[PATCH] gold: --export-dynamic-symbol: don't imply -u
Cary Coutant
ccoutant@gmail.com
Fri Sep 3 01:17:05 GMT 2021
> > I did try to be compatible with Gold for my initial patch but I
> > quickly realized not implying -u makes more sense.
> > https://sourceware.org/pipermail/binutils/2020-May/110953.html
> >
> > This option does not appear to have open source uses (according to
> > Debian Code Search) since GNU ld did not implement it until a few days
> > ago.
> > The updated semantics did cause some trouble to me - I had to fix a
> > few --export-dynamic-symbol= uses for my company. Everything is good
> > now.
> >
> > My conjecture about the design of implied -u: we do ugly things like
> > --export-dynamic-symbol=_Unwind_Resume (and a few other symbols), so
> > that the executable exposes unwind symbols
> > which can prevent glibc's ugly dlopen("libgcc.so.1") . If
> > --export-dynamic-symbol= implies -u, things are easier:
> >
> > we can write: -Wl,--export-dynamic-symbol=_Unwind_Backtrace
> > -Wl,--export-dynamic-symbol=_Unwind_Resume
> > instead of: -Wl,--export-dynamic-symbol=_Unwind_Backtrace
> > -Wl,--export-dynamic-symbol=_Unwind_Resume -Wl,-u,_Unwind_Backtrace
> > -Wl,-u,_Unwind_Resume
OK, I'll concede here. Sorry for the long delay.
> > > > gold/
> > > >
> > > > * archive.cc (Library_base::should_include_member): Don't handle
> > > > --export-dynamic-symbol.
> > > > * symtab.cc (Symbol_table::do_add_undefined_symbols_from_command_line):
> > > > Likewise.
This is OK. Thanks!
-cary
More information about the Binutils
mailing list