Thread
:
Locating global data in ELF code on IA64
View Single Post
#
2
April 13th 06, 02:17 PM posted to comp.sys.intel
Alex Johnson
external usenet poster
Posts: n/a
Locating global data in ELF code on IA64
wrote:
Hi,
For my project I want to locate all the global data variables in an ELF
format code. To do this on IA32 and AMD64, we look through the _DYNAMIC
table and locate the relocation table by a d_tag==Elf32_Rel/Elf64_Rela
matching, then go through the relocation table entries and match their
type with R_386_GLOB_DAT/R_X86_64_GLOB_DAT. This mechanism, however,
doesn't work on IA64, because apparently IA64 stores its global data
somewhere else. In the relocation table all I find is function names,
thus there's no global data match.
I was wondering if this is the right direction to go on IA64. Any hint?
Thanks.
C.
Try matching region IDs. I believe you will find that in Linux (at
least when I dealt with IA64 Linux) uses different regions for user
code, shared code, and kernel code. Check the top bits of the address
(VRN = 63:61)...shared code used to be region 2 (addresses starting with
"4").
Alex
Alex Johnson
View message headers