aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-alpha.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-02-09 10:30:13 +0000
committerNick Clifton <nickc@redhat.com>2004-02-09 10:30:13 +0000
commit0d5f99947baa22a5dda53be002c3885ffe311ca5 (patch)
tree7a385a5d7d110dfaf15dfa120a5433679a5dfebf /bfd/elf64-alpha.c
parent174fd7f9556183397625dbfa99ef68ecd325c74b (diff)
downloadfsf-binutils-gdb-0d5f99947baa22a5dda53be002c3885ffe311ca5.zip
fsf-binutils-gdb-0d5f99947baa22a5dda53be002c3885ffe311ca5.tar.gz
fsf-binutils-gdb-0d5f99947baa22a5dda53be002c3885ffe311ca5.tar.bz2
Catch GOT offsets for a symbol which have no associated GOT subsection.
Diffstat (limited to 'bfd/elf64-alpha.c')
-rw-r--r--bfd/elf64-alpha.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 6025277..8bd03c2 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -3547,6 +3547,7 @@ elf64_alpha_calc_got_offsets_for_symbol (h, arg)
struct alpha_elf_link_hash_entry *h;
PTR arg ATTRIBUTE_UNUSED;
{
+ bfd_boolean result = TRUE;
struct alpha_elf_got_entry *gotent;
if (h->root.root.type == bfd_link_hash_warning)
@@ -3555,14 +3556,23 @@ elf64_alpha_calc_got_offsets_for_symbol (h, arg)
for (gotent = h->got_entries; gotent; gotent = gotent->next)
if (gotent->use_count > 0)
{
- bfd_size_type *plge
- = &alpha_elf_tdata (gotent->gotobj)->got->_raw_size;
+ struct alpha_elf_obj_tdata *td;
+ bfd_size_type *plge;
+ td = alpha_elf_tdata (gotent->gotobj);
+ if (td == NULL)
+ {
+ _bfd_error_handler (_("Symbol %s has no GOT subsection for offset 0x%x"),
+ h->root.root.root.string, gotent->got_offset);
+ result = FALSE;
+ continue;
+ }
+ plge = &td->got->_raw_size;
gotent->got_offset = *plge;
*plge += alpha_got_entry_size (gotent->reloc_type);
}
- return TRUE;
+ return result;
}
static void