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? Ruud _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list