Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153370291
D25985.id75688.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D25985.id75688.diff
View Options
Index: head/share/mk/bsd.linker.mk
===================================================================
--- head/share/mk/bsd.linker.mk
+++ head/share/mk/bsd.linker.mk
@@ -94,6 +94,9 @@
.if ${${X_}LINKER_TYPE} == "lld" && ${${X_}LINKER_VERSION} >= 60000
${X_}LINKER_FEATURES+= retpoline
.endif
+.if ${${X_}LINKER_TYPE} == "lld" && ${${X_}LINKER_VERSION} >= 90000
+${X_}LINKER_FEATURES+= ifunc-noplt
+.endif
.endif
.else
# Use LD's values
Index: head/sys/conf/kern.pre.mk
===================================================================
--- head/sys/conf/kern.pre.mk
+++ head/sys/conf/kern.pre.mk
@@ -166,9 +166,13 @@
.if ${LINKER_TYPE} != "lld"
LDFLAGS+= -z common-page-size=4096
.else
+.if defined(LINKER_FEATURES) && !${LINKER_FEATURES:Mifunc-noplt}
+.warning "Linker ${LD} does not support -z ifunc-noplt -> ifunc calls are unoptimized."
+.else
LDFLAGS+= -z notext -z ifunc-noplt
.endif
.endif
+.endif # ${MACHINE_CPUARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "riscv"
# Hack: Work around undefined weak symbols being out of range when linking with
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 21, 6:38 PM (2 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31926286
Default Alt Text
D25985.id75688.diff (1 KB)
Attached To
Mode
D25985: Allow linking the kernel with a linker that doesn't support -z ifunc-noplt
Attached
Detach File
Event Timeline
Log In to Comment