This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
MIPS: Tweak support for linking without a GOT
- From: Daniel Jacobowitz <drow at false dot org>
- To: binutils at sourceware dot org
- Date: Tue, 29 Nov 2005 10:59:51 -0500
- Subject: MIPS: Tweak support for linking without a GOT
This is a pretty minor change for mainline, but a bit more significant for
the older branch where I encountered it (where it leads to a segfault rather
than potentially wrong output). _bfd_mips_elf_hide_symbol is called before
we know whether we will need a GOT or not. Therefore, it must pass
maybe_excluded == TRUE to mips_elf_got_section, or it might not see a GOT
section if we haven't seen any definitely GOT relocations yet.
Is this OK?
--
Daniel Jacobowitz
CodeSourcery, LLC
2005-11-29 Daniel Jacobowitz <dan@codesourcery.com>
* elfxx-mips.c (_bfd_mips_elf_hide_symbol): Adjust handling
for missing GOTs.
Index: elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.155
diff -u -p -r1.155 elfxx-mips.c
--- elfxx-mips.c 23 Nov 2005 14:04:17 -0000 1.155
+++ elfxx-mips.c 29 Nov 2005 15:56:43 -0000
@@ -8431,7 +8431,7 @@ _bfd_mips_elf_hide_symbol (struct bfd_li
dynobj = elf_hash_table (info)->dynobj;
if (dynobj != NULL && force_local && h->root.type != STT_TLS
- && (got = mips_elf_got_section (dynobj, FALSE)) != NULL
+ && (got = mips_elf_got_section (dynobj, TRUE)) != NULL
&& (g = mips_elf_section_data (got)->u.got_info) != NULL)
{
if (g->next)