mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 18:35:42 +01:00 
			
		
		
		
	With the existing code, function symbols are defined in .text, and the
body is defined in .text.xxx. This causes (at least some version of) the
linker not to emit the function body into the final binary, since it's
part of a different section to the symbols being referenced. This of
course causes a wide variety of failures.
This change moves the push/pop-section directives before the function
symbols, and after any relate ENDPROC macro invocations, so that symbols
and bodies are all in the "pushed" sections, and thus the function bodies
are emitted into the binary.
This solves (at least) the boot problems currently seen on Tegra systems
that use SPL (i.e. all ARMv7 Tegras).
Fixes: 13b0a91a6d ("arm: lib: Split asm symbols into different .text subsections")
Cc: Marek Vasut <marex@denx.de>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
		
	
		
			
				
	
	
		
			35 lines
		
	
	
		
			602 B
		
	
	
	
		
			ArmAsm
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			602 B
		
	
	
	
		
			ArmAsm
		
	
	
	
	
	
| /* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005
 | |
|    Free Software Foundation, Inc.
 | |
| 
 | |
|  * SPDX-License-Identifier:	GPL-2.0+
 | |
|  */
 | |
| 
 | |
| #include <linux/linkage.h>
 | |
| #include <asm/assembler.h>
 | |
| 
 | |
| #ifdef __ARMEB__
 | |
| #define al r1
 | |
| #define ah r0
 | |
| #else
 | |
| #define al r0
 | |
| #define ah r1
 | |
| #endif
 | |
| 
 | |
| .pushsection .text.__lshldi3, "ax"
 | |
| ENTRY(__lshrdi3)
 | |
| ENTRY(__aeabi_llsr)
 | |
| 
 | |
| 	subs	r3, r2, #32
 | |
| 	rsb	ip, r2, #32
 | |
| 	movmi	al, al, lsr r2
 | |
| 	movpl	al, ah, lsr r3
 | |
|  ARM(	orrmi	al, al, ah, lsl ip	)
 | |
|  THUMB(	lslmi	r3, ah, ip		)
 | |
|  THUMB(	orrmi	al, al, r3		)
 | |
| 	mov	ah, ah, lsr r2
 | |
| 	ret	lr
 | |
| 
 | |
| ENDPROC(__lshrdi3)
 | |
| ENDPROC(__aeabi_llsr)
 | |
| .popsection
 |