aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ld-i386/branch1.d2
-rw-r--r--ld/testsuite/ld-i386/call1.d2
-rw-r--r--ld/testsuite/ld-i386/call2.d2
-rw-r--r--ld/testsuite/ld-i386/call3a.d2
-rw-r--r--ld/testsuite/ld-i386/call3b.d2
-rw-r--r--ld/testsuite/ld-i386/call3c.d2
-rw-r--r--ld/testsuite/ld-i386/call3d.d2
-rw-r--r--ld/testsuite/ld-i386/call3e.d2
-rw-r--r--ld/testsuite/ld-i386/call3f.d2
-rw-r--r--ld/testsuite/ld-i386/call3g.d2
-rw-r--r--ld/testsuite/ld-i386/call3h.d2
-rw-r--r--ld/testsuite/ld-i386/got1.dd2
-rw-r--r--ld/testsuite/ld-i386/got1a.S11
-rw-r--r--ld/testsuite/ld-i386/got1d.S1
-rw-r--r--ld/testsuite/ld-i386/i386.exp10
-rw-r--r--ld/testsuite/ld-i386/jmp1.d2
-rw-r--r--ld/testsuite/ld-i386/jmp2.d2
-rw-r--r--ld/testsuite/ld-i386/lea1c.d2
-rw-r--r--ld/testsuite/ld-i386/load1.d2
-rw-r--r--ld/testsuite/ld-i386/load2.d2
-rw-r--r--ld/testsuite/ld-i386/load3.d2
-rw-r--r--ld/testsuite/ld-i386/load4a.d2
-rw-r--r--ld/testsuite/ld-i386/load5a.d2
-rw-r--r--ld/testsuite/ld-i386/mov2b.d2
-rw-r--r--ld/testsuite/ld-i386/mov3.d2
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-21-x86-64.d2
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-22-x86-64.d2
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-5r-local-x86-64.d2
-rw-r--r--ld/testsuite/ld-x86-64/call1a.d2
-rw-r--r--ld/testsuite/ld-x86-64/call1b.d2
-rw-r--r--ld/testsuite/ld-x86-64/call1c.d2
-rw-r--r--ld/testsuite/ld-x86-64/call1d.d2
-rw-r--r--ld/testsuite/ld-x86-64/call1e.d2
-rw-r--r--ld/testsuite/ld-x86-64/call1f.d2
-rw-r--r--ld/testsuite/ld-x86-64/call1g.d2
-rw-r--r--ld/testsuite/ld-x86-64/call1h.d2
-rw-r--r--ld/testsuite/ld-x86-64/call1i.d2
-rw-r--r--ld/testsuite/ld-x86-64/load1a.d2
-rw-r--r--ld/testsuite/ld-x86-64/load1b.d2
-rw-r--r--ld/testsuite/ld-x86-64/x86-64.exp10
40 files changed, 57 insertions, 47 deletions
diff --git a/ld/testsuite/ld-i386/branch1.d b/ld/testsuite/ld-i386/branch1.d
index a078f1d..81b069e 100644
--- a/ld/testsuite/ld-i386/branch1.d
+++ b/ld/testsuite/ld-i386/branch1.d
@@ -1,4 +1,4 @@
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -melf_i386
#objdump: -dw
diff --git a/ld/testsuite/ld-i386/call1.d b/ld/testsuite/ld-i386/call1.d
index 69383b2..e3ebedc 100644
--- a/ld/testsuite/ld-i386/call1.d
+++ b/ld/testsuite/ld-i386/call1.d
@@ -1,3 +1,3 @@
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -shared -melf_i386
#error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object
diff --git a/ld/testsuite/ld-i386/call2.d b/ld/testsuite/ld-i386/call2.d
index 69383b2..e3ebedc 100644
--- a/ld/testsuite/ld-i386/call2.d
+++ b/ld/testsuite/ld-i386/call2.d
@@ -1,3 +1,3 @@
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -shared -melf_i386
#error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object
diff --git a/ld/testsuite/ld-i386/call3a.d b/ld/testsuite/ld-i386/call3a.d
index a8ff27f..5a1e1df 100644
--- a/ld/testsuite/ld-i386/call3a.d
+++ b/ld/testsuite/ld-i386/call3a.d
@@ -1,5 +1,5 @@
#source: call3.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -melf_i386
#objdump: -dw
diff --git a/ld/testsuite/ld-i386/call3b.d b/ld/testsuite/ld-i386/call3b.d
index 06af6f5..de98ce4 100644
--- a/ld/testsuite/ld-i386/call3b.d
+++ b/ld/testsuite/ld-i386/call3b.d
@@ -1,5 +1,5 @@
#source: call3.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -melf_i386 -z call-nop=prefix-addr
#objdump: -dw
diff --git a/ld/testsuite/ld-i386/call3c.d b/ld/testsuite/ld-i386/call3c.d
index 64e8372..0fdbee4 100644
--- a/ld/testsuite/ld-i386/call3c.d
+++ b/ld/testsuite/ld-i386/call3c.d
@@ -1,5 +1,5 @@
#source: call3.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -melf_i386 -z call-nop=prefix-nop
#objdump: -dw
diff --git a/ld/testsuite/ld-i386/call3d.d b/ld/testsuite/ld-i386/call3d.d
index a9274c8..4d965b3 100644
--- a/ld/testsuite/ld-i386/call3d.d
+++ b/ld/testsuite/ld-i386/call3d.d
@@ -1,5 +1,5 @@
#source: call3.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -melf_i386 -z call-nop=suffix-nop
#objdump: -dw
diff --git a/ld/testsuite/ld-i386/call3e.d b/ld/testsuite/ld-i386/call3e.d
index 2876b49..608682c 100644
--- a/ld/testsuite/ld-i386/call3e.d
+++ b/ld/testsuite/ld-i386/call3e.d
@@ -1,5 +1,5 @@
#source: call3.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -melf_i386 -z call-nop=prefix-0x67
#objdump: -dw
diff --git a/ld/testsuite/ld-i386/call3f.d b/ld/testsuite/ld-i386/call3f.d
index 5ab0cf1..f3a4869 100644
--- a/ld/testsuite/ld-i386/call3f.d
+++ b/ld/testsuite/ld-i386/call3f.d
@@ -1,5 +1,5 @@
#source: call3.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -melf_i386 -z call-nop=prefix-0x90
#objdump: -dw
diff --git a/ld/testsuite/ld-i386/call3g.d b/ld/testsuite/ld-i386/call3g.d
index 8287770..f3e3f36 100644
--- a/ld/testsuite/ld-i386/call3g.d
+++ b/ld/testsuite/ld-i386/call3g.d
@@ -1,5 +1,5 @@
#source: call3.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -melf_i386 -z call-nop=suffix-0x90
#objdump: -dw
diff --git a/ld/testsuite/ld-i386/call3h.d b/ld/testsuite/ld-i386/call3h.d
index 83f371a..afd1ce8 100644
--- a/ld/testsuite/ld-i386/call3h.d
+++ b/ld/testsuite/ld-i386/call3h.d
@@ -1,5 +1,5 @@
#source: call3.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -melf_i386 -z call-nop=suffix-144
#objdump: -dw
diff --git a/ld/testsuite/ld-i386/got1.dd b/ld/testsuite/ld-i386/got1.dd
index e46153d..e6e82de 100644
--- a/ld/testsuite/ld-i386/got1.dd
+++ b/ld/testsuite/ld-i386/got1.dd
@@ -10,6 +10,8 @@
[ ]*[a-f0-9]+: ff d0 call \*%eax
[ ]*[a-f0-9]+: [ a-f0-9]+ mov *0x[a-f0-9]+,%eax
[ ]*[a-f0-9]+: ff d0 call \*%eax
+[ ]*[a-f0-9]+: [ a-f0-9]+ call [a-f0-9]+ <__x86.get_pc_thunk.cx>
+[ ]*[a-f0-9]+: [ a-f0-9]+ add \$0x[a-f0-9]+,%ecx
[ ]*[a-f0-9]+: [ a-f0-9]+ lea *0x[a-f0-9]+,%ecx
[ ]*[a-f0-9]+: ff d1 call \*%ecx
[ ]*[a-f0-9]+: 83 ec 0c sub \$0xc,%esp
diff --git a/ld/testsuite/ld-i386/got1a.S b/ld/testsuite/ld-i386/got1a.S
index f3d5330..7a3f7b5 100644
--- a/ld/testsuite/ld-i386/got1a.S
+++ b/ld/testsuite/ld-i386/got1a.S
@@ -12,10 +12,19 @@ main:
call *%eax
movl plt@GOT, %eax
call *%eax
- movl foo@GOT(%ebx), %ecx
+ call __x86.get_pc_thunk.cx
+ addl $_GLOBAL_OFFSET_TABLE_, %ecx
+ movl foo@GOT(%ecx), %ecx
call *%ecx
subl $12, %esp
pushl $0
pushl $0 # Push a dummy return address onto stack.
jmp *myexit@GOT
.size main, .-main
+ .section .text.__x86.get_pc_thunk.cx,"axG",@progbits,__x86.get_pc_thunk.cx,comdat
+ .globl __x86.get_pc_thunk.cx
+ .hidden __x86.get_pc_thunk.cx
+ .type __x86.get_pc_thunk.cx, @function
+__x86.get_pc_thunk.cx:
+ movl (%esp), %ecx
+ ret
diff --git a/ld/testsuite/ld-i386/got1d.S b/ld/testsuite/ld-i386/got1d.S
index a6d51c6..7e4c9b1 100644
--- a/ld/testsuite/ld-i386/got1d.S
+++ b/ld/testsuite/ld-i386/got1d.S
@@ -19,7 +19,6 @@ plt:
pushl %esi
pushl %ebx
call __x86.get_pc_thunk.bx
-1:
addl $_GLOBAL_OFFSET_TABLE_, %ebx
subl $20, %esp
leal __FUNCTION__.1866@GOTOFF(%ebx), %esi
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index 04eb7b1..9d392c2 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -357,7 +357,7 @@ if { [isnative]
[list \
"Build libplt-main1.a" \
"" \
- "-fPIC" \
+ "-fPIC -Wa,-mrelax-relocations=yes" \
{ plt-main1.c } \
{{readelf {-Wr} plt-main1.rd}} \
"libplt-main1.a" \
@@ -365,7 +365,7 @@ if { [isnative]
[list \
"Build libplt-main2.a" \
"" \
- "-fPIC" \
+ "-fPIC -Wa,-mrelax-relocations=yes" \
{ plt-main2.c } \
{{readelf {-Wr} plt-main2.rd}} \
"libplt-main2.a" \
@@ -373,7 +373,7 @@ if { [isnative]
[list \
"Build libplt-main3.a" \
"" \
- "-fPIC $PLT_CFLAGS" \
+ "-fPIC -Wa,-mrelax-relocations=yes $PLT_CFLAGS" \
{ plt-main3.c } \
{{readelf {-Wr} plt-main3.rd}} \
"libplt-main3.a" \
@@ -381,7 +381,7 @@ if { [isnative]
[list \
"Build libplt-main4.a" \
"" \
- "-fPIC $PLT_CFLAGS" \
+ "-fPIC -Wa,-mrelax-relocations=yes $PLT_CFLAGS" \
{ plt-main4.c } \
{{readelf {-Wr} plt-main4.rd}} \
"libplt-main4.a" \
@@ -535,7 +535,7 @@ if { [isnative]
[list \
"Build gotpc1" \
"tmpdir/got1d.so" \
- "" \
+ "-Wa,-mrelax-relocations=yes" \
{ got1a.S got1b.c got1c.c } \
{{objdump {-dw} got1.dd}} \
"got1" \
diff --git a/ld/testsuite/ld-i386/jmp1.d b/ld/testsuite/ld-i386/jmp1.d
index 69383b2..e3ebedc 100644
--- a/ld/testsuite/ld-i386/jmp1.d
+++ b/ld/testsuite/ld-i386/jmp1.d
@@ -1,3 +1,3 @@
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -shared -melf_i386
#error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object
diff --git a/ld/testsuite/ld-i386/jmp2.d b/ld/testsuite/ld-i386/jmp2.d
index 69383b2..e3ebedc 100644
--- a/ld/testsuite/ld-i386/jmp2.d
+++ b/ld/testsuite/ld-i386/jmp2.d
@@ -1,3 +1,3 @@
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -shared -melf_i386
#error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object
diff --git a/ld/testsuite/ld-i386/lea1c.d b/ld/testsuite/ld-i386/lea1c.d
index dd76258..0c3580d 100644
--- a/ld/testsuite/ld-i386/lea1c.d
+++ b/ld/testsuite/ld-i386/lea1c.d
@@ -1,5 +1,5 @@
#source: lea1.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -melf_i386
#objdump: -dw
diff --git a/ld/testsuite/ld-i386/load1.d b/ld/testsuite/ld-i386/load1.d
index 062ea18..a252a15 100644
--- a/ld/testsuite/ld-i386/load1.d
+++ b/ld/testsuite/ld-i386/load1.d
@@ -1,4 +1,4 @@
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -melf_i386
#objdump: -dw --sym
#notarget: i?86-*-nacl* x86_64-*-nacl*
diff --git a/ld/testsuite/ld-i386/load2.d b/ld/testsuite/ld-i386/load2.d
index 87c2509..467fee0 100644
--- a/ld/testsuite/ld-i386/load2.d
+++ b/ld/testsuite/ld-i386/load2.d
@@ -1,3 +1,3 @@
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -melf_i386 -shared
#error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object
diff --git a/ld/testsuite/ld-i386/load3.d b/ld/testsuite/ld-i386/load3.d
index 87c2509..467fee0 100644
--- a/ld/testsuite/ld-i386/load3.d
+++ b/ld/testsuite/ld-i386/load3.d
@@ -1,3 +1,3 @@
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -melf_i386 -shared
#error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object
diff --git a/ld/testsuite/ld-i386/load4a.d b/ld/testsuite/ld-i386/load4a.d
index 3aa56bd..f3f02ea 100644
--- a/ld/testsuite/ld-i386/load4a.d
+++ b/ld/testsuite/ld-i386/load4a.d
@@ -1,4 +1,4 @@
#source: load4.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -Bsymbolic -shared -melf_i386
#error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object
diff --git a/ld/testsuite/ld-i386/load5a.d b/ld/testsuite/ld-i386/load5a.d
index 88c225a..9744316 100644
--- a/ld/testsuite/ld-i386/load5a.d
+++ b/ld/testsuite/ld-i386/load5a.d
@@ -1,4 +1,4 @@
#source: load5.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -Bsymbolic -shared -melf_i386
#error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object
diff --git a/ld/testsuite/ld-i386/mov2b.d b/ld/testsuite/ld-i386/mov2b.d
index ea5dd9b..295a7c5 100644
--- a/ld/testsuite/ld-i386/mov2b.d
+++ b/ld/testsuite/ld-i386/mov2b.d
@@ -1,5 +1,5 @@
#source: mov2.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -pie -melf_i386
#objdump: -dw
diff --git a/ld/testsuite/ld-i386/mov3.d b/ld/testsuite/ld-i386/mov3.d
index 17da244..4ce5cd8 100644
--- a/ld/testsuite/ld-i386/mov3.d
+++ b/ld/testsuite/ld-i386/mov3.d
@@ -1,4 +1,4 @@
-#as: --32
+#as: --32 -mrelax-relocations=yes
#ld: -melf_i386
#objdump: -dw
diff --git a/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d
index 53ccd5a..ae75487 100644
--- a/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d
@@ -1,4 +1,4 @@
-#as: --64
+#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64
#objdump: -dw
#target: x86_64-*-*
diff --git a/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d
index 53ccd5a..ae75487 100644
--- a/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d
@@ -1,4 +1,4 @@
-#as: --64
+#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64
#objdump: -dw
#target: x86_64-*-*
diff --git a/ld/testsuite/ld-ifunc/ifunc-5r-local-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-5r-local-x86-64.d
index 18021e7..2ce53a9 100644
--- a/ld/testsuite/ld-ifunc/ifunc-5r-local-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-5r-local-x86-64.d
@@ -1,5 +1,5 @@
#source: ifunc-5-local-x86-64.s
-#as: --64
+#as: --64 -mrelax-relocations=yes
#ld: -r -melf_x86_64
#readelf: -r --wide
#target: x86_64-*-*
diff --git a/ld/testsuite/ld-x86-64/call1a.d b/ld/testsuite/ld-x86-64/call1a.d
index 2a63b1c..2b131ee 100644
--- a/ld/testsuite/ld-x86-64/call1a.d
+++ b/ld/testsuite/ld-x86-64/call1a.d
@@ -1,5 +1,5 @@
#source: call1.s
-#as: --64
+#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64
#objdump: -dw
diff --git a/ld/testsuite/ld-x86-64/call1b.d b/ld/testsuite/ld-x86-64/call1b.d
index e782fa2..e2fef07 100644
--- a/ld/testsuite/ld-x86-64/call1b.d
+++ b/ld/testsuite/ld-x86-64/call1b.d
@@ -1,5 +1,5 @@
#source: call1.s
-#as: --64
+#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 -z call-nop=prefix-addr
#objdump: -dw
diff --git a/ld/testsuite/ld-x86-64/call1c.d b/ld/testsuite/ld-x86-64/call1c.d
index d058fc7..7fe8056 100644
--- a/ld/testsuite/ld-x86-64/call1c.d
+++ b/ld/testsuite/ld-x86-64/call1c.d
@@ -1,5 +1,5 @@
#source: call1.s
-#as: --64
+#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 -z call-nop=prefix-nop
#objdump: -dw
diff --git a/ld/testsuite/ld-x86-64/call1d.d b/ld/testsuite/ld-x86-64/call1d.d
index 8871cc6..c93756b 100644
--- a/ld/testsuite/ld-x86-64/call1d.d
+++ b/ld/testsuite/ld-x86-64/call1d.d
@@ -1,5 +1,5 @@
#source: call1.s
-#as: --64
+#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 -z call-nop=suffix-nop
#objdump: -dw
diff --git a/ld/testsuite/ld-x86-64/call1e.d b/ld/testsuite/ld-x86-64/call1e.d
index 7127f1a..c7c467c 100644
--- a/ld/testsuite/ld-x86-64/call1e.d
+++ b/ld/testsuite/ld-x86-64/call1e.d
@@ -1,5 +1,5 @@
#source: call1.s
-#as: --64
+#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 -z call-nop=prefix-0x67
#objdump: -dw
diff --git a/ld/testsuite/ld-x86-64/call1f.d b/ld/testsuite/ld-x86-64/call1f.d
index 587bade..d0c3f11 100644
--- a/ld/testsuite/ld-x86-64/call1f.d
+++ b/ld/testsuite/ld-x86-64/call1f.d
@@ -1,5 +1,5 @@
#source: call1.s
-#as: --64
+#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 -z call-nop=prefix-0x90
#objdump: -dw
diff --git a/ld/testsuite/ld-x86-64/call1g.d b/ld/testsuite/ld-x86-64/call1g.d
index 3bb512e..6a8d790 100644
--- a/ld/testsuite/ld-x86-64/call1g.d
+++ b/ld/testsuite/ld-x86-64/call1g.d
@@ -1,5 +1,5 @@
#source: call1.s
-#as: --64
+#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 -z call-nop=suffix-0x90
#objdump: -dw
diff --git a/ld/testsuite/ld-x86-64/call1h.d b/ld/testsuite/ld-x86-64/call1h.d
index c7c8dde..f8e1d07 100644
--- a/ld/testsuite/ld-x86-64/call1h.d
+++ b/ld/testsuite/ld-x86-64/call1h.d
@@ -1,5 +1,5 @@
#source: call1.s
-#as: --64
+#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64 -z call-nop=suffix-144
#objdump: -dw
diff --git a/ld/testsuite/ld-x86-64/call1i.d b/ld/testsuite/ld-x86-64/call1i.d
index b3684ad..d5a157b 100644
--- a/ld/testsuite/ld-x86-64/call1i.d
+++ b/ld/testsuite/ld-x86-64/call1i.d
@@ -1,5 +1,5 @@
#source: call1.s
-#as: --x32
+#as: --x32 -mrelax-relocations=yes
#ld: -melf32_x86_64 -z call-nop=suffix-0x90
#objdump: -dw
diff --git a/ld/testsuite/ld-x86-64/load1a.d b/ld/testsuite/ld-x86-64/load1a.d
index 5c9349e..0eb4880 100644
--- a/ld/testsuite/ld-x86-64/load1a.d
+++ b/ld/testsuite/ld-x86-64/load1a.d
@@ -1,5 +1,5 @@
#source: load1.s
-#as: --64
+#as: --64 -mrelax-relocations=yes
#ld: -melf_x86_64
#objdump: -dw --sym
#notarget: x86_64-*-nacl*
diff --git a/ld/testsuite/ld-x86-64/load1b.d b/ld/testsuite/ld-x86-64/load1b.d
index 70ef274..8827f38 100644
--- a/ld/testsuite/ld-x86-64/load1b.d
+++ b/ld/testsuite/ld-x86-64/load1b.d
@@ -1,5 +1,5 @@
#source: load1.s
-#as: --x32
+#as: --x32 -mrelax-relocations=yes
#ld: -melf32_x86_64
#objdump: -dw --sym
#notarget: x86_64-*-nacl*
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 1254b44..f21a30e 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -392,7 +392,7 @@ if { [isnative] && [which $CC] != 0 } {
[list \
"Build libplt-main1.a" \
"" \
- "-fPIC" \
+ "-fPIC -Wa,-mrelax-relocations=yes" \
{ plt-main1.c } \
{{readelf {-Wr} plt-main1.rd}} \
"libplt-main1.a" \
@@ -400,7 +400,7 @@ if { [isnative] && [which $CC] != 0 } {
[list \
"Build libplt-main2.a" \
"" \
- "-fPIC" \
+ "-fPIC -Wa,-mrelax-relocations=yes" \
{ plt-main2.c } \
{{readelf {-Wr} plt-main2.rd}} \
"libplt-main2.a" \
@@ -408,7 +408,7 @@ if { [isnative] && [which $CC] != 0 } {
[list \
"Build libplt-main3.a" \
"" \
- "-fPIC $PLT_CFLAGS" \
+ "-fPIC -Wa,-mrelax-relocations=yes $PLT_CFLAGS" \
{ plt-main3.c } \
{{readelf {-Wr} plt-main3.rd}} \
"libplt-main3.a" \
@@ -416,7 +416,7 @@ if { [isnative] && [which $CC] != 0 } {
[list \
"Build libplt-main4.a" \
"" \
- "-fPIC $PLT_CFLAGS" \
+ "-fPIC -Wa,-mrelax-relocations=yes $PLT_CFLAGS" \
{ plt-main4.c } \
{{readelf {-Wr} plt-main4.rd}} \
"libplt-main4.a" \
@@ -546,7 +546,7 @@ if { [isnative] && [which $CC] != 0 } {
[list \
"Build gotpcrel1" \
"tmpdir/gotpcrel1d.so" \
- "" \
+ "-Wa,-mrelax-relocations=yes" \
{ gotpcrel1a.S gotpcrel1b.c gotpcrel1c.c } \
{{objdump {-dw} gotpcrel1.dd}} \
"gotpcrel1" \