# HG changeset patch # User Paul Boddie # Date 1540573541 -7200 # Node ID ae0b0022e6096aa3d9f17df8d0007379153f0abf # Parent 45a99a68c2ed4abc30a2fffbb6f6b7b58a43968b Use the global offset table when obtaining the address of main. diff -r 45a99a68c2ed -r ae0b0022e609 lib/start.S --- a/lib/start.S Thu Oct 25 21:19:01 2018 +0200 +++ b/lib/start.S Fri Oct 26 19:05:41 2018 +0200 @@ -71,13 +71,8 @@ lui $gp, %hi(_GLOBAL_OFFSET_TABLE_) ori $gp, $gp, %lo(_GLOBAL_OFFSET_TABLE_) - /* - Jump to the main program. Since the boot code is separate from the - other code, the address cannot be obtained via the GOT. - ("relocation truncated to fit: R_MIPS_PC16 against `main'") - */ + /* Jump to the main program. */ - lui $t9, %hi(main) - ori $t9, $t9, %lo(main) + la $t9, main jr $t9 nop