[LinuxBIOS] [PATCH] v3: fix absolute calls from initram

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Tue Dec 4 23:52:21 CET 2007

On 04.12.2007 19:40, Corey Osgood wrote:
> Carl-Daniel Hailfinger wrote:
>> Absolute calls from initram were only working from the file which had
>> _MAINOBJECT #defined. Calls from all other files ended up in nirvana
>> because the compiler was not able to calculate the address of the
>> wrapper for the absolute call. The linker tried, but failed miserably.
>> Use the -combine flag and compile all of initram at once. This enables
>> GCC to calculate the address of the abscall wrapper, resulting in
>> working code.
>> Segher Boessenkool thinks the patched code works only by accident
>> because GCC has no way to specify generation of XIP code. According to
>> him, future GCC versions or other circumstances may break the code.
>> While this patch makes code work for now, it does NOT check whether the
>> generated code tries to write to memory outside the stack (general
>> writable data). That will of course fail, but I hope porters are smart
>> enough to avoid that.
>> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
> Acked-by: Corey Osgood <corey.osgood at gmail.com>

Thanks, r537.


More information about the coreboot mailing list