Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Apr 1999 08:22:43 -0500
From:      "Eric L. Hernes" <erich@lodgenet.com>
To:        Luigi Rizzo <luigi@labinfo.iet.unipi.it>
Cc:        erich@lodgenet.com (Eric L. Hernes), cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: ports/net/etherboot - Imported sources 
Message-ID:  <199904171322.IAA15273@jake.lodgenet.com>
In-Reply-To: Your message of "Sat, 17 Apr 1999 11:39:25 %2B0200." <199904170939.LAA16487@labinfo.iet.unipi.it> 

next in thread | previous in thread | raw e-mail | index | archive | help
Luigi Rizzo writes:
> + second one, at ld time:
>	ld -N -Ttext 0x98000 -e _start -nostdlib -o wd.tmp \
>		start.o config-wd.o bootlib.a driver.a 
>	start.o: Undefined symbol `main' referenced from text segment
>   at this point, if i change the reference in start.S from main to _main,
>   i get a few more errors...
>
>Any idea what I am doing going wrong ?
>I am totally unclear on what should be the entry point etc.

It seems to be an elf v. a.out problem.  You may not be able to use
a.out tools to build this.

I think that chaning main -> _main in start.S is the right approach.
Then there's about four more undefined symbols:
___main, _edata, _end, and _exit; some normally come from crt0 (I think)
you might be able to get some stuff from looking at the differences
between a.out & elf's crt0's.

After you get the symbols resolved, your next hurdle is going to be
to find an a.out `objcopy' the port uses it to strip the binaries down
to just code+data (I think).  For an elf system theres /usr/bin/objcopy,
for a.out; I think I've got an old binary laying around, but I'm not
sure it'll work.

Or on the other hand, you could use the linux_devel package, and cross
compile the thing.  If you want to do that check with Doug Ambrisko, he's
got patches for that.

>
>	cheers
>	luigi
>

Eric


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904171322.IAA15273>