[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] minit-stack

From: Ruud Vlaming
Subject: Re: [avr-gcc-list] minit-stack
Date: Thu, 23 Oct 2008 12:49:09 +0200
User-agent: KMail/1.9.1

On Thursday 23 October 2008 12:05, Joerg Wunsch wrote:
> Ruud wrote:
> >This trick does function if you leave the quotes out, so
> >-Wl,--defsym=__stack="xOS+xOSstackShift" is wrong and
> >-Wl,--defsym=__stack=xOS+xOSstackShift is correct.
> Is this under Win32?  Normally, the Unix shell removes the quotes
> before passing the argument to the application, the quotes are merely
> needed to prevent the shell from trying to perform wildcard expansions
> on the argument.
Gentoo Linux. But the point is that i use a file to store the options
and than call gcc with something like @../gcc_options.

> >What keeps puzzling me is why this is not allowed:
> >    asm(".global __stack    \n\t ");
> >    asm(".set __stack, xOS \n\t ");
> It's probably a question about where that object module is placed on
> the linker commandline.  The symbol __stack is declared a weak symbol
> in gcrt1.o, my guess is that you'd have to place the object module
> trying to override it /before/ gcrt1.o is linked.  As commandline
> options are always processed before any object modules, the --defsym
> is processed early enough.
Interresting thought. Does it also explain why 
    asm(".global __stack    \n\t ");
    asm(".set __stack, 0xF4 \n\t ");
does work?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]