HomeFreeBSD

linker_set: fix globl/weak symbol redefinitions to work on clang 12

Description

linker_set: fix globl/weak symbol redefinitions to work on clang 12

In clang 12.0.0.rc2, going from weak to global is now a hard error:

/usr/src/stand/libsa/amd64/_setjmp.S:67:25: error: _longjmp changed binding to STB_GLOBAL
.text; .p2align 4,0x90; .globl _longjmp; .type _longjmp,@function; _longjmp:; .cfi_startproc

And the other way is a warning, but we have -Werror:

error: __start_set_Xcommand_set changed binding to STB_WEAK [-Werror,-Winline-asm]
error: __stop_set_Xcommand_set changed binding to STB_WEAK [-Werror,-Winline-asm]

ref: https://reviews.llvm.org/D90108

Reviewed By: arichardson
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29159

Details

Provenance
val_packett.coolAuthored on Apr 20 2021, 12:47 AM
arichardsonCommitted on Apr 20 2021, 1:56 AM
Reviewer
arichardson
Differential Revision
D29159: linker_set: fix globl/weak symbol redefinitions to work on clang 12
Parents
rG5a89498d1986: nfsd: fix stripe size reply for the File Layout pNFS server
Branches
Unknown
Tags
Unknown