diff options
author | Jie Zhang <jie.zhang@analog.com> | 2006-05-23 05:45:22 +0000 |
---|---|---|
committer | Jie Zhang <jie.zhang@analog.com> | 2006-05-23 05:45:22 +0000 |
commit | 8aafe8b463c3c254ab29594ae82d516fa6627ad1 (patch) | |
tree | bad4cae900e61e827c9813bf7cc44d7934884d14 /bfd/elf32-bfin.c | |
parent | aaceb81c032470d15f5b064f639f639fee3ad40d (diff) | |
download | gdb-8aafe8b463c3c254ab29594ae82d516fa6627ad1.zip gdb-8aafe8b463c3c254ab29594ae82d516fa6627ad1.tar.gz gdb-8aafe8b463c3c254ab29594ae82d516fa6627ad1.tar.bz2 |
* elf32-bfin.c (bfinfdpic_relocate_section): Clear reloc for
deteted entries in .eh_frame section.
Diffstat (limited to 'bfd/elf32-bfin.c')
-rw-r--r-- | bfd/elf32-bfin.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index 5d6e1e1..ba6bc62 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -2435,6 +2435,8 @@ bfinfdpic_relocate_section (bfd * output_bfd, input_section->output_section) & (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD)) { + bfd_vma offset; + if (_bfinfdpic_osec_readonly_p (output_bfd, input_section ->output_section)) @@ -2445,15 +2447,23 @@ bfinfdpic_relocate_section (bfd * output_bfd, name, input_bfd, input_section, rel->r_offset); return FALSE; } - _bfinfdpic_add_dyn_reloc (output_bfd, - bfinfdpic_gotrel_section (info), - _bfd_elf_section_offset - (output_bfd, info, - input_section, rel->r_offset) - + input_section - ->output_section->vma - + input_section->output_offset, - r_type, dynindx, addend, picrel); + offset = _bfd_elf_section_offset (output_bfd, info, + input_section, rel->r_offset); + /* Only output a reloc for a not deleted entry. */ + if (offset >= (bfd_vma) -2) + _bfinfdpic_add_dyn_reloc (output_bfd, + bfinfdpic_gotrel_section (info), + 0, + R_unused0, + dynindx, addend, picrel); + else + _bfinfdpic_add_dyn_reloc (output_bfd, + bfinfdpic_gotrel_section (info), + offset + input_section + ->output_section->vma + + input_section->output_offset, + r_type, + dynindx, addend, picrel); } else addend += bfinfdpic_got_section (info)->output_section->vma; |