Re: [arm-gnu] Regarding Entry Point in Codesourcery Assembler code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] Regarding Entry Point in Codesourcery Assembler code



Am 31.08.2010 14:27, schrieb Abhinav Varma:
> Hey,
> 
> How can we specify an entry point in an Assembler code file. The entry
> point is for the entire build. I do not wish to put the
> ENTRY(<LABEL_NAME>) in the linker script. Is there any alternative
> option in the assembler file itself?

AFAIK not for GNU. But you can do some preprocessor tricks :-)

start.S:
#ifdef LINKER
ENTRY(__start)
#else
	.globl __start
__start:
#endif

gcc -E -P -DLINKER start.S > entry.ld

x.ld

-include entry.ld

BTW: What's so bad about placing it in the linker script/command line ?

-- 
42Bastian
+
| http://www.sciopta.com
| Fastest direct message passing kernel.
| IEC61508 certified.
+