This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed] Darwin: accept indirect symbols
- From: Tristan Gingold <gingold at adacore dot com>
- To: binutils Development <binutils at sourceware dot org>
- Date: Mon, 5 Dec 2011 15:42:17 +0100
- Subject: [committed] Darwin: accept indirect symbols
Hi,
the mach-o format has indirect symbols and they are present at least in some system libraries. They were not supported, which resulted in error messages from bed during gdb sessions.
With this patch they are now read although with the BFD convention (which is a.out based).
Committed on trunk.
Tristan.
bfd/
2011-12-05 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_read_symtab_symbol): Accept indirect symbols.
Index: mach-o.c
===================================================================
RCS file: /cvs/src/src/bfd/mach-o.c,v
retrieving revision 1.70
diff -c -r1.70 mach-o.c
*** mach-o.c 5 Dec 2011 14:10:11 -0000 1.70
--- mach-o.c 5 Dec 2011 14:41:58 -0000
***************
*** 1901,1910 ****
}
break;
case BFD_MACH_O_N_INDR:
! (*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbol: "
! "symbol \"%s\" is unsupported 'indirect' reference: setting to undefined"),
! s->symbol.name);
! s->symbol.section = bfd_und_section_ptr;
break;
default:
(*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbol: "
--- 1901,1912 ----
}
break;
case BFD_MACH_O_N_INDR:
! /* FIXME: we don't follow the BFD convention as this indirect symbol
! won't be followed by the referenced one. This looks harmless
! unless we start using the linker. */
! s->symbol.flags |= BSF_INDIRECT;
! s->symbol.section = bfd_ind_section_ptr;
! s->symbol.value = 0;
break;
default:
(*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbol: "