mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
(md_apply_fix): Remove bad assert added 2000-09-26.
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
2000-10-07 Alan Modra <alan@linuxcare.com.au>
|
2000-10-07 Alan Modra <alan@linuxcare.com.au>
|
||||||
|
|
||||||
|
* config/tc-hppa.c (md_apply_fix): Remove plainly wrong assert.
|
||||||
|
Re-arrange function a little and improve error message.
|
||||||
|
|
||||||
* write.c (write_relocs): Fix a comment.
|
* write.c (write_relocs): Fix a comment.
|
||||||
|
|
||||||
* config/obj-elf.c (elf_frob_symbol): Make section syms global on
|
* config/obj-elf.c (elf_frob_symbol): Make section syms global on
|
||||||
|
@ -4341,12 +4341,11 @@ md_apply_fix (fixP, valp)
|
|||||||
fixS *fixP;
|
fixS *fixP;
|
||||||
valueT *valp;
|
valueT *valp;
|
||||||
{
|
{
|
||||||
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
|
unsigned char *buf;
|
||||||
struct hppa_fix_struct *hppa_fixP;
|
struct hppa_fix_struct *hppa_fixP;
|
||||||
offsetT new_val;
|
offsetT new_val;
|
||||||
int insn, val;
|
int insn, val, fmt;
|
||||||
|
|
||||||
hppa_fixP = (struct hppa_fix_struct *) fixP->tc_fix_data;
|
|
||||||
/* SOM uses R_HPPA_ENTRY and R_HPPA_EXIT relocations which can
|
/* SOM uses R_HPPA_ENTRY and R_HPPA_EXIT relocations which can
|
||||||
never be "applied" (they are just markers). Likewise for
|
never be "applied" (they are just markers). Likewise for
|
||||||
R_HPPA_BEGIN_BRTAB and R_HPPA_END_BRTAB. */
|
R_HPPA_BEGIN_BRTAB and R_HPPA_END_BRTAB. */
|
||||||
@ -4373,14 +4372,19 @@ md_apply_fix (fixP, valp)
|
|||||||
return 1;
|
return 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
insn = bfd_get_32 (stdoutput, (unsigned char *) buf);
|
|
||||||
/* There should have been an HPPA specific fixup associated
|
/* There should have been an HPPA specific fixup associated
|
||||||
with the GAS fixup. */
|
with the GAS fixup. */
|
||||||
if (hppa_fixP)
|
hppa_fixP = (struct hppa_fix_struct *) fixP->tc_fix_data;
|
||||||
|
if (hppa_fixP == NULL)
|
||||||
{
|
{
|
||||||
int fmt = bfd_hppa_insn2fmt (stdoutput, insn);
|
printf (_("no hppa_fixup entry for fixup type 0x%x at %s:%d"),
|
||||||
|
fixP->fx_r_type, fixP->fx_file, fixP->fx_line);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
assert (fmt == hppa_fixP->fx_r_format);
|
buf = fixP->fx_frag->fr_literal + fixP->fx_where;
|
||||||
|
insn = bfd_get_32 (stdoutput, buf);
|
||||||
|
fmt = bfd_hppa_insn2fmt (stdoutput, insn);
|
||||||
|
|
||||||
/* If there is a symbol associated with this fixup, then it's something
|
/* If there is a symbol associated with this fixup, then it's something
|
||||||
which will need a SOM relocation (except for some PC-relative relocs).
|
which will need a SOM relocation (except for some PC-relative relocs).
|
||||||
@ -4402,7 +4406,7 @@ md_apply_fix (fixP, valp)
|
|||||||
|| hppa_fixP->fx_r_field == e_rtsel
|
|| hppa_fixP->fx_r_field == e_rtsel
|
||||||
|| hppa_fixP->fx_r_field == e_ltsel)
|
|| hppa_fixP->fx_r_field == e_ltsel)
|
||||||
new_val = ((fmt == 12 || fmt == 17 || fmt == 22) ? 8 : 0);
|
new_val = ((fmt == 12 || fmt == 17 || fmt == 22) ? 8 : 0);
|
||||||
/* This is truely disgusting. The machine independent code blindly
|
/* This is truly disgusting. The machine independent code blindly
|
||||||
adds in the value of the symbol being relocated against. Damn! */
|
adds in the value of the symbol being relocated against. Damn! */
|
||||||
else if (fmt == 32
|
else if (fmt == 32
|
||||||
&& fixP->fx_addsy != NULL
|
&& fixP->fx_addsy != NULL
|
||||||
@ -4545,15 +4549,8 @@ md_apply_fix (fixP, valp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Insert the relocation. */
|
/* Insert the relocation. */
|
||||||
bfd_put_32 (stdoutput, insn, (unsigned char *) buf);
|
bfd_put_32 (stdoutput, insn, buf);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf (_("no hppa_fixup entry for this fixup (fixP = 0x%x, type = 0x%x)\n"),
|
|
||||||
(unsigned int) fixP, fixP->fx_r_type);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Exactly what point is a PC-relative offset relative TO?
|
/* Exactly what point is a PC-relative offset relative TO?
|
||||||
|
Reference in New Issue
Block a user