This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: help regarding ld
- From: Nick Clifton <nickc at redhat dot com>
- To: aram bharathi <arambharathi at linuxmail dot org>
- Cc: binutils at sourceware dot org, gcc at gcc dot gnu dot org
- Date: Fri, 18 Mar 2005 10:46:31 +0000
- Subject: Re: help regarding ld
- References: <20050318095716.0935A1FB8B@ws5-1.us4.outblaze.com>
Hi Aram,
i am using the arm-elf-gcc compiler to generate the assembly code
arm-elf-gcc -mthumb -S new.c
after this i use the arm-elf-as for genrating machine code
arm-elf-as new.s
Note - these two steps could be combined into one by using the -c switch
instead of the -S switch:
arm-elf-gcc -mthumb -c new.c
it produces one a.out file..
Note: Despite its name this "a.out" file is not an executable program it
is just an object file that still needs to be linked. Naming the file
a.out is a "feature" of the assembler.
arm-elf-ld a.out
produces error like
arm-elf-ld: warning: cannot find entry symbol _start; not setting start address
how do i type the correct command line option for this
Try using gcc to control the entire process from compilation to final
link, like this:
arm-elf-gcc new.c
Cheers
Nick