Re: [PATCH 2/33] i386: define __pa_symbol

Andi Kleen
2006-08-02T03:10:41Z

> Yes. ISO C only defines pointer arithmetic with in arrays.
> I believe gnu C makes it a well defined case.

Nope, it doesn't.

There was a miscompilation on PPC some time ago, that is why
HIDE_RELOC() and __pa_symbol() was implemented.

>
> Currently we do not appear to have any problems on i386.
> But I have at least one case of code that is shared between
> i386 and x86_64 and it is appropriate to use __pa_symbol on
> x86_64.
>
> So I added __pa_symbol for that practical reason.
>
> I would have no problems with generalizing this but I wanted to
> at least make it possible to use the concept on i386.

No problem with that, just use HIDE_RELOC

-Andi