|
From: | Vincent Amiot |
Subject: | Absolute symbols crash ld 2.15 (2.14 used to be OK) |
Date: | Thu, 30 Sep 2004 19:43:23 -0500 |
The simple assembly code below crashes ld (comes from investigation about using ld with an older
Can you help? Best regards V. Amiot bash-2.05b$
ld --version
GNU
ld version 2.15.91
20040725
Copyright
2002 Free Software Foundation, Inc.
This
program is free software; you may redistribute it under the terms of the
GNU General Public License. This program has absolutely no warranty.
k.s: .set X, 1239 .global X bash-2.05b$
gcc -o k.o k.s -c bash-2.05b$
ld k.o Segmentation
fault (core dumped) bash-2.05b$ bash-2.05b$ gdb --args ld k.o GNU gdb 2003-09-20-cvs (cygwin-special) Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General
Public License, and you are welcome to change it and/or distribute copies of it
under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show
warranty" for details. This GDB was configured as "i686-pc-cygwin"... (gdb) r Starting program: /usr/bin/ld.exe k.o Program received signal SIGSEGV, Segmentation fault. 0x00440936 in coff_link_add_symbols (abfd=0xa061b98,
info=0x4aa0d0) at ../../bfd/cofflink.c:455 455
if (! (bfd_coff_link_add_one_symbol (gdb) l 450
addit = FALSE; 451
} 452 453
if (addit) 454
{ 455
if (! (bfd_coff_link_add_one_symbol 456
(info, abfd, name, flags, section, value, 457
(const char *) NULL, copy, FALSE, 458
(struct bfd_link_hash_entry **) sym_hash))) 459
goto error_return; (gdb) q bash-2.05b$ popd /cygdrive/c/Documents and Settings/All Users/Documents/La
Jolla Old/ISS/libs/PE bash-2.05b$ objdump -t k.o k.o: file format pe-i386 SYMBOL TABLE: [ 0](sec -2)(fl 0x00)(ty 0)(scl 103)
(nx 1) 0x00000000 fake File [ 2](sec 1)(fl 0x00)(ty 0)(scl
3) (nx 1) 0x00000000 .text AUX scnlen 0x0 nreloc 0 nlnno 0 [ 4](sec 2)(fl 0x00)(ty 0)(scl
3) (nx 1) 0x00000000 .data AUX scnlen 0x0 nreloc 0 nlnno 0 [ 6](sec 3)(fl 0x00)(ty 0)(scl
3) (nx 1) 0x00000000 .bss AUX scnlen 0x0 nreloc 0 nlnno 0 [ 8](sec -1)(fl 0x00)(ty
0)(scl 2) (nx 0) 0x000004d7 X |
[Prev in Thread] | Current Thread | [Next in Thread] |