This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Fix gold problem with weak undefined 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: Fri, 04 Apr 2008 08:26:03 -0700
- Subject: Re: PATCH: Fix gold problem with weak undefined symbols
- References: <c17be2b30804011643v50eb7699j7c2902df8568a2a5@mail.gmail.com>
"Cary Coutant" <ccoutant@google.com> writes:
> This patch fixes a problem in gold where it incorrectly generates a
> dynamic relocation for a reference to a weak undefined symbol, or for
> a reference to an absolute symbol.
Based on this discussion, I think we should go ahead and commit this
to gold. It makes gold act like GNU ld. Clearly more thought is
required before changing the linker behaviour in this area.
> 2008-03-31 Cary Coutant <ccoutant@google.com>
>
> * symtab.h (Symbol::is_weak_undefined): New function.
> (Symbol::is_strong_undefined): New function.
> (Symbol::is_absolute): New function.
> (Symbol::needs_plt_entry): Exclude weak undefined symbols.
> (Symbol::needs_dynamic_reloc): Exclude weak undefined and
> absolute symbols.
> * testsuite/Makefile.am (check_PROGRAMS): Add weak_undef_test.
> (weak_undef_test): New target.
> * testsuite/Makefile.in: Rebuild.
> * testsuite/weak_undef_file1.cc: New file.
> * testsuite/weak_undef_file2.cc: New file.
> * testsuite/weak_undef_test.cc: New file.
> +// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
Change the copyright date to just 2008 for the new files.
This patch is OK with that change.
Thanks.
Ian