[coreboot] r1026 - in coreboot-v3: mainboard/kontron/986lcd-m southbridge/intel/i82801gx

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Sat Nov 15 03:54:22 CET 2008

On 14.11.2008 19:54, ron minnich wrote:
> On Fri, Nov 14, 2008 at 10:52 AM, Stefan Reinauer <stepan at coresystems.de> wrote:
>> Carl-Daniel Hailfinger wrote:
>>> We're missing one crucial piece which is necessary to get PIC to work:
>>> The linker. PIC code must be linked _after_ its location is known.
>> That sounds absurd as it would totally defeat the purpose of PIC.
>> It's position independent code exactly _because_ you can't know the
>> position at link time.
> actually, the GCC definiton of PIC is odd to say the least, as
> compared to what I used to call PIC.

Remember what Segher said: We're (ab)using gcc on x86 in a way that was
never envisioned.

> But I am afraid carl-daniel is right. PIC in the gcc sense really
> means "shared libraries" from what I can see, and does require a
> linker post-pass.
> Possibly on machines such as core 2, we should copy the (tiny) initram
> to CARBASE and run it there, and link it for CARBASE.

At least on AMD Fam10h processors, this is documented to fail. I believe
we can trick the processor into doing that anyway, but that would be so
highly complicated and processor dependent that the author of that code
would become a critical resource ;-)

I'd like to have the initram in CAR option available for emergency
situations, though.



More information about the coreboot mailing list