Let lib/csu use __FBSDID consistently [was: Re: svn commit: r216200 - in projects/binutils-2.17: ...]

Dimitry Andric dim at FreeBSD.org
Wed Dec 8 22:42:08 UTC 2010


On 2010-12-08 12:47, Dimitry Andric wrote:
...
> As an aside, I saw that lib/csu/ia64/crti.S and crtn.S miss .ident
> statements, and as a whole lib/csu seems a bit inconsistent with those.
> Some files use __FBSID(), others plain .ident statements, and yet others
> simply use .ascii, and put the ID's in the .rodata segment... I'll have
> a look at cleaning that up, I think. :)

Okay, here's a diff that lets lib/csu consistently use __FBSDID().  This
survives a make universe.  If there are no objections, I would like to
commit it.
-------------- next part --------------
Index: lib/csu/amd64/crt1.c
===================================================================
--- lib/csu/amd64/crt1.c	(revision 216309)
+++ lib/csu/amd64/crt1.c	(working copy)
@@ -24,6 +24,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: head/lib/csu/amd64/crt1.c 204756 2010-03-05 13:28:05Z uqs $");
+
 #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: head/lib/csu/amd64/crt1.c 204756 2010-03-05 13:28:05Z uqs $\"");
Index: lib/csu/amd64/crti.S
===================================================================
--- lib/csu/amd64/crti.S	(revision 216309)
+++ lib/csu/amd64/crti.S	(working copy)
@@ -23,6 +23,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD: head/lib/csu/amd64/crti.S 127252 2004-03-21 01:39:01Z peter $");
+
 	.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: head/lib/csu/amd64/crti.S 127252 2004-03-21 01:39:01Z peter $\0"
Index: lib/csu/amd64/crtn.S
===================================================================
--- lib/csu/amd64/crtn.S	(revision 216309)
+++ lib/csu/amd64/crtn.S	(working copy)
@@ -23,6 +23,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD: head/lib/csu/amd64/crtn.S 127252 2004-03-21 01:39:01Z peter $");
+
 	.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: head/lib/csu/amd64/crtn.S 127252 2004-03-21 01:39:01Z peter $\0"
Index: lib/csu/arm/crt1.c
===================================================================
--- lib/csu/arm/crt1.c	(revision 216309)
+++ lib/csu/arm/crt1.c	(working copy)
@@ -39,6 +39,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: head/lib/csu/arm/crt1.c 204756 2010-03-05 13:28:05Z uqs $");
+
 #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: head/lib/csu/arm/crt1.c 204756 2010-03-05 13:28:05Z uqs $\"");
Index: lib/csu/arm/crtn.S
===================================================================
--- lib/csu/arm/crtn.S	(revision 216309)
+++ lib/csu/arm/crtn.S	(working copy)
@@ -1,5 +1,6 @@
 #include <machine/asm.h>
 __FBSDID("$FreeBSD: head/lib/csu/arm/crtn.S 135679 2004-09-23 23:00:51Z cognet $");
+
 	.section .init,"ax",%progbits
 	ldmea	fp, {fp, sp, pc}
 	mov	pc, lr
Index: lib/csu/i386-elf/crt1_c.c
===================================================================
--- lib/csu/i386-elf/crt1_c.c	(revision 216309)
+++ lib/csu/i386-elf/crt1_c.c	(working copy)
@@ -26,6 +26,9 @@
  * $FreeBSD: head/lib/csu/i386-elf/crt1_c.c 200038 2009-12-02 16:34:20Z kib $
  */
 
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: head/lib/csu/i386-elf/crt1_c.c 200038 2009-12-02 16:34:20Z kib $");
+
 #ifndef lint
 #ifndef __GNUC__
 #error "GCC is needed to compile this file"
Index: lib/csu/i386-elf/crt1_s.S
===================================================================
--- lib/csu/i386-elf/crt1_s.S	(revision 216309)
+++ lib/csu/i386-elf/crt1_s.S	(working copy)
@@ -25,6 +25,8 @@
  * $FreeBSD: head/lib/csu/i386-elf/crt1_s.S 209295 2010-06-18 11:10:39Z kib $
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD: head/lib/csu/i386-elf/crt1_s.S 209295 2010-06-18 11:10:39Z kib $");
 
 	.text
 	.align	4
@@ -47,5 +49,3 @@ _start:
 	int3
 	.cfi_endproc
 	.size	_start, . - _start
-
-	.ident	"$FreeBSD: head/lib/csu/i386-elf/crt1_s.S 209295 2010-06-18 11:10:39Z kib $"
Index: lib/csu/i386-elf/crti.S
===================================================================
--- lib/csu/i386-elf/crti.S	(revision 216309)
+++ lib/csu/i386-elf/crti.S	(working copy)
@@ -23,6 +23,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD: head/lib/csu/i386-elf/crti.S 146369 2005-05-19 07:31:06Z dfr $");
+
 	.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: head/lib/csu/i386-elf/crti.S 146369 2005-05-19 07:31:06Z dfr $\0"
Index: lib/csu/i386-elf/crtn.S
===================================================================
--- lib/csu/i386-elf/crtn.S	(revision 216309)
+++ lib/csu/i386-elf/crtn.S	(working copy)
@@ -23,6 +23,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD: head/lib/csu/i386-elf/crtn.S 146369 2005-05-19 07:31:06Z dfr $");
+
 	.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: head/lib/csu/i386-elf/crtn.S 146369 2005-05-19 07:31:06Z dfr $\0"
Index: lib/csu/ia64/crt1.S
===================================================================
--- lib/csu/ia64/crt1.S	(revision 216309)
+++ lib/csu/ia64/crt1.S	(working copy)
@@ -24,7 +24,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-		.ident		"$FreeBSD: head/lib/csu/ia64/crt1.S 133989 2004-08-18 23:06:47Z marcel $"
+#include <machine/asm.h>
+__FBSDID("$FreeBSD: head/lib/csu/ia64/crt1.S 133989 2004-08-18 23:06:47Z marcel $");
 
 		.text
 
Index: lib/csu/ia64/crti.S
===================================================================
--- lib/csu/ia64/crti.S	(revision 216309)
+++ lib/csu/ia64/crti.S	(working copy)
@@ -26,6 +26,9 @@
  * $FreeBSD: head/lib/csu/ia64/crti.S 85952 2001-11-03 06:31:27Z peter $
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD: head/lib/csu/ia64/crti.S 85952 2001-11-03 06:31:27Z peter $");
+
 /*
  * This file (and its companion crtn.S) form the terminators of the
  * .init and .fini sections.
Index: lib/csu/ia64/crtn.S
===================================================================
--- lib/csu/ia64/crtn.S	(revision 216309)
+++ lib/csu/ia64/crtn.S	(working copy)
@@ -26,6 +26,9 @@
  * $FreeBSD: head/lib/csu/ia64/crtn.S 213906 2010-10-15 21:40:20Z dim $
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD: head/lib/csu/ia64/crtn.S 213906 2010-10-15 21:40:20Z dim $");
+
 	.file	"crtn.S"
 
 	.section .init,"ax", at progbits
Index: lib/csu/powerpc/crt1.c
===================================================================
--- lib/csu/powerpc/crt1.c	(revision 216309)
+++ lib/csu/powerpc/crt1.c	(working copy)
@@ -39,6 +39,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: head/lib/csu/powerpc/crt1.c 204756 2010-03-05 13:28:05Z uqs $");
+
 #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: head/lib/csu/powerpc/crt1.c 204756 2010-03-05 13:28:05Z uqs $\"");
Index: lib/csu/powerpc/crti.S
===================================================================
--- lib/csu/powerpc/crti.S	(revision 216309)
+++ lib/csu/powerpc/crti.S	(working copy)
@@ -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: head/lib/csu/powerpc/crti.S 96632 2002-05-15 04:19:49Z obrien $");
+
 	.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: head/lib/csu/powerpc/crti.S 96632 2002-05-15 04:19:49Z obrien $\0"
Index: lib/csu/powerpc/crtn.S
===================================================================
--- lib/csu/powerpc/crtn.S	(revision 216309)
+++ lib/csu/powerpc/crtn.S	(working copy)
@@ -23,6 +23,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD: head/lib/csu/powerpc/crtn.S 96632 2002-05-15 04:19:49Z obrien $");
+
 	.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: head/lib/csu/powerpc/crtn.S 96632 2002-05-15 04:19:49Z obrien $\0"
Index: lib/csu/powerpc64/crt1.c
===================================================================
--- lib/csu/powerpc64/crt1.c	(revision 216309)
+++ lib/csu/powerpc64/crt1.c	(working copy)
@@ -39,6 +39,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: head/lib/csu/powerpc64/crt1.c 209869 2010-07-10 03:45:55Z nwhitehorn $");
+
 #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: head/lib/csu/powerpc64/crt1.c 209869 2010-07-10 03:45:55Z nwhitehorn $\"");
Index: lib/csu/powerpc64/crti.S
===================================================================
--- lib/csu/powerpc64/crti.S	(revision 216309)
+++ lib/csu/powerpc64/crti.S	(working copy)
@@ -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: head/lib/csu/powerpc64/crti.S 209869 2010-07-10 03:45:55Z nwhitehorn $");
+
 	.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: head/lib/csu/powerpc64/crti.S 209869 2010-07-10 03:45:55Z nwhitehorn $\0"
Index: lib/csu/powerpc64/crtn.S
===================================================================
--- lib/csu/powerpc64/crtn.S	(revision 216309)
+++ lib/csu/powerpc64/crtn.S	(working copy)
@@ -23,6 +23,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD: head/lib/csu/powerpc64/crtn.S 209869 2010-07-10 03:45:55Z nwhitehorn $");
+
 	.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: head/lib/csu/powerpc64/crtn.S 209869 2010-07-10 03:45:55Z nwhitehorn $\0"
Index: lib/csu/sparc64/crt1.c
===================================================================
--- lib/csu/sparc64/crt1.c	(revision 216309)
+++ lib/csu/sparc64/crt1.c	(working copy)
@@ -30,6 +30,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: head/lib/csu/sparc64/crt1.c 204756 2010-03-05 13:28:05Z uqs $");
+
 #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: head/lib/csu/sparc64/crt1.c 204756 2010-03-05 13:28:05Z uqs $\"");
Index: lib/csu/sparc64/crti.S
===================================================================
--- lib/csu/sparc64/crti.S	(revision 216309)
+++ lib/csu/sparc64/crti.S	(working copy)
@@ -26,6 +26,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD: head/lib/csu/sparc64/crti.S 85612 2001-10-28 00:20:34Z obrien $");
+
  	.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: head/lib/csu/sparc64/crti.S 85612 2001-10-28 00:20:34Z obrien $\0"
Index: lib/csu/sparc64/crtn.S
===================================================================
--- lib/csu/sparc64/crtn.S	(revision 216309)
+++ lib/csu/sparc64/crtn.S	(working copy)
@@ -26,6 +26,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <machine/asm.h>
+__FBSDID("$FreeBSD: head/lib/csu/sparc64/crtn.S 85612 2001-10-28 00:20:34Z obrien $");
+
  	.file	"crtn.S"
 
 	.section .init,"ax", at progbits
@@ -37,6 +40,3 @@
 	.align	4
 	ret
 	 restore
-
-	.section .rodata
-.ascii "$FreeBSD: head/lib/csu/sparc64/crtn.S 85612 2001-10-28 00:20:34Z obrien $\0"


More information about the svn-src-projects mailing list