This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] x86/cet: Properly output labels in property note section
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Uros Bizjak <ubizjak at gmail dot com>, Igor Tsimbalist <igor dot v dot tsimbalist at intel dot com>
- Date: Thu, 19 Apr 2018 12:12:47 -0700
- Subject: Re: [PATCH] x86/cet: Properly output labels in property note section
- References: <20180415110617.GA27586@intel.com> <yddtvs7kotj.fsf@CeBiTec.Uni-Bielefeld.DE>
On Thu, Apr 19, 2018 at 11:56 AM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> "H.J. Lu" <hongjiu.lu@intel.com> writes:
>
>> Replace ASM_OUTPUT_LABEL with fprintf so that internal labels in property
>> note section are unchanged -fleading-underscore.
>>
>> OK for trunk?
>>
>> H.J.
>> ---
>> gcc/
>>
>> PR target/85404
>> * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
>> Replace ASM_OUTPUT_LABEL with fprintf.
>>
>> gcc/testsuite/
>>
>> PR target/85404
>> * gcc.target/i386/pr85404.c: New test.
>
> The testcase FAILs on Solaris/x86 with /bin/as:
>
> FAIL: gcc.target/i386/pr85404.c (test for excess errors)
>
> Excess errors:
> Assembler: pr85404.c
> "/var/tmp//cc_MI..a.s", line 6 : Illegal mnemonic
> Near line: " endbr32"
> "/var/tmp//cc_MI..a.s", line 6 : Syntax error
> Near line: " endbr32"
> "/var/tmp//cc_MI..a.s", line 13 : Illegal mnemonic
> Near line: " endbr32"
> "/var/tmp//cc_MI..a.s", line 13 : Syntax error
> Near line: " endbr32"
>
> There are also FAILs on gcc-testresults for i686-pc-linux-gnu,
> x86_64-unknown-linux-gnu, and i586-unknown-freebsd10.4 (probably older
> versions of gas).
>
> It either needs a dg-require-effective-target cet or be demoted to a
> compile test, depending on intent.
>
I am checking in this.
--
H.J.
diff --git a/gcc/testsuite/gcc.target/i386/pr85404.c
b/gcc/testsuite/gcc.target/i386/pr85404.c
index bbf456ec024..0194f7b7edd 100644
--- a/gcc/testsuite/gcc.target/i386/pr85404.c
+++ b/gcc/testsuite/gcc.target/i386/pr85404.c
@@ -1,4 +1,4 @@
-/* { dg-do assemble } */
+/* { dg-do assemble { target cet } } */
/* { dg-options "-fleading-underscore -mcet -fcf-protection" } */
void func(void) __asm("_func");