This is the mail archive of the 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: Question about gcc options '-mapcs-stack-check' and '-mapcs-frame'

On 24/08/18 14:51, Akhilesh chirlancha wrote:
> Hello All,
> I'm using gcc 5.4.0 for armhf target.
> I was compiling simple stack over flow test code with '-mapcs-stack-check'
> option.
> # gcc -mapcs-stack-check test.c
> test.c:1:0: warning: -mapcs-stack-check incompatible with -mno-apcs-frame
>  #include<stdio.h>
>  ^
> As per my understanding from the above warning is -mapcs-stack-check option
> depends on -mapcs-frame. Is my understanding correct?? If yes, gcc should
> work for -mapcs-frame.
> But I found this in GCC online docs(
> -mapcs-frame
>         Generate a stack frame that is compliant with the ARM Procedure
> Call Standard for all functions, even if this is not strictly necessary for
> correct execution of the code. Specifying '-fomit-frame-pointer' with this
> option causes the stack frames not to be generated for leaf functions. The
> default is '-mno-apcs-frame'. This option is deprecated.
> Document saying '-mapcs-frame' option is deprecated. Does it mean I can't
> use -mapcs-stack-check option?

It wouldn't help even if you did.  I don't think APSC-style stack
checking was ever fully implemented in GCC.


> Thanks in advance,
> Best Regards
> -Akhilesh

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