From: Tristan Gingold Date: Fri, 4 Apr 2014 10:37:50 +0000 (+0200) Subject: mach-o: output output_section target_index to write relocs. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=47c509326557dcef05608226b8d6428476289886;p=binutils-gdb.git mach-o: output output_section target_index to write relocs. bfd/ * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_out): Use target index of output_section. * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Ditto. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e134050a982..1eac58ad15c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2014-04-04 Tristan Gingold + + * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_out): Use target index + of output_section. + * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Ditto. + 2014-04-04 Tristan Gingold * bfd.c (bfd_get_arch_size): Default is taken from arch. diff --git a/bfd/mach-o-i386.c b/bfd/mach-o-i386.c index 95dc48cb8b4..8349c66c575 100644 --- a/bfd/mach-o-i386.c +++ b/bfd/mach-o-i386.c @@ -210,7 +210,8 @@ bfd_mach_o_i386_swap_reloc_out (arelent *rel, bfd_mach_o_reloc_info *rinfo) if ((*rel->sym_ptr_ptr)->flags & BSF_SECTION_SYM) { rinfo->r_extern = 0; - rinfo->r_value = (*rel->sym_ptr_ptr)->section->target_index; + rinfo->r_value = + (*rel->sym_ptr_ptr)->section->output_section->target_index; } else { diff --git a/bfd/mach-o-x86-64.c b/bfd/mach-o-x86-64.c index 53ff8429a1f..221c030ac5c 100644 --- a/bfd/mach-o-x86-64.c +++ b/bfd/mach-o-x86-64.c @@ -284,7 +284,8 @@ bfd_mach_o_x86_64_swap_reloc_out (arelent *rel, bfd_mach_o_reloc_info *rinfo) if ((*rel->sym_ptr_ptr)->flags & BSF_SECTION_SYM) { rinfo->r_extern = 0; - rinfo->r_value = (*rel->sym_ptr_ptr)->section->target_index; + rinfo->r_value = + (*rel->sym_ptr_ptr)->section->output_section->target_index; } else {