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

(cherry picked from commit 32231805fbe2b9438c2de50c229b43c016207a08)

Details

Provenance
val_packett.coolAuthored on Apr 20 2021, 12:47 AM
mjgCommitted on Jun 26 2021, 3:52 PM
Reviewer
arichardson
Differential Revision
D29159: linker_set: fix globl/weak symbol redefinitions to work on clang 12
Parents
rGd4f253ea50f7: sys/dev/md: Drop unncessary __GLOBL(mfs_root)
Branches
Unknown
Tags
Unknown