mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-30 00:21:06 +00:00
b2f1858455
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>
48 lines
813 B
ArmAsm
48 lines
813 B
ArmAsm
/*
|
|
* linux/arch/arm/lib/muldi3.S
|
|
*
|
|
* Author: Nicolas Pitre
|
|
* Created: Oct 19, 2005
|
|
* Copyright: Monta Vista Software, Inc.
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0
|
|
*/
|
|
|
|
#include <linux/linkage.h>
|
|
#include <asm/assembler.h>
|
|
|
|
#ifdef __ARMEB__
|
|
#define xh r0
|
|
#define xl r1
|
|
#define yh r2
|
|
#define yl r3
|
|
#else
|
|
#define xl r0
|
|
#define xh r1
|
|
#define yl r2
|
|
#define yh r3
|
|
#endif
|
|
|
|
.pushsection .text.__muldi3, "ax"
|
|
ENTRY(__muldi3)
|
|
ENTRY(__aeabi_lmul)
|
|
|
|
mul xh, yl, xh
|
|
mla xh, xl, yh, xh
|
|
mov ip, xl, lsr #16
|
|
mov yh, yl, lsr #16
|
|
bic xl, xl, ip, lsl #16
|
|
bic yl, yl, yh, lsl #16
|
|
mla xh, yh, ip, xh
|
|
mul yh, xl, yh
|
|
mul xl, yl, xl
|
|
mul ip, yl, ip
|
|
adds xl, xl, yh, lsl #16
|
|
adc xh, xh, yh, lsr #16
|
|
adds xl, xl, ip, lsl #16
|
|
adc xh, xh, ip, lsr #16
|
|
ret lr
|
|
|
|
ENDPROC(__muldi3)
|
|
ENDPROC(__aeabi_lmul)
|
|
.popsection
|