diff mbox

[U-Boot,2/5] MIPS: create .text sub-sections for assembler functions

Message ID 1450552849-10813-3-git-send-email-daniel.schwierzeck@gmail.com
State Accepted
Commit 5b6f357fe73a3fab11870cceeac5f2fecd6d7e02
Delegated to: Daniel Schwierzeck
Headers show

Commit Message

Daniel Schwierzeck Dec. 19, 2015, 7:20 p.m. UTC
Put all functions coded in assembly in sub-sections of
section .text. This allows the linker to garbage collect
unused assembly functions too.

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

 arch/mips/include/asm/asm.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h
index 855f707..8c9c4e2 100644
--- a/arch/mips/include/asm/asm.h
+++ b/arch/mips/include/asm/asm.h
@@ -59,6 +59,7 @@  symbol:
 		.align	2;                              \
 		.type	symbol, @function;              \
 		.ent	symbol, 0;                      \
+		.section .text.symbol, "x";             \
 symbol:		.frame	sp, 0, ra
 
 /*
@@ -68,7 +69,8 @@  symbol:		.frame	sp, 0, ra
 		.globl	symbol;                         \
 		.align	2;                              \
 		.type	symbol, @function;              \
-		.ent	symbol, 0;                       \
+		.ent	symbol, 0;                      \
+		.section .text.symbol, "x";             \
 symbol:		.frame	sp, framesize, rpc
 
 /*