summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2005-08-02 23:09:16 +0000
committerAlan Modra <amodra@bigpond.net.au>2005-08-02 23:09:16 +0000
commit928a88d8d825e4d239c024a8a9ad6b822e5bc9e6 (patch)
tree2b566e3f2ba875a28fb7004410e5d4ec8f43bb0c /bfd
parenta0323076b1575371a5d08a32cae6d79f9f6119ff (diff)
downloadbinutils-redhat-928a88d8d825e4d239c024a8a9ad6b822e5bc9e6.tar.gz
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Correct value of
_GLOBAL_OFFSET_TABLE_ for > 32k GOT.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-ppc.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 841bb022cf..fe62cb8a10 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-03 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Correct value of
+ _GLOBAL_OFFSET_TABLE_ for > 32k GOT.
+
2005-08-02 Andreas Schwab <schwab@suse.de>
* elfxx-ia64.c (struct elfNN_ia64_allocate_data): Add only_got.
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 6239438bb6..454e9e0f20 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -4676,14 +4676,17 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
unsigned int g_o_t = 32768;
- /* If we haven't allocated the header, do so now. */
+ /* If we haven't allocated the header, do so now. When we get here,
+ for old plt/got the got size will be 0 to 32764 (not allocated),
+ or 32780 to 65536 (header allocated). For new plt/got, the
+ corresponding ranges are 0 to 32768 and 32780 to 65536. */
if (htab->got->size <= 32768)
{
g_o_t = htab->got->size;
+ if (htab->old_plt)
+ g_o_t += 4;
htab->got->size += htab->got_header_size;
}
- if (htab->old_plt && !htab->is_vxworks)
- g_o_t += 4;
htab->elf.hgot->root.u.def.value = g_o_t;
}