svn commit: r216338 - in head/lib/csu: amd64 arm i386-elf ia64 powerpc powerpc64 sparc64

Dimitry Andric dim at FreeBSD.org
Thu Dec 9 21:31:22 UTC 2010


Author: dim
Date: Thu Dec  9 21:31:21 2010
New Revision: 216338
URL: http://svn.freebsd.org/changeset/base/216338

Log:
  Let all .c and .S files under lib/csu consistently use the __FBSDID()
  macro for identification, instead of several different hand-rolled
  variants (plain .ident, .ascii, etc).

Modified:
  head/lib/csu/amd64/crt1.c
  head/lib/csu/amd64/crti.S
  head/lib/csu/amd64/crtn.S
  head/lib/csu/arm/crt1.c
  head/lib/csu/arm/crtn.S
  head/lib/csu/i386-elf/crt1_c.c
  head/lib/csu/i386-elf/crt1_s.S
  head/lib/csu/i386-elf/crti.S
  head/lib/csu/i386-elf/crtn.S
  head/lib/csu/ia64/crt1.S
  head/lib/csu/ia64/crti.S
  head/lib/csu/ia64/crtn.S
  head/lib/csu/powerpc/crt1.c
  head/lib/csu/powerpc/crti.S
  head/lib/csu/powerpc/crtn.S
  head/lib/csu/powerpc64/crt1.c
  head/lib/csu/powerpc64/crti.S
  head/lib/csu/powerpc64/crtn.S
  head/lib/csu/sparc64/crt1.c
  head/lib/csu/sparc64/crti.S
  head/lib/csu/sparc64/crtn.S

Modified: head/lib/csu/amd64/crt1.c
==============================================================================
--- head/lib/csu/amd64/crt1.c	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/amd64/crt1.c	Thu Dec  9 21:31:21 2010	(r216338)
@@ -24,6 +24,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
 #ifndef lint
 #ifndef __GNUC__
 #error "GCC is needed to compile this file"
@@ -92,5 +95,3 @@ __asm__("eprol:");
 	_init();
 	exit( main(argc, argv, env) );
 }
-
-__asm__(".ident\t\"$FreeBSD$\"");

Modified: head/lib/csu/amd64/crti.S
==============================================================================
--- head/lib/csu/amd64/crti.S	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/amd64/crti.S	Thu Dec  9 21:31:21 2010	(r216338)
@@ -23,6 +23,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
 	.section .init,"ax", at progbits
 	.align	4
 	.globl	_init
@@ -36,6 +39,3 @@ _init:
 	.type	_fini, at function
 _fini:
 	subq	$8,%rsp
-
-	.section .rodata
-.ascii "$FreeBSD$\0"

Modified: head/lib/csu/amd64/crtn.S
==============================================================================
--- head/lib/csu/amd64/crtn.S	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/amd64/crtn.S	Thu Dec  9 21:31:21 2010	(r216338)
@@ -23,6 +23,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
 	.section .init,"ax", at progbits
 	addq	$8,%rsp
 	ret
@@ -30,6 +33,3 @@
 	.section .fini,"ax", at progbits
 	addq	$8,%rsp
 	ret
-
-	.section .rodata
-.ascii "$FreeBSD$\0"

Modified: head/lib/csu/arm/crt1.c
==============================================================================
--- head/lib/csu/arm/crt1.c	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/arm/crt1.c	Thu Dec  9 21:31:21 2010	(r216338)
@@ -39,6 +39,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
 #ifndef lint
 #ifndef __GNUC__
 #error "GCC is needed to compile this file"
@@ -49,7 +52,6 @@
 
 #include "libc_private.h"
 #include "crtbrand.c"
-#include <machine/asm.h>
 
 struct Struct_Obj_Entry;
 struct ps_strings;
@@ -136,5 +138,3 @@ __asm__(".text");
 __asm__("eprol:");
 __asm__(".previous");
 #endif
-
-__asm__(".ident\t\"$FreeBSD$\"");

Modified: head/lib/csu/arm/crtn.S
==============================================================================
--- head/lib/csu/arm/crtn.S	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/arm/crtn.S	Thu Dec  9 21:31:21 2010	(r216338)
@@ -1,5 +1,6 @@
 #include <machine/asm.h>
 __FBSDID("$FreeBSD$");
+
 	.section .init,"ax",%progbits
 	ldmea	fp, {fp, sp, pc}
 	mov	pc, lr

Modified: head/lib/csu/i386-elf/crt1_c.c
==============================================================================
--- head/lib/csu/i386-elf/crt1_c.c	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/i386-elf/crt1_c.c	Thu Dec  9 21:31:21 2010	(r216338)
@@ -26,6 +26,9 @@
  * $FreeBSD$
  */
 
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
 #ifndef lint
 #ifndef __GNUC__
 #error "GCC is needed to compile this file"

Modified: head/lib/csu/i386-elf/crt1_s.S
==============================================================================
--- head/lib/csu/i386-elf/crt1_s.S	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/i386-elf/crt1_s.S	Thu Dec  9 21:31:21 2010	(r216338)
@@ -25,6 +25,8 @@
  * $FreeBSD$
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
 
 	.text
 	.align	4
@@ -47,5 +49,3 @@ _start:
 	int3
 	.cfi_endproc
 	.size	_start, . - _start
-
-	.ident	"$FreeBSD$"

Modified: head/lib/csu/i386-elf/crti.S
==============================================================================
--- head/lib/csu/i386-elf/crti.S	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/i386-elf/crti.S	Thu Dec  9 21:31:21 2010	(r216338)
@@ -23,6 +23,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
 	.section .init,"ax", at progbits
 	.align	4
 	.globl	_init
@@ -36,6 +39,3 @@ _init:
 	.type	_fini, at function
 _fini:
 	sub	$12,%esp	/* re-align stack pointer */
-
-	.section .rodata
-.ascii "$FreeBSD$\0"

Modified: head/lib/csu/i386-elf/crtn.S
==============================================================================
--- head/lib/csu/i386-elf/crtn.S	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/i386-elf/crtn.S	Thu Dec  9 21:31:21 2010	(r216338)
@@ -23,6 +23,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
 	.section .init,"ax", at progbits
 	add	$12,%esp
 	ret
@@ -30,6 +33,3 @@
 	.section .fini,"ax", at progbits
 	add	$12,%esp
 	ret
-
-	.section .rodata
-.ascii "$FreeBSD$\0"

Modified: head/lib/csu/ia64/crt1.S
==============================================================================
--- head/lib/csu/ia64/crt1.S	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/ia64/crt1.S	Thu Dec  9 21:31:21 2010	(r216338)
@@ -24,7 +24,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-		.ident		"$FreeBSD$"
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
 
 		.text
 

Modified: head/lib/csu/ia64/crti.S
==============================================================================
--- head/lib/csu/ia64/crti.S	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/ia64/crti.S	Thu Dec  9 21:31:21 2010	(r216338)
@@ -26,6 +26,9 @@
  * $FreeBSD$
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
 /*
  * This file (and its companion crtn.S) form the terminators of the
  * .init and .fini sections.

Modified: head/lib/csu/ia64/crtn.S
==============================================================================
--- head/lib/csu/ia64/crtn.S	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/ia64/crtn.S	Thu Dec  9 21:31:21 2010	(r216338)
@@ -26,6 +26,9 @@
  * $FreeBSD$
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
 	.file	"crtn.S"
 
 	.section .init,"ax", at progbits

Modified: head/lib/csu/powerpc/crt1.c
==============================================================================
--- head/lib/csu/powerpc/crt1.c	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/powerpc/crt1.c	Thu Dec  9 21:31:21 2010	(r216338)
@@ -39,6 +39,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
 #ifndef lint
 #ifndef __GNUC__
 #error "GCC is needed to compile this file"
@@ -120,5 +123,3 @@ __asm__(".text");
 __asm__("eprol:");
 __asm__(".previous");
 #endif
-
-__asm__(".ident\t\"$FreeBSD$\"");

Modified: head/lib/csu/powerpc/crti.S
==============================================================================
--- head/lib/csu/powerpc/crti.S	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/powerpc/crti.S	Thu Dec  9 21:31:21 2010	(r216338)
@@ -22,7 +22,10 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-	
+
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
 	.section .init,"ax", at progbits
 	.align	2
 	.globl	_init
@@ -44,7 +47,3 @@ _fini:
 	stw 31,12(1)
 	stw 0,20(1)
 	mr 31,1
-
-
-	.section .rodata
-.ascii "$FreeBSD$\0"

Modified: head/lib/csu/powerpc/crtn.S
==============================================================================
--- head/lib/csu/powerpc/crtn.S	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/powerpc/crtn.S	Thu Dec  9 21:31:21 2010	(r216338)
@@ -23,6 +23,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
 	.section .init,"ax", at progbits
 	lwz 11,0(1)
 	lwz 0,4(11)
@@ -39,7 +42,3 @@
 	lwz 31,-4(11)
 	mr 1,11
 	blr
-
-
-	.section .rodata
-.ascii "$FreeBSD$\0"

Modified: head/lib/csu/powerpc64/crt1.c
==============================================================================
--- head/lib/csu/powerpc64/crt1.c	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/powerpc64/crt1.c	Thu Dec  9 21:31:21 2010	(r216338)
@@ -39,6 +39,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
 #ifndef lint
 #ifndef __GNUC__
 #error "GCC is needed to compile this file"
@@ -119,5 +122,3 @@ __asm__(".text");
 __asm__("eprol:");
 __asm__(".previous");
 #endif
-
-__asm__(".ident\t\"$FreeBSD$\"");

Modified: head/lib/csu/powerpc64/crti.S
==============================================================================
--- head/lib/csu/powerpc64/crti.S	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/powerpc64/crti.S	Thu Dec  9 21:31:21 2010	(r216338)
@@ -22,7 +22,10 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-	
+
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
 	.section .init,"ax", at progbits
 	.align	2
 	.globl	_init
@@ -56,6 +59,3 @@ _fini:
 	stdu 1,-48(1)
 	mflr 0
 	std 0,64(1)
-
-	.section .rodata
-.ascii "$FreeBSD$\0"

Modified: head/lib/csu/powerpc64/crtn.S
==============================================================================
--- head/lib/csu/powerpc64/crtn.S	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/powerpc64/crtn.S	Thu Dec  9 21:31:21 2010	(r216338)
@@ -23,6 +23,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
 	.section .init,"ax", at progbits
 	ld %r1,0(%r1)
 	ld 0,16(%r1)
@@ -35,7 +38,3 @@
 	ld 0,16(%r1)
 	mtlr 0
 	blr
-
-
-	.section .rodata
-.ascii "$FreeBSD$\0"

Modified: head/lib/csu/sparc64/crt1.c
==============================================================================
--- head/lib/csu/sparc64/crt1.c	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/sparc64/crt1.c	Thu Dec  9 21:31:21 2010	(r216338)
@@ -30,6 +30,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
 #ifndef lint
 #ifndef __GNUC__
 #error "GCC is needed to compile this file"
@@ -121,5 +124,3 @@ __asm__(".text");
 __asm__("eprol:");
 __asm__(".previous");
 #endif
-
-__asm__(".ident\t\"$FreeBSD$\"");

Modified: head/lib/csu/sparc64/crti.S
==============================================================================
--- head/lib/csu/sparc64/crti.S	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/sparc64/crti.S	Thu Dec  9 21:31:21 2010	(r216338)
@@ -26,6 +26,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
  	.file	"crti.S"
 
 	/* The minimum stack frame size (bytes) is:
@@ -52,7 +55,3 @@ _init:
 	.align	4
 _fini:
 	save %sp,-192,%sp
-
-
-	.section .rodata
-.ascii "$FreeBSD$\0"

Modified: head/lib/csu/sparc64/crtn.S
==============================================================================
--- head/lib/csu/sparc64/crtn.S	Thu Dec  9 21:29:36 2010	(r216337)
+++ head/lib/csu/sparc64/crtn.S	Thu Dec  9 21:31:21 2010	(r216338)
@@ -26,6 +26,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
  	.file	"crtn.S"
 
 	.section .init,"ax", at progbits
@@ -37,6 +40,3 @@
 	.align	4
 	ret
 	 restore
-
-	.section .rodata
-.ascii "$FreeBSD$\0"


More information about the svn-src-head mailing list