diff options
| author | Timo Teräs <timo.teras@iki.fi> | 2013-07-11 05:38:46 +0000 |
|---|---|---|
| committer | Timo Teräs <timo.teras@iki.fi> | 2013-07-11 05:44:44 +0000 |
| commit | f00ea22784d28a92b14dd5b570eda217c7d9a462 (patch) | |
| tree | c1b263dea6b951efe35c46424083a41b4e9420cc /main/musl/0008-add-some-ARM-EABI-specific-exception-handling-infras.patch | |
| parent | dc3ff4b277d5a9ae36771ac635f8d43eb0cbfb59 (diff) | |
| download | aports-f00ea22784d28a92b14dd5b570eda217c7d9a462.tar.bz2 aports-f00ea22784d28a92b14dd5b570eda217c7d9a462.tar.xz | |
main/musl: various fixes from git master, and packaging fixes
- use upstream commits for all arm pie/unwind fixes
- replace getopt with BSD licensed GNU compatible getopt
- set proper SONAME for the libc generated for packaging purposes
- rename libc.so to be ld-musl-$ARCH.so.1 and point the SONAME
and ldd links to it. this allows libc.so to go to -dev package
as it will be used for compiling only.
- move specs file to musl-crosstool subpackage
Diffstat (limited to 'main/musl/0008-add-some-ARM-EABI-specific-exception-handling-infras.patch')
| -rw-r--r-- | main/musl/0008-add-some-ARM-EABI-specific-exception-handling-infras.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/main/musl/0008-add-some-ARM-EABI-specific-exception-handling-infras.patch b/main/musl/0008-add-some-ARM-EABI-specific-exception-handling-infras.patch new file mode 100644 index 0000000000..56b09d7cf2 --- /dev/null +++ b/main/musl/0008-add-some-ARM-EABI-specific-exception-handling-infras.patch @@ -0,0 +1,66 @@ +From f39afb9ffb34b747bfc1ec9d77b239c0c32a754d Mon Sep 17 00:00:00 2001 +From: Rich Felker <dalias@aerifal.cx> +Date: Wed, 10 Jul 2013 16:11:01 -0400 +Subject: [PATCH 8/9] add some ARM EABI-specific exception handling + infrastructure +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +patch by Timo Teräs +--- + arch/arm/src/find_exidx.c | 42 ++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 42 insertions(+) + create mode 100644 arch/arm/src/find_exidx.c + +diff --git a/arch/arm/src/find_exidx.c b/arch/arm/src/find_exidx.c +new file mode 100644 +index 0000000..77c4472 +--- /dev/null ++++ b/arch/arm/src/find_exidx.c +@@ -0,0 +1,42 @@ ++#define _GNU_SOURCE ++#include <link.h> ++#include <stdint.h> ++ ++struct find_exidx_data { ++ uintptr_t pc, exidx_start; ++ int exidx_len; ++}; ++ ++static int find_exidx(struct dl_phdr_info *info, size_t size, void *ptr) ++{ ++ struct find_exidx_data *data = ptr; ++ const ElfW(Phdr) *phdr = info->dlpi_phdr; ++ uintptr_t addr, exidx_start = 0; ++ int i, match = 0, exidx_len = 0; ++ ++ for (i = info->dlpi_phnum; i > 0; i--, phdr++) { ++ addr = info->dlpi_addr + phdr->p_vaddr; ++ switch (phdr->p_type) { ++ case PT_LOAD: ++ match |= data->pc >= addr && data->pc < addr + phdr->p_memsz; ++ break; ++ case PT_ARM_EXIDX: ++ exidx_start = addr; ++ exidx_len = phdr->p_memsz; ++ break; ++ } ++ } ++ data->exidx_start = exidx_start; ++ data->exidx_len = exidx_len; ++ return match; ++} ++ ++uintptr_t __gnu_Unwind_Find_exidx(uintptr_t pc, int *pcount) ++{ ++ struct find_exidx_data data; ++ data.pc = pc; ++ if (dl_iterate_phdr(find_exidx, &data) <= 0) ++ return 0; ++ *pcount = data.exidx_len / 8; ++ return data.exidx_start; ++} +-- +1.8.3.2 + |
