diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2013-01-03 14:16:20 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2013-01-03 14:16:20 +0200 |
commit | 6c0bdc393dda3de8bacd3a1844d980802e45d195 (patch) | |
tree | a22cd1c92d7312038c4d4e5533b723450061aac0 /tools | |
parent | f84a71cdc786a012fc9cbe16c5236c622ea970a4 (diff) | |
download | rpm-6c0bdc393dda3de8bacd3a1844d980802e45d195.tar.gz |
Only fake ELF soname's if requested
- This helps cutting down the number of bogus provides from dlopen()'ed
plugins and internal libraries which preferrably shouldn't have a
soname at all. Unfortunately libtool always puts in a soname even if
-module -avoid-version is used :-/
- OTOH there are broken libraries which dont have a soname even though
they should, so (we need to) allow falling back to the former behavior
of faking up a soname from the basename.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/elfdeps.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/elfdeps.c b/tools/elfdeps.c index 65ef4f511..2a8fea3ff 100644 --- a/tools/elfdeps.c +++ b/tools/elfdeps.c @@ -14,6 +14,7 @@ int filter_private = 0; int soname_only = 0; +int fake_soname = 0; typedef struct elfInfo_s { Elf *elf; @@ -254,7 +255,7 @@ static int processFile(const char *fn, int dtype) } /* For DSO's, provide the basename of the file if DT_SONAME not found. */ - if (ei->isDSO && !ei->gotDEBUG && !ei->gotSONAME) { + if (ei->isDSO && !ei->gotDEBUG && !ei->gotSONAME && fake_soname) { const char *bn = strrchr(fn, '/'); addDep(&ei->provides, bn ? bn + 1 : fn, NULL, ei->marker); } @@ -288,6 +289,7 @@ int main(int argc, char *argv[]) { "requires", 'R', POPT_ARG_VAL, &requires, -1, NULL, NULL }, { "filter-private", 0, POPT_ARG_VAL, &filter_private, -1, NULL, NULL }, { "soname-only", 0, POPT_ARG_VAL, &soname_only, -1, NULL, NULL }, + { "fake-soname", 0, POPT_ARG_VAL, &fake_soname, -1, NULL, NULL }, POPT_AUTOHELP POPT_TABLEEND }; |