bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/28124] ld: Make special sections in a section group GCable


From: i at maskray dot me
Subject: [Bug ld/28124] ld: Make special sections in a section group GCable
Date: Fri, 23 Jul 2021 23:46:17 +0000

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

--- Comment #1 from Fangrui Song <i at maskray dot me> ---
For SHF_LINK_ORDER:

% cat a.s
.globl _start; _start: nop
.section .text.a,"ax",@progbits; ret
.section .init_array.a,"awo",@init_array,.text.a; ret
% gcc -fuse-ld=bfd a.s -nostdlib -Wl,--gc-sections
/usr/bin/ld.bfd: a.out: sh_link of section `.init_array' points to discarded
section `.text.a' of `/tmp/cceqfqVM.o'
/usr/bin/ld.bfd: final link failed: bad value
collect2: error: ld returned 1 exit status

(Trunk GNU ld is the same.)

If we allow GCable .init_array, we should discard .init_array.a and this should
link without an error.

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