mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 04:49:54 +08:00
2009-07-27 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
* config/tc-cr16.c (md_apply_fix): Put the addend value alone in to object file without symbol values. (tc_gen_reloc): For local symbols resolved or its absolute symbol, then set the relocation type as NULL.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2009-07-27 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
|
||||||
|
|
||||||
|
* config/tc-cr16.c (md_apply_fix): Put the addend value alone in to
|
||||||
|
object file without symbol values.
|
||||||
|
(tc_gen_reloc): For local symbols resolved or its absolute symbol,
|
||||||
|
then set the relocation type as NULL.
|
||||||
|
|
||||||
2009-07-25 H.J. Lu <hongjiu.lu@intel.com>
|
2009-07-25 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* config/tc-i386.c (cpu_arch): Add l1om.
|
* config/tc-i386.c (cpu_arch): Add l1om.
|
||||||
|
@ -523,6 +523,13 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS * fixP)
|
|||||||
arelent * reloc;
|
arelent * reloc;
|
||||||
bfd_reloc_code_real_type code;
|
bfd_reloc_code_real_type code;
|
||||||
|
|
||||||
|
/* If symbols are local and resolved, then no relocation needed. */
|
||||||
|
if ( ((fixP->fx_addsy)
|
||||||
|
&& (S_GET_SEGMENT (fixP->fx_addsy) == absolute_section))
|
||||||
|
|| ((fixP->fx_subsy)
|
||||||
|
&& (S_GET_SEGMENT (fixP->fx_subsy) == absolute_section)))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
reloc = xmalloc (sizeof (arelent));
|
reloc = xmalloc (sizeof (arelent));
|
||||||
reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
|
reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
|
||||||
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
|
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
|
||||||
@ -728,7 +735,27 @@ void
|
|||||||
md_apply_fix (fixS *fixP, valueT *valP, segT seg)
|
md_apply_fix (fixS *fixP, valueT *valP, segT seg)
|
||||||
{
|
{
|
||||||
valueT val = * valP;
|
valueT val = * valP;
|
||||||
|
|
||||||
|
if (fixP->fx_addsy == NULL
|
||||||
|
&& fixP->fx_pcrel == 0)
|
||||||
|
fixP->fx_done = 1;
|
||||||
|
else if (fixP->fx_pcrel == 1
|
||||||
|
&& fixP->fx_addsy != NULL
|
||||||
|
&& S_GET_SEGMENT (fixP->fx_addsy) == seg)
|
||||||
|
fixP->fx_done = 1;
|
||||||
|
else
|
||||||
|
fixP->fx_done = 0;
|
||||||
|
|
||||||
|
if (fixP->fx_addsy != NULL && !fixP->fx_pcrel)
|
||||||
|
{
|
||||||
|
val = fixP->fx_offset;
|
||||||
|
fixP->fx_done = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fixP->fx_done)
|
||||||
|
{
|
||||||
char *buf = fixP->fx_frag->fr_literal + fixP->fx_where;
|
char *buf = fixP->fx_frag->fr_literal + fixP->fx_where;
|
||||||
|
|
||||||
fixP->fx_offset = 0;
|
fixP->fx_offset = 0;
|
||||||
|
|
||||||
switch (fixP->fx_r_type)
|
switch (fixP->fx_r_type)
|
||||||
@ -750,17 +777,10 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
|
|||||||
abort ();
|
abort ();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
fixP->fx_done = 0;
|
fixP->fx_done = 0;
|
||||||
|
}
|
||||||
if (fixP->fx_addsy == NULL
|
else
|
||||||
&& fixP->fx_pcrel == 0)
|
fixP->fx_offset = * valP;
|
||||||
fixP->fx_done = 1;
|
|
||||||
|
|
||||||
if (fixP->fx_pcrel == 1
|
|
||||||
&& fixP->fx_addsy != NULL
|
|
||||||
&& S_GET_SEGMENT (fixP->fx_addsy) == seg)
|
|
||||||
fixP->fx_done = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The location from which a PC relative jump should be calculated,
|
/* The location from which a PC relative jump should be calculated,
|
||||||
|
Reference in New Issue
Block a user