Version française
Home     About     Download     Resources     Contact us    
Browse thread
Native executable symtable
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Keith Wansbrough <Keith.Wansbrough@c...>
Subject: Re: [Caml-list] Native executable symtable
Luca Pascali wrote:

> Keith Wansbrough wrote:
[..]
> >The brute-force way is to make sure that you know one of the values in
> >the table (the CRC of an unchanging module, say), and then just scan
> >through the executable searching for that value as a bit-pattern.
[..]
> Ok. Sounds fine.
> But for the application we thought is not applicable.
[..]
> So we do not know those values, and we cannot search for them in the file.

Make sure there is a value you do know.  For example, write a module 
containing just a big string.  Require that it is always included in 
any executable supported by your system.  Compute its CRC.  Now you 
have a starting-point for searching.

> It will be more useful for us to know where to find those values in the 
> natively compiled file and if this solution is cross platform or not.

No solution will be completely cross-platform; different platforms
have different executable formats.  But if you support say ELF and PE
(COFF), you'll cover a lot of platforms...

--KW 8-)