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.