I've read the COFF file format and I'm trying to implement a program that reports all the COFF data, symbols etc. I can read the file header but my list of symbols is just s***.
Can some one please look at the code attached.
Pete
[attachment deleted by admin]
Dynamic Linking
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Dynamic Linking
hmm ..
i'm unsure, but i can see things like
you are of course aware that writing ptr+offset in C means (void*)ptr + offset * sizeof(<base type of ptr>), so ((dword*)p) + 1 == ((char*)p)+4
i'm unsure, but i can see things like
Code: Select all
struct coff_header *image;
...
symbol = (image + image->symbol_off + i);
Re:Dynamic Linking
Thanks. Although I still don't completely understand the output. The name of the symbols are obviously right.
I've just found a page which seems to contain lots of useful info on the subject and on other stuff as well.
HERE
Pete
I've just found a page which seems to contain lots of useful info on the subject and on other stuff as well.
HERE
Pete
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Dynamic Linking
all of these things are also clearly described in the appendix of the Kernighan & Ritchie book about ANSI C ... that one is a must-read for all of you, young paddawan ...