[LinuxBIOS] support PIC and prototypes

Peter Stuge peter at stuge.se
Thu Aug 30 00:58:06 CEST 2007


On Wed, Aug 29, 2007 at 03:25:41PM -0700, ron minnich wrote:
> I am confusing you, maybe.

Yeah. :)


> stage0 is not pic. stage0 is non-pic. initram is pic. initram,
> which is pic, needs to call stage0, which is not pic.

Did you rule out the possibility of having the functions in stage0
that need to be called from initram in a separate file, making them
all PIC and calling them from CAR, PIC and stage2+ alike?

Would that require the pointer trick for each function in all the
files where they're called? :\


> > Please don't use stage0 to tag the PIC code, use pic instead.
> > stage0printk would become picprintk, or maybe pic_printk.
> 
> this implies to me that the printk itself is pic, which it is not.

Good point.


> Another name?

Can't come up with anything good right now.


> > Btw - why couldn't everyone call the PIC functions?
> 
> stage0 is not pic. If we make it pic, it ballons.

Sorry, balloons? You mean it grows huge or just blows up == doesn't work?


> When gcc generates PIC code, it still generates relative calls.

Isn't that (part of) the definition of PIC?


> Gcc is not tremendously good at generating PIC, what it really
> creates is "PIC assuming you use the GNU shared library
> techniques".

:(


//Peter




More information about the coreboot mailing list