aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2009-06-16 02:07:22 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2009-06-16 02:07:22 +0000
commit886815b26678f1a166311140f5ab72cbf715beb4 (patch)
treebabf770c5145407ee920465e5859e297de225f6e /bfd
parent6c4fb25ace9b05927a11917862e02dbb80bd773f (diff)
downloadgdb-886815b26678f1a166311140f5ab72cbf715beb4.zip
gdb-886815b26678f1a166311140f5ab72cbf715beb4.tar.gz
gdb-886815b26678f1a166311140f5ab72cbf715beb4.tar.bz2
bfd/
* elf32-vax.c (elf_vax_instantiate_got_entries): Skip local symbols in GOT space calculation. (elf_vax_relocate_section): Adjust accordingly.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-vax.c20
2 files changed, 21 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 59be932..15ee34e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
+ * elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
+ symbols in GOT space calculation.
+ (elf_vax_relocate_section): Adjust accordingly.
+
+2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
+
* elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
include <R11:R2>.
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index 59f3501..516734d 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -1332,6 +1332,8 @@ elf_vax_instantiate_got_entries (struct elf_link_hash_entry *h, PTR infoptr)
}
else if (h->got.refcount > 0)
{
+ bfd_boolean dyn;
+
/* Make sure this symbol is output as a dynamic symbol. */
if (h->dynindx == -1)
{
@@ -1339,9 +1341,15 @@ elf_vax_instantiate_got_entries (struct elf_link_hash_entry *h, PTR infoptr)
return FALSE;
}
+ dyn = elf_hash_table (info)->dynamic_sections_created;
/* Allocate space in the .got and .rela.got sections. */
- sgot->size += 4;
- srelgot->size += sizeof (Elf32_External_Rela);
+ if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ && (info->shared
+ || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
+ {
+ sgot->size += 4;
+ srelgot->size += sizeof (Elf32_External_Rela);
+ }
}
return TRUE;
@@ -1485,6 +1493,7 @@ elf_vax_relocate_section (bfd *output_bfd,
the global offset table. */
{
+ bfd_boolean dyn;
bfd_vma off;
if (sgot == NULL)
@@ -1498,9 +1507,10 @@ elf_vax_relocate_section (bfd *output_bfd,
BFD_ASSERT (off != (bfd_vma) -1);
BFD_ASSERT (off < sgot->size);
- if (info->shared
- && h->dynindx == -1
- && h->def_regular)
+ dyn = elf_hash_table (info)->dynamic_sections_created;
+ if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
+ || (info->shared
+ && SYMBOL_REFERENCES_LOCAL (info, h)))
{
/* The symbol was forced to be local
because of a version file.. We must initialize