[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/24526] Generalize GC support for SHF_LINK_ORDER
From: |
i at maskray dot me |
Subject: |
[Bug ld/24526] Generalize GC support for SHF_LINK_ORDER |
Date: |
Fri, 20 Sep 2019 11:57:29 +0000 |
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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug ld/24526] Generalize GC support for SHF_LINK_ORDER,
i at maskray dot me <=