Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/mk PR/57147: Andreas Gustafsson: Work around binutils ...



details:   https://anonhg.NetBSD.org/src/rev/165103697e76
branches:  trunk
changeset: 372837:165103697e76
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Dec 30 02:01:42 2022 +0000

description:
PR/57147: Andreas Gustafsson: Work around binutils 2.38+ relro
issue with +2M size in every binary by setting max-page-size. This
is the simplest fix; fixing this properly requires a lot more
surgery, and upstream seems uncertain how to fix it properly.

diffstat:

 share/mk/bsd.sys.mk |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 069f01897fa1 -r 165103697e76 share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk       Thu Dec 29 22:41:36 2022 +0000
+++ b/share/mk/bsd.sys.mk       Fri Dec 30 02:01:42 2022 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.sys.mk,v 1.309 2021/12/14 16:22:07 christos Exp $
+#      $NetBSD: bsd.sys.mk,v 1.310 2022/12/30 02:01:42 christos Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -138,7 +138,10 @@
 .endif
 
 .if ${MKRELRO:Uno} != "no"
-LDFLAGS+=      -Wl,-z,relro
+# XXX Workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014301
+# Set manually the maxpagesize to 4096 which is ok for now since we only
+# support relro by default on x86 and aarch64
+LDFLAGS+=      -Wl,-z,relro -Wl,-z,max-page-size=4096
 .endif
 
 .if ${MKRELRO:Uno} == "full" && ${NOFULLRELRO:Uno} == "no"



Home | Main Index | Thread Index | Old Index