[PATCH] D72968: [lld][ELF] Don't apply --fix-cortex-a53-843419 to relocatable links.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 20 15:41:44 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc81fe34718d7: [lld][ELF] Don't apply --fix-cortex-a53-843419 to relocatable links. (authored by efriedma).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72968/new/
https://reviews.llvm.org/D72968
Files:
lld/ELF/Driver.cpp
lld/test/ELF/aarch64-cortex-a53-843419-recognize.s
Index: lld/test/ELF/aarch64-cortex-a53-843419-recognize.s
===================================================================
--- lld/test/ELF/aarch64-cortex-a53-843419-recognize.s
+++ lld/test/ELF/aarch64-cortex-a53-843419-recognize.s
@@ -4,6 +4,8 @@
// RUN: llvm-objdump -triple=aarch64-linux-gnu -d %t2 | FileCheck %s -check-prefixes=CHECK,CHECK-FIX
// RUN: ld.lld %t.o -z separate-code -o %t3
// RUN: llvm-objdump -triple=aarch64-linux-gnu -d %t3 | FileCheck %s -check-prefixes=CHECK,CHECK-NOFIX
+// RUN: ld.lld -fix-cortex-a53-843419 -r -z separate-code %t.o -o %t4
+// RUN: llvm-objdump -triple=aarch64-linux-gnu -d %t4 | FileCheck %s -check-prefixes=CHECK-RELOCATABLE
// Test cases for Cortex-A53 Erratum 843419
// See ARM-EPM-048406 Cortex_A53_MPCore_Software_Developers_Errata_Notice.pdf
// for full erratum details.
@@ -33,6 +35,12 @@
// CHECK-FIX: 212000: 03 c8 00 14 b #204812
// CHECK-NOFIX: 212000: 00 00 40 f9 ldr x0, [x0]
// CHECK-NEXT: 212004: c0 03 5f d6 ret
+// CHECK-RELOCATABLE: t3_ff8_ldr:
+// CHECK-RELOCATABLE-NEXT: ff8: 00 00 00 90 adrp x0, #0
+// CHECK-RELOCATABLE-NEXT: ffc: 21 00 40 f9 ldr x1, [x1]
+// CHECK-RELOCATABLE-NEXT: 1000: 00 00 40 f9 ldr x0, [x0]
+// CHECK-RELOCATABLE-NEXT: 1004: c0 03 5f d6 ret
+
.section .text.01, "ax", %progbits
.balign 4096
.globl t3_ff8_ldr
Index: lld/ELF/Driver.cpp
===================================================================
--- lld/ELF/Driver.cpp
+++ lld/ELF/Driver.cpp
@@ -874,7 +874,8 @@
args.hasFlag(OPT_export_dynamic, OPT_no_export_dynamic, false);
config->filterList = args::getStrings(args, OPT_filter);
config->fini = args.getLastArgValue(OPT_fini, "_fini");
- config->fixCortexA53Errata843419 = args.hasArg(OPT_fix_cortex_a53_843419);
+ config->fixCortexA53Errata843419 = args.hasArg(OPT_fix_cortex_a53_843419) &&
+ !args.hasArg(OPT_relocatable);
config->fixCortexA8 = args.hasArg(OPT_fix_cortex_a8);
config->forceBTI = hasZOption(args, "force-bti");
config->gcSections = args.hasFlag(OPT_gc_sections, OPT_no_gc_sections, false);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72968.239205.patch
Type: text/x-patch
Size: 2250 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200120/4013dafc/attachment.bin>
More information about the llvm-commits
mailing list