/* tc-hppa.c -- Assemble for the PA
Copyright 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002 Free Software Foundation, Inc.
+ 2002, 2003 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
/* handle of the OPCODE hash table */
static struct hash_control *op_hash = NULL;
+/* These characters can be suffixes of opcode names and they may be
+ followed by meaningful whitespace. We don't include `,' and `!'
+ as they never appear followed by meaningful whitespace. */
+const char hppa_symbol_chars[] = "*?=<>";
+
/* Table of pseudo ops for the PA. FIXME -- how many of these
are now redundant with the overall GAS and the object file
dependent tables? */
{"equ", pa_equ, 0},
{"exit", pa_exit, 0},
{"export", pa_export, 0},
-#ifdef OBJ_ELF
- {"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0 },
-#endif
{"fill", pa_fill, 0},
{"float", pa_float_cons, 'f'},
{"half", pa_cons, 2},
{"lcomm", pa_lcomm, 0},
{"leave", pa_leave, 0},
{"level", pa_level, 0},
-#ifdef OBJ_ELF
- {"loc", dwarf2_directive_loc, 0 },
-#endif
{"long", pa_cons, 4},
{"lsym", pa_lsym, 0},
#ifdef OBJ_SOM
failed:
/* Check if the args matched. */
- if (match == FALSE)
+ if (!match)
{
if (&insn[1] - pa_opcodes < (int) NUMOPCODES
&& !strcmp (insn->name, insn[1].name))
offsetT new_val;
int insn, val, fmt;
- if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0)
- fixP->fx_done = 1;
-
/* SOM uses R_HPPA_ENTRY and R_HPPA_EXIT relocations which can
never be "applied" (they are just markers). Likewise for
R_HPPA_BEGIN_BRTAB and R_HPPA_END_BRTAB. */
return;
#endif
+ if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0)
+ fixP->fx_done = 1;
+
/* There should have been an HPPA specific fixup associated
with the GAS fixup. */
hppa_fixP = (struct hppa_fix_struct *) fixP->tc_fix_data;
|| hppa_fixP->fx_r_field == e_rtsel
|| hppa_fixP->fx_r_field == e_ltsel)
new_val = ((fmt == 12 || fmt == 17 || fmt == 22) ? 8 : 0);
- /* This is truly disgusting. The machine independent code blindly
- adds in the value of the symbol being relocated against. Damn! */
- else if (fmt == 32
- && fixP->fx_addsy != NULL
- && S_GET_SEGMENT (fixP->fx_addsy) != bfd_com_section_ptr)
- new_val = hppa_field_adjust (* valP - S_GET_VALUE (fixP->fx_addsy),
- 0, hppa_fixP->fx_r_field);
#endif
else
new_val = hppa_field_adjust (* valP, 0, hppa_fixP->fx_r_field);
symbolS *sym;
int status;
char *p = *s;
- boolean have_prefix;
+ bfd_boolean have_prefix;
/* Skip whitespace before the number. */
while (*p == ' ' || *p == '\t')
num = S_GET_VALUE (sym);
/* Well, we don't really have one, but we do have a
register, so... */
- have_prefix = true;
+ have_prefix = TRUE;
}
else if (S_GET_SEGMENT (sym) == &bfd_abs_section)
num = S_GET_VALUE (sym);
}
#endif
- if (fixp->fx_addsy && (S_IS_EXTERNAL (fixp->fx_addsy)
- || S_IS_WEAK (fixp->fx_addsy)))
- return 0;
-
/* Reject reductions of symbols in sym1-sym2 expressions when
the fixup will occur in a CODE subspace.
if (fixp->fx_addsy
&& fixp->fx_subsy
&& (hppa_fix->segment->flags & SEC_CODE))
- {
- /* Apparently sy_used_in_reloc never gets set for sub symbols. */
- symbol_mark_used_in_reloc (fixp->fx_subsy);
- return 0;
- }
+ return 0;
/* We can't adjust any relocs that use LR% and RR% field selectors.
/* Ensure we emit a relocation for global symbols so that dynamic
linking works. */
- if (S_IS_EXTERNAL (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy))
+ if (S_FORCE_RELOC (fixp->fx_addsy, 1))
return 1;
/* It is necessary to force PC-relative calls/jumps to have a relocation