summaryrefslogtreecommitdiffstats
path: root/binutils-2.24/ld
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.24/ld')
-rw-r--r--binutils-2.24/ld/ChangeLog5
-rw-r--r--binutils-2.24/ld/emultempl/aarch64elf.em10
-rw-r--r--binutils-2.24/ld/ld.texinfo7
-rw-r--r--binutils-2.24/ld/testsuite/ChangeLog7
-rw-r--r--binutils-2.24/ld/testsuite/ld-aarch64/aarch64-elf.exp8
-rw-r--r--binutils-2.24/ld/testsuite/ld-aarch64/erratum835769.d48
-rw-r--r--binutils-2.24/ld/testsuite/ld-aarch64/erratum835769.s75
7 files changed, 159 insertions, 1 deletions
diff --git a/binutils-2.24/ld/ChangeLog b/binutils-2.24/ld/ChangeLog
index 0422d81..f6a6e95 100644
--- a/binutils-2.24/ld/ChangeLog
+++ b/binutils-2.24/ld/ChangeLog
@@ -1,3 +1,8 @@
+2014-10-24 Tejas Belagod <tejas.belagod@arm.com>
+
+ * emultempl/aarch64elf.em: Add command-line option for erratum
+ 835769.
+
2014-04-16 Steve Ellcey <sellcey@mips.com>
* emultempl/elf32.em: Include safe-ctype.h.
diff --git a/binutils-2.24/ld/emultempl/aarch64elf.em b/binutils-2.24/ld/emultempl/aarch64elf.em
index b3279bf..87aba34 100644
--- a/binutils-2.24/ld/emultempl/aarch64elf.em
+++ b/binutils-2.24/ld/emultempl/aarch64elf.em
@@ -30,6 +30,7 @@ fragment <<EOF
static int no_enum_size_warning = 0;
static int no_wchar_size_warning = 0;
static int pic_veneer = 0;
+static int fix_erratum_835769 = 0;
static void
gld${EMULATION_NAME}_before_parse (void)
@@ -297,7 +298,7 @@ aarch64_elf_create_output_section_statements (void)
bfd_elf${ELFSIZE}_aarch64_set_options (link_info.output_bfd, &link_info,
no_enum_size_warning,
no_wchar_size_warning,
- pic_veneer);
+ pic_veneer, fix_erratum_835769);
stub_file = lang_add_input_file ("linker stubs",
lang_input_file_is_fake_enum,
@@ -346,6 +347,7 @@ PARSE_AND_LIST_PROLOGUE='
#define OPTION_PIC_VENEER 310
#define OPTION_STUBGROUP_SIZE 311
#define OPTION_NO_WCHAR_SIZE_WARNING 312
+#define OPTION_FIX_ERRATUM_835769 313
'
PARSE_AND_LIST_SHORTOPTS=p
@@ -356,6 +358,7 @@ PARSE_AND_LIST_LONGOPTS='
{ "pic-veneer", no_argument, NULL, OPTION_PIC_VENEER},
{ "stub-group-size", required_argument, NULL, OPTION_STUBGROUP_SIZE },
{ "no-wchar-size-warning", no_argument, NULL, OPTION_NO_WCHAR_SIZE_WARNING},
+ { "fix-cortex-a53-835769", no_argument, NULL, OPTION_FIX_ERRATUM_835769},
'
PARSE_AND_LIST_OPTIONS='
@@ -373,6 +376,7 @@ PARSE_AND_LIST_OPTIONS='
after each stub section. Values of +/-1 indicate\n\
the linker should choose suitable defaults.\n"
));
+ fprintf (file, _(" --fix-cortex-a53-835769 Fix erratum 835769\n"));
'
PARSE_AND_LIST_ARGS_CASES='
@@ -392,6 +396,10 @@ PARSE_AND_LIST_ARGS_CASES='
pic_veneer = 1;
break;
+ case OPTION_FIX_ERRATUM_835769:
+ fix_erratum_835769 = 1;
+ break;
+
case OPTION_STUBGROUP_SIZE:
{
const char *end;
diff --git a/binutils-2.24/ld/ld.texinfo b/binutils-2.24/ld/ld.texinfo
index c925ecb..988e2d7 100644
--- a/binutils-2.24/ld/ld.texinfo
+++ b/binutils-2.24/ld/ld.texinfo
@@ -6248,6 +6248,13 @@ The @samp{--fix-cortex-a8} switch enables a link-time workaround for an erratum
The erratum only affects Thumb-2 code. Please contact ARM for further details.
+@cindex Cortex-A53 erratum 835769 workaround
+@kindex --fix-cortex-a53-835769
+@kindex --no-fix-cortex-a53-835769
+The @samp{--fix-cortex-a53-835769} switch enables a link-time workaround for erratum 835769 present on certain early revisions of Cortex-A53 processors. The workaround is disabled by default. It can be enabled by specifying @samp{--fix-cortex-a53-835769}, or disabled unconditionally by specifying @samp{--no-fix-cortex-a53-835769}.
+
+Please contact ARM for further details.
+
@kindex --merge-exidx-entries
@kindex --no-merge-exidx-entries
The @samp{--no-merge-exidx-entries} switch disables the merging of adjacent exidx entries in debuginfo.
diff --git a/binutils-2.24/ld/testsuite/ChangeLog b/binutils-2.24/ld/testsuite/ChangeLog
index 963d096..adfd93f 100644
--- a/binutils-2.24/ld/testsuite/ChangeLog
+++ b/binutils-2.24/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2014-10-24 Tejas Belagod <tejas.belagod@arm.com>
+
+ * ld-aarch64/aarch64-elf.exp (aarch64elftests): Drive erratum
+ 835769 tests.
+ * ld-aarch64/erratum835769.d: New.
+ * ld-aarch64/erratum835769.s: New.
+
2014-05-28 Matthew Fortune <matthew.fortune@imgtec.com>
* lib/ld-lib.exp: Add objcopy_objects command to run_dump_test.
diff --git a/binutils-2.24/ld/testsuite/ld-aarch64/aarch64-elf.exp b/binutils-2.24/ld/testsuite/ld-aarch64/aarch64-elf.exp
index 5c150dd..ca57495 100644
--- a/binutils-2.24/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/binutils-2.24/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -35,6 +35,14 @@ if { ![is_elf_format] || ![istarget "aarch64*-*-*"] } {
set aarch64elftests {
{"EH Frame merge" "-Ttext 0x8000" "" "" {eh-frame-bar.s eh-frame-foo.s}
{{objdump --dwarf=frames eh-frame.d}} "eh-frame"}
+ {"Erratum 835769 dump test"
+ "--fix-cortex-a53-835769" "" "" {erratum835769.s}
+ {{objdump -dr erratum835769.d}}
+ "erratum835769"}
+ {"Erratum 835769 dump test -shared"
+ "--fix-cortex-a53-835769 -shared" "" "" {erratum835769.s}
+ {{objdump -dr erratum835769.d}}
+ "erratum835769"}
}
run_ld_link_tests $aarch64elftests
diff --git a/binutils-2.24/ld/testsuite/ld-aarch64/erratum835769.d b/binutils-2.24/ld/testsuite/ld-aarch64/erratum835769.d
new file mode 100644
index 0000000..a040236
--- /dev/null
+++ b/binutils-2.24/ld/testsuite/ld-aarch64/erratum835769.d
@@ -0,0 +1,48 @@
+#...
+Disassembly of section .text:
+#...
+[0-9a-f]+ <a1ldr>:
+[ \t0-9a-f]+:[ \t]+b8408c87[ \t]+ldr[ \t]+w7, \[x4,#8\]\!
+[ \t0-9a-f]+:[ \t]+1b017c06[ \t]+mul[ \t]+w6, w0, w1
+[ \t0-9a-f]+:[ \t]+f9400084[ \t]+ldr[ \t]+x4, \[x4\]
+[ \t0-9a-f]+:[ \t0-9a-z]+[ \t]+b[ \t]+[0-9a-f]+ <__erratum_835769_veneer_0>
+[ \t0-9a-f]+:[ \t]+aa0503e0[ \t]+mov[ \t]+x0, x5
+[ \t0-9a-f]+:[ \t]+d65f03c0[ \t]+ret
+
+[0-9a-f]+ <a5ldr>:
+[ \t0-9a-f]+:[ \t]+b8408c87[ \t]+ldr[ \t]+w7, \[x4,#8\]!
+[ \t0-9a-f]+:[ \t]+1b017c06[ \t]+mul[ \t]+w6, w0, w1
+[ \t0-9a-f]+:[ \t]+f9400084[ \t]+ldr[ \t]+x4, \[x4\]
+[ \t0-9a-f]+:[ \t0-9a-z]+[ \t]+b[ \t]+[0-9a-f]+ <__erratum_835769_veneer_1>
+[ \t0-9a-f]+:[ \t]+aa0503e0[ \t]+mov[ \t]+x0, x5
+[ \t0-9a-f]+:[ \t]+d65f03c0[ \t]+ret
+
+[0-9a-f]+ <a6ldr>:
+[ \t0-9a-f]+:[ \t]+b8408c87[ \t]+ldr[ \t]+w7, \[x4,#8\]!
+[ \t0-9a-f]+:[ \t]+1b017c06[ \t]+mul[ \t]+w6, w0, w1
+[ \t0-9a-f]+:[ \t]+f9400084[ \t]+ldr[ \t]+x4, \[x4\]
+[ \t0-9a-f]+:[ \t]+9b031885[ \t]+madd[ \t]+x5, x4, x3, x6
+[ \t0-9a-f]+:[ \t]+aa0503e0[ \t]+mov[ \t]+x0, x5
+[ \t0-9a-f]+:[ \t]+d65f03c0[ \t]+ret
+
+[0-9a-f]+ <a7str>:
+[ \t0-9a-f]+:[ \t]+b8408c87[ \t]+ldr[ \t]+w7, \[x4,#8\]!
+[ \t0-9a-f]+:[ \t]+1b017c06[ \t]+mul[ \t]+w6, w0, w1
+[ \t0-9a-f]+:[ \t]+f9000084[ \t]+str[ \t]+x4, \[x4\]
+[ \t0-9a-f]+:[ \t0-9a-z]+[ \t]+b[ \t]+[0-9a-f]+ <__erratum_835769_veneer_2>
+[ \t0-9a-f]+:[ \t]+aa0503e0[ \t]+mov[ \t]+x0, x5
+[ \t0-9a-f]+:[ \t]+d65f03c0[ \t]+ret
+[ \t0-9a-f]+:[ \t]+00000000[ \t]+.inst[ \t]+0x00000000 ; undefined
+
+[0-9a-f]+ <__erratum_835769_veneer_2>:
+[ \t0-9a-f]+:[ \t]+9b031885[ \t]+madd[ \t]+x5, x4, x3, x6
+[ \t0-9a-f]+:[ \t0-9a-z]+[ \t]+b[ \t]+[0-9a-f]+ <a7str\+0x[0-9a-f]+>
+
+[0-9a-f]+ <__erratum_835769_veneer_1>:
+[ \t0-9a-f]+:[ \t]+9ba31845[ \t]+umaddl[ \t]+x5, w2, w3, x6
+[ \t0-9a-f]+:[ \t0-9a-z]+[ \t]+b[ \t]+[0-9a-f]+ <a5ldr\+0x[0-9a-f]+>
+
+[0-9a-f]+ <__erratum_835769_veneer_0>:
+[ \t0-9a-f]+:[ \t]+9b031845[ \t]+madd[ \t]+x5, x2, x3, x6
+[ \t0-9a-f]+:[ \t0-9a-z]+[ \t]+b[ \t]+[0-9a-f]+ <a1ldr\+0x[0-9a-f]+>
+#pass
diff --git a/binutils-2.24/ld/testsuite/ld-aarch64/erratum835769.s b/binutils-2.24/ld/testsuite/ld-aarch64/erratum835769.s
new file mode 100644
index 0000000..d57b5ab
--- /dev/null
+++ b/binutils-2.24/ld/testsuite/ld-aarch64/erratum835769.s
@@ -0,0 +1,75 @@
+ .text
+ .align 2
+ .global main
+ .type main, %function
+main:
+ stp x29, x30, [sp, -32]!
+ add x29, sp, 0
+ mov x0, -26
+ str x0, [x29,16]
+ mov x0, 26
+ str x0, [x29,24]
+ add x4, x29, 16
+ mov x0, -1
+ mov x1, 2
+ mov x2, -3
+ mov x3, 4
+ bl a1ldr
+ add x4, x29, 16
+ mov x0, -1
+ mov x1, 2
+ mov x2, -3
+ mov x3, 4
+ bl a5ldr
+ mov w0, 0
+ ldp x29, x30, [sp], 32
+ ret
+ .size main, .-main
+
+ .align 2
+ .global a1ldr
+ .type a1ldr, %function
+a1ldr:
+ ldr w7, [x4,8]!
+ mul w6, w0, w1
+ ldr x4, [x4]
+ madd x5, x2, x3, x6
+ mov x0, x5
+ ret
+ .size a1ldr, .-a1ldr
+
+ .align 2
+ .global a5ldr
+ .type a5ldr, %function
+a5ldr:
+ ldr w7, [x4,8]!
+ mul w6, w0, w1
+ ldr x4, [x4]
+ umaddl x5, w2, w3, x6
+ mov x0, x5
+ ret
+ .size a5ldr, .-a5ldr
+
+ .align 2
+ .global a6ldr
+ .type a6ldr, %function
+a6ldr:
+ ldr w7, [x4,8]!
+ mul w6, w0, w1
+ ldr x4, [x4]
+ madd x5, x4, x3, x6
+ mov x0, x5
+ ret
+ .size a6ldr, .-a6ldr
+
+ .align 2
+ .global a6ldr
+ .type a6ldr, %function
+a7str:
+ ldr w7, [x4,8]!
+ mul w6, w0, w1
+ str x4, [x4]
+ madd x5, x4, x3, x6
+ mov x0, x5
+ ret
+ .size a7str, .-a7str