diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-04-01 19:12:15 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-04-01 19:12:15 +0000 |
commit | 6332d986266bbb9704bf14e1ad8df433064203c2 (patch) | |
tree | 30f6ac86eb6731af7cb28846f3ac8ec23ea11d1d /sys | |
parent | 2086f42c6f9735c2622be90c4e97f02afb618865 (diff) |
Build mips kernels with -G 0, to disable use of so-called `small' data and
bss sections. The current kernel linker script is not gp-friendly enough for
that; and while gas 2.15 was not attempting to output gp-relative relocations
for variables which might have ended up in .sdata or .sbss, gas 2.17 will,
and the kernel will fail to link.
To be improved eventually with a better kernel ld script putting the
gp-addressable sections close enough to gp... and making sure kernel gp is
reloaded in all the userland->kernel code paths which might need gp in the
kernel.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/loongson/conf/Makefile.loongson | 4 | ||||
-rw-r--r-- | sys/arch/octeon/conf/Makefile.octeon | 4 | ||||
-rw-r--r-- | sys/arch/sgi/conf/Makefile.sgi | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/loongson/conf/Makefile.loongson b/sys/arch/loongson/conf/Makefile.loongson index 0fa050deeea..b16508dc038 100644 --- a/sys/arch/loongson/conf/Makefile.loongson +++ b/sys/arch/loongson/conf/Makefile.loongson @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.loongson,v 1.36 2013/03/30 07:25:20 tedu Exp $ +# $OpenBSD: Makefile.loongson,v 1.37 2013/04/01 19:12:13 miod Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -34,7 +34,7 @@ CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \ -Wno-main -Wno-uninitialized -Wno-format \ -Wstack-larger-than-2047 -CMACHFLAGS= -mno-abicalls ${ABI} -msoft-float -Wa,-mfix-loongson2f-btb +CMACHFLAGS= -mno-abicalls ${ABI} -msoft-float -Wa,-mfix-loongson2f-btb -G 0 CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ -fno-builtin-vsnprintf -fno-builtin-log \ -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS} diff --git a/sys/arch/octeon/conf/Makefile.octeon b/sys/arch/octeon/conf/Makefile.octeon index 8b016bf1114..77e5ed8bf63 100644 --- a/sys/arch/octeon/conf/Makefile.octeon +++ b/sys/arch/octeon/conf/Makefile.octeon @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.octeon,v 1.12 2013/03/30 07:25:20 tedu Exp $ +# $OpenBSD: Makefile.octeon,v 1.13 2013/04/01 19:12:14 miod Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -34,7 +34,7 @@ CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \ -Wno-main -Wno-uninitialized -Wno-format \ -Wstack-larger-than-2047 -CMACHFLAGS= -mno-abicalls ${ABI} -msoft-float +CMACHFLAGS= -mno-abicalls ${ABI} -msoft-float -G 0 CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ -fno-builtin-vsnprintf -fno-builtin-log \ -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS} diff --git a/sys/arch/sgi/conf/Makefile.sgi b/sys/arch/sgi/conf/Makefile.sgi index 84bd80e468e..a07ee2a9b8e 100644 --- a/sys/arch/sgi/conf/Makefile.sgi +++ b/sys/arch/sgi/conf/Makefile.sgi @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sgi,v 1.59 2013/03/30 07:25:20 tedu Exp $ +# $OpenBSD: Makefile.sgi,v 1.60 2013/04/01 19:12:14 miod Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -34,7 +34,7 @@ CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \ -Wno-main -Wno-uninitialized -Wno-format \ -Wstack-larger-than-2047 -CMACHFLAGS= -mno-abicalls ${ABI} -msoft-float +CMACHFLAGS= -mno-abicalls ${ABI} -msoft-float -G 0 CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ -fno-builtin-vsnprintf -fno-builtin-log \ -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS} |