Date: Wed, 08 Dec 2010 23:42:07 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Tijl Coosemans <tijl@freebsd.org> Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org Subject: Let lib/csu use __FBSDID consistently [was: Re: svn commit: r216200 - in projects/binutils-2.17: ...] Message-ID: <4D0009BF.6060000@FreeBSD.org> In-Reply-To: <4CFF7056.3040808@FreeBSD.org> References: <201012052024.oB5KOMUF007051@svn.freebsd.org> <201012061718.13823.tijl@coosemans.org> <4CFD2E01.1000509@FreeBSD.org> <201012071448.47319.tijl@freebsd.org> <4CFF7056.3040808@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------000105070106050105010000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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. --------------000105070106050105010000 Content-Type: text/plain; name="csu-ident-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="csu-ident-1.diff" 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",@progbits .align 4 .globl _init @@ -36,6 +39,3 @@ _init: .type _fini,@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",@progbits addq $8,%rsp ret @@ -30,6 +33,3 @@ .section .fini,"ax",@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",@progbits .align 4 .globl _init @@ -36,6 +39,3 @@ _init: .type _fini,@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",@progbits add $12,%esp ret @@ -30,6 +33,3 @@ .section .fini,"ax",@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",@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",@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",@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",@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",@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",@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" --------------000105070106050105010000--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D0009BF.6060000>