[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ld doesn't warn about undefined symbols
From: |
Daniel Jacobowitz |
Subject: |
Re: ld doesn't warn about undefined symbols |
Date: |
Fri, 4 Nov 2005 16:32:32 -0500 |
User-agent: |
Mutt/1.5.8i |
On Wed, Nov 02, 2005 at 06:01:03PM +0100, Jakub Jermar wrote:
> ld (from binutils 2.16) on mipsel doesn't warn about
> undefined symbols with elf32-little and binary output
> formats (and possibly others).
>
> When the output format is elf32-tradlittlemips, undefined
> symbols are reported as expected.
> My project needs to use both binary and elf32-little
> targets, so it is essential for me to know what is going on.
No, you don't need to use either. I strongly recommend you always let
the linker target a format that it knows about, and use objcopy to
convert to any other formats you want to generate.
> boot.bin: boot.o test.o
> $(LD) $(LFLAGS) boot.o test.o -o $@
> OUTPUT_FORMAT(elf32-little)
> /*OUTPUT_FORMAT(binary)*/
$(LD) $(LFLAGS) boot.o test.o -o address@hidden
$(OBJCOPY) -O binary address@hidden $@
--
Daniel Jacobowitz
CodeSourcery, LLC