This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold patch] Fix problem with --export-dynamic-symbol and versioned symbols
- From: Ian Lance Taylor <iant at google dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Tue, 22 May 2012 15:42:31 -0700
- Subject: Re: [gold patch] Fix problem with --export-dynamic-symbol and versioned symbols
- References: <CAHACq4rqC7bGe5bLvOD2r6R=5PG-C+K32cpv9cng2YbEykvVjw@mail.gmail.com>
Cary Coutant <ccoutant@google.com> writes:
> The --dynamic-list and --export-dynamic-symbol options can trigger an
> internal error in Symbol_table::sized_finalize_symbol() if a named
> symbol is referenced with a version from a dynamic object. In that
> case, we try to force a dynamic symbol table entry for the versioned
> symbol in the dynamic object. This patch fixes the problem by forcing
> the dynamic symbol table entry only after checking that the symbol is
> defined in a non-shared object.
>
> Tested on x86_64. OK to commit?
>
> -cary
>
>
> 2012-05-22 Cary Coutant <ccoutant@google.com>
>
> * symtab.cc (Symbol::should_add_dynsym_entry): Check for relocatable
> object before exporting symbol.
Seems like this would do the wrong thing for
ld --defsym=foo=0 --export-dynamic-symbol=foo
Ian