ANDROID: arm64: fix LD_DEAD_CODE_DATA_ELIMINATION
authorSami Tolvanen <samitolvanen@google.com>
Tue, 13 Feb 2018 22:00:14 +0000 (14:00 -0800)
committerSami Tolvanen <samitolvanen@google.com>
Thu, 26 Apr 2018 23:03:35 +0000 (16:03 -0700)
Keep .entry.tramp.text to avoid the "Entry trampoline text too big"
error while linking.

Bug: 62093296
Bug: 67506682
Change-Id: Idab3216244bd2f8537bb2a5bb47e25e8588394da
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
arch/arm64/kernel/vmlinux.lds.S

index ddfd3c0942f7acf27d3bb0396ebbd3ba87303296..e9ad6914a4fb68cd952377f9811aff986a9a5a51 100644 (file)
@@ -61,7 +61,7 @@ jiffies = jiffies_64;
 #define TRAMP_TEXT                                     \
        . = ALIGN(PAGE_SIZE);                           \
        VMLINUX_SYMBOL(__entry_tramp_text_start) = .;   \
-       *(.entry.tramp.text)                            \
+       KEEP(*(.entry.tramp.text))                      \
        . = ALIGN(PAGE_SIZE);                           \
        VMLINUX_SYMBOL(__entry_tramp_text_end) = .;
 #else