I am confusing you, maybe.
stage0 is not pic. stage0 is non-pic. initram is pic. initram, which is pic, needs to call stage0, which is not pic.
To add to the fun, stage0 does make one call to initram: it calls initram's main.
On 8/29/07, Peter Stuge peter@stuge.se wrote:
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. Another name?
I would like that file to be called just pic.o and be unrelated to anything stage0 - except of course that stage0 calls the code in pic.o.
except that file IS stage0.o. It's stage0 with all the symbols renamed. What do we call them?
I think the method is great but I want to choose all filenames carefully so it is really clear what is going on.
Btw - why couldn't everyone call the PIC functions?
stage0 is not pic. If we make it pic, it ballons. When gcc generates PIC code, it still generates relative calls. Gcc is not tremendously good at generating PIC, what it really creates is "PIC assuming you use the GNU shared library techniques".
ron