This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PR14962 fix
On Mon, Dec 17, 2012 at 06:55:52AM -0800, H.J. Lu wrote:
> On Mon, Dec 17, 2012 at 5:44 AM, Alan Modra <amodra@gmail.com> wrote:
> > I have one to add, but currently it fails on a number of targets.
This fixes most of the failures I found.
ELF targets that use the generic linker can leave unexpected values
in internal_elf_sym.st_shndx (the shndx the symbol had in the defining
input object file), if a linker script converts a symbol to absolute.
* elf.c (swap_out_syms): Set shndx to SHN_ABS when not one of
the special MAP_* values.
Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.579
diff -u -p -r1.579 elf.c
--- bfd/elf.c 14 Dec 2012 15:30:28 -0000 1.579
+++ bfd/elf.c 18 Dec 2012 09:48:06 -0000
@@ -6791,6 +6791,7 @@ swap_out_syms (bfd *abfd,
shndx = elf_tdata (abfd)->symtab_shndx_section;
break;
default:
+ shndx = SHN_ABS;
break;
}
}
--
Alan Modra
Australia Development Lab, IBM