This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[7/20] MIPS GOT: Remove unused gotidx allocation
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: binutils at sourceware dot org
- Date: Mon, 11 Feb 2013 17:41:02 +0000
- Subject: [7/20] MIPS GOT: Remove unused gotidx allocation
- References: <87fw1222fy.fsf@talisman.default>
mips_elf_record_local_got_symbol assigns a gotidx to non-TLS symbols,
but the index has no meaning and isn't used. (Real local GOT entries
are allocated by address rather than symbol index and have separate
mips_got_entries.) We can start with gotidx set to -1 for all GOT entries.
Richard
bfd/
* elfxx-mips.c (mips_elf_record_local_got_symbol): Always set
gotidx to -1.
Index: bfd/elfxx-mips.c
===================================================================
--- bfd/elfxx-mips.c 2013-02-11 14:06:32.881161889 +0000
+++ bfd/elfxx-mips.c 2013-02-11 14:06:33.391165833 +0000
@@ -3777,9 +3777,9 @@ mips_elf_record_local_got_symbol (bfd *a
return TRUE;
}
+ entry.gotidx = -1;
if (tls_flag != 0)
{
- entry.gotidx = -1;
entry.tls_type = tls_flag;
if (tls_flag == GOT_TLS_IE)
g->tls_gotno += 1;
@@ -3793,7 +3793,7 @@ mips_elf_record_local_got_symbol (bfd *a
}
else
{
- entry.gotidx = g->local_gotno++;
+ g->local_gotno += 1;
entry.tls_type = 0;
}