This is the mail archive of the
mailing list for the GCC project.
Re: PATCH: Clear hardware capabilities from gcc.target/i386 executables with Sun ld
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 24 Feb 2010 13:49:57 -0800
- Subject: Re: PATCH: Clear hardware capabilities from gcc.target/i386 executables with Sun ld
- References: <yddmxyypwff.fsf@CeBiTec.Uni-Bielefeld.DE>
On Wed, 2010-02-24 at 14:58 +0100, Rainer Orth wrote:
> Running the testsuite on Solaris 11/x86 after bootstrapping with Sun as
> and Sun ld revealed many testsuite failures in gcc.target/i386:
> ld.so.1: aesdec.exe: fatal: hardware capability unsupported: 0x4000000 [ AES ]
> FAIL: gcc.target/i386/aesdec.c execution test
> This happens because the Sun assembler encodes the instruction set
> extensions used by the code as hardware capabilities in the object and
> executable files to avoid trying to execute such code on platforms where
> the hardware doesn't support the extension.
> In the testsuite cases, this isn't a problem because it is guarded
> against at runtime.
> To avoid it if using the Sun linker, one can pass a mapfile which clears
> all automatically created hardware capabilities from the resulting
> The following patch does just that and allows all the affected testcases
> to pass. It also survived a bootstrap with GNU ld, which doesn't
> support such mapfiles, to make sure they aren't broken.
> Ok for mainline?