aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2013-01-18 16:37:08 +0000
committerH.J. Lu <hjl.tools@gmail.com>2013-01-18 16:37:08 +0000
commit8ce3d284cb47f1b08c74d8a20b6b0cfd2d225d2c (patch)
tree5d825116e26667a2d48760c9f1c101393bf803a6
parenta477bfd1c2c42949303ef790038d31f1c08ade41 (diff)
downloadgdb-8ce3d284cb47f1b08c74d8a20b6b0cfd2d225d2c.zip
gdb-8ce3d284cb47f1b08c74d8a20b6b0cfd2d225d2c.tar.gz
gdb-8ce3d284cb47f1b08c74d8a20b6b0cfd2d225d2c.tar.bz2
Support size relocation only for ELF
* config/tc-i386.c (reloc): Support size relocation only for ELF. (tc_i386_fix_adjustable): Likewise. (lex_got): Likewise. (tc_gen_reloc): Likewise.
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-i386.c6
2 files changed, 13 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 31653de..bc3fd10 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2013-01-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (reloc): Support size relocation only for ELF.
+ (tc_i386_fix_adjustable): Likewise.
+ (lex_got): Likewise.
+ (tc_gen_reloc): Likewise.
+
2013-01-17 Yufeng Zhang <yufeng.zhang@arm.com>
* config/tc-aarch64.c (output_operand_error_record): Change to output
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index c96229e..c8ec0c0 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -2686,6 +2686,7 @@ reloc (unsigned int size,
break;
}
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
if (other == BFD_RELOC_SIZE32)
{
if (size == 8)
@@ -2693,6 +2694,7 @@ reloc (unsigned int size,
if (pcrel)
as_bad (_("there are no pc-relative size relocations"));
}
+#endif
/* Sign-checking 4-byte relocations in 16-/32-bit code is pointless. */
if (size == 4 && (flag_code != CODE_64BIT || disallow_64bit_reloc))
@@ -6719,9 +6721,11 @@ lex_got (enum bfd_reloc_code_real *rel,
const enum bfd_reloc_code_real rel[2];
const i386_operand_type types64;
} gotrel[] = {
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
{ STRING_COMMA_LEN ("SIZE"), { BFD_RELOC_SIZE32,
BFD_RELOC_SIZE32 },
OPERAND_TYPE_IMM32_64 },
+#endif
{ STRING_COMMA_LEN ("PLTOFF"), { _dummy_first_bfd_reloc_code_real,
BFD_RELOC_X86_64_PLTOFF64 },
OPERAND_TYPE_IMM64 },
@@ -9245,6 +9249,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
switch (fixp->fx_r_type)
{
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
case BFD_RELOC_SIZE32:
case BFD_RELOC_SIZE64:
if (S_IS_DEFINED (fixp->fx_addsy)
@@ -9262,6 +9267,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
md_apply_fix (fixp, (valueT *) &value, NULL);
return NULL;
}
+#endif
case BFD_RELOC_X86_64_PLT32:
case BFD_RELOC_X86_64_GOT32: