[patch] Fix relocation version two
Kai Tietz
Kai.Tietz@onevision.com
Thu Jan 22 14:49:00 GMT 2009
Hello,
This patch fixes relocation version 2. There was a thinko in relocation
schema for v2. v1 relocates directly to the instruction at fixup_name, but
version two does this in pseudo relocator code. This difference is
necessary for 64-bit systems, because the relocation is mostly
pc-relative, so a special treating has do be done here.
The part in pe_create_runtime_relocator_reference () is more to ensure
that element has pointer width. I used for this the PE_IDATA5_SIZE macro,
but this part is not really necessary, but makes it a bit more consitant
to read.
ChangeLog
2009-01-22 Kai Tietz <kai.tietz@onevision.com>
* pe-dll.c (tmp_seq2): New static variable.
(make_singleton_name_imp): New.
(make_import_fixup_entry): Use for v2 the _imp_<name> symbol.
(pe_create_runtime_relocator_reference): Make reference for
64-bit 8 bytes.
Tested on x86_64-pc-mingw32 and for i686-pc-mingw32
Is this patch ok to apply?
Cheers,
Kai
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixrlv2.diff
Type: application/octet-stream
Size: 6456 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090122/bd5b9cca/attachment.obj>
More information about the Binutils
mailing list