1

Description du format des PedroM Applications:
 * 1.Header:
 *     Magic Tag.3b + Format of executable.1b
 *     Flags.l
 *     Size of executable.l
 *     Offset to Relocation Pass2.l
 *     Offset to Export Table.l
 *     Offset to Symbol Table.l
 *  2.Relocation Pass 1:
 *     CompressedRelocationTable of CodeOrg in CODE section.
 *     CompressedRelocationTable of WriteIndirectOrg in CODE section.
 *     System Import Table in CODE section:
 *       SystemCallsTableSize.w
 *       {index.w; CompressedRelocationTable}[] of System Calls:
 *        0x0xxx: LONG ROMCALL 0x1xxx: DLONG RAMCALLS 0x2xxx: WORD RAMCALLS 0x3xxx: LONG PedroM Call
 *  3.Relocation Pass 2:
 *     Size of WRITE section.l
 *     Library Import Table:
 *       LibraryImportTableSize.w
 *       {name.8b; version.w; Size.w; index.w[]}[]
 *     Data Section:
 *       DataSectionSize.l
 *       Data.b[]
 *     CompressedRelocationTable of CodeOrg in WRITE Section.
 *     CompressedRelocationTable of WriteOrg in WRITE Section.
 *  4.Export Table
 *     {size.w;  offset.l[] }
 *  5.Sorted Symbol Table
 *     {size.w; {name.8b; offset.l}[]}


Commentaires, explications => Post.

2

.l: Long 32 bits
.w: Word 16 bits
.b: Byte 8 bits
.Nb: Byte N*8 bits.
[]: Table variable du type precedent.
CompressedRelocationTable: Cf ProgFormatV6

3

CodeOrg: Address of the program in Flash
WriteIndirectOrg: Address of the Address of the Write Section in RAM.

4

Quelle sera l'adresse de référence de tes CompressedRelocationTable?
Si c'est une adresse dans le header et qu'il y a la table (de taille variable) entre cette adresse et le début du code, ça ne va pas aller (du moins pas avec ld-tigcc - mais c'est aussi un problème pour tout linker parce que ça voudrait dire que la taille de la table dépend de la taille de la table elle-même, bref dépendance circulaire).
avatar
Mes news pour calculatrices TI: Ti-Gen
Mes projets PC pour calculatrices TI: TIGCC, CalcForge (CalcForgeLP, Emu-TIGCC)
Mes chans IRC: #tigcc et #inspired sur irc.freequest.net (UTF-8)

Liberté, Égalité, Fraternité

5

La fin du header je pense pour la section code,
et le debut des data pour la section data (0 quoi).

6

OK, ça m'a l'air raisonnable.
Ça m'a l'air implémentable dans ld-tigcc alors, donc aucune objection de ma part.
avatar
Mes news pour calculatrices TI: Ti-Gen
Mes projets PC pour calculatrices TI: TIGCC, CalcForge (CalcForgeLP, Emu-TIGCC)
Mes chans IRC: #tigcc et #inspired sur irc.freequest.net (UTF-8)

Liberté, Égalité, Fraternité