aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1993-11-12 22:54:41 +0000
committerJeff Law <law@redhat.com>1993-11-12 22:54:41 +0000
commitf2eed8840d6dc70abf7c2296013545bf614ca0af (patch)
treeebfd566f53a89813fcb7956e1d3a8bcefc337a60
parent9d271503e81a1d0c4c3514ae3a7dbd57c27bafbd (diff)
downloadgdb-f2eed8840d6dc70abf7c2296013545bf614ca0af.zip
gdb-f2eed8840d6dc70abf7c2296013545bf614ca0af.tar.gz
gdb-f2eed8840d6dc70abf7c2296013545bf614ca0af.tar.bz2
* config/tc-hppa.c (hppa_fix_struct): Use a real type for the
field selector, rather than an int. All uses of field selectors fixed. (tc_gen_reloc): For SOM PLABELs, always set addend to zero for now. (md_apply_fix_1): Do not call hppa_field_adjust for any PLABEL field.
-rw-r--r--gas/ChangeLog13
-rw-r--r--gas/config/tc-hppa.c23
2 files changed, 29 insertions, 7 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 10034b2..0fe6be7 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,8 +1,17 @@
-Thu Nov 11 15:49:08 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+Fri Nov 12 14:52:17 1993 Jeffrey A. Law (law@snake.cs.utah.edu
+
+ * config/tc-hppa.c (hppa_fix_struct): Use a real type for the
+ field selector, rather than an int. All uses of field selectors
+ fixed.
+ (tc_gen_reloc): For SOM PLABELs, always set addend to zero for now.
+ (md_apply_fix_1): Do not call hppa_field_adjust for any PLABEL
+ field.
+
+ Thu Nov 11 15:49:08 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
* config/tc-hppa.c (pa_type_args): For .import statements,
silently ignore attempt to change the symbol type for a function
- from ST_ENTRY to ST_CODE on .import
+ from ST_ENTRY to ST_CODE on .import.
Wed Nov 10 16:19:13 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index 194ce9b..606d778 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -491,7 +491,7 @@ struct default_space_dict
struct hppa_fix_struct
{
/* The field selector. */
- int fx_r_field;
+ enum hppa_reloc_field_selector_type fx_r_field;
/* Type of fixup. */
int fx_r_type;
@@ -606,7 +606,8 @@ static unsigned int pa_subspace_start PARAMS ((sd_chain_struct *, int));
static void pa_ip PARAMS ((char *));
static void fix_new_hppa PARAMS ((fragS *, int, short int, symbolS *,
long, expressionS *, int,
- bfd_reloc_code_real_type, long,
+ bfd_reloc_code_real_type,
+ enum hppa_reloc_field_selector_type,
int, long, char *));
static void md_apply_fix_1 PARAMS ((fixS *, long));
static int is_end_of_statement PARAMS ((void));
@@ -1320,7 +1321,7 @@ fix_new_hppa (frag, where, size, add_symbol, offset, exp, pcrel,
expressionS *exp;
int pcrel;
bfd_reloc_code_real_type r_type;
- long r_field;
+ enum hppa_reloc_field_selector_type r_field;
int r_format;
long arg_reloc;
char *unwind_desc;
@@ -2857,7 +2858,6 @@ tc_gen_reloc (section, fixp)
reloc->sym_ptr_ptr = &fixp->fx_addsy->bsym;
reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where ;
- reloc->addend = 0;
switch (code)
{
@@ -2865,6 +2865,17 @@ tc_gen_reloc (section, fixp)
case R_ABS_CALL:
reloc->addend = HPPA_R_ADDEND (hppa_fixp->fx_arg_reloc, 0);
break;
+
+ case R_DATA_PLABEL:
+ case R_CODE_PLABEL:
+ /* For plabel relocations, the addend of the
+ relocation should be either 0 (no static link) or 2
+ (static link required).
+
+ FIXME: We always assume no static link! */
+ reloc->addend = 0;
+ break;
+
default:
reloc->addend = fixp->fx_addnumber;
break;
@@ -3037,7 +3048,9 @@ md_apply_fix_1 (fixP, val)
&& fixP->fx_subsy->bsym->section == &bfd_und_section))
return;
- if (fmt != 0 && fmt != 32)
+ if (fmt != 0 && hppa_fixP->fx_r_field != R_HPPA_PSEL
+ && hppa_fixP->fx_r_field != R_HPPA_LPSEL
+ && hppa_fixP->fx_r_field != R_HPPA_RPSEL)
new_val = hppa_field_adjust (val, 0, hppa_fixP->fx_r_field);
else
new_val = 0;