[LinuxBIOS] patch: extending LAR, and removing elf from linuxbios (it is not needed)
stepan at coresystems.de
Wed Aug 29 16:50:13 CEST 2007
ron minnich wrote:
> 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, ...);
int (*printk)(int level, char *fmt, ...) = stage0printk;
It even fails for those symbols that we don't explicitly want to export.
Pretty good I guess.
> So you get a compile time error. Do you change all the include files? uck.
No, only one header?!?
> 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
This sounds even better. No idea though.
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.de • http://www.coresystems.de/
More information about the coreboot