|
@@ -63,11 +63,29 @@
|
|
|
. = 0x0; \
|
|
|
start_##sname:
|
|
|
|
|
|
+/*
|
|
|
+ * .linker_stub_catch section is used to catch linker stubs from being
|
|
|
+ * inserted in our .text section, above the start_text label (which breaks
|
|
|
+ * the ABS_ADDR calculation). See kernel/vmlinux.lds.S and tools/head_check.sh
|
|
|
+ * for more details. We would prefer to just keep a cacheline (0x80), but
|
|
|
+ * 0x100 seems to be how the linker aligns branch stub groups.
|
|
|
+ */
|
|
|
+#ifdef CONFIG_LD_HEAD_STUB_CATCH
|
|
|
+#define OPEN_TEXT_SECTION(start) \
|
|
|
+ .section ".linker_stub_catch","ax",@progbits; \
|
|
|
+linker_stub_catch: \
|
|
|
+ . = 0x4; \
|
|
|
+ text_start = (start) + 0x100; \
|
|
|
+ .section ".text","ax",@progbits; \
|
|
|
+ .balign 0x100; \
|
|
|
+start_text:
|
|
|
+#else
|
|
|
#define OPEN_TEXT_SECTION(start) \
|
|
|
text_start = (start); \
|
|
|
.section ".text","ax",@progbits; \
|
|
|
. = 0x0; \
|
|
|
start_text:
|
|
|
+#endif
|
|
|
|
|
|
#define ZERO_FIXED_SECTION(sname, start, end) \
|
|
|
sname##_start = (start); \
|