On Wed, Aug 29, 2007 at 02:36:31PM -0700, ron minnich wrote: > Here is a proposal for supporting pic etc. without too much hardship. > > we create a file, include/lib.h, and move all prototypes to that file. > That file is included by non-pic code, and has declarations like this: > int printk(int level, char *format, ...); > > We create another file, call libpic.h, and it looks like this: > int (*printk)(int level, char *format, ...) = stage0printk;
Please don't use stage0 to tag the PIC code, use pic instead. stage0printk would become picprintk, or maybe pic_printk. > PIC programs include libpic.h. non-PIC programs include lib.h. > > At build time, for PIC programs, we use that little trick I showed > earlier to create a stag0_pic.o with symbols renamed, e.g. printk > becomes stage0printk. 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. > non-PIC programs (e.g. stage2) link against stage0.o as they do > now. PIC programs link against stage0_pic.o. > > This will work; is it acceptable? 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? //Peter -- linuxbios mailing list [email protected] http://www.linuxbios.org/mailman/listinfo/linuxbios
