mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Nudge lld to break the kernel read-only and read-write sections into
separate 2M pages. The binutils default for max-page-size and common-page-size used to produce this result. By setting these values, we can nudge lld to also separate these sections into separate 2M pages. Reviewed by: jhb, kib Discussed with: emaste Sponsored by: Netflix Differential Revision: D14282
This commit is contained in:
parent
c2a5dc6cd7
commit
a0d442c0d8
1 changed files with 4 additions and 0 deletions
|
|
@ -120,6 +120,10 @@ CFLAGS+= ${CONF_CFLAGS}
|
|||
LDFLAGS+= -Wl,--build-id=sha1
|
||||
.endif
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "amd64"
|
||||
LDFLAGS+= -Wl,-z max-page-size=2097152 -Wl,-z common-page-size=4096
|
||||
.endif
|
||||
|
||||
NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC}
|
||||
NORMAL_S= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}
|
||||
PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC}
|
||||
|
|
|
|||
Loading…
Reference in a new issue