This is the mail archive of the gcc@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: Problem about gcc 4.1 + binutil 2.16.92 + glibc 2.4 + ARM EABI


Hi Richard,
Thanks for your information. I will ask for help on gcc-help@gcc.gnu.org.

But I still have question about gcc here:
The Local variables layout will impact my development. Consider
following C code:
my_test()
{
      int i;
      int j;
      char c[7];
      int *tmp;

     tmp = (int *) c;
     *tmp = j;
     ....
}
I don't think the local variables will be in register. So the code
"*tmp = j;" cause the
align exception in some situation if use the 4.1 toolchain. If I am
wrong, please
correct me. Thanks a lot.


Regards Yin, Fengwei

On 5/31/06, Richard Earnshaw <Richard.Earnshaw@arm.com> wrote:
On Wed, 2006-05-31 at 07:58, Fengwei Yin wrote:

> int my_temp(void)
> {
>       int i;
>       int j;
>       char str[2];

>
> Please notice the address of the str and j. there IS NO memory hole
> between therm
> when using gcc 3.4.3 and there IS memory hole when using gcc 4.1. My question
> is: Why there is difference there. And what is the root cause of the
> difference (EABI
>  or gcc update)? Is there any gcc option to make them align?

This has nothing to do with the EABI.  Local variables are not laid out
on the stack in any particular order (and in many cases will never go on
the stack since they will live entirely in registers).

Please direct any follow-ups to gcc-help@gcc.gnu.org.  This is off-topic
for this list.

R.
--
Richard Earnshaw             Email: Richard.Earnshaw@arm.com
ARM Ltd                      Phone: +44 1223 400569 (Direct + VoiceMail)
110 Fulbourn Road            Switchboard: +44 1223 400400
Cherry Hinton                Fax: +44 1223 400410
Cambridge CB1 9NJ            Web: http://www.arm.com/
UK

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.





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