aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2011-12-05 14:42:31 +0000
committerTristan Gingold <gingold@adacore.com>2011-12-05 14:42:31 +0000
commit0596a831a2e79bd9880d65c48a1c2c57a57e950a (patch)
treef4aa79c5228e75af6ec2d3206bc458ac0ad68e1b
parent5c03c7f9ac378ddbe140faf0bf3a53108b2f037e (diff)
downloadgdb-0596a831a2e79bd9880d65c48a1c2c57a57e950a.zip
gdb-0596a831a2e79bd9880d65c48a1c2c57a57e950a.tar.gz
gdb-0596a831a2e79bd9880d65c48a1c2c57a57e950a.tar.bz2
2011-12-05 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_read_symtab_symbol): Accept indirect symbols.
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/mach-o.c10
2 files changed, 10 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7d96b5f..2f7f59a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,9 @@
2011-12-05 Tristan Gingold <gingold@adacore.com>
+ * mach-o.c (bfd_mach_o_read_symtab_symbol): Accept indirect symbols.
+
+2011-12-05 Tristan Gingold <gingold@adacore.com>
+
* mach-o.c (bfd_mach_o_write_contents): Handle LC_LOAD_UPWARD_DYLIB.
(bfd_mach_o_read_dylib): Likewise.
(bfd_mach_o_read_command): Likewise.
diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index 4412b0b..04c971e 100644
--- a/bfd/mach-o.c
+++ b/bfd/mach-o.c
@@ -1901,10 +1901,12 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd,
}
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;
+ /* 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: "