R_PPC_ADDR16_HI relocs in PPC modules ?

Segher Boessenkool segher at kernel.crashing.org
Wed Jan 3 07:48:31 EST 2007


> Sure. As an example, here is some output of otool -rV and the 
> corresponding
> disassembled text section part
>
> Relocation information (__TEXT,__text) 61126 entries
> address  pcrel length extern type    scattered symbolnum/value
> 00000654 False long   False  LO16    False     1 (__TEXT,__text)
>          False long   False  PAIR    False     half = 0x0000
> 00000650 False long   False  HI16    False     1 (__TEXT,__text)
>          False long   False  PAIR    False     half = 0x83fc
>
> 00000650        lis     r12,hi16(_msw_report_event)
> 00000654        ori     r12,r12,lo16(_msw_report_event)

Ah.  lis and ori.  HI16 is just fine there -- but note that
that doesn't use an add insn.  You're patching the function
"apply_relocate_add()", so I guess some more work is needed?


Segher




More information about the Linuxppc-dev mailing list