diff options
author | Iain Sandoe <iain@codesourcery.com> | 2012-01-13 12:59:30 +0000 |
---|---|---|
committer | Iain Sandoe <iain@codesourcery.com> | 2012-01-13 12:59:30 +0000 |
commit | 687be931eb3d3064e1ae6026f0c415048d9914cf (patch) | |
tree | 19b174fba55baf271b2d3a25073b8a54bb0d47bd /gas/config/obj-macho.c | |
parent | bb76d9401ec780f95f7c13a93067ae030cb612e8 (diff) | |
download | gdb-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 'gas/config/obj-macho.c')
-rw-r--r-- | gas/config/obj-macho.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gas/config/obj-macho.c b/gas/config/obj-macho.c index 988b098..ddf0988 100644 --- a/gas/config/obj-macho.c +++ b/gas/config/obj-macho.c @@ -1630,14 +1630,18 @@ obj_mach_o_set_indirect_symbols (bfd *abfd, asection *sec, for (isym = list, n = 0; isym != NULL; isym = isym->next, n++) { + sym = (bfd_mach_o_asymbol *)symbol_get_bfdsym (isym->sym); /* Array is init to NULL & NULL signals a local symbol If the section is lazy-bound, we need to keep the - reference to the symbol, since dyld can override. */ - if (S_IS_LOCAL (isym->sym) && ! lazy) + reference to the symbol, since dyld can override. + + Absolute symbols are handled specially. */ + if (sym->symbol.section == bfd_abs_section_ptr) + ms->indirect_syms[n] = sym; + else if (S_IS_LOCAL (isym->sym) && ! lazy) ; else { - sym = (bfd_mach_o_asymbol *)symbol_get_bfdsym (isym->sym); if (sym == NULL) ; /* If the symbols is external ... */ |