bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/6478] stab warnings cause linker errors


From: vincent dot riviere at freesbee dot fr
Subject: [Bug ld/6478] stab warnings cause linker errors
Date: 6 May 2008 20:52:11 -0000

------- Additional Comments From vincent dot riviere at freesbee dot fr  
2008-05-06 20:52 -------
Hi, Nick.
I agree with you on the 2 points.

1) Shame on me, there is effectively a typo near the end, it shoud be read:
Further strangeness comes if we convert b.o into ELF, too.

$ objcopy b.o b-elf.o -O elf32-i386
BFD: b-elf.o: warning: allocated section `.text' not in segment

2) I've just compiled the latest binutils snapshot, linking the 2 converted ELF 
files success (unlike 2.18).

I noticed some changes between the versions.
Let say that b-218.o is generated by gas 2.18, and b-cvs is generated by the 
latest gas from CVS.

$ objdump -t b-218.o

b-218.o:     file format a.out-i386-netbsd

SYMBOL TABLE:
00000000    W d  *ABS* 0000 00 1e a linker warning
00000000 g       *ABS* 0000 00 03 _f
00000000 g       .text 0000 00 05 _f

$ objdump -t b-cvs.o

b-cvs.o:     file format a.out-i386-netbsd

SYMBOL TABLE:
00000000    W d  *ABS* 0000 00 1e a linker warning
00000000         *UND* 0000 00 01 _f
00000000 g       .text 0000 00 05 _f

We can notice that the symbol referred by the warning was *ABS* and is now 
*UND*. The behavior has changed... anyway it doesn't matter.

That difference is kept after the conversion into ELF :

$ objdump -t b-218-elf.o

b-218-elf.o:     file format elf32-i386

SYMBOL TABLE:
00000000 l       *ABS*  00000000 a linker warning
00000000 l    d  .text  00000000 .text
00000008 l    d  .data  00000000 .data
00000008 l    d  .bss   00000000 .bss
00000000 g       *ABS*  00000000 _f
00000000 g       .text  00000000 _f

$ objdump -t b-cvs-elf.o

b-cvs-elf.o:     file format elf32-i386

SYMBOL TABLE:
00000000 l       *ABS*  00000000 a linker warning
00000000 l    d  .text  00000000 .text
00000008 l    d  .data  00000000 .data
00000008 l    d  .bss   00000000 .bss
00000000         *UND*  00000000 _f
00000000 g       .text  00000000 _f

This may explain that the multiple definition problem has gone.
However, I'm quite surprised when I look at the b-cvs-elf.o symbol table : the 
_f symbol is both undefined and defined in the .text segment ! The first _f is 
probably the symbol related to the warning, however now it is not just after 
the warning, there are the section symbols between them, now.

This was about the strange things.

However the undefined reference problem is still here.
We have together the same results with the latest binutils, that's some kind of 
good news ;-)


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW


http://sourceware.org/bugzilla/show_bug.cgi?id=6478

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]