diff options
author | Joan Bruguera <joanbrugueram@gmail.com> | 2023-02-18 21:52:15 +0000 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-02-20 09:32:46 -0300 |
commit | 1b0ea8c5d886fedabd611a569b5ec58a6f5153e6 (patch) | |
tree | 072ac0e8f642178cf170aac1e7033e1b64d765ea /elf/readlib.c | |
parent | fd78cfa72ea2bab30fdb4e1e0672b34471426c05 (diff) | |
download | glibc-1b0ea8c5d886fedabd611a569b5ec58a6f5153e6.zip glibc-1b0ea8c5d886fedabd611a569b5ec58a6f5153e6.tar.gz glibc-1b0ea8c5d886fedabd611a569b5ec58a6f5153e6.tar.bz2 |
elf: Restore ldconfig libc6 implicit soname logic [BZ #30125]
While cleaning up old libc version support, the deprecated libc4 code was
accidentally kept in `implicit_soname`, instead of the libc6 code.
This causes additional symlinks to be created by `ldconfig` for libraries
without a soname, e.g. a library `libsomething.123.456.789` without a soname
will create a `libsomething.123` -> `libsomething.123.456.789` symlink.
As the libc6 version of the `implicit_soname` code is a trivial `xstrdup`,
just inline it and remove `implicit_soname` altogether.
Some further simplification looks possible (e.g. the call to `create_links`
looks like a no-op if `soname == NULL`, other than the verbose printfs), but
logic is kept as-is for now.
Fixes: BZ #30125
Fixes: 8ee878592c4a ("Assume only FLAG_ELF_LIBC6 suport")
Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf/readlib.c')
-rw-r--r-- | elf/readlib.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/elf/readlib.c b/elf/readlib.c index c5c3591..bc13d9a 100644 --- a/elf/readlib.c +++ b/elf/readlib.c @@ -166,24 +166,5 @@ process_file (const char *real_file_name, const char *file_name, return ret; } -/* Returns made up soname if lib doesn't have explicit DT_SONAME. */ - -char * -implicit_soname (const char *lib, int flag) -{ - char *soname = xstrdup (lib); - - /* Aout files don't have a soname, just return the name - including the major number. */ - char *major = strstr (soname, ".so."); - if (major) - { - char *dot = strstr (major + 4, "."); - if (dot) - *dot = '\0'; - } - return soname; -} - /* Get architecture specific version of process_elf_file. */ #include <readelflib.c> |