arm: lib: fix push/pop-section directives
PATCH 1/1 arm: lib: fix push/pop-section directives
From: Stephen Warren <[email protected]>
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).
--- arch/arm/lib/ashldi3.S | 4 ++-- arch/arm/lib/ashrdi3.S | 4 ++-- arch/arm/lib/div64.S | 4 ++-- arch/arm/lib/lib1funcs.S | 44 ++++++++++++++++++++++---------------------- arch/arm/lib/lshrdi3.S | 4 ++-- arch/arm/lib/muldi3.S | 4 ++-- arch/arm/lib/uldivmod.S | 4 ++-- 7 files changed, 34 insertions(+), 34 deletions(-)
arch/arm/lib/ashldi3.S +2 -2
@@ -15,9 +15,9 @@ #define ah r1 #endif +.pushsection .text.__ashldi3, "ax" ENTRY(__ashldi3) ENTRY(__aeabi_llsl) -.pushsection .text.__ashldi3, "ax" subs r3, r2, #32 rsb ip, r2, #32
@@ -29,6 +29,6 @@ ENTRY(__aeabi_llsl) mov al, al, lsl r2 ret lr -.popsection ENDPROC(__ashldi3) ENDPROC(__aeabi_llsl) +.popsection
arch/arm/lib/ashrdi3.S +2 -2
@@ -15,9 +15,9 @@ #define ah r1 #endif +.pushsection .text.__ashrdi3, "ax" ENTRY(__ashrdi3) ENTRY(__aeabi_lasr) -.pushsection .text.__ashrdi3, "ax" subs r3, r2, #32 rsb ip, r2, #32
@@ -29,6 +29,6 @@ ENTRY(__aeabi_lasr) mov ah, ah, asr r2 ret lr -.popsection ENDPROC(__ashrdi3) ENDPROC(__aeabi_lasr) +.popsection
arch/arm/lib/div64.S +2 -2
@@ -45,9 +45,9 @@ * Clobbered regs: xl, ip */ +.pushsection .text.__do_div64, "ax" ENTRY(__do_div64) UNWIND(.fnstart) -.pushsection .text.__do_div64, "ax" @ Test for easy paths first. subs ip, r4, #1
@@ -193,7 +193,6 @@ UNWIND(.fnstart) moveq yh, xh moveq xh, #0 reteq lr -.popsection UNWIND(.fnend) UNWIND(.fnstart)
@@ -212,3 +211,4 @@ Ldiv0_64: UNWIND(.fnend) ENDPROC(__do_div64) +.popsection
arch/arm/lib/lib1funcs.S +22 -22
174 lines not on this page · raw message
arch/arm/lib/lshrdi3.S +2 -2
@@ -15,9 +15,9 @@ #define ah r1 #endif +.pushsection .text.__lshldi3, "ax" ENTRY(__lshrdi3) ENTRY(__aeabi_llsr) -.pushsection .text.__lshldi3, "ax" subs r3, r2, #32 rsb ip, r2, #32
@@ -29,6 +29,6 @@ ENTRY(__aeabi_llsr) mov ah, ah, lsr r2 ret lr -.popsection ENDPROC(__lshrdi3) ENDPROC(__aeabi_llsr) +.popsection
arch/arm/lib/muldi3.S +2 -2
@@ -23,9 +23,9 @@ #define yh r3 #endif +.pushsection .text.__muldi3, "ax" ENTRY(__muldi3) ENTRY(__aeabi_lmul) -.pushsection .text.__muldi3, "ax" mul xh, yl, xh mla xh, xl, yh, xh
@@ -43,6 +43,6 @@ ENTRY(__aeabi_lmul) adc xh, xh, ip, lsr #16 ret lr -.popsection ENDPROC(__muldi3) ENDPROC(__aeabi_lmul) +.popsection
arch/arm/lib/uldivmod.S +2 -2
@@ -33,8 +33,8 @@ THUMB( TMP .req r8 ) -ENTRY(__aeabi_uldivmod) .pushsection .text.__aeabi_uldivmod, "ax" +ENTRY(__aeabi_uldivmod) stmfd sp!, {r4, r5, r6, r7, THUMB(TMP,) lr} @ Test if B == 0
@@ -242,5 +242,5 @@ L_div_by_0: mov R_0, #0 mov R_1, #0 ldmfd sp!, {r4, r5, r6, r7, THUMB(TMP,) pc} -.popsection ENDPROC(__aeabi_uldivmod) +.popsection
Signature · 1 line
2.8.3
PATCH 1/1 arm: lib: fix push/pop-section directives
Quoted 16 lines · Stephen Warren
From: Stephen Warren <[email protected]>
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).
Quoted 6 lines
Fixes 13b0a91a6d48 ("arm: lib: Split asm symbols into different .text subsections")Cc Marek Vasut <[email protected]>Cc Tom Warren <[email protected]>Cc Simon Glass <[email protected]>Cc Masahiro Yamada <[email protected]>Signed-off-by Stephen Warren <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160603/88b2e6e2/attachment.sig>
PATCH 1/1 arm: lib: fix push/pop-section directives
Quoted 18 lines · Tom Rini
Quoted 16 lines · Stephen Warren
From: Stephen Warren <[email protected]>
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).
Quoted 9 lines
Quoted 6 lines
Fixes 13b0a91a6d48 ("arm: lib: Split asm symbols into different .text subsections")Cc Marek Vasut <[email protected]>Cc Tom Warren <[email protected]>Cc Simon Glass <[email protected]>Cc Masahiro Yamada <[email protected]>Signed-off-by Stephen Warren <[email protected]>Applied to u-boot/master, thanks!
Thanks!
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 arm: lib: fix push/pop-section directives
Quoted 26 lines · Marek Vasut
Quoted 25 lines · Tom Rini
Quoted 22 lines · Stephen Warren
From: Stephen Warren <[email protected]>
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 13b0a91a6d48 ("arm: lib: Split asm symbols into different .text subsections")Cc Marek Vasut <[email protected]>Cc Tom Warren <[email protected]>Cc Simon Glass <[email protected]>Cc Masahiro Yamada <[email protected]>Signed-off-by Stephen Warren <[email protected]>
Quoted 3 lines
Quoted 2 lines
Applied to u-boot/master, thanks!
Thanks!
So, that said, this breaks VCMA9 and maybe a few other platforms, can you look a little more Stephen or Marek? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160604/33d54112/attachment.sig>
PATCH 1/1 arm: lib: fix push/pop-section directives
Quoted 27 lines · Tom Rini
Quoted 26 lines · Marek Vasut
Quoted 25 lines · Tom Rini
Quoted 22 lines · Stephen Warren
From: Stephen Warren <[email protected]>
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 13b0a91a6d48 ("arm: lib: Split asm symbols into different .text subsections")Cc Marek Vasut <[email protected]>Cc Tom Warren <[email protected]>Cc Simon Glass <[email protected]>Cc Masahiro Yamada <[email protected]>Signed-off-by Stephen Warren <[email protected]>
Quoted 7 lines
Quoted 3 lines
Quoted 2 lines
Applied to u-boot/master, thanks!
Thanks!
So, that said, this breaks VCMA9 and maybe a few other platforms, can you look a little more Stephen or Marek? Thanks!
Patch is out.
Signature · 2 lines
Best regards, Marek Vasut