Date: Thu, 13 Jan 2011 20:44:31 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/lib/csu/amd64 Makefile src/lib/csu/arm Makefile src/lib/csu/common crtbrand.c src/lib/csu/i386-elf Makefile src/lib/csu/ia64 Makefile src/lib/csu/mips Makefile src/lib/csu/powerpc Makefile src/lib/csu/powerpc64 Makefile Message-ID: <201101132044.p0DKij9A040148@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
dim 2011-01-13 20:44:31 UTC FreeBSD src repository Modified files: lib/csu/amd64 Makefile lib/csu/arm Makefile lib/csu/common crtbrand.c lib/csu/i386-elf Makefile lib/csu/ia64 Makefile lib/csu/mips Makefile lib/csu/powerpc Makefile lib/csu/powerpc64 Makefile Log: SVN rev 217375 on 2011-01-13 20:44:31Z by dim Apply a workaround for a binutils issue with the .note.ABI-tag section generated from lib/csu/common/crtbrand.c (which ultimately ends up in executables and shared libraries, via crt1.o, gcrt1.o or Scrt1.o). For all arches except sparc, gcc emits the section directive for the abitag struct in crtbrand.c with a PROGBITS type. However, newer versions of binutils (after 2.16.90) require the section to be of NOTE type, to guarantee that the .note.ABI-tag section correctly ends up in the first page of the final executable. Unfortunately, there is no clean way to tell gcc to use another section type, so crtbrand.c (or the C files that include it) must be compiled in multiple steps: - Compile the .c file to a .s file. - Edit the .s file to change the 'progbits' type to 'note', for the section directive that defines the .note.ABI-tag section. - Compile the .s file to an object file. These steps are done in the invididual Makefiles for each applicable arch. Reviewed by: kib Revision Changes Path 1.21 +23 -4 src/lib/csu/amd64/Makefile 1.5 +23 -4 src/lib/csu/arm/Makefile 1.7 +17 -0 src/lib/csu/common/crtbrand.c 1.24 +23 -4 src/lib/csu/i386-elf/Makefile 1.16 +22 -6 src/lib/csu/ia64/Makefile 1.5 +23 -4 src/lib/csu/mips/Makefile 1.12 +23 -4 src/lib/csu/powerpc/Makefile 1.2 +17 -2 src/lib/csu/powerpc64/Makefile
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101132044.p0DKij9A040148>