]> git.sur5r.net Git - u-boot/commitdiff
MIPS: create .text sub-sections for assembler functions
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Sat, 19 Dec 2015 19:20:46 +0000 (20:20 +0100)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Sat, 16 Jan 2016 20:06:45 +0000 (21:06 +0100)
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

index 855f70708ecffa2899a899d5d9ede38f5851d122..8c9c4e27148b7e3e6d2e3045dbacba6a04c5bb57 100644 (file)
@@ -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
 
 /*