1.1 --- a/lib/start.S Fri Oct 26 18:22:04 2018 +0200
1.2 +++ b/lib/start.S Fri Oct 26 19:10:51 2018 +0200
1.3 @@ -75,31 +75,17 @@
1.4 lui $gp, %hi(_GLOBAL_OFFSET_TABLE_)
1.5 ori $gp, $gp, %lo(_GLOBAL_OFFSET_TABLE_)
1.6
1.7 - /*
1.8 - Relocate mutable data and then jump to the main program.
1.9 -
1.10 - Since the boot code is separate from the other code, addresses cannot be
1.11 - obtained via the GOT:
1.12 -
1.13 - "relocation truncated to fit: R_MIPS_PC16 against `main'"
1.14 - */
1.15 + /* Relocate mutable data and then jump to the main program. */
1.16
1.17 - lui $a0, %hi(_data_original)
1.18 - ori $a0, $a0, %lo(_data_original)
1.19 -
1.20 - lui $a1, %hi(_data)
1.21 - ori $a1, $a1, %lo(_data)
1.22 -
1.23 - lui $a2, %hi(_data_size)
1.24 - ori $a2, $a2, %lo(_data_size)
1.25 + la $a0, _data_original
1.26 + la $a1, _data
1.27 + la $a2, _data_size
1.28 lw $a2, 0($a2)
1.29
1.30 - lui $t9, %hi(relocate_data)
1.31 - ori $t9, $t9, %lo(relocate_data)
1.32 + la $t9, relocate_data
1.33 jal $t9
1.34 nop
1.35
1.36 - lui $t9, %hi(main)
1.37 - ori $t9, $t9, %lo(main)
1.38 + la $t9, main
1.39 jr $t9
1.40 nop