Bug 15355 - ppc64 linker script failure
Summary: ppc64 linker script failure
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.24
: P2 normal
Target Milestone: ---
Assignee: Alan Modra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-10 07:55 UTC by Anton Blanchard
Modified: 2014-03-28 19:03 UTC (History)
3 users (show)

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


Attachments
ppc64 kernel linker script (8.42 KB, application/octet-stream)
2013-04-10 07:55 UTC, Anton Blanchard
Details
Trivial source code to link (22 bytes, text/plain)
2013-04-10 07:56 UTC, Anton Blanchard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Blanchard 2013-04-10 07:55:46 UTC
Created attachment 6973 [details]
ppc64 kernel linker script

I see the following failure when building a ppc64 Linux kernel with gold:

# gcc -c foo.c
# ld -m elf64ppc -Bstatic -T vmlinux.lds foo.o

ld: internal error in segment_precedes, at layout.cc:3183
Comment 1 Anton Blanchard 2013-04-10 07:56:18 UTC
Created attachment 6974 [details]
Trivial source code to link
Comment 2 Alan Modra 2013-04-11 01:45:31 UTC
This is due to the linker script specifying two PT_NOTE segments, something that gold seems to think should not be allowed.
Comment 3 Sourceware Commits 2013-04-21 23:21:58 UTC
CVSROOT:	/cvs/src
Module name:	src
Changes by:	amodra@sourceware.org	2013-04-21 23:21:56

Modified files:
	gold           : ChangeLog layout.cc 

Log message:
	PR gold/15355
	* layout.cc (Layout::segment_precedes): Allow more than one
	segment with the same type and flags.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&r1=1.1068&r2=1.1069
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/layout.cc.diff?cvsroot=src&r1=1.249&r2=1.250
Comment 4 Alan Modra 2013-04-22 03:26:21 UTC
Fixed
Comment 5 Cary Coutant 2014-03-28 19:03:44 UTC
*** Bug 16389 has been marked as a duplicate of this bug. ***