[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/5692] New: ld segfault linked to bfd elf error
From: |
pdd at lgsinnovations dot com |
Subject: |
[Bug ld/5692] New: ld segfault linked to bfd elf error |
Date: |
29 Jan 2008 23:04:20 -0000 |
Cross compiling uclibc 0.9.29 on i686-pc-linux-gnu-gcc for a
arm-softfloat-linux-uclibc ran into a segfault on ld. Turns out the problem is
the makefile hands the linker /dev/null for a file, which in turn when the bfd
library tries to get the symbols there is no check for a null pointer (as there
are no symbols). The simple fix is:
--- binutils-2.18.50.0.3/bfd/elf.c.orig 2008-01-29 14:48:45.000000000 -0500
+++ binutils-2.18.50.0.3/bfd/elf.c 2008-01-29 14:52:06.000000000 -0500
@@ -361,6 +361,11 @@
alloc_ext = NULL;
alloc_extshndx = NULL;
bed = get_elf_backend_data (ibfd);
+ if (bed == NULL)
+ {
+ intsym_buf = NULL;
+ goto out;
+ }
extsym_size = bed->s->sizeof_sym;
amt = symcount * extsym_size;
pos = symtab_hdr->sh_offset + symoffset * extsym_size;
I expect there probably is a more elegant solution, but this is quick and dirty.
Have fun!
--
Summary: ld segfault linked to bfd elf error
Product: binutils
Version: 2.18
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: pdd at lgsinnovations dot com
CC: bug-binutils at gnu dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=5692
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug ld/5692] New: ld segfault linked to bfd elf error,
pdd at lgsinnovations dot com <=
- [Bug ld/5692] ld segfault linked to bfd elf error, nickc at redhat dot com, 2008/01/30
- [Bug ld/5692] ld segfault linked to bfd elf error, pdd at lgsinnovations dot com, 2008/01/30
- [Bug ld/5692] ld segfault linked to bfd elf error, nickc at redhat dot com, 2008/01/30
- [Bug ld/5692] ld segfault linked to bfd elf error, nickc at redhat dot com, 2008/01/31
- [Bug ld/5692] ld segfault linked to bfd elf error, nickc at redhat dot com, 2008/01/31