Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/stand Quash .eh_frame unwind tables in boot ...
details: https://anonhg.NetBSD.org/src/rev/9374444d0e21
branches: trunk
changeset: 353121:9374444d0e21
user: uwe <uwe%NetBSD.org@localhost>
date: Thu Apr 20 19:09:29 2017 +0000
description:
Quash .eh_frame unwind tables in boot code.
diffstat:
sys/arch/macppc/stand/Makefile.inc | 7 ++++++-
sys/arch/macppc/stand/bootxx/Makefile | 4 +++-
sys/arch/macppc/stand/ofwboot/Makefile | 15 ++++++++++-----
3 files changed, 19 insertions(+), 7 deletions(-)
diffs (88 lines):
diff -r 34e577349db0 -r 9374444d0e21 sys/arch/macppc/stand/Makefile.inc
--- a/sys/arch/macppc/stand/Makefile.inc Thu Apr 20 18:53:12 2017 +0000
+++ b/sys/arch/macppc/stand/Makefile.inc Thu Apr 20 19:09:29 2017 +0000
@@ -1,3 +1,8 @@
-# $NetBSD: Makefile.inc,v 1.3 2000/02/07 16:26:59 tsubai Exp $
+# $NetBSD: Makefile.inc,v 1.4 2017/04/20 19:09:29 uwe Exp $
BINDIR= /usr/mdec
+
+CFLAGS_UNWIND.gcc= -fno-unwind-tables -fno-asynchronous-unwind-tables
+CFLAGS_UNWIND.clang= -fno-unwind-tables
+
+LINKFLAGS_UNWIND= --no-ld-generated-unwind-info
diff -r 34e577349db0 -r 9374444d0e21 sys/arch/macppc/stand/bootxx/Makefile
--- a/sys/arch/macppc/stand/bootxx/Makefile Thu Apr 20 18:53:12 2017 +0000
+++ b/sys/arch/macppc/stand/bootxx/Makefile Thu Apr 20 19:09:29 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2014/08/10 17:44:26 joerg Exp $
+# $NetBSD: Makefile,v 1.16 2017/04/20 19:09:29 uwe Exp $
S!= cd ${.CURDIR}/../../../..; pwd
@@ -14,9 +14,11 @@
CFLAGS= -Os -Wall -ffreestanding
CFLAGS+= ${${ACTIVE_CC} == "gcc":? -msoft-float :}
+CFLAGS+= ${CFLAGS_UNWIND.${ACTIVE_CC}}
CPPFLAGS+= -D_STANDALONE -DPPC_OEA -I${.OBJDIR} -I${S}
STRIPFLAG=
LINKFLAGS= -x -N -Ttext 4000 -e _start
+LINKFLAGS+= ${LINKFLAGS_UNWIND}
CLEANFILES+= ${PROG}.sym
${PROG}: ${OBJS}
diff -r 34e577349db0 -r 9374444d0e21 sys/arch/macppc/stand/ofwboot/Makefile
--- a/sys/arch/macppc/stand/ofwboot/Makefile Thu Apr 20 18:53:12 2017 +0000
+++ b/sys/arch/macppc/stand/ofwboot/Makefile Thu Apr 20 19:09:29 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.57 2017/04/20 18:39:28 uwe Exp $
+# $NetBSD: Makefile,v 1.58 2017/04/20 19:09:29 uwe Exp $
S= ${.CURDIR}/../../../..
@@ -9,6 +9,7 @@
XCOFFXTRAOBJ= Xcoffxtra.o
CFLAGS+= -ffreestanding
CFLAGS+= ${${ACTIVE_CC} == "gcc":? -msoft-float :}
+CFLAGS+= ${CFLAGS_UNWIND.${ACTIVE_CC}}
CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
#CPPFLAGS+= -DDEBUG -DNETIF_DEBUG
CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP
@@ -55,6 +56,9 @@
CPPFLAGS+= -DRELOC=0x${RELOC} -DRELOC_FLATFILE=0x${RELOC_FLATFILE}
#CPPFLAGS+= -DXCOFF_GLUE # for booting PCI Powermacs
+LINKFLAGS= -N -Ttext ${RELOC} -Bstatic
+LINKFLAGS+= ${LINKFLAGS_UNWIND}
+
### find out what to use for libkern
KERN_AS= library
.include "${S}/lib/libkern/Makefile.inc"
@@ -82,7 +86,7 @@
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
${_MKTARGET_LINK}
- ${LD} -s -N -Ttext ${RELOC} -Bstatic -o ${PROG}.el1 \
+ ${LD} -s -o ${PROG}.el1 ${LINKFLAGS} \
${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
${OBJCOPY} -O binary ${PROG}.el1 ${PROG}
@@ -91,13 +95,14 @@
${PROG}.elf: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
${_MKTARGET_LINK}
- ${LD} -s -N -Ttext ${RELOC} -Bstatic -o ${PROG}.elf \
+ ${LD} -s -o ${PROG}.elf ${LINKFLAGS} \
${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
${PROG}.xcf: ${OBJS} ${XCOFFXTRAOBJ} ${LIBSA} ${LIBZ} ${LIBKERN}
${_MKTARGET_LINK}
- ${LD} -N -T ${.CURDIR}/../fixcoff/elf32_powerpc_merge.x -e _entry \
- -Ttext ${RELOC} -Bstatic -o ${PROG}.mrg ${XCOFFXTRAOBJ} \
+ ${LD} -o ${PROG}.mrg ${LINKFLAGS} \
+ -T ${.CURDIR}/../fixcoff/elf32_powerpc_merge.x \
+ -e _entry ${XCOFFXTRAOBJ} \
${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
${OBJCOPY} -O aixcoff-rs6000 -R .comment -R .note \
${PROG}.mrg ${PROG}.xcf
Home |
Main Index |
Thread Index |
Old Index