This is the mail archive of the
mailing list for the GCC project.
Re: Help with an Wierd Error
- From: Jim Wilson <wilson at codesourcery dot com>
- To: Balaji dot Iyer at gtri dot gatech dot edu
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 06 Apr 2010 09:52:36 -0700
- Subject: Re: Help with an Wierd Error
- References: <A2943CAA-B078-4DF9-A47C-E6161DFE2C31@gtri.gatech.edu>
On 04/02/2010 11:02 AM, Balaji.Iyer@gtri.gatech.edu wrote:
/opt/or32/lib/gcc/or32-elf/4.2.2/../../../../or32-elf/lib/crt0.o: In function `loop':
(.text+0x64): undefined reference to `___bss_start'
It looks like a case of one-too-many underscores prepended to symbol
names. The default for ELF is to not prepend an underscore. The
default for COFF is to prepend an underscore. Check USER_LABEL_PREFIX
which should be empty for ELF (default definition in defaults.h file).
Check ASM_OUTPUT_LABELREF which should use %U and not an explicit
underscore (see defaults.h file). Check for usage of the
-fleading-underscores option (should not be used). Check for header
file inclusion to see if something is out of place, such as a use of
svr3.h when svr4.h should be used.
Also check to make sure that gcc, gas, and gld all agree on whether a
symbol is prepended with an underscore or not. If gcc does it but gas
doesn't, then C code calling assembly language code may fail because of