Source-Changes-HG archive

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

[src/trunk]: src Use wildcards for stripping/preserving the mapping symbols o...



details:   https://anonhg.NetBSD.org/src/rev/b6cdd640dea6
branches:  trunk
changeset: 331578:b6cdd640dea6
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Aug 14 18:39:38 2014 +0000

description:
Use wildcards for stripping/preserving the mapping symbols on ARM and
AArch64. LLVM creates unique symbols in each file of the form $a.n etc.

diffstat:

 share/mk/bsd.sys.mk                    |  6 +++---
 sys/arch/aarch64/conf/Makefile.aarch64 |  6 +++---
 sys/arch/arm/conf/Makefile.arm         |  7 +++----
 3 files changed, 9 insertions(+), 10 deletions(-)

diffs (63 lines):

diff -r 7439ef52b118 -r b6cdd640dea6 share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk       Thu Aug 14 18:38:29 2014 +0000
+++ b/share/mk/bsd.sys.mk       Thu Aug 14 18:39:38 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.sys.mk,v 1.243 2014/08/14 15:14:45 matt Exp $
+#      $NetBSD: bsd.sys.mk,v 1.244 2014/08/14 18:39:38 joerg Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -261,10 +261,10 @@
 # Objcopy
 .if ${MACHINE_ARCH} == aarch64eb
 # AARCH64 big endian needs to preserve $x/$d symbols for the linker.
-OBJCOPYLIBFLAGS_EXTRA=-K '\$x' -K '\$d'
+OBJCOPYLIBFLAGS_EXTRA=-w -K '[$$][dx]' -K '[$$][dx]\.*'
 .elif !empty(MACHINE_ARCH:M*arm*eb)
 # ARM big endian needs to preserve $a/$d/$t symbols for the linker.
-OBJCOPYLIBFLAGS_EXTRA=-K '\$a' -K '\$d' -K '\$t'
+OBJCOPYLIBFLAGS_EXTRA=-w -K '[$$][adt]' -K '[$$][adt]\.*'
 .endif
 OBJCOPYLIBFLAGS?=${"${.TARGET:M*.po}" != "":?-X:-x} ${OBJCOPYLIBFLAGS_EXTRA}
 
diff -r 7439ef52b118 -r b6cdd640dea6 sys/arch/aarch64/conf/Makefile.aarch64
--- a/sys/arch/aarch64/conf/Makefile.aarch64    Thu Aug 14 18:38:29 2014 +0000
+++ b/sys/arch/aarch64/conf/Makefile.aarch64    Thu Aug 14 18:39:38 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.aarch64,v 1.1 2014/08/10 05:47:37 matt Exp $
+#      $NetBSD: Makefile.aarch64,v 1.2 2014/08/14 18:39:39 joerg Exp $
 
 # Makefile for NetBSD
 #
@@ -69,8 +69,8 @@
 # with ddb. Do it differently if 'makeoptions DEBUG="-g"' was specified.
 .if !defined(DEBUG) || empty(DEBUG:M-g*)
 SYSTEM_LD_TAIL?=       ${SYSTEM_LD_TAIL_DBSYM}; \
-                       ${OBJCOPY} --strip-symbol='$$k' \
-                                  --strip-symbol='$$d' $@ ;\
+                       ${OBJCOPY} -w --strip-symbol='[$$][dx]' \
+                                  --strip-symbol='[$$][dx]\.*' $@ ;\
                        ${SIZE} $@; chmod 755 $@
 .else
 STRIPFLAGS=-g --strip-symbol='$$x' --strip-symbol='$$d'
diff -r 7439ef52b118 -r b6cdd640dea6 sys/arch/arm/conf/Makefile.arm
--- a/sys/arch/arm/conf/Makefile.arm    Thu Aug 14 18:38:29 2014 +0000
+++ b/sys/arch/arm/conf/Makefile.arm    Thu Aug 14 18:39:38 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.arm,v 1.42 2014/03/02 13:21:59 joerg Exp $
+#      $NetBSD: Makefile.arm,v 1.43 2014/08/14 18:39:39 joerg Exp $
 
 # Makefile for NetBSD
 #
@@ -83,9 +83,8 @@
 # with ddb. Do it differently if 'makeoptions DEBUG="-g"' was specified.
 .if !defined(DEBUG) || empty(DEBUG:M-g*)
 SYSTEM_LD_TAIL?=       ${SYSTEM_LD_TAIL_DBSYM} ; \
-                       ${OBJCOPY} --strip-symbol='$$a'  \
-                                   --strip-symbol='$$t'         \
-                                   --strip-symbol='$$d' $@     ;\
+                       ${OBJCOPY} --wildcard --strip-symbol='[$$][atd]' \
+                                   --strip-symbol='[$$][atd]\.*' $@;   \
                        ${SIZE} $@; chmod 755 $@
 .else
 STRIPFLAGS=-g --strip-symbol='$$a' --strip-symbol='$$t' --strip-symbol='$$d'



Home | Main Index | Thread Index | Old Index