mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
libsys: link symbolic
so that libc/libthr do not preempt libsys symbols, esp. errno-related. The issue is, if libsys is linked with DT_BIND_NOW flag, and then loaded as filter, rtld tries to relocate its PLT symbols immediately, not as filter. There, during symbol lookup, rtld finds filtering symbols in libc, and since libc is in loading filters mode, the resolution stops there. The end result is that libsys links to libc. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D44027
This commit is contained in:
parent
0085afdceb
commit
baa7d0741b
|
@ -43,6 +43,7 @@ CFLAGS+= -ftls-model=initial-exec
|
|||
# Link with static libcompiler_rt.a.
|
||||
#
|
||||
LDFLAGS+= -nodefaultlibs
|
||||
LDFLAGS+= -Wl,-Bsymbolic
|
||||
LIBADD+= compiler_rt
|
||||
|
||||
.if ${MK_SSP} != "no" && \
|
||||
|
|
Loading…
Reference in a new issue