Home | History | Annotate | Download | only in cg

Lines Matching refs:TVector

438      that TVector's don't have to contain two words, they can be longer,
455 fragment to fix must have a TVector in its data section. TVectors are
458 for the fragment that's exporting the TVector. How TVectors are
459 created is interesting too. On disk, a TVector consists of two words,
462 to the TOC base. When CFM prepares a TVector, it applies the following
465 tvector.codePtr = tvector.codeOffset + base of code section
466 tvector.tocPtr = tvector.tocOffset + base of data section
470 base of code section = tvector.codePtr - tvector.codeOffset
471 base of data section = tvector.dataPtr - tvector.dataOffset
473 So if you can find the relocated contents of the TVector and
474 find the original offsets that made up the TVector, you can then
477 Finding the relocated contents of the TVector is easy; I simply
479 A routine pointer is a TVector pointer, so you can just cast it
485 TVector exists. Once I have that, I can just read the unrelocated TVector
489 struct TVector {
493 typedef struct TVector TVector;
501 // 1. Find the contents of the relocated TVector of the
505 // 2. Find the contents of the non-relocated TVector by
507 // using that to read the TVector contents from disk.
514 TVector * relocatedExport;
520 TVector originalOffsets;
527 // First find the init routine's TVector, which gives us the relocated
530 relocatedExport = (TVector *) fragToFix->initRoutine;
534 // Now find the init routine's TVector's offsets in the data section on
583 // Extract the init routine's TVector from the unpacked section.
586 BlockMoveData(unpackedDataSection + initOffset, &originalOffsets, sizeof(TVector));
595 sizeof(TVector),
1317 // other than a function pointer (ie TVector symbol) then we don't even true.