R_PPC_ADDR16_HI relocs in PPC modules ?

Segher Boessenkool segher at kernel.crashing.org
Wed Jan 3 04:16:01 EST 2007


> unknown ADD relocation: 5
>
> which refers to R_PPC_ADDR16_HI relocations. The error message comes
> from apply_relocate_add() in arch/powerpc/kernel/module_32.c, which
> deals with R_PPC_ADDR16_LO and R_PPC_ADDR16_HA relocs, but not
> R_PPC_ADDR16_HI ones.
>
> Is there a reason for this ? Those relocs directly come from the
> mapping of PPC_RELOC_HI16 in the original driver, and i'd rather not
> transpose them into R_PPC_ADDR16_HA.

Well you normally never end up with an add with an @h -- you're
typically adding it to something that is loaded with "li", i.e.,
something that's the sign-extended version of the low 16 bits of
the 32-bit thing you're loading totally.

I'm interested how (and why :-) ) Darwin ends up doing it; could
you send me the (original) file in question?  Or an otool -tvV
of it, or part thereof that shows the problem.


Segher




More information about the Linuxppc-dev mailing list