From 06988dfc57d0d03fd576e5949f52b8745278c0ab Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 8 Feb 2010 09:13:47 +0000 Subject: [PATCH] 2010-02-08 Tristan Gingold * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern for non-scattered relocations. --- bfd/ChangeLog | 5 +++++ bfd/mach-o.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f9ca746963b..6e07ae370f1 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2010-02-08 Tristan Gingold + + * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern + for non-scattered relocations. + 2010-02-08 Nathan Sidwell * elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty diff --git a/bfd/mach-o.c b/bfd/mach-o.c index 20279c414b3..57d774ba4af 100644 --- a/bfd/mach-o.c +++ b/bfd/mach-o.c @@ -705,12 +705,16 @@ bfd_mach_o_canonicalize_one_reloc (bfd *abfd, char *buf, res->addend = 0; res->address = addr; if (symnum & BFD_MACH_O_R_EXTERN) - sym = syms + num; + { + sym = syms + num; + reloc.r_extern = 1; + } else { BFD_ASSERT (num != 0); BFD_ASSERT (num <= mdata->nsects); sym = mdata->sections[num - 1]->bfdsection->symbol_ptr_ptr; + reloc.r_extern = 0; } res->sym_ptr_ptr = sym; reloc.r_type = BFD_MACH_O_GET_R_TYPE (symnum);