diff options
author | Ryan Long <ryan.long@oarcorp.com> | 2022-08-08 09:23:48 -0500 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2022-08-08 12:02:03 -0500 |
commit | 5500232a8989ecad90a44a1051896ad9b53d6732 (patch) | |
tree | c62165f069aceb06590954ac14a2d347966bf562 /cpukit/libdl/rtl-unwind-arm.h | |
parent | posix: Avoid dead code in clock_nanosleep() (diff) | |
download | rtems-5500232a8989ecad90a44a1051896ad9b53d6732.tar.bz2 |
libdl: Refactor shared code in ARM and AArch64
rtl-mdreloc-arm.c was used as the basis for rtl-mdreloc-aarch64.c. This lead
to some code being shared by the two files. The code was consolidated into
rtl-unwind-arm.c.
Closes #4686
Diffstat (limited to 'cpukit/libdl/rtl-unwind-arm.h')
-rw-r--r-- | cpukit/libdl/rtl-unwind-arm.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/cpukit/libdl/rtl-unwind-arm.h b/cpukit/libdl/rtl-unwind-arm.h new file mode 100644 index 0000000000..08a2660560 --- /dev/null +++ b/cpukit/libdl/rtl-unwind-arm.h @@ -0,0 +1,46 @@ +#include <unwind.h> + +#include <rtems/rtl/rtl.h> +#include "rtl-unwind.h" + +typedef unsigned _Unwind_Word __attribute__((__mode__(__word__))); +typedef _Unwind_Word _uw; + +bool +rtems_rtl_elf_unwind_parse (const rtems_rtl_obj* obj, + const char* name, + uint32_t flags); + +bool +rtems_rtl_elf_unwind_register (rtems_rtl_obj* obj); + +bool +rtems_rtl_elf_unwind_deregister (rtems_rtl_obj* obj); + +/* An exception index table entry. */ +typedef struct __EIT_entry +{ + _uw fnoffset; + _uw content; +} __EIT_entry; + +/* The exception index table location in the base module */ +extern __EIT_entry __exidx_start; +extern __EIT_entry __exidx_end; + +/* + * A weak reference is in libgcc, provide a real version and provide a way to + * manage loaded modules. + * + * Passed in the return address and a reference to the number of records + * found. We set the start of the exidx data and the number of records. + */ +_Unwind_Ptr +__gnu_Unwind_Find_exidx (_Unwind_Ptr return_address, + int* nrec) __attribute__ ((__noinline__, + __used__, + __noclone__)); + +_Unwind_Ptr +__gnu_Unwind_Find_exidx (_Unwind_Ptr return_address, + int* nrec); |