[PATCH] x86: Pack function addresses tightly as well

From: Ingo Molnar
Date: Fri Apr 10 2015 - 08:14:29 EST


Not-Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
arch/x86/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 0366d6b44a14..573d0c459f99 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -77,9 +77,12 @@ else
KBUILD_AFLAGS += -m64
KBUILD_CFLAGS += -m64

- # Align jump targets to 1 byte, not the default 16 bytes:
+ # Pack jump targets tightly, don't align them to the default 16 bytes:
KBUILD_CFLAGS += -falign-jumps=1

+ # Pack functions tightly as well:
+ KBUILD_CFLAGS += -falign-functions=1
+
# Don't autogenerate traditional x87 instructions
KBUILD_CFLAGS += $(call cc-option,-mno-80387)
KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/