Patchwork [U-Boot,v3,7/9] arm720t: add linkage macro for relocate_code

login
register
mail settings
Submitter Allen Martin
Date Aug. 15, 2012, 9:38 p.m.
Message ID <1345066741-19613-8-git-send-email-amartin@nvidia.com>
Download mbox | patch
Permalink /patch/177860/
State Changes Requested
Delegated to: Tom Warren
Headers show

Comments

Allen Martin - Aug. 15, 2012, 9:38 p.m.
The linker needs this to understand that the symbol is actually a
function so it will generate correct thumb interworking code.

Signed-off-by: Allen Martin <amartin@nvidia.com>
---
 arch/arm/cpu/arm720t/start.S |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/arch/arm/cpu/arm720t/start.S b/arch/arm/cpu/arm720t/start.S
index 013da46..b110bf7 100644
--- a/arch/arm/cpu/arm720t/start.S
+++ b/arch/arm/cpu/arm720t/start.S
@@ -27,6 +27,7 @@ 
 #include <config.h>
 #include <version.h>
 #include <asm/hardware.h>
+#include <linux/linkage.h>
 
 /*
  *************************************************************************
@@ -171,8 +172,7 @@  call_board_init_f:
  * after relocating the monitor code.
  *
  */
-	.globl	relocate_code
-relocate_code:
+ENTRY(relocate_code)
 	mov	r4, r0	/* save addr_sp */
 	mov	r5, r1	/* save addr of gd */
 	mov	r6, r2	/* save addr of destination */
@@ -279,6 +279,7 @@  _rel_dyn_end_ofs:
 	.word __rel_dyn_end - _start
 _dynsym_start_ofs:
 	.word __dynsym_start - _start
+ENDPROC(relocate_code)
 
 /*
  *************************************************************************