Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150524508
D33919.1792556237.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D33919.1792556237.diff
View Options
Index: sys/conf/kmod.mk
===================================================================
--- sys/conf/kmod.mk
+++ sys/conf/kmod.mk
@@ -220,10 +220,14 @@
${OBJCOPY} --only-keep-debug ${FULLPROG} ${.TARGET}
.endif
+.if exists(${SYSDIR}/conf/ldscript.kmod.${MACHINE})
+LDSCRIPT_FLAGS?= -T ${SYSDIR}/conf/ldscript.kmod.${MACHINE}
+.endif
+
.if ${__KLD_SHARED} == yes
${FULLPROG}: ${KMOD}.kld
${LD} -m ${LD_EMULATION} -Bshareable -znotext -znorelro ${_LDFLAGS} \
- -o ${.TARGET} ${KMOD}.kld
+ ${LDSCRIPT_FLAGS} -o ${.TARGET} ${KMOD}.kld
.if !defined(DEBUG_FLAGS)
${OBJCOPY} --strip-debug ${.TARGET}
.endif
@@ -234,16 +238,13 @@
CLEANFILES+= export_syms
.endif
-.if exists(${SYSDIR}/conf/ldscript.kmod.${MACHINE})
-LDSCRIPT_FLAGS?= -T ${SYSDIR}/conf/ldscript.kmod.${MACHINE}
-.endif
-
.if ${__KLD_SHARED} == yes
${KMOD}.kld: ${OBJS} ${BLOB_OBJS}
.else
+_LDSCRIPT_FLAGS= ${LDSCRIPT_FLAGS}
${FULLPROG}: ${OBJS} ${BLOB_OBJS}
.endif
- ${LD} -m ${LD_EMULATION} ${_LDFLAGS} ${LDSCRIPT_FLAGS} -r -d \
+ ${LD} -m ${LD_EMULATION} ${_LDFLAGS} ${_LDSCRIPT_FLAGS} -r -d \
-o ${.TARGET} ${OBJS} ${BLOB_OBJS}
.if ${MK_CTF} != "no"
${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} ${BLOB_OBJS}
Index: sys/conf/ldscript.kmod.i386
===================================================================
--- sys/conf/ldscript.kmod.i386
+++ sys/conf/ldscript.kmod.i386
@@ -28,6 +28,7 @@
*/
SECTIONS
{
+ . = SIZEOF_HEADERS;
set_pcpu :
{
*(set_pcpu)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 21, 4:17 AM (10 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30574782
Default Alt Text
D33919.1792556237.diff (1 KB)
Attached To
Mode
D33919: Apply the module ldscript correctly on a shared ko
Attached
Detach File
Event Timeline
Log In to Comment