File indexing completed on 2025-05-11 08:24:14
0001
0002
0003
0004
0005
0006
0007 #ifndef _LINK_ELF_H_
0008 #define _LINK_ELF_H_
0009
0010 #include <sys/types.h>
0011
0012 #include <machine/elf_machdep.h>
0013 #include <stdint.h>
0014 #include <rtems/rtl/rtl-obj-fwd.h>
0015
0016 #ifdef __cplusplus
0017 extern "C" {
0018 #endif
0019
0020 enum sections
0021 {
0022 rap_text = 0,
0023 rap_const = 1,
0024 rap_ctor = 2,
0025 rap_dtor = 3,
0026 rap_data = 4,
0027 rap_bss = 5,
0028 rap_secs = 6
0029 };
0030
0031
0032
0033
0034 typedef struct
0035 {
0036 const char* name;
0037 uint32_t offset;
0038 uint32_t size;
0039 uint32_t rap_id;
0040 }section_detail;
0041
0042
0043
0044
0045 struct link_map {
0046 const char* name;
0047 uint32_t sec_num;
0048 section_detail* sec_detail;
0049 uint32_t* sec_addr[rap_secs];
0050 uint32_t rpathlen;
0051 char* rpath;
0052 struct link_map* l_next;
0053 struct link_map* l_prev;
0054 };
0055
0056
0057
0058
0059 struct r_debug {
0060 int r_version;
0061 struct link_map *r_map;
0062 enum {
0063 RT_CONSISTENT,
0064 RT_ADD,
0065 RT_DELETE
0066 } r_state;
0067 };
0068
0069
0070
0071
0072 void _rtld_debug_state (void);
0073
0074
0075
0076
0077 int _rtld_linkmap_add (rtems_rtl_obj* obj);
0078
0079
0080
0081
0082 void _rtld_linkmap_delete (rtems_rtl_obj* obj);
0083
0084 #ifdef __cplusplus
0085 }
0086 #endif
0087 #endif