https://sourceware.org/bugzilla/show_bug.cgi?id=24836
--- Comment #11 from crusader.mike at gmail dot com ---
> ... it would be possible ... a lot of work for little gain
Well, in my case (which I believe isn't very rare) majority of functionality is
locked in a few large static libs (of dubious q
https://sourceware.org/bugzilla/show_bug.cgi?id=24836
--- Comment #10 from Alan Modra ---
Regarding the interaction between --gc-sections and --as-needed, yes it would
be possible to run a pass over as-needed dynamic objects after garbage
collection to check whether their symbols are still needed
https://sourceware.org/bugzilla/show_bug.cgi?id=24836
--- Comment #9 from crusader.mike at gmail dot com ---
... about #6, running my binary with LD_DEBUG:
LD_DEBUG=bindings LD_BIND_NOW=1 ./procmon.e
produces curious output:
...
27438: binding file /usr/local/lib64/libxalan-c.so.111 [0
https://sourceware.org/bugzilla/show_bug.cgi?id=24836
--- Comment #8 from crusader.mike at gmail dot com ---
Alan, you are correct -- looks like garbage collection can remove symbol
references to the point that final binary no longer needs given DT_NEEDED
shared lib anymore. That is precisely what
https://sourceware.org/bugzilla/show_bug.cgi?id=24836
--- Comment #7 from Alan Modra ---
> Maybe garbage collection (-Wl,--gc-sections) happens after
> effect of "-Wl,--as-needed"?
It does, and that might be why you have shared libraries seen as needed before
garbage collection runs. If you lin
https://sourceware.org/bugzilla/show_bug.cgi?id=24836
--- Comment #6 from crusader.mike at gmail dot com ---
Symbol table '.dynsym' contains 361 entries:
Num:Value Size TypeBind Vis Ndx Name
...
237: 00415bb033 FUNCWEAK DEFAULT 13
xalanc_1_11::Xala
https://sourceware.org/bugzilla/show_bug.cgi?id=24836
Florian Weimer changed:
What|Removed |Added
CC||fweimer at redhat dot com
--- Commen
https://sourceware.org/bugzilla/show_bug.cgi?id=24836
--- Comment #4 from crusader.mike at gmail dot com ---
Is this the reason for this behaviour?
$ readelf -s procmon.e | grep xalan
237: 00415bb033 FUNCWEAK DEFAULT 13
_ZN11xalanc_1_XalanVe
289: 00415bb0
https://sourceware.org/bugzilla/show_bug.cgi?id=24836
--- Comment #3 from crusader.mike at gmail dot com ---
Maybe garbage collection (-Wl,--gc-sections) happens after effect of
"-Wl,--as-needed"?
--
You are receiving this mail because:
You are on the CC list for the bug.
___
https://sourceware.org/bugzilla/show_bug.cgi?id=24836
--- Comment #2 from crusader.mike at gmail dot com ---
Here is the output with "-Wl,-v":
collect2 version 8.2.1 20180905 (Red Hat 8.2.1-3)
/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld -plugin
/opt/rh/devtoolset-8/root/usr
https://sourceware.org/bugzilla/show_bug.cgi?id=24836
Alan Modra changed:
What|Removed |Added
CC||amodra at gmail dot com
--- Comment #1 f
11 matches
Mail list logo