diff options
author | Nick Clifton <nickc@redhat.com> | 1997-09-17 16:52:23 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 1997-09-17 16:52:23 +0000 |
commit | db1fa6ab261fd9d5a22b8c8adec16c54dcb4b7ea (patch) | |
tree | 50b3274a81ce2a2c2e54559a4ec5fb6e1742d42d /bfd/elf32-v850.c | |
parent | 8bd89725a7dfd1c709791f2d472a8cd8d35612dc (diff) | |
download | gdb-db1fa6ab261fd9d5a22b8c8adec16c54dcb4b7ea.zip gdb-db1fa6ab261fd9d5a22b8c8adec16c54dcb4b7ea.tar.gz gdb-db1fa6ab261fd9d5a22b8c8adec16c54dcb4b7ea.tar.bz2 |
Catch relocations against non-existant symbols.
Diffstat (limited to 'bfd/elf32-v850.c')
-rw-r--r-- | bfd/elf32-v850.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c index feb298e..d3339fb 100644 --- a/bfd/elf32-v850.c +++ b/bfd/elf32-v850.c @@ -945,6 +945,9 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, return bfd_reloc_ok; case R_V850_ZDA_16_16_OFFSET: + if (sym_sec == NULL) + return bfd_reloc_undefined; + value -= sym_sec->output_section->vma; value += (short) bfd_get_16 (input_bfd, hit_data); @@ -955,6 +958,9 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, return bfd_reloc_ok; case R_V850_ZDA_15_16_OFFSET: + if (sym_sec == NULL) + return bfd_reloc_undefined; + insn = bfd_get_16 (input_bfd, hit_data); value -= sym_sec->output_section->vma; @@ -984,6 +990,9 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, return bfd_reloc_ok; case R_V850_SDA_16_16_OFFSET: + if (sym_sec == NULL) + return bfd_reloc_undefined; + { unsigned long gp; struct bfd_link_hash_entry * h; @@ -1010,6 +1019,9 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, } case R_V850_SDA_15_16_OFFSET: + if (sym_sec == NULL) + return bfd_reloc_undefined; + { unsigned long gp; struct bfd_link_hash_entry * h; @@ -1218,6 +1230,9 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, } case R_V850_SDA_16_16_SPLIT_OFFSET: + if (sym_sec == NULL) + return bfd_reloc_undefined; + { unsigned long gp; struct bfd_link_hash_entry * h; @@ -1252,6 +1267,9 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, } case R_V850_ZDA_16_16_SPLIT_OFFSET: + if (sym_sec == NULL) + return bfd_reloc_undefined; + insn = bfd_get_32 (input_bfd, hit_data); value -= sym_sec->output_section->vma; |