This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patching raw section data with non-partial_inplace relocations


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]