This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Modifying the LABEL for functions emitted by the GCC Compiler
- From: "Rohit Arul Raj" <rohitarulraj at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Cc: gcc-help at gcc dot gnu dot org, timothyprince at sbcglobal dot net
- Date: Fri, 1 Sep 2006 19:36:45 +0530
- Subject: Re: Modifying the LABEL for functions emitted by the GCC Compiler
- References: <c356fd4e0609010631v55712f0bu858c3b7d10914673@mail.gmail.com>
Rohit Arul Raj wrote:
The gcc-coldfire compiler spits out the labels as it is in the
assembly file (main, printf etc), where as the IDE compiler spits out
the labels prefixed with a '_' (_main, _printf etc).
Is there any way i can make gcc-coldfire compiler emit the lables
prefixed with an underscore (' _ ').Can anyone Help me OUT of this
mess!!!
How about reconciling the -fleading-underscore options?
-------------------------------------------------------------------------------------------------------------------------------------
Yeah Thanks!!!
That works for the compiler.... But the problem is that how can i
force my linker to accept the labels with an '_'.
If i link with an '_' prefix i get the following error message
<Error>
metro.o: In function `_main':
(.text+0xe): undefined reference to `_printf'
metro.o: In function `_main':
(.text+0x8): relocation truncated to fit: R_68K_16 against `_@7'
sim-crt0.o: In function `start':
sim-crt0.S:(.text+0x56): undefined reference to `main'
<Error>
Is there any option available in the Linker part to get round this???
ttyl,
Rohit