[PATCH] gold: --export-dynamic-symbol: don't imply -u

Cary Coutant ccoutant@gmail.com
Sun Jun 14 00:22:52 GMT 2020


> to match GNU ld.
>
> 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.

You say we're doing this to match Gnu ld, but Gnu ld didn't implement
this option until several years after it was added to Gold. Shouldn't
the burden of compatibility be in the other direction? I'm not
comfortable changing the behavior of --export-dynamic-symbol like
this, and my memory isn't good enough to remember what the rationale
was for making it work like -u -- whether it was just "it seems like
it makes sense" or "there's a specific need for it to work that way".

-cary


More information about the Binutils mailing list