This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Patching raw section data with non-partial_inplace relocations
- From: Nick Clifton <nickc at redhat dot com>
- To: Alexandro Sanchez Bach <alexaltea123 at gmail dot com>, binutils at sourceware dot org
- Date: Thu, 29 Jun 2017 11:46:16 +0100
- Subject: Re: Patching raw section data with non-partial_inplace relocations
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=nickc at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B8E5D70ABE
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B8E5D70ABE
- References: <004b01d2eb57$9c5e8d10$d51ba730$@gmail.com>
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