From owner-freebsd-arm@FreeBSD.ORG Wed Sep 11 08:21:27 2013 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ED21F457; Wed, 11 Sep 2013 08:21:27 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id CDBCD2C99; Wed, 11 Sep 2013 08:21:24 +0000 (UTC) Received: from bender.Home (97e5e46b.skybroadband.com [151.229.228.107]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id 4E5A75DFFE; Wed, 11 Sep 2013 08:21:23 +0000 (UTC) Date: Wed, 11 Sep 2013 09:21:15 +0100 From: Andrew Turner To: Warner Losh Subject: Re: CVS commit: src/lib/csu Message-ID: <20130911092115.139716ce@bender.Home> In-Reply-To: <38D6DE4E-C4E3-4239-A198-51D6AC7711AC@bsdimp.com> References: <24478.1378868144@splode.eterna.com.au> <38D6DE4E-C4E3-4239-A198-51D6AC7711AC@bsdimp.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/7I9gKVU3Ja9d2NG/i=iDi=g" Cc: "freebsd-arm@freebsd.org" , embedded@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2013 08:21:28 -0000 --MP_/7I9gKVU3Ja9d2NG/i=iDi=g Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, 10 Sep 2013 21:12:51 -0600 Warner Losh wrote: > Perhaps we should do it too... I also like this elf-notes.html idea > too... Something like the patch I've attached from the thread at [1]? It adds a MACHINE_ARCH note type. Andrew [1] http://lists.freebsd.org/pipermail/freebsd-arch/2013-July/014482.html > Warner > > Begin forwarded message: > > > From: matthew green > > Date: September 10, 2013 8:55:44 PM MDT > > To: source-changes-d@NetBSD.org > > Cc: matt@NetBSD.org > > Subject: re: CVS commit: src/lib/csu > > > > > >> Module Name: src > >> Committed By: matt > >> Date: Tue Sep 10 16:45:33 UTC 2013 > >> > >> Modified Files: > >> src/lib/csu: Makefile > >> src/lib/csu/arch/earm: Makefile.inc > >> src/lib/csu/common: Makefile.inc sysident.S > >> sysident_assym.cf > >> > >> Log Message: > >> Add support for a NetBSD MARCH elf note to record the MACHINE_ARCH > >> for which a program was compiled. > > > > please update this doc: > > > > http://www.netbsd.org/docs/kernel/elf-notes.html > > > > and perhaps remove the link to cgd while you're at it ;) > > > > thanks. > > > > > > .mrg. > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > > --MP_/7I9gKVU3Ja9d2NG/i=iDi=g Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=machine_arch_note.diff Index: lib/csu/common/crtbrand.c =================================================================== --- lib/csu/common/crtbrand.c (revision 252514) +++ lib/csu/common/crtbrand.c (working copy) @@ -64,3 +64,17 @@ .name = NOTE_FREEBSD_VENDOR, .desc = __FreeBSD_version }; + +static const struct { + int32_t namesz; + int32_t descsz; + int32_t type; + char name[sizeof(NOTE_FREEBSD_VENDOR)]; + char desc[sizeof(MACHINE_ARCH)]; +} archtag __attribute__ ((section (NOTE_SECTION), aligned(4))) __used = { + .namesz = sizeof(NOTE_FREEBSD_VENDOR), + .descsz = sizeof(MACHINE_ARCH), + .type = ARCH_NOTETYPE, + .name = NOTE_FREEBSD_VENDOR, + .desc = MACHINE_ARCH +}; Index: lib/csu/common/notes.h =================================================================== --- lib/csu/common/notes.h (revision 252514) +++ lib/csu/common/notes.h (working copy) @@ -34,5 +34,6 @@ #define ABI_NOTETYPE 1 #define CRT_NOINIT_NOTETYPE 2 +#define ARCH_NOTETYPE 3 #endif --MP_/7I9gKVU3Ja9d2NG/i=iDi=g--