bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/26404] ld: INSERT [AFTER|BEFORE] variant for extension purposes


From: nickc at redhat dot com
Subject: [Bug ld/26404] ld: INSERT [AFTER|BEFORE] variant for extension purposes
Date: Fri, 05 Mar 2021 11:29:53 +0000

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

--- Comment #7 from Nick Clifton <nickc at redhat dot com> ---
(In reply to Fangrui Song from comment #6)

> scriptfile defines multiple SECTIONS commands. Each SECTIONS defines exactly
> one output section (for the first implementation we make the scope as narrow
> as possible).
> 
>   SECTIONS {
>     .foo : { KEEP(*(.foo)) }

If there already is a .foo section in the linker script, should any kind of
message be issued ?  I assume not by default, but maybe if the --verbose option
is active then it would be helpful to know that the override has happened. 
Also, if --verbose is used, then presumably the overwritten version is the one
that should be displayed.

> If the main script defines .foo, its .foo is overwritten;
> if the main script does not define .foo, the new .foo is inserted as an
> orphan (the regular orphan placement rule applies).

This might be a problem as section placement is often very important.
We may need to implement your INSERT BEFORE/AFTER idea as well.

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