aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2010-09-19 10:07:30 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2010-09-19 10:07:30 +0000
commitf7ff11061f3278dce60be909b9f63d94cbd38afd (patch)
tree6e433e2de1c1c7e2bfbca4c0095a169c95fb8662
parent0fc1eb3c4d0fb716bad2b525dd5f35168c4f4df9 (diff)
downloadgdb-f7ff11061f3278dce60be909b9f63d94cbd38afd.zip
gdb-f7ff11061f3278dce60be909b9f63d94cbd38afd.tar.gz
gdb-f7ff11061f3278dce60be909b9f63d94cbd38afd.tar.bz2
bfd/
* elfxx-mips.c (allocate_dynrelocs): Don't add relocation symbols to the global GOT on VxWorks.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfxx-mips.c11
2 files changed, 13 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b5675cb..d6ffa69 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2010-09-19 Richard Sandiford <rdsandiford@googlemail.com>
+ * elfxx-mips.c (allocate_dynrelocs): Don't add relocation symbols
+ to the global GOT on VxWorks.
+
+2010-09-19 Richard Sandiford <rdsandiford@googlemail.com>
+
* elfxx-mips.c (_bfd_mips_elf_check_relocs): On VxWorks,
exclude __GOTT_BASE__ and __GOTT_INDEX__ from the warning
about HI/LO relocations in shared objects.
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index a0694e3..6b30f11 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -8172,9 +8172,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
if (do_copy)
{
/* Even though we don't directly need a GOT entry for this symbol,
- a symbol must have a dynamic symbol table index greater that
- DT_MIPS_GOTSYM if there are dynamic relocations against it. */
- if (hmips->global_got_area > GGA_RELOC_ONLY)
+ the SVR4 psABI requires it to have a dynamic symbol table
+ index greater that DT_MIPS_GOTSYM if there are dynamic
+ relocations against it.
+
+ VxWorks does not enforce the same mapping between the GOT
+ and the symbol table, so the same requirement does not
+ apply there. */
+ if (!htab->is_vxworks && hmips->global_got_area > GGA_RELOC_ONLY)
hmips->global_got_area = GGA_RELOC_ONLY;
mips_elf_allocate_dynamic_relocations