aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 9299b1c..9fae870 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1789,9 +1789,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
addend = bfd_get_32 (input_bfd, contents + rel->r_offset);
msec = sec;
addend =
- _bfd_merged_section_offset (output_bfd, &msec,
- elf_section_data (sec)->merge_info,
- sym->st_value + addend, (bfd_vma) 0)
+ _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend)
- relocation;
addend += msec->output_section->vma + msec->output_offset;
bfd_put_32 (input_bfd, addend, contents + rel->r_offset);
@@ -2009,19 +2007,11 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
skip = false;
- if (elf_section_data (input_section)->stab_info == NULL)
- outrel.r_offset = rel->r_offset;
- else
- {
- off = (_bfd_stab_section_offset
- (output_bfd, htab->elf.stab_info, input_section,
- &elf_section_data (input_section)->stab_info,
- rel->r_offset));
- if (off == (bfd_vma) -1)
- skip = true;
- outrel.r_offset = off;
- }
-
+ outrel.r_offset =
+ _bfd_elf_section_offset (output_bfd, info, input_section,
+ rel->r_offset);
+ if (outrel.r_offset == (bfd_vma) -1)
+ skip = true;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);