This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING] [PATCH] Add direct support for Linux kernel __fentry__ patching


Le 27 sept. 2014 à 18:45, Dominique d'Humières <dominiq@lps.ens.fr> a écrit :

> I think the patch for gcc.target/i386/nop-mcount.c should be
> 
> --- ../_clean/gcc/testsuite/gcc.target/i386/nop-mcount.c	2014-09-26 23:29:45.000000000 +0200
> +++ gcc/testsuite/gcc.target/i386/nop-mcount.c	2014-09-27 18:43:40.000000000 +0200
> @@ -1,5 +1,5 @@
>  /* Test -mnop-mcount */
> -/* { dg-do compile } */
> +/* { dg-do compile { target { *-*-linux* && nonpic } } } */
>  /* { dg-options "-pg -mfentry -mrecord-mcount -mnop-mcount" } */
>  /* { dg-final { scan-assembler-not "__fentry__" } } */
>  /* Origin: Andi Kleen */
> 
> Dominique
> 
> Le 27 sept. 2014 à 17:35, Andi Kleen <andi@firstfloor.org> a écrit :
> 
>> On Sat, Sep 27, 2014 at 01:21:29PM +0200, Dominique Dhumieres wrote:
>>> The new tests fail on darwin:
>>> 
>>> /opt/gcc/work/gcc/testsuite/gcc.target/i386/nop-mcount.c:1:0: error: -mnop-mcount is not implemented for -fPIC
>>> 
>>> and gcc.target/i386/record-mcount.c fails because mcount_loc is not found in the assembly.
>> 
>> Sorry. Here's a patch. I'll install it as obvious unless someone
>> complains. Also I hope it's the last mcount patch for now :-)
>> 
>> -Andi
>> 
>> diff --git a/gcc/testsuite/gcc.target/i386/nop-mcount.c b/gcc/testsuite/gcc.target/i386/nop-mcount.c
>> index 2592231..942cae0 100644
>> --- a/gcc/testsuite/gcc.target/i386/nop-mcount.c
>> +++ b/gcc/testsuite/gcc.target/i386/nop-mcount.c
>> @@ -1,5 +1,5 @@
>> /* Test -mnop-mcount */
>> -/* { dg-do compile } */
>> +/* { dg-do compile { target *-*-linux* } } */
>> /* { dg-options "-pg -mfentry -mrecord-mcount -mnop-mcount" } */
>> /* { dg-final { scan-assembler-not "__fentry__" } } */
>> /* Origin: Andi Kleen */
>> diff --git a/gcc/testsuite/gcc.target/i386/record-mcount.c b/gcc/testsuite/gcc.target/i386/record-mcount.c
>> index dae413e..26b0dbc 100644
>> --- a/gcc/testsuite/gcc.target/i386/record-mcount.c
>> +++ b/gcc/testsuite/gcc.target/i386/record-mcount.c
>> @@ -1,5 +1,5 @@
>> /* Test -mrecord-mcount */
>> -/* { dg-do compile } */
>> +/* { dg-do compile { target *-*-linux* } } */
>> /* { dg-options "-pg -mrecord-mcount" } */
>> /* { dg-final { scan-assembler "mcount_loc" } } */
>> /* Origin: Andi Kleen */
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]