[Bug ld/6478] stab warnings cause linker errors

2008-05-06 Thread nickc at redhat dot com

--- Additional Comments From nickc at redhat dot com  2008-05-06 08:40 
---
Hi Vincent,

  I just tried your testcase with an i386-pc-netbsdaout toolchain built from the
latest mainline binutils sources.

  First of all, there appears to be a typo in your description.  You say:
"Further strangeness comes if we convert a.o into ELF, too", but I think that
you mean "...convert b.o..." as a.o has already been converted.

  Secondly - I do not get the problem you report when both files have been
converted to ELF:

  % gas/as-new a.s -o a.o
  % gas/as-new b.s -o b.o
  % binutils/objcopy a.o a.elf.o -O elf32-i386
  BFD: a.elf.o: warning: allocated section `.text' not in segment
  % binutils/objcopy b.o b.elf.o -O elf32-i386
  BFD: b.elf.o: warning: allocated section `.text' not in segment
  % ld/ld-new a.elf.o b.elf.o
  %

(Note: the linker did not display the stab warning text as a warning message in
this case.  This is probably a bug, although it may count as a "feature" if it
is because it is very hard to translate aout stabs warning messages into ELF
format).

I did get the error message about the undefined reference to _f when attempting
to link a.elf.o and b.o, so I am going to look into that.  But in the meantime I
would appreciate it if you could try re-running your testcase with an up to date
toolchain to see if you encounter the same behaviour as I did.

Cheers
  Nick


-- 
   What|Removed |Added

 Status|NEW |WAITING


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.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/2834] Linker reports error "X referenced in section '.rodata' of foo.o: defined in discarded section X of foo.o" with g++ 3.3

2008-05-06 Thread bert dot barbe at oracle dot com

--- Additional Comments From bert dot barbe at oracle dot com  2008-05-06 
11:44 ---
We see the same problem with ld 2.17 . The problem is as said , that there
is code that is/ needs to be compiled with unfixed gcc compilers
and it won't relink on systems with newer binutils (eg rhel5).
Also binutils 2.15 was patched to compensate for this gcc behavior, see
http://sources.redhat.com/bugzilla/show_bug.cgi?id=233


-- 


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

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/6478] stab warnings cause linker errors

2008-05-06 Thread vincent dot riviere at freesbee dot fr

--- 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:
W d  *ABS*  00 1e a linker warning
 g   *ABS*  00 03 _f
 g   .text  00 05 _f

$ objdump -t b-cvs.o

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

SYMBOL TABLE:
W d  *ABS*  00 1e a linker warning
 *UND*  00 01 _f
 g   .text  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:
 l   *ABS*   a linker warning
 ld  .text   .text
0008 ld  .data   .data
0008 ld  .bss    .bss
 g   *ABS*   _f
 g   .text   _f

$ objdump -t b-cvs-elf.o

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

SYMBOL TABLE:
 l   *ABS*   a linker warning
 ld  .text   .text
0008 ld  .data   .data
0008 ld  .bss    .bss
 *UND*   _f
 g   .text   _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.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/6483] New: objdump -g does not understand the debug info

2008-05-06 Thread chrisj at rtems dot org
Using the M68K RTEMS 4.9 tool set from the RTEMS repo installed with yum the
following occurs for the m68k target:

$ m68k-rtems4.9-gcc -g -c -o hello.o hello.c
$ m68k-rtems4.9-objdump -g hello.o

hello.o: file format elf32-m68k

m68k-rtems4.9-objdump: hello.o: no recognized debugging information

The object file can be linked into an RTEMS application that can be debugged
with gdb and objdump can disassemble the object with source. The objdump -W
displays the DWARF info.

The RTEMS tools can be located here:
 http://www.rtems.org/wiki/index.php/APT/Yum_Repository

-- 
   Summary: objdump -g does not understand the debug info
   Product: binutils
   Version: 2.18
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: chrisj at rtems dot org
CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-redhat-linux-gnu
  GCC host triplet: x86_64-redhat-linux-gnu
GCC target triplet: m68k-unknown-rtems4.9


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

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/6483] objdump -g does not understand the debug info

2008-05-06 Thread chrisj at rtems dot org

--- Additional Comments From chrisj at rtems dot org  2008-05-07 06:08 
---
Created an attachment (id=2724)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=2724&action=view)
Test case with command line instructions.


-- 


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

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/6049] gold is lacking option -u SYMBOL

2008-05-06 Thread ian at airs dot com

--- Additional Comments From ian at airs dot com  2008-05-07 06:13 ---
This is now fixed in the development sources.  Thanks for reporting it.

-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils