[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] compile, link, _start entry symbol, crt1.o, ANSI C etc.



On Mon, 15 Apr 2002, ebeam ebeam wrote:

> cc -c -ansi -I./ -I -march=i686 -o P2DO090.o P2DO090.c
> ld -o P2DO090 AUBAONM.o CVRXXXC.o AUBASTE.o P200004.o AUMQREA.o CVRMQDC.o 
> P200025.o P200026.o AUBAWTW.o CVRMQCM.o AUBAIRC.o AUBAWTR.o AUBASOK.o 
> AUBAWTE.o P2DO090.o -L./ -L/opt/mqm/lib -lcrypt -lm -lmqm -lc ld: warning: 
> cannot find entry symbol _start; defaulting to 08048890
> cc -ansi -I./ -I -march=i686 P2DOD00.c -o P2DOD00
> make: *** Deleting file `P2DOD00'
> make: *** [P2DOD00] Interrupt

Lav dit script om, så det kalder cc istedet for ld i den sidste linie.  
Dine linker options er slet ikke tilstrækkelige hvis du vil kalde ld
direkte - cc (gcc) vil automatisk inkludere crt0.o, mv. (libgcc og 
venner).

Bemærk også, at det nogen gange kan være nødvendigt at angive -L og -l 
optioner flere gange - som regel både før og efter .o optionerne. Det har 
noget med den underlige måde gcc (ld) resolver afhængigheder at gøre på.

> Og jeg bruger følgende C-compiler med disse options:
> 
> hostname# gcc -v -o image P2DO090.o

Her mangler du alle de options (og især .o filer) du angav ovenfor.

Mads

-- 
Mads Bondo Dydensborg.                               sslug@sslug
Imagine a federal law making it illegal for anyone (including Consumer
Reports) to purposefully cause an automobile collision. While this may be a
well-intentioned attempt to stop road-rage, it also bans automobile
crash-testing, ultimately leading to unsafe vehicles and the inability to
learn how to make vehicles safe in general. The situation with the DMCA is
analogous. 
                               - Princton FAQ about the SDMI challenge



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *