cc68a136 |
1 | *update*\r |
2 | Use the "compress jumtable" Cyclone config.h option to fix this issue\r |
3 | (no patcher will be needed then).\r |
4 | \r |
5 | \r |
6 | There is a problem with Cyclone on symbian platform:\r |
7 | GNU as generates COFF object files, which allow max of 0xFFFF (65535) relocation\r |
8 | entries. Cyclone uses a jumptable of 0x10000 (65536, 1 for every opcode-word)\r |
9 | antries. When the executable is loaded, all jumptable entries must be relocated\r |
10 | to point to right code location. Because of this limitation, Cyclone's jumptable is\r |
11 | incomplete (misses 2 entries), and if M68k opcodes 0xFFFE or 0xFFFF are ever\r |
12 | encoundered when emulating, your emulator will crash.\r |
13 | \r |
14 | I have written a little patcher to fix that. It writes those two missing entries and\r |
15 | marks them as relocatable. Placeholders must not be deleted just after the jumttable\r |
16 | in the Cyclone source code.\r |
17 | \r |
18 | This version works with intermediate PE executable, which is used both for APPs and EXEs,\r |
19 | and is produced by gcc toolkit just before running petran. So it's best to insert\r |
20 | this in your makefile, in the rule which builds your APP/EXE, just after last 'ld'\r |
21 | statement, for example:\r |
22 | \r |
23 | $(EPOCTRGUREL)\PICODRIVEN.APP : $(EPOCBLDUREL)\PICODRIVEN.in $(EPOCSTATLINKUREL)\EDLL.LIB $(LIBSUREL)\r |
24 | ...\r |
25 | ld -s -e _E32Dll -u _E32Dll --dll \\r |
26 | "$(EPOCBLDUREL)\PICODRIVEN.exp" \\r |
27 | -Map "$(EPOCTRGUREL)\PICODRIVEN.APP.map" -o "$(EPOCBLDUREL)\PICODRIVEN.APP" \\r |
28 | "$(EPOCSTATLINKUREL)\EDLL.LIB" --whole-archive "$(EPOCBLDUREL)\PICODRIVEN.in" \\r |
29 | --no-whole-archive $(LIBSUREL) $(USERLDFLAGS)\r |
30 | -$(ERASE) "$(EPOCBLDUREL)\PICODRIVEN.exp"\r |
31 | \r |
32 | patchtable_symb2 "$(EPOCBLDUREL)\PICODRIVEN.APP"\r |
33 | \r |
34 | petran "$(EPOCBLDUREL)\PICODRIVEN.APP" "$@" \\r |
35 | -nocall -uid1 0x10000079 -uid2 0x100039ce -uid3 0x1000c193\r |
36 | -$(ERASE) "$(EPOCBLDUREL)\PICODRIVEN.APP"\r |
37 | perl -S ecopyfile.pl "$@" "PICODRIVEN.APP"\r |
38 | \r |
39 | \r |
40 | This is also compatible with ECompXL.\r |
41 | \r |
42 | To test if this thing worked, you can load crash_cyclone.bin in your emulator.\r |