Bug 11533 - gold generates bad DSO
Summary: gold generates bad DSO
Status: RESOLVED OBSOLETE
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.21
: P2 normal
Target Milestone: ---
Assignee: Ian Lance Taylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-23 17:55 UTC by H.J. Lu
Modified: 2016-03-27 15:33 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
A testcase (538 bytes, application/octet-stream)
2010-04-23 17:56 UTC, H.J. Lu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2010-04-23 17:55:43 UTC
Gold generates bad DSO in some cases.
Comment 1 H.J. Lu 2010-04-23 17:56:28 UTC
Created attachment 4749 [details]
A testcase

[hjl@gnu-6 alignment-4]$ make
cc    -c -o foo.o foo.c
ld -z max-page-size=0x1000 -shared -o libld.so foo.o
cc -o main1 main.o libld.so -Wl,-rpath,.
ld.gold -z max-page-size=0x1000 -shared -o libgold.so foo.o
cc -o main2 main.o libgold.so -Wl,-rpath,.
./main1
foo: 0x604000, 128
./main2
./main2: error while loading shared libraries: libgold.so: ELF load command
address/offset not properly aligned
make: *** [all] Error 127
[hjl@gnu-6 alignment-4]$
Comment 2 Cary Coutant 2016-03-27 15:33:51 UTC
This appears to have been fixed at some point. It no longer fails one trunk.