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

Fangrui Song <i at maskray dot me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|gold                        |ld

--- Comment #1 from Fangrui Song <i at maskray dot me> ---
This is a feature request to both GNU ld and gold.

# a.s
.globl _start
_start:
.quad .foo

.section .foo,"a"
.quad 0
.section .bar,"ao",@progbits,.foo
.quad 0
.section .zed,"ao",@progbits,.foo
.quad 0


llvm-mc -filetype=obj -triple=x86_64 a.s -o a.o
ld.bfd --gc-sections a.o -o a; readelf -S a # .bar and .zed were collected
gold --gc-sections a.o -o a; readelf -S a   # .bar and .zed were collected
ld.lld --gc-sections a.o -o a; readelf -S a # .bar and .zed were retained


In lld, the SHF_LINK_ORDER sections .bar and .zed are treated like .rela.foo.
The retain of .foo will also keep .bar and .zed alive.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to