[openbeos] Re: Assembler and BeOS (tool chain question)

  • From: "François Revol" <revol@xxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Sun, 21 Jan 2007 11:08:52 +0100 CET

> However, if I manually assemble and link the program, the executable 
> doesn't
> work.
> (~/develop/example)> as -o example.o example.s
> (~/develop/example)> ld -o example example.o -e main -lroot
> 
> (the -e main argument instructs linker to search for main instead of 
> _start)
> When executed, I get a segment violation error under Zeta 1.2.
> 

I guess you must linke to the crt objects as they initialize a lot of 
stuff.
Just use the verbose options of gcc to find out what args it gives when 
calling ld.

François.

Other related posts: