bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/28143] start-stop-gc feature addition broke link with ldscript


From: amodra at gmail dot com
Subject: [Bug ld/28143] start-stop-gc feature addition broke link with ldscript
Date: Wed, 28 Jul 2021 00:44:23 +0000

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

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
           Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
         Resolution|---                         |NOTABUG

--- Comment #1 from Alan Modra <amodra at gmail dot com> ---
(In reply to andy from comment #0)
>     (bfd_elf_define_start_stop): Don't modify ldscript_def syms.
> was this change in behaviour around ldscripts intentional or is this a bug?

That was a deliberate change.  I believe it was wrong for ld to modify a user
definition of some symbol that just happens to match a linker defined symbol.

If you want these symbols to be protected visibility, you can do that by making
a reference to them protected.  eg.
$ cat foo.s
 .data
 .protected foo
 .dc.a foo
$ as -o foo.o foo.s
$ ld -o foo foo.o --defsym foo=0
$ readelf -s foo | grep foo
     3: 0000000000000000     0 NOTYPE  GLOBAL PROTECTED  ABS foo

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