Changeset 634e020 in mainline
- Timestamp:
- 2016-04-28T18:25:29Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5035ba05
- Parents:
- 9182e86f
- Location:
- uspace/lib/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/rtld/module.c
r9182e86f r634e020 62 62 module_process_pre_arch(m); 63 63 64 if (m->dyn.plt_rel == DT_REL) { 65 DPRINTF("table type DT_REL\n"); 66 if (m->dyn.rel != NULL) { 67 DPRINTF("non-empty\n"); 68 rel_table_process(m, m->dyn.rel, m->dyn.rel_sz); 69 } 70 /* FIXME: this seems wrong */ 71 if (m->dyn.jmp_rel != NULL) { 72 DPRINTF("table type jmp-rel\n"); 73 DPRINTF("non-empty\n"); 64 /* jmp_rel table */ 65 if (m->dyn.jmp_rel != NULL) { 66 DPRINTF("jmp_rel table\n"); 67 if (m->dyn.plt_rel == DT_REL) { 68 DPRINTF("jmp_rel table type DT_REL\n"); 74 69 rel_table_process(m, m->dyn.jmp_rel, m->dyn.plt_rel_sz); 75 } 76 } else { /* (m->dyn.plt_rel == DT_RELA) */ 77 DPRINTF("table type DT_RELA\n"); 78 if (m->dyn.rela != NULL) { 79 DPRINTF("non-empty\n"); 80 rela_table_process(m, m->dyn.rela, m->dyn.rela_sz); 81 } 70 } else { 71 assert(m->dyn.plt_rel == DT_RELA); 72 DPRINTF("jmp_rel table type DT_RELA\n"); 73 rela_table_process(m, m->dyn.jmp_rel, m->dyn.plt_rel_sz); 74 } 75 } 76 77 /* rel table */ 78 if (m->dyn.rel != NULL) { 79 DPRINTF("rel table\n"); 80 rel_table_process(m, m->dyn.rel, m->dyn.rel_sz); 81 } 82 83 /* rela table */ 84 if (m->dyn.rela != NULL) { 85 DPRINTF("rela table\n"); 86 rela_table_process(m, m->dyn.rela, m->dyn.rela_sz); 82 87 } 83 88 -
uspace/lib/c/include/rtld/dynamic.h
r9182e86f r634e020 48 48 */ 49 49 typedef struct dyn_info { 50 /** Type of relocations used for the PLT, either DT_REL or DT_RELA */51 int plt_rel;52 53 50 /** Relocation table without explicit addends */ 54 51 void *rel; … … 64 61 void *jmp_rel; 65 62 size_t plt_rel_sz; 63 /** Type of relocations used for the PLT, either DT_REL or DT_RELA */ 64 int plt_rel; 66 65 67 66 /** Pointer to PLT/GOT (processor-specific) */
Note:
See TracChangeset
for help on using the changeset viewer.