]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
MIPS: fix annotation of _start and relocate_code
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Sat, 19 Dec 2015 19:20:45 +0000 (20:20 +0100)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Sat, 16 Jan 2016 20:06:45 +0000 (21:06 +0100)
Correctly annotate _start and relocate_code as functions to
produce more readable disassembly code generated by objdump.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
arch/mips/cpu/start.S
arch/mips/include/asm/asm.h

index 3b5b622abedf06ffba3534692d7fba027569ed52..e95cdca61eba2db1b88700c7d297558a09e405d1 100644 (file)
@@ -56,9 +56,7 @@
 
        .set noreorder
 
-       .globl _start
-       .text
-_start:
+ENTRY(_start)
        /* U-boot entry point */
        b       reset
         nop
@@ -192,6 +190,8 @@ reset:
        jr      t9
         move   ra, zero
 
+       END(_start)
+
 /*
  * void relocate_code (addr_sp, gd, addr_moni)
  *
@@ -202,9 +202,7 @@ reset:
  * a1 = gd
  * a2 = destination address
  */
-       .globl  relocate_code
-       .ent    relocate_code
-relocate_code:
+ENTRY(relocate_code)
        move    sp, a0                  # set new stack pointer
        move    fp, sp
 
@@ -317,4 +315,4 @@ in_ram:
        jr      t9
         move   ra, zero
 
-       .end    relocate_code
+       END(relocate_code)
index 933ccb1b7864abb9993bcaa187f25f15c9878dbf..855f70708ecffa2899a899d5d9ede38f5851d122 100644 (file)
 #define CPLOAD(register)
 #endif
 
+#define ENTRY(symbol)                                   \
+               .globl  symbol;                         \
+               .type   symbol, @function;              \
+               .ent    symbol, 0;                      \
+symbol:
+
 /*
  * LEAF - declare leaf routine
  */