Article View: comp.sys.amiga.tech
Article #12606Hunks & Segments & ...
From: Harvey Taylor
Date: Sat, 06 May 1989 22:17
Date: Sat, 06 May 1989 22:17
44 lines
2697 bytes
2697 bytes
I have written a file disassembler, that looks at the various
hunks & disassembles or dumps them accordingly...which has raised
a few questions in my mind...
Lots of the commands use the global vector.
1) Is this structure defined anywhere? I do _not_ intend to use this info
for writing code, just to analyze my disassemblies.
2) Is anybody else doing any disassembly of the system calls & commands?
I have a copy of a Hacker's Treasure, but that is back at version 1.1.
There is some info in the System Programmer's Guide as well.
3) Is there anything more to Segment Lists other than what is mentioned
in the AmigaDOS Tech Ref Man?
LONG Size of Segment
Prev BPTR ---> LONG BPTR to next segment [0 = eolist]
LONG Start of segment code/data
The reason I wonder is that there is a commonly used initialization
module [used in several commands] which references a pointer [Boffset?]
at the start of the segment code/data???
The naming conventions of Hunks are a bit confusing. With HUNK_Code,
HUNK_reloc, etc you get the impression that these signify the hunks,
but on Page 251 of the ATRM we read:
"A hunk consists of a block of code or data, relocation information
and a list of defined or referenced external symbols. etc..."
4) If a hunk consists of say HUNK_code, then HUNK_reloc, then HUNK_end;
what are these sub-elements called? ie. the reloc piece or the code
piece?
5) What is the relation between Segments & hunks? Is there anything
hidden here?
6) In my disassemblies, I have noticed some peculiar (to put it mildly)
hunk structures such as Code & Data pieces of length 0; 20 or 30
code & data hunks (many of them very short) in an 8K program. Is this
an artifact of inefficient &/ improper linking or is there a reason
behind it?
<-Harvey
_____
M _/ \_ Harvey Taylor
U / <o> \ Meta Media Productions
T | | [QL wares:Amigoid in training]
A | <o> <o> | 726 West 17th
N | [ | Vancouver,BC.Canada.V5Z 1T9
T \_ === _/ uunet!van-bc!rsoft!mindlink!Harvey_Taylor
S \_____/ a186@mindlink.UUCP
FOR NUCLEAR POWER
Technical Details
Message-ID:
<232@mindlink.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wasatch!cs.utexas.edu!rutgers!att!alberta!ubc-cs!van-bc!rsoft!mindlink!a186Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wasatch!cs.utexas.edu!rutgers!att!alberta!ubc-cs!van-bc!rsoft!mindlink!a186 From: a186@mindlink.UUCP (Harvey Taylor) Newsgroups: comp.sys.amiga.tech Subject: Hunks & Segments & ... Message-ID: <232@mindlink.UUCP> Date: 6 May 89 22:17:49 GMT Organization: MIND LINK! - British Columbia, Canada Lines: 44