Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Oct 2018 17:35:32 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339181 - in head/lib/csu: arm common
Message-ID:  <201810041735.w94HZWVn061837@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Thu Oct  4 17:35:32 2018
New Revision: 339181
URL: https://svnweb.freebsd.org/changeset/base/339181

Log:
  crt: switch to standard note type definitions from elf_common.h
  
  This makes it easier to grep the source tree for these notes, and
  ensures that they will remain in sync.
  
  Reviewed by:	kib
  Approved by:	re (gjb)
  MFC after:	1 week
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D17408

Modified:
  head/lib/csu/arm/crt1.c
  head/lib/csu/common/crtbrand.c
  head/lib/csu/common/ignore_init.c
  head/lib/csu/common/notes.h

Modified: head/lib/csu/arm/crt1.c
==============================================================================
--- head/lib/csu/arm/crt1.c	Thu Oct  4 11:47:53 2018	(r339180)
+++ head/lib/csu/arm/crt1.c	Thu Oct  4 17:35:32 2018	(r339181)
@@ -44,6 +44,8 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#include <sys/param.h>
+#include <sys/elf_common.h>
 #include <stdlib.h>
 
 #include "libc_private.h"
@@ -120,7 +122,7 @@ static const struct {
 } archtag __attribute__ ((section (NOTE_SECTION), aligned(4))) __used = {
 	.namesz = sizeof(NOTE_FREEBSD_VENDOR),
 	.descsz = sizeof(MACHINE_ARCH),
-	.type = ARCH_NOTETYPE,
+	.type = NT_FREEBSD_ARCH_TAG,
 	.name = NOTE_FREEBSD_VENDOR,
 	.desc = MACHINE_ARCH
 };

Modified: head/lib/csu/common/crtbrand.c
==============================================================================
--- head/lib/csu/common/crtbrand.c	Thu Oct  4 11:47:53 2018	(r339180)
+++ head/lib/csu/common/crtbrand.c	Thu Oct  4 17:35:32 2018	(r339181)
@@ -29,6 +29,7 @@
 __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
+#include <sys/elf_common.h>
 #include "notes.h"
 
 /*
@@ -62,7 +63,7 @@ static const struct {
 } abitag __attribute__ ((section (NOTE_SECTION), aligned(4))) __used = {
 	.namesz = sizeof(NOTE_FREEBSD_VENDOR),
 	.descsz = sizeof(int32_t),
-	.type = ABI_NOTETYPE,
+	.type = NT_FREEBSD_ABI_TAG,
 	.name = NOTE_FREEBSD_VENDOR,
 	.desc = __FreeBSD_version
 };

Modified: head/lib/csu/common/ignore_init.c
==============================================================================
--- head/lib/csu/common/ignore_init.c	Thu Oct  4 11:47:53 2018	(r339180)
+++ head/lib/csu/common/ignore_init.c	Thu Oct  4 17:35:32 2018	(r339181)
@@ -28,6 +28,8 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#include <sys/param.h>
+#include <sys/elf_common.h>
 #include "notes.h"
 
 extern int main(int, char **, char **);
@@ -114,7 +116,7 @@ static const struct {
     aligned(4))) __used = {
 	.namesz = sizeof(NOTE_FREEBSD_VENDOR),
 	.descsz = sizeof(uint32_t),
-	.type = CRT_NOINIT_NOTETYPE,
+	.type = NT_FREEBSD_NOINIT_TAG,
 	.name = NOTE_FREEBSD_VENDOR,
 	.desc = 0
 };

Modified: head/lib/csu/common/notes.h
==============================================================================
--- head/lib/csu/common/notes.h	Thu Oct  4 11:47:53 2018	(r339180)
+++ head/lib/csu/common/notes.h	Thu Oct  4 17:35:32 2018	(r339181)
@@ -34,8 +34,4 @@
 
 #define NOTE_SECTION		".note.tag"
 
-#define ABI_NOTETYPE		1
-#define	CRT_NOINIT_NOTETYPE	2
-#define	ARCH_NOTETYPE		3
-
 #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810041735.w94HZWVn061837>