+2020-02-13 Fangrui Song <maskray@google.com>
+ H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/25551
+ * config/tc-i386.c (tc_i386_fix_adjustable): Don't check
+ BFD_RELOC_386_PLT32 nor BFD_RELOC_X86_64_PLT32.
+ * testsuite/gas/i386/i386.exp: Run relax-5 and x86-64-relax-4.
+ * testsuite/gas/i386/relax-5.d: New file.
+ * testsuite/gas/i386/relax-5.s: Likewise.
+ * testsuite/gas/i386/x86-64-relax-4.d: Likewise.
+ * testsuite/gas/i386/x86-64-relax-4.s: Likewise.
+
2020-02-13 Jan Beulich <jbeulich@suse.com>
* config/tc-i386.c (cpu_noarch): Use CPU_ANY_SSE4_FLAGS in
if (fixP->fx_r_type == BFD_RELOC_SIZE32
|| fixP->fx_r_type == BFD_RELOC_SIZE64
|| fixP->fx_r_type == BFD_RELOC_386_GOTOFF
- || fixP->fx_r_type == BFD_RELOC_386_PLT32
|| fixP->fx_r_type == BFD_RELOC_386_GOT32
|| fixP->fx_r_type == BFD_RELOC_386_GOT32X
|| fixP->fx_r_type == BFD_RELOC_386_TLS_GD
|| fixP->fx_r_type == BFD_RELOC_386_TLS_LE
|| fixP->fx_r_type == BFD_RELOC_386_TLS_GOTDESC
|| fixP->fx_r_type == BFD_RELOC_386_TLS_DESC_CALL
- || fixP->fx_r_type == BFD_RELOC_X86_64_PLT32
|| fixP->fx_r_type == BFD_RELOC_X86_64_GOT32
|| fixP->fx_r_type == BFD_RELOC_X86_64_GOTPCREL
|| fixP->fx_r_type == BFD_RELOC_X86_64_GOTPCRELX
run_dump_test "relax-3"
run_dump_test "relax-4"
+ run_dump_test "relax-5"
run_dump_test "got"
run_dump_test "got-no-relax"
run_dump_test "x86-64-relax-2"
run_dump_test "x86-64-relax-3"
+ run_dump_test "x86-64-relax-4"
run_dump_test "x86-64-jump"
run_dump_test "x86-64-branch-2"
--- /dev/null
+#objdump: -dwr
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+ <printk>:
+ +[a-f0-9]+: c3 ret
+
+Disassembly of section .init.text:
+
+0+ <foo>:
+ +[a-f0-9]+: e8 fb ff ff ff call 0 <foo> 1: R_386_PLT32 .text
+ +[a-f0-9]+: e8 fc ff ff ff call 6 <foo\+0x6> 6: R_386_PC32 .text
+#pass
--- /dev/null
+ .section .init.text,"ax",@progbits
+ .global foo
+foo:
+ call printk@PLT
+ call printk
+ .text
+printk:
+ ret
--- /dev/null
+#objdump: -drw
+#notarget: *-*-solaris*
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <printk>:
+ +[a-f0-9]+: c3 retq
+
+Disassembly of section .init.text:
+
+0+ <foo>:
+ +[a-f0-9]+: e8 00 00 00 00 callq 5 <foo\+0x5> 1: R_X86_64_PLT32 .text-0x4
+ +[a-f0-9]+: 48 8d 05 00 00 00 00 lea 0x0\(%rip\),%rax # c <foo\+0xc> 8: R_X86_64_PC32 .text-0x4
+#pass
--- /dev/null
+ .section .init.text,"ax",@progbits
+ .global foo
+foo:
+ call printk
+ lea printk(%rip), %rax
+ .text
+printk:
+ ret