Synchronize the code with mips{32,64}/start.S, in order to
allow further unifications.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
* generated by GNU ld. Skip these reserved entries from relocation.
*/
lw t3, -4(t0) # t3 <-- num_got_entries
* generated by GNU ld. Skip these reserved entries from relocation.
*/
lw t3, -4(t0) # t3 <-- num_got_entries
- lw t4, -8(t0) # t4 <-- _GLOBAL_OFFSET_TABLE_
- add t4, s1 # t4 now holds relocated _G_O_T_
- addi t4, t4, 8 # skipping first two entries
+ lw t8, -8(t0) # t8 <-- _GLOBAL_OFFSET_TABLE_
+ add t8, s1 # t8 now holds relocated _G_O_T_
+ addi t8, t8, 8 # skipping first two entries
2:
addi t2, 1
blt t2, t3, 1b
2:
addi t2, 1
blt t2, t3, 1b
/* Update dynamic relocations */
lw t1, -16(t0) # t1 <-- __rel_dyn_start
/* Update dynamic relocations */
lw t1, -16(t0) # t1 <-- __rel_dyn_start
lw t3, -8(t1) # t3 <-- location to fix up in FLASH
lw t3, -8(t1) # t3 <-- location to fix up in FLASH
- lw t4, 0(t3) # t4 <-- original pointer
- add t4, s1 # t4 <-- adjusted pointer
+ lw t8, 0(t3) # t8 <-- original pointer
+ add t8, s1 # t8 <-- adjusted pointer
add t3, s1 # t3 <-- location to fix up in RAM
add t3, s1 # t3 <-- location to fix up in RAM