From 4d9c41b1dc1ae4fea89b9bbf867943101d8d929e Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 7 Jan 2013 14:23:13 +0200 Subject: [PATCH] Fake ELF sonames by default (again) - (Private) libraries which might intentionally not have DT_SONAME are still recorded as requires from DT_NEEDED, and there's no way of knowing what's an internal library when generating requires. Not faking the soname in these cases will only result in broken requires in cases that always used to "just work". - Change the switch to --no-fake-soname disabler instead to allow tweaking in special cases but by default we gotta match linker (and ELF specification) behavior, no matter how much we'd like to use this for our own heuristics :-/ (cherry picked from commit b6f159a34c946b75cb95a7862968ff4e8eb74fe6) --- tools/elfdeps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/elfdeps.c b/tools/elfdeps.c index ab8ca90..fc9a905 100644 --- a/tools/elfdeps.c +++ b/tools/elfdeps.c @@ -14,7 +14,7 @@ int filter_private = 0; int soname_only = 0; -int fake_soname = 0; +int fake_soname = 1; typedef struct elfInfo_s { Elf *elf; @@ -292,7 +292,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 }, + { "no-fake-soname", 0, POPT_ARG_VAL, &fake_soname, 0, NULL, NULL }, POPT_AUTOHELP POPT_TABLEEND }; -- 2.7.4