aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite/ChangeLog
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-05-15 03:17:31 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-05-15 03:30:53 -0700
commit8dcea93252a9ea7dff57e85220a719e2a5e8ab41 (patch)
treec2e6a597a60a10a48c58f9a6e95cb117f65f8fe4 /gas/testsuite/ChangeLog
parentd1c4b12b9d48d9266b78e2c22d70aa25830b9f8f (diff)
downloadgdb-8dcea93252a9ea7dff57e85220a719e2a5e8ab41.zip
gdb-8dcea93252a9ea7dff57e85220a719e2a5e8ab41.tar.gz
gdb-8dcea93252a9ea7dff57e85220a719e2a5e8ab41.tar.bz2
Add -mshared option to x86 ELF assembler
This patch adds -mshared option to x86 ELF assembler. By default, assembler will optimize out non-PLT relocations against defined non-weak global branch targets with default visibility. The -mshared option tells the assembler to generate code which may go into a shared library where all non-weak global branch targets with default visibility can be preempted. The resulting code is slightly bigger. This option only affects the handling of branch instructions. This Linux kernel patch is needed to create a working x86 Linux kernel if it hasn't been applied: diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index ae6588b..b91a00c 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S @@ -339,8 +339,8 @@ early_idt_handlers: i = i + 1 .endr -/* This is global to keep gas from relaxing the jumps */ -ENTRY(early_idt_handler) +/* This is weak to keep gas from relaxing the jumps */ +WEAK(early_idt_handler) cld cmpl $2,(%rsp) # X86_TRAP_NMI -- gas/ * config/tc-i386.c (shared): New. (OPTION_MSHARED): Likewise. (elf_symbol_resolved_in_segment_p): Add relocation argument. Check PLT relocations and shared. (md_estimate_size_before_relax): Pass fragP->fr_var to elf_symbol_resolved_in_segment_p. (md_longopts): Add -mshared. (md_show_usage): Likewise. (md_parse_option): Handle OPTION_MSHARED. * doc/c-i386.texi: Document -mshared. gas/testsuite/ * gas/i386/i386.exp: Don't run pcrel for ELF targets. Run pcrel-elf, relax-4 and x86-64-relax-3 for ELF targets. * gas/i386/pcrel-elf.d: New file. * gas/i386/relax-4.d: Likewise. * gas/i386/x86-64-relax-3.d: Likewise. * gas/i386/relax-3.d: Pass -mshared to assembler. Updated. * gas/i386/x86-64-relax-2.d: Likewise. * gas/i386/relax-3.s: Add test for PLT relocation.
Diffstat (limited to 'gas/testsuite/ChangeLog')
-rw-r--r--gas/testsuite/ChangeLog11
1 files changed, 11 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index dab5fcf..95b7583 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,14 @@
+2015-05-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gas/i386/i386.exp: Don't run pcrel for ELF targets. Run
+ pcrel-elf, relax-4 and x86-64-relax-3 for ELF targets.
+ * gas/i386/pcrel-elf.d: New file.
+ * gas/i386/relax-4.d: Likewise.
+ * gas/i386/x86-64-relax-3.d: Likewise.
+ * gas/i386/relax-3.d: Pass -mshared to assembler. Updated.
+ * gas/i386/x86-64-relax-2.d: Likewise.
+ * gas/i386/relax-3.s: Add test for PLT relocation.
+
2015-05-14 Peter Bergner <bergner@vnet.ibm.com>
* gas/ppc/power4.d: Add a slbia test.