[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/6992] New: constant strings don't get relocated properly in a
From: |
andyc at bluearc dot com |
Subject: |
[Bug gold/6992] New: constant strings don't get relocated properly in a relocatable built with gold |
Date: |
28 Oct 2008 16:47:46 -0000 |
Here's a program:
# cat main.cpp
#include <stdio.h>
int
main() {
printf("hello world\n");
return 0;
}
I have a script that builds that program:
# cat buildit.sh
LD=${LD:-'ld'}
g++ -c main.cpp
$LD -r -o relocatable.o --script script.lnk main.o
g++ -o main relocatable.o
./main
If I build the relocatable with the traditional linker, then the program prints
"hello world" as expected. If I build the relocatable with gold, then the
program prints garbage:
???H???
#
--
Summary: constant strings don't get relocated properly in a
relocatable built with gold
Product: binutils
Version: 2.20 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: gold
AssignedTo: ian at airs dot com
ReportedBy: andyc at bluearc dot com
CC: bug-binutils at gnu dot org,timb at bluearc dot com
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=6992
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug gold/6992] New: constant strings don't get relocated properly in a relocatable built with gold,
andyc at bluearc dot com <=