bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/16804] gold rejects kernel linker script


From: ccoutant at google dot com
Subject: [Bug gold/16804] gold rejects kernel linker script
Date: Thu, 03 Apr 2014 18:00:41 +0000

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

--- Comment #8 from Cary Coutant <ccoutant at google dot com> ---
> Huh?  I agree that your suggestion appears to work, but isn't gold supposed to
> speak linker script language as spoken by GNU ld?

We try to get as close as possible, but the two linkers are enough
different that we can't do bug-for-bug compatibility.

> The de facto reference
> (https://sourceware.org/binutils/docs/ld/Output-Section-Description.html#Output-Section-Description)
> says:
>
>      section [address] [(type)] :
>        [AT(lma)]
>        [ALIGN(section_align) | ALIGN_WITH_INPUT]
>        [SUBALIGN(subsection_align)]
>        [constraint]
>        {
>          output-section-command
>          output-section-command
>          ...
>        } [>region] [AT>lma_region] [:phdr :phdr ...] [=fillexp]
>
> The comma at the end is conspicuously absent.

Huh. You're right, the docs don't say anything about commas, even
though the linker supports it. I'll see about adding it to the docs.

> Please either document or fix this.  I realize that GNU ld is doing something
> very strange with fillexp, but the fact that a single comma (but not two
> commas!) is legal at the end of an output section description appears to be
> completely undocumented.

Another, documented, way of disambiguating your script is to use
quotes around the special section name "/DISCARD/". In "Output Section
Name", it says: "A section name may consist of any sequence of
characters, but a name which contains any unusual characters such as
commas must be quoted." I guess they don't think '/' is unusual in a
name.

-cary

-- 
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]