[Top][All Lists]

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

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

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] minit-stack
Date: Thu, 23 Oct 2008 12:05:50 +0200 (MET DST)

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.

>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.
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

reply via email to

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