Module Name:    src
Committed By:   matt
Date:           Tue Sep 10 16:35:10 UTC 2013

Modified Files:
        src/libexec/ld.elf_so: sysident.h
        src/libexec/ld.elf_so/arch/arm: Makefile.inc

Log Message:
For earm, emit a MARCH note.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/libexec/ld.elf_so/sysident.h
cvs rdiff -u -r1.19 -r1.20 src/libexec/ld.elf_so/arch/arm/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/ld.elf_so/sysident.h
diff -u src/libexec/ld.elf_so/sysident.h:1.15 src/libexec/ld.elf_so/sysident.h:1.16
--- src/libexec/ld.elf_so/sysident.h:1.15	Mon May  6 08:02:20 2013
+++ src/libexec/ld.elf_so/sysident.h	Tue Sep 10 16:35:10 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: sysident.h,v 1.15 2013/05/06 08:02:20 skrll Exp $ */
+/* $NetBSD: sysident.h,v 1.16 2013/09/10 16:35:10 matt Exp $ */
 
 /*
  * Copyright (c) 1997 Christopher G. Demetriou
@@ -89,3 +89,20 @@ __asm(
 	"\t.previous\n"
 	"\t.p2align\t2\n"
 );
+
+#ifdef ELF_NOTE_MARCH_DESC
+__asm(
+	".section\t\".note.netbsd.march\", \"a\"\n"
+	"\t.p2align\t2\n\n"
+
+	"\t.long\t" __S(ELF_NOTE_MARCH_NAMESZ) "\n"
+	"\t.long\t2f-1f\n"
+	"\t.long\t" __S(ELF_NOTE_TYPE_MARCH_TAG) "\n"
+	"\t.ascii\t" __S(ELF_NOTE_MARCH_NAME) "\n"
+	"1:\t.asciz\t" __S(ELF_NOTE_MARCH_DESC) "\n"
+	"2:\n"
+
+	"\t.previous\n"
+	"\t.p2align\t2\n"
+);
+#endif

Index: src/libexec/ld.elf_so/arch/arm/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/arm/Makefile.inc:1.19 src/libexec/ld.elf_so/arch/arm/Makefile.inc:1.20
--- src/libexec/ld.elf_so/arch/arm/Makefile.inc:1.19	Fri May  3 15:52:31 2013
+++ src/libexec/ld.elf_so/arch/arm/Makefile.inc	Tue Sep 10 16:35:10 2013
@@ -1,6 +1,7 @@
-#	$NetBSD: Makefile.inc,v 1.19 2013/05/03 15:52:31 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.20 2013/09/10 16:35:10 matt Exp $
 
 SRCS+=		rtld_start.S mdreloc.c
+#CPUFLAGS.rtld_start.S+=	-marm
 
 # XXX Should not be in CPPFLAGS!
 CPPFLAGS+=	-fpic
@@ -8,6 +9,7 @@ CPPFLAGS+=	-fpic
 CPPFLAGS+=	-DELFSIZE=32
 .if !empty(LDELFSO_MACHINE_ARCH:Mearm*)
 CPPFLAGS+=	-DHAVE_INITFINI_ARRAY
+CPPFLAGS+=	-DELF_NOTE_MARCH_DESC=\"${LDELFSO_MACHINE_ARCH}\"
 SRCS+=		find_exidx.c
 .endif
 

Reply via email to