This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Null pointer read in binutils-2.10.0.33: bfd/elf32-i386.c: elf_i386_relocate_section
- To: Marco dot Franzen at Thyron dot com
- Subject: Re: Null pointer read in binutils-2.10.0.33: bfd/elf32-i386.c: elf_i386_relocate_section
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Fri, 23 Mar 2001 13:00:49 -0800
- Cc: binutils at sources dot redhat dot com
- References: <200103231040.KAA10476@maidavale.thyron-local> <01032318504903.11087@maidavale>
On Fri, Mar 23, 2001 at 06:24:34PM +0000, Marco Franzen wrote:
> On Fri, 23 Mar 2001, I wrote:
> > (gdb) run -m elf_i386 -o dec.e crt1.o crti.o crtbegin.o dec.o libtask.a libgcc.a libc.so libgcc.a crtend.o crtn.o
> > Starting program: /usr/bin/ld -m elf_i386 -o dec.e crt1.o crti.o crtbegin.o dec.o libtask.a libgcc.a libc.so libgcc.a crtend.o crtn.o
> >
> > Program received signal SIGSEGV, Segmentation fault.
>
> That was because one file, libtask.a, was for the wrong architecture,
> Solaris/Sparc (due to an incomplete make clean rule...).
>
> The native linker on SCO Unixware 7, different from GNU ld on GNU/Linux,
> can detect this and issues an error message:
> UX:ld: ERROR: libtask.a(tri_des.o): fatal error: libtask.a(tri_des.o): wrong machine type
>
> Could GNU ld (or libbfd) do the same?
> It would not only have saved me two days but also have caused another
> GNU/Linux installation at a customer's site. Now they use a non-free Unix
> instead.
>
I will fix it.
H.J.