aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorIain Sandoe <iain@codesourcery.com>2012-01-13 12:59:30 +0000
committerIain Sandoe <iain@codesourcery.com>2012-01-13 12:59:30 +0000
commit687be931eb3d3064e1ae6026f0c415048d9914cf (patch)
tree19b174fba55baf271b2d3a25073b8a54bb0d47bd /bfd
parentbb76d9401ec780f95f7c13a93067ae030cb612e8 (diff)
downloadgdb-687be931eb3d3064e1ae6026f0c415048d9914cf.zip
gdb-687be931eb3d3064e1ae6026f0c415048d9914cf.tar.gz
gdb-687be931eb3d3064e1ae6026f0c415048d9914cf.tar.bz2
handle absolute indirect syms in mach-o
bfd: * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute indirect symbols. gas: * config/obj-macho.c (obj_mach_o_set_indirect_symbols): Handle absolute indirect symbols. gas/testsuite: * gas/mach-o/dysymtab-3.d: New. * gas/mach-o/symbols-7.s: New.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/mach-o.c4
2 files changed, 10 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 77749a7..7b56967 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,6 +1,11 @@
2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
- * mach-o.c (bfd_mach_o_write_relocs): Move compuation of relocs file
+ * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
+ indirect symbols.
+
+2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
+
+ * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file
position from here... to (bfd_mach_o_build_seg_command): Here.
2012-01-12 Iain Sandoe <idsandoe@googlemail.com>
diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index 2625319..a13ac4e 100644
--- a/bfd/mach-o.c
+++ b/bfd/mach-o.c
@@ -2210,6 +2210,10 @@ bfd_mach_o_build_dysymtab_command (bfd *abfd,
{
if (isyms[j] == NULL)
dsym->indirect_syms[n] = BFD_MACH_O_INDIRECT_SYM_LOCAL;
+ else if (isyms[j]->symbol.section == bfd_abs_section_ptr
+ && ! (isyms[j]->n_type & BFD_MACH_O_N_EXT))
+ dsym->indirect_syms[n] = BFD_MACH_O_INDIRECT_SYM_LOCAL
+ | BFD_MACH_O_INDIRECT_SYM_ABS;
else
dsym->indirect_syms[n] = isyms[j]->symbol.udata.i;
}