diff options
| author | Florian Weimer <fweimer@redhat.com> | 2024-09-24 13:23:10 +0200 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2024-09-24 13:23:10 +0200 |
| commit | 8f6a53eab8fa9562e1ad4b7a4922ae44cf13d663 (patch) | |
| tree | 6f0ad6a6331267c8035b9f8a3b9b709cb5a22044 | |
| parent | 7e21a65c58cc91b3bac5f45838ee4278acf1cc45 (diff) | |
| download | glibc-8f6a53eab8fa9562e1ad4b7a4922ae44cf13d663.zip glibc-8f6a53eab8fa9562e1ad4b7a4922ae44cf13d663.tar.gz glibc-8f6a53eab8fa9562e1ad4b7a4922ae44cf13d663.tar.bz2 | |
elf: In rtld_setup_main_map, assume ld.so has a DYNAMIC segment
The way we build ld.so, it always has a dynamic segment, so checking for
its absence is unnecessary.
| -rw-r--r-- | elf/rtld.c | 24 |
1 files changed, 0 insertions, 24 deletions
@@ -386,7 +386,6 @@ static void dl_main (const ElfW(Phdr) *phdr, ElfW(Word) phnum, /* These two variables cannot be moved into .data.rel.ro. */ static struct libname_list _dl_rtld_libname; -static struct libname_list _dl_rtld_libname2; /* Variable for statistics. */ RLTD_TIMING_DECLARE (relocate_time, static); @@ -1167,29 +1166,6 @@ rtld_setup_main_map (struct link_map *main_map) /* _dl_rtld_libname.next = NULL; Already zero. */ GL(dl_rtld_map).l_libname = &_dl_rtld_libname; - /* Ordinarily, we would get additional names for the loader from - our DT_SONAME. This can't happen if we were actually linked as - a static executable (detect this case when we have no DYNAMIC). - If so, assume the filename component of the interpreter path to - be our SONAME, and add it to our name list. */ - if (GL(dl_rtld_map).l_ld == NULL) - { - const char *p = NULL; - const char *cp = _dl_rtld_libname.name; - - /* Find the filename part of the path. */ - while (*cp != '\0') - if (*cp++ == '/') - p = cp; - - if (p != NULL) - { - _dl_rtld_libname2.name = p; - /* _dl_rtld_libname2.next = NULL; Already zero. */ - _dl_rtld_libname.next = &_dl_rtld_libname2; - } - } - has_interp = true; break; case PT_LOAD: |
