ld crashed with SIGSEGV in bfd_elf_final_link()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
binutils (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Binary package hint: binutils
c.c:
extern int a(void);
int cf(void)
{
return 2;
}
void my_exit(int i)
{
asm ("mov %0, %%ebx\n"
"mov %1, %%eax\n"
"int %2\n"
: : "i"(1), "r"(i), "i"(0x80));
return;
}
int main(int argc, char **argv)
{
int i = 1;
if (argc > 1)
i = argv[1] - '0';
my_exit(1);
return 1;
}
scr:
ENTRY(main)
SECTIONS {
/* Read-only sections, merged into text segment: */
/* PROVIDE (__executable_start = SEGMENT_
. = SEGMENT_
*/
. = 0x1000;
.text : { *(.text) }
/DISCARD/ : { *(*) }
}
$ gcc -nodefaultlibs -Wl,-T,scr -o c c.c
ProblemType: Crash
Architecture: i386
Date: Sat Sep 19 17:24:04 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/ld
Package: binutils 2.19.91.
ProcCmdline: /usr/bin/ld --build-id --eh-frame-hdr -m elf_i386 --hash-style=both -dynamic-linker /lib/ld-linux.so.2 -o c -z relro /usr/lib/
ProcEnviron:
SHELL=/bin/bash
PATH=(custom, user)
LANG=en_US.UTF-8
SegvAnalysis:
Segfault happened at: 0xb7ff1c03: movl $0x4,0x38(%eax)
PC (0xb7ff1c03) ok
source "$0x4" ok
destination "0x38(%eax)" (0x00000038) not located in a known VMA region (needed writable region)!
SegvReason: writing NULL VMA
Signal: 11
SourcePackage: binutils
StacktraceTop:
?? () from /usr/lib/
bfd_elf_final_link ()
?? ()
?? ()
__libc_start_main () from /lib/tls/
Title: ld crashed with SIGSEGV in bfd_elf_
Uname: Linux 2.6.31-rc8-custom i686
UserGroups: adm admin audio cdrom dialout dip floppy fuse lpadmin plugdev video www-data
StacktraceTop: elf_i386_ finish_ dynamic_ sections (output_ bfd=0x9450af8,
bfd_elf_final_link (abfd=0x9450af8, info=0x80d0440)
?? ()
?? ()
__libc_start_main (