Apparently I forgot to commit this change:

* config/tc-hppa.c (md_apply_fix): Go ahead and call
        hppa_field_adjust to get a new value for R_DATA_ONE_SYMBOL
        relocations in SOM.
        (hppa_fix_adjustable): Refine somewhat.
This commit is contained in:
Jeff Law
1995-02-07 18:20:57 +00:00
parent f64a8968db
commit b4682e519f
2 changed files with 33 additions and 11 deletions

View File

@ -38,6 +38,13 @@ Thu Feb 2 15:21:24 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
(VMS_RSYM_Parse): move S_GET_VALUE() inside switch to avoid (VMS_RSYM_Parse): move S_GET_VALUE() inside switch to avoid
calling it for uninteresting cases. calling it for uninteresting cases.
Wed Feb 1 23:52:45 1995 Jeff Law (law@snake.cs.utah.edu)
* config/tc-hppa.c (md_apply_fix): Go ahead and call
hppa_field_adjust to get a new value for R_DATA_ONE_SYMBOL
relocations in SOM.
(hppa_fix_adjustable): Refine somewhat.
Fri Jan 27 21:29:53 1995 Michael Meissner <meissner@tiktok.cygnus.com> Fri Jan 27 21:29:53 1995 Michael Meissner <meissner@tiktok.cygnus.com>
* config/tc-ppc.h (NO_STRING_ESCAPES): Don't define if we are * config/tc-ppc.h (NO_STRING_ESCAPES): Don't define if we are

View File

@ -2215,7 +2215,7 @@ pa_ip (str)
num = pa_get_absolute_expression (&the_insn, &s); num = pa_get_absolute_expression (&the_insn, &s);
s = expr_end; s = expr_end;
CHECK_FIELD (num, 671108864, 0, 0); CHECK_FIELD (num, 671108864, 0, 0);
INSERT_FIELD_AND_CONTINUE (opcode, num, 1); INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
/* Handle a 3 bit SFU identifier at 25. */ /* Handle a 3 bit SFU identifier at 25. */
case 'f': case 'f':
@ -2855,8 +2855,18 @@ md_apply_fix (fixP, valp)
which will need a SOM relocation (except for some PC-relative relocs). which will need a SOM relocation (except for some PC-relative relocs).
In such cases we should treat the "val" or "addend" as zero since it In such cases we should treat the "val" or "addend" as zero since it
will be added in as needed from fx_offset in tc_gen_reloc. */ will be added in as needed from fx_offset in tc_gen_reloc. */
if (fixP->fx_addsy != NULL if ((fixP->fx_addsy != NULL
|| fixP->fx_r_type == R_HPPA_NONE) || fixP->fx_r_type == R_HPPA_NONE)
#ifdef OBJ_SOM
&& fmt != 32
|| hppa_fixP->fx_r_field == e_psel
|| hppa_fixP->fx_r_field == e_rpsel
|| hppa_fixP->fx_r_field == e_lpsel
|| hppa_fixP->fx_r_field == e_tsel
|| hppa_fixP->fx_r_field == e_rtsel
|| hppa_fixP->fx_r_field == e_ltsel
#endif
)
new_val = ((fmt == 12 || fmt == 17) ? 8 : 0); new_val = ((fmt == 12 || fmt == 17) ? 8 : 0);
else else
new_val = hppa_field_adjust (*valp, 0, hppa_fixP->fx_r_field); new_val = hppa_field_adjust (*valp, 0, hppa_fixP->fx_r_field);
@ -5379,6 +5389,9 @@ pa_subspace (unused)
else else
section = subseg_new (ss_name, 0); section = subseg_new (ss_name, 0);
if (zero)
seg_info (section)->bss = 1;
/* Now set the flags. */ /* Now set the flags. */
bfd_set_section_flags (stdoutput, section, applicable); bfd_set_section_flags (stdoutput, section, applicable);
@ -6125,11 +6138,9 @@ pa_text (unused)
Reject reductions involving symbols with external scope; such Reject reductions involving symbols with external scope; such
reductions make life a living hell for object file editors. reductions make life a living hell for object file editors.
FIXME. Also reject R_HPPA relocations which are 32 bits FIXME. Also reject R_HPPA relocations which are 32bits wide in
wide. Helps with code lables in arrays for SOM. (SOM BFD code the code space. The SOM BFD backend doesn't know how to pull the
needs to generate relocations to push the addend and symbol value right bits out of an instruction. */
onto the stack, add them, then pop the value off the stack and
use it in a relocation -- yuk. */
int int
hppa_fix_adjustable (fixp) hppa_fix_adjustable (fixp)
@ -6145,10 +6156,14 @@ hppa_fix_adjustable (fixp)
return 0; return 0;
#endif #endif
/* Reject reductions of symbols in DLT relative relocs. */ /* Reject reductions of symbols in DLT relative relocs,
relocations with plabels. */
if (hppa_fix->fx_r_field == e_tsel if (hppa_fix->fx_r_field == e_tsel
|| hppa_fix->fx_r_field == e_ltsel || hppa_fix->fx_r_field == e_ltsel
|| hppa_fix->fx_r_field == e_rtsel) || hppa_fix->fx_r_field == e_rtsel
|| hppa_fix->fx_r_field == e_psel
|| hppa_fix->fx_r_field == e_rpsel
|| hppa_fix->fx_r_field == e_lpsel)
return 0; return 0;
if (fixp->fx_addsy && fixp->fx_addsy->bsym->flags & BSF_GLOBAL) if (fixp->fx_addsy && fixp->fx_addsy->bsym->flags & BSF_GLOBAL)