]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Merge from mainline.
authorAlan Modra <amodra@gmail.com>
Sat, 27 Apr 2002 13:44:15 +0000 (13:44 +0000)
committerAlan Modra <amodra@gmail.com>
Sat, 27 Apr 2002 13:44:15 +0000 (13:44 +0000)
2002-04-17  Martin Schwidefsky  <schwidefsky@de.ibm.com>
* config/tc-s390.c (tc_s390_fix_adjustable): Prevent adjustments to
symbols in merge sections.

2002-02-19  Martin Schwidefsky  <schwidefsky@de.ibm.com>
* config/tc-s390.c (md_parse_option): Add switches -m31 and -m64.
Make bit size independent of architecture switch.
(md_begin): Add warning for -m64 with -Aesa.
(s390_md_end): Use renamed architecture defines.

2002-02-19  Tom Tromey  <tromey@redhat.com>
* config/tc-xstormy16.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.

Tue Apr  9 16:45:48 2002  J"orn Rennecke <joern.rennecke@superh.com>
* config/tc-sh.h (TC_FIX_ADJUSTABLE): Disable adjusting if
symbol_used_in_reloc_p is true.
* config/tc-sh.c (md_apply_fix3): Don't zero relocations on big
endian hosts.

gas/ChangeLog
gas/config/tc-s390.c
gas/config/tc-sh.c
gas/config/tc-sh.h
gas/config/tc-xstormy16.h

index 4e1bd8e6785ec698e2ca57ea932e3c9179300d29..6b09fddf0e0bc0a92768a4d2edd25fcb25d9a9e0 100644 (file)
@@ -1,6 +1,25 @@
 2002-04-27  Alan Modra  <amodra@bigpond.net.au>
 
        Merge from mainline.
+       2002-04-17  Martin Schwidefsky  <schwidefsky@de.ibm.com>
+       * config/tc-s390.c (tc_s390_fix_adjustable): Prevent adjustments to
+       symbols in merge sections.
+
+       2002-02-19  Martin Schwidefsky  <schwidefsky@de.ibm.com>
+       * config/tc-s390.c (md_parse_option): Add switches -m31 and -m64.
+       Make bit size independent of architecture switch.
+       (md_begin): Add warning for -m64 with -Aesa.
+       (s390_md_end): Use renamed architecture defines.
+
+       2002-02-19  Tom Tromey  <tromey@redhat.com>
+       * config/tc-xstormy16.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
+
+       Tue Apr  9 16:45:48 2002  J"orn Rennecke <joern.rennecke@superh.com>
+       * config/tc-sh.h (TC_FIX_ADJUSTABLE): Disable adjusting if
+       symbol_used_in_reloc_p is true.
+       * config/tc-sh.c (md_apply_fix3): Don't zero relocations on big
+       endian hosts.
+
        2002-04-03  Alan Modra  <amodra@bigpond.net.au>
        * symbols.c (resolve_symbol_value <O_uminus, O_bit_not,
        O_logical_not>): Derive final_seg from add_symbol.
index 2fb2c6c3a25854da9a94f16d3adfa35c4422e597..ef631adac4d4de89fcb6889b47a88788ba6cab2b 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-s390.c -- Assemble for the S390
-   Copyright 2000, 2001 Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
 
    This file is part of GAS, the GNU Assembler.
@@ -373,6 +373,12 @@ md_parse_option (c, arg)
       else if (arg != NULL && strcmp (arg, "warn-areg-zero") == 0)
        warn_areg_zero = TRUE;
 
+      else if (arg != NULL && strcmp (arg, "31") == 0)
+       s390_arch_size = 31;
+
+      else if (arg != NULL && strcmp (arg, "64") == 0)
+       s390_arch_size = 64;
+
       else
        {
          as_bad (_("invalid switch -m%s"), arg);
@@ -382,15 +388,9 @@ md_parse_option (c, arg)
 
     case 'A':
       if (arg != NULL && strcmp (arg, "esa") == 0)
-       {
-         current_architecture = S390_OPCODE_ESA;
-         s390_arch_size = 32;
-       }
+       current_architecture = S390_OPCODE_ESA;
       else if (arg != NULL && strcmp (arg, "esame") == 0)
-       {
-         current_architecture = S390_OPCODE_ESAME;
-         s390_arch_size = 64;
-       }
+       current_architecture = S390_OPCODE_ESAME;
       else
        as_bad ("invalid architecture -A%s", arg);
       current_arch_mask = 1 << current_architecture;
@@ -422,7 +422,9 @@ md_show_usage (stream)
         S390 options:\n\
         -mregnames        Allow symbolic names for registers\n\
         -mwarn-areg-zero  Warn about zero base/index registers\n\
-        -mno-regnames     Do not allow symbolic names for registers\n"));
+        -mno-regnames     Do not allow symbolic names for registers\n\
+        -m31              Set file format to 31 bit format\n\
+        -m64              Set file format to 64 bit format\n"));
   fprintf (stream, _("\
         -V                print assembler version number\n\
         -Qy, -Qn          ignored\n"));
@@ -440,6 +442,10 @@ md_begin ()
   boolean dup_insn = false;
   const char *retval;
 
+  /* Give a warning if the combination -m64-bit and -Aesa is used.  */
+  if (s390_arch_size == 64 && current_arch_mask == (1 << S390_OPCODE_ESA))
+    as_warn ("The 64 bit file format is used without esame instructions.");
+
   /* Set the ELF flags if desired.  */
   if (s390_flags)
     bfd_set_private_flags (stdoutput, s390_flags);
@@ -487,9 +493,9 @@ void
 s390_md_end ()
 {
   if (s390_arch_size == 64)
-    bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_esame);
+    bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_64);
   else
-    bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_esa);
+    bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_31);
 }
 
 void
@@ -1624,6 +1630,10 @@ tc_s390_fix_adjustable(fixP)
     return 0;
   if (S_IS_WEAK (fixP->fx_addsy))
     return 0;
+  /* Don't adjust pc-relative references to merge sections.  */
+  if ((S_GET_SEGMENT(fixP->fx_addsy)->flags & SEC_MERGE) != 0 
+      && fixP->fx_pcrel)
+    return 0;
   /* adjust_reloc_syms doesn't know about the GOT.  */
   if (   fixP->fx_r_type == BFD_RELOC_32_GOTOFF
       || fixP->fx_r_type == BFD_RELOC_390_PLT16DBL
index 5afaad89683d47705c5fbd3a461f2b1eb010508e..1f33e10dbcfa0b92ea4846ead37060e1bcfea8e6 100644 (file)
@@ -3310,7 +3310,7 @@ md_apply_fix3 (fixP, valP, seg)
   char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
   int lowbyte = target_big_endian ? 1 : 0;
   int highbyte = target_big_endian ? 0 : 1;
-  long val = * (long *) valP;
+  long val = (long) *valP;
   long max, min;
   int shift;
 
index 7d9214a76ec476e154623fdd1963dae2de55dfef..313ac88c1b09f1ab83eb36415a0f0e74afa74b67 100644 (file)
@@ -68,7 +68,12 @@ extern boolean sh_fix_adjustable PARAMS ((struct fix *));
 
 /* This arranges for gas/write.c to not apply a relocation if
    obj_fix_adjustable() says it is not adjustable.  */
-#define TC_FIX_ADJUSTABLE(fixP) obj_fix_adjustable (fixP)
+/* ??? fixups with symbols in SEC_MERGE sections are marked with
+   obj_fix_adjustable and have a non-section symbol, as in
+   "vwxyz"+1 in execute/string-opt-6.c .  Maybe the test of
+   (symbol_used_in_reloc_p should be done in the machine-independent code.  */
+#define TC_FIX_ADJUSTABLE(fixP) \
+  (! symbol_used_in_reloc_p (fixP->fx_addsy) && obj_fix_adjustable (fixP))
 #endif
 
 #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC)
index 07ff314931290bc58887b00925228b660017cba6..875a874a17c36ffbf22653becb0d01918e493195 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-xstormy16.h -- Header file for tc-xstormy16.c.
-   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -67,3 +67,6 @@ extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
 extern void xstormy16_cons_fix_new PARAMS ((fragS *f, int, int, expressionS *));
 
 #define md_cgen_record_fixup_exp  xstormy16_cgen_record_fixup_exp
+
+/* Minimum instruction is two bytes.  */
+#define DWARF2_LINE_MIN_INSN_LENGTH 2