Subject: Re: MH's bootblock setup on stock A3000
To: Olaf Seibert <rhialto@mbfys.kun.nl>
From: Geert Uytterhoeven <Geert.Uytterhoeven@CS.kuleuven.ac.be>
List: amiga
Date: 11/30/1995 13:08:03
Olaf Seibert wrote:
> Michael L. Hitch wrote:
> >   I don't know how to make gcc generate pc-relative code and base register
> > relative data on NetBSD.  I use SAS/C because it's very easy to do that.
> 
> I haven't run NetBSD/amiga in ages, but I would start trying with
> -fPIC (position independent code). But it may not be supported
> by default; I seem to remember difficulties with that sort of stuff
> on the amiga-gcc mailing list.

Position independent code is _not_ pc-relative code.

For amiga-lilo-0.5 (soon to be released) I wrote a Perl script to convert the
asm output of gcc (-fPIC) to pc-relative code. This works except for the 
initialization of pointers at compiletime. But as a workaround you can
initialize them at runtime.

If anyone is interested in this script, please let me know.

Greetings,

						Geert

--
Geert Uytterhoeven                     Geert.Uytterhoeven@cs.kuleuven.ac.be
Wavelets, Linux/m68k on Amiga          http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium