Correctly annotate _start and relocate_code as functions to
produce more readable disassembly code generated by objdump.

Signed-off-by: Daniel Schwierzeck <daniel.schwierz...@gmail.com>
---

 arch/mips/cpu/start.S       | 12 +++++-------
 arch/mips/include/asm/asm.h |  6 ++++++
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S
index 3b5b622..e95cdca 100644
--- a/arch/mips/cpu/start.S
+++ b/arch/mips/cpu/start.S
@@ -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)
diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h
index 933ccb1..855f707 100644
--- a/arch/mips/include/asm/asm.h
+++ b/arch/mips/include/asm/asm.h
@@ -45,6 +45,12 @@
 #define CPLOAD(register)
 #endif
 
+#define ENTRY(symbol)                                   \
+               .globl  symbol;                         \
+               .type   symbol, @function;              \
+               .ent    symbol, 0;                      \
+symbol:
+
 /*
  * LEAF - declare leaf routine
  */
-- 
2.5.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to