summaryrefslogtreecommitdiffstats
path: root/BaseTools/Bin/GccLto/liblto-aarch64.s
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Bin/GccLto/liblto-aarch64.s')
-rw-r--r--BaseTools/Bin/GccLto/liblto-aarch64.s21
1 files changed, 21 insertions, 0 deletions
diff --git a/BaseTools/Bin/GccLto/liblto-aarch64.s b/BaseTools/Bin/GccLto/liblto-aarch64.s
new file mode 100644
index 0000000000..02a55ef445
--- /dev/null
+++ b/BaseTools/Bin/GccLto/liblto-aarch64.s
@@ -0,0 +1,21 @@
+//
+// Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
+//
+// SPDX-License-Identifier: BSD-2-Clause-Patent
+//
+
+//
+// GCC in LTO mode interoperates poorly with non-standard libraries that
+// provide implementations of compiler intrinsics such as memcpy/memset
+// or the stack protector entry points.
+//
+// By referencing these functions from a non-LTO object that can be passed
+// to the linker via the -plugin-opt=-pass-through=-lxxx options, the
+// intrinsics are included in the link in a way that allows them to be
+// pruned again if no other references to them exist.
+//
+
+ .long memcpy - .
+ .long memset - .
+ .long __stack_chk_fail - .
+ .long __stack_chk_guard - .