This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bootstrap broken for mingw and cygwin targets (and other none-elf targets)


On Fri, Jan 18, 2013 at 7:10 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
> Hi H.J,
>
> your recent changes in tc-i386.c about use of S_GET_SIZE for none-elf
> targets causes bootstrap failures for cygwin, and mingw.  Culprit
> commit is http://sourceware.org/ml/binutils-cvs/2013-01/msg00114.html
> and I kindly ask to fix/revert this change ASAP.
>
> Regards,
> Kai

I checked in this patch to fix mingw build.

-- 
H.J.
--
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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]