On Tue, 22 Feb 2011 19:47:13 +0100, Roland McGrath wrote:
> Thanks for the hint. I was not aware prelink can even change
the
> .dynamic/PT_DYNAMIC address.
It changes the addresses of all allocated sections and all phdrs.
Yes, but normally only by a multiple of 0x1000 (PAGE_SIZE).
Just if there is the REL->RELA conversion, it can change the relocation offset
arbitrarily (not aligned to 0x1000). It may be clear, it was not to me.
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 7] .rel.dyn REL 000002b0 0002b0 000028 08 A 3 0 4
[ 8] .rel.plt REL 000002d8 0002d8 000010 08 A 3 10 4
[ 9] .init PROGBITS 000002e8 0002e8 00002e 00 AX 0 0 4
[10] .plt PROGBITS 00000318 000318 000030 04 AX 0 0 4
[11] .text PROGBITS 00000350 000350 00012c 00 AX 0 0 16
->
[ 7] .rel.dyn RELA 411b32b0 0002b0 00003c 0c A 3 0 4
[ 8] .rel.plt REL 411b32ec 0002ec 000010 08 A 3 10 4
[ 9] .init PROGBITS 411b3308 000308 00002e 00 AX 0 0 4
[10] .plt PROGBITS 411b3338 000338 000030 04 AX 0 0 4
[11] .text PROGBITS 411b3370 000370 00012c 00 AX 0 0 16
Thanks,
Jan