Patching raw section data with non-partial_inplace relocations

Nick Clifton nickc@redhat.com
Thu Jun 29 10:46:00 GMT 2017


Hi Alexandro,

> I'm not sure if there's any workaround for the following situation. As you
> know, constant addresses (e.g. jump tables) are loaded in powerpc as:
> lis     r9, .jumptable@ha      ; load high 16 bits
> addis   r9, r9, .jumptable@l   ; load low 16 bits

> Question: Is there any way of forcing the raw data to be patched? Or do I
> have to implement that myself?

You probably have to implement it yourself.  But ... have you tried using the
assembler to generate the raw data with reloc directives attached ?  Eg:

  .word 0x12345678@ha

No guarantees, but this might work.

Cheers
  Nick




More information about the Binutils mailing list