diff options
author | Chris Johns <chrisj@rtems.org> | 2017-03-30 11:06:24 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2017-03-31 09:00:14 +1100 |
commit | bba48d90bcd343f62b368a510b67bbdb51fb6f0c (patch) | |
tree | 0f7b4fb43aa7a432228d420f7987d7dcf4c6d90c /cpukit/libdl/rtl-obj.h | |
parent | benchmarks/whetstone: Port to RTEMS (diff) | |
download | rtems-bba48d90bcd343f62b368a510b67bbdb51fb6f0c.tar.bz2 |
libdl: Support link ordered loading of ELF sections.
The ARM C++ exception ABI uses an address ordered index table to
locate the correct frame data and this requires the EXIDX sections are
loaded in the order the order the matching text is loaded.
The EXIDX sections set the SHF_LINK_ORDER flag and link field. This patch
adds support to load those flagged sections in the linked-to section
order.
Updates #2955.
Closes #2959
Diffstat (limited to 'cpukit/libdl/rtl-obj.h')
-rw-r--r-- | cpukit/libdl/rtl-obj.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/cpukit/libdl/rtl-obj.h b/cpukit/libdl/rtl-obj.h index 9ec184be1a..6a35a72822 100644 --- a/cpukit/libdl/rtl-obj.h +++ b/cpukit/libdl/rtl-obj.h @@ -102,8 +102,19 @@ typedef struct rtems_rtl_loader_table_s #define RTEMS_RTL_OBJ_SECT_WRITE (1 << 11) /**< Section is writable, ie data. */ #define RTEMS_RTL_OBJ_SECT_EXEC (1 << 12) /**< Section is executable. */ #define RTEMS_RTL_OBJ_SECT_ZERO (1 << 13) /**< Section is preset to zero. */ -#define RTEMS_RTL_OBJ_SECT_CTOR (1 << 14) /**< Section contains constructors. */ -#define RTEMS_RTL_OBJ_SECT_DTOR (1 << 15) /**< Section contains destructors. */ +#define RTEMS_RTL_OBJ_SECT_LINK (1 << 14) /**< Section is link-ordered. */ +#define RTEMS_RTL_OBJ_SECT_CTOR (1 << 15) /**< Section contains constructors. */ +#define RTEMS_RTL_OBJ_SECT_DTOR (1 << 16) /**< Section contains destructors. */ +#define RTEMS_RTL_OBJ_SECT_LOCD (1 << 17) /**< Section has been located. */ + +/** + * Section types mask. + */ +#define RTEMS_RTL_OBJ_SECT_TYPES (RTEMS_RTL_OBJ_SECT_TEXT | \ + RTEMS_RTL_OBJ_SECT_CONST | \ + RTEMS_RTL_OBJ_SECT_DATA | \ + RTEMS_RTL_OBJ_SECT_BSS | \ + RTEMS_RTL_OBJ_SECT_EH) /** * An object file is made up of sections and the can be more than @@ -124,6 +135,7 @@ struct rtems_rtl_obj_sect_s uint32_t flags; /**< The section's flags. */ void* base; /**< The base address of the section in * memory. */ + int load_order; /**< Order we load sections. */ }; /** |