bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/18855] String constants mixed up when linked with gold on Linu


From: sourceware-bugzilla at mkarcher dot dialup.fu-berlin.de
Subject: [Bug gold/18855] String constants mixed up when linked with gold on Linux/sparc64
Date: Fri, 02 Oct 2015 20:35:59 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=18855

Michael Karcher <sourceware-bugzilla at mkarcher dot dialup.fu-berlin.de> 
changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |address@hidden
                   |                            |r.dialup.fu-berlin.de

--- Comment #5 from Michael Karcher <sourceware-bugzilla at mkarcher dot 
dialup.fu-berlin.de> ---
Created attachment 8675
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8675&action=edit
Automated testcase

I made a automatic test case for it (see attachment). I think the ltrans.*.s
file in my archive are my own gcc invocation on sparc64, but the files from
attachment 8619 should do as well. Just run make from the attached archive,
after extracting it into a binutils build tree:

address@hidden:~/src/Development/binutils-gdb/testdata$ make -s clean check
First output line: address that gets passed to puts
Second output line: address that contains the string to be printed
 142c00 2025730a 00000000 252d3673 5b256c69   %s.....%-6s[%li
 1428d0 32323600 00000000 3d3d3d20 74726965  226.....=== trie
address@hidden:~/src/Development/binutils-gdb/testdata$ make -s clean check
LD=../ld/ld-new
../ld/ld-new: warning: cannot find entry symbol _start; defaulting to
0000000000100120
First output line: address that gets passed to puts
Second output line: address that contains the string to be printed
 1428b0 6e000000 00000000 32323600 00000000  n.......226.....
 1428b0 6e000000 00000000 32323600 00000000  n.......226.....

Using ld, the output is OK (the same line is outputted twice), using gold (the
default), the output shows that the string reference is off. The testcase is
host platform independent, it just requires binutils to be compiled for target
architecture sparc64-unknown-linux-gnu.

Interestingly, the output from gold has been observed to be correct for some
orders of the object files, but incorrect for other orders (happened to me
until I had sorting in, as the file names got mixed up as the kernel liked
depending on what files were present in the same directory).

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

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