Patching raw section data with non-partial_inplace relocations

Alexandro Sanchez Bach alexaltea123@gmail.com
Thu Jun 29 11:19:00 GMT 2017


Hi Nick,

> You probably have to implement it yourself.

That's what I'm working on right now, which is essentially copy-and-pasting code from bfd/reloc.c

> But ... have you tried using the assembler to generate the raw data with reloc directives attached ?

Not sure if I understand this correctly, is this part of BFD? The binaries I'm processing are given as-is and I cannot assume that C/C++/ASM sources are available to compile them with other flags if that's what you mean.

All I can do is using libbfd to read the dynamic relocations and patch the raw section data accordingly. And this would work out of the box if the howto structures in elf32-ppc.c defined `partial_inplace = TRUE`. Since it's not the case, I guess I can only implement my own patcher as you suggested.

Thanks a lot for your time. :-)

Cheers,
Alexandro




More information about the Binutils mailing list