* tc-m68hc11.c (s_m68hc11_parse_pseudo_instruction):
[deliverable/binutils-gdb.git] / gas / config / tc-vax.c
index db2055e7169c56085e7e1c7ad29e8a419ce2c71b..185a9a242d19a093a7d6bafd0d4ce798c93e9350 100644 (file)
@@ -1,6 +1,6 @@
 /* tc-vax.c - vax-specific -
    Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001, 2002,
-   2003, 2004, 2005, 2006, 2007, 2008
+   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -396,23 +396,20 @@ md_estimate_size_before_relax (fragS *fragP, segT segment)
                  || S_IS_WEAK (fragP->fr_symbol)
                  || S_IS_EXTERNAL (fragP->fr_symbol)))
            {
-             if (p[0] & 0x10)
-               {
-                 if (flag_want_pic)
-                   as_fatal ("PIC reference to %s is indirect.\n",
-                             S_GET_NAME (fragP->fr_symbol));
-               }
+             /* Indirect references cannot go through the GOT or PLT,
+                let's hope they'll become local in the final link.  */
+             if ((ELF_ST_VISIBILITY (S_GET_OTHER (fragP->fr_symbol))
+                  != STV_DEFAULT)
+                 || (p[0] & 0x10))
+               reloc_type = BFD_RELOC_32_PCREL;
+             else if (((unsigned char *) fragP->fr_opcode)[0] == VAX_CALLS
+                      || ((unsigned char *) fragP->fr_opcode)[0] == VAX_CALLG
+                      || ((unsigned char *) fragP->fr_opcode)[0] == VAX_JSB
+                      || ((unsigned char *) fragP->fr_opcode)[0] == VAX_JMP
+                      || S_IS_FUNCTION (fragP->fr_symbol))
+               reloc_type = BFD_RELOC_32_PLT_PCREL;
              else
-               {
-                 if (((unsigned char *) fragP->fr_opcode)[0] == VAX_CALLS
-                     || ((unsigned char *) fragP->fr_opcode)[0] == VAX_CALLG
-                     || ((unsigned char *) fragP->fr_opcode)[0] == VAX_JSB
-                     || ((unsigned char *) fragP->fr_opcode)[0] == VAX_JMP
-                     || S_IS_FUNCTION (fragP->fr_symbol))
-                   reloc_type = BFD_RELOC_32_PLT_PCREL;
-                 else
-                   reloc_type = BFD_RELOC_32_GOT_PCREL;
-               }
+               reloc_type = BFD_RELOC_32_GOT_PCREL;
            }
 #endif
          switch (RELAX_STATE (fragP->fr_subtype))
@@ -1274,10 +1271,8 @@ vip_op (char *optext, struct vop *vopP)
      get the types wrong below, we lose at compile time rather than at
      lint or run time.  */
   char access_mode;            /* vop_access.  */
-  char width;                  /* vop_width.  */
 
   access_mode = vopP->vop_access;
-  width = vopP->vop_width;
   /* None of our code bugs (yet), no user text errors, no warnings
      even.  */
   err = wrn = 0;
@@ -2403,7 +2398,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
 #endif
 
   reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
-  assert (reloc->howto != 0);
+  gas_assert (reloc->howto != 0);
 
   return reloc;
 }
@@ -2716,6 +2711,7 @@ md_assemble (char *instruction_string)
   if (need_pass_2 || goofed)
     return;
 
+  dwarf2_emit_insn (0);
   /* Emit op-code.  */
   /* Remember where it is, in case we want to modify the op-code later.  */
   opcode_low_byteP = frag_more (v.vit_opcode_nbytes);
This page took 0.024704 seconds and 4 git commands to generate.