aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-04-02 19:57:33 +0000
committerIan Lance Taylor <ian@airs.com>1996-04-02 19:57:33 +0000
commit19bfbcbecf49abb63d85b0244dc10770e3b4ac9a (patch)
treebcb51a8133c664730198d4e418b454e4bd93dd5b /bfd/elf.c
parent1dad72bde57b9d2f3a0e128000dc7220c33fe415 (diff)
downloadgdb-19bfbcbecf49abb63d85b0244dc10770e3b4ac9a.zip
gdb-19bfbcbecf49abb63d85b0244dc10770e3b4ac9a.tar.gz
gdb-19bfbcbecf49abb63d85b0244dc10770e3b4ac9a.tar.bz2
* elf-bfd.h (struct elf_link_hash_table): Add hgot field.
* elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field. * elflink.c (_bfd_elf_create_got_section): Store the _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field. * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the global offset table goes over 0x1000, set the value of _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section. (elf32_sparc_relocate_section): Subtract the offset of _GLOBAL_OFFSET_TABLE_ when handling GOT relocations. PR 9323.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index fdc16d9..6ede06a 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -583,6 +583,7 @@ _bfd_elf_link_hash_table_init (table, abfd, newfunc)
table->dynstr = NULL;
table->bucketcount = 0;
table->needed = NULL;
+ table->hgot = NULL;
return _bfd_link_hash_table_init (&table->root, abfd, newfunc);
}
@@ -2078,11 +2079,9 @@ assign_file_positions_for_segments (abfd)
if (i == 0)
abort ();
p->p_memsz += adjust;
+ off += adjust;
if ((flags & SEC_LOAD) != 0)
- {
- p->p_filesz += adjust;
- off += adjust;
- }
+ p->p_filesz += adjust;
}
}