[LinuxBIOS] patch: extending LAR, and removing elf from linuxbios (it is not needed)
rminnich at gmail.com
Wed Aug 29 16:34:53 CEST 2007
On 8/29/07, Stefan Reinauer <stepan at coresystems.de> wrote:
> > > What was that linker auto rename trick that Marc mentioned recently?
> > The naming is not the issue. The issue is getting gcc to do abs calls,
> > not relative calls, for some symbols.
I did the auto-rename trick. It is a simple objcopy with
--prefix-symbols and whatever you want -- e.g. stage0.
Then in initram you can do this (which I did):
int (*printk)(int level, char *fmt, ...) = stage0printk;
The problem comes in with includes. How do you declare printk? In
console.h it is this:
int printk(int level, char *fmt, ...)
So you get a compile time error. Do you change all the include files? uck.
The simplest, easiest way to make this go would be a pragma on certain
symbols that makes gcc do an absolute, not relative, call. is this
More information about the coreboot