diff options
Diffstat (limited to 'elf/rtld.c')
-rw-r--r-- | elf/rtld.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -428,7 +428,6 @@ static ElfW(Addr) _dl_start_final (void *arg, /* These are defined magically by the linker. */ extern const ElfW(Ehdr) __ehdr_start attribute_hidden; -extern char _etext[] attribute_hidden; extern char _end[] attribute_hidden; @@ -477,8 +476,10 @@ _dl_start_final (void *arg, struct dl_start_final_info *info) #endif _dl_setup_hash (&_dl_rtld_map); _dl_rtld_map.l_real = &_dl_rtld_map; - _dl_rtld_map.l_map_start = (ElfW(Addr)) &__ehdr_start; - _dl_rtld_map.l_map_end = (ElfW(Addr)) _end; + _dl_rtld_map.l_map_start + = (ElfW(Addr)) DL_ADDRESS_WITHOUT_RELOC (&__ehdr_start); + _dl_rtld_map.l_map_end + = (ElfW(Addr)) DL_ADDRESS_WITHOUT_RELOC (_end); /* Copy the TLS related data if necessary. */ #ifndef DONT_USE_BOOTSTRAP_MAP # if NO_TLS_OFFSET != 0 |