![Razz :P](./images/smilies/icon_razz.gif)
I used this one on bonafide:
http://www.iecc.com/linker/linker10.html
and this HOWTO about parsing elf dynamic symbol tables
http://em386.blogspot.com/2006/10/resol ... mbols.html
In the second one, they are describing which section to look in, to find the Elf32_Rel entries...
They say that 'the section that has type SHT_REL is the one we're after', but two of those sections have type SHT_REL. .rel.plt is the one in my own test code which holds all the relavent relocation data, but what do I do if I get a situation as above, where there are multiple .rel sections? The only information my dynamic linker gets passed is an offset, and this can be applied to both .rel.dyn and .rel.plt. Do I just find the entry labeled '.rel.plt' and ignore all other sections with SHT_REL set?$ readelf -S /bin/ls
There are 26 section headers, starting at offset 0x126d8:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
...
[ 4] .dynsym DYNSYM 080484a0 0004a0 0006b0 10 A 5 1 4
...
[ 8] .rel.dyn REL 08049170 001170 000028 08 A 4 0 4
[ 9] .rel.plt REL 08049198 001198 0002f0 08 A 4 11 4
Cheers for any help,
JamesM