mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
* configure.in: (arm-*-elf): Handle.
(thumb-*-elf): Handle. * configure: Regenerate. * read.c (stringer): Fix typo in comment. * write.c (fixup_segment): Don't add symbol value to addend if TC_ARM and OBJ_ELF. * config/tc-arm.c (md_section_align): Don't align dwarf debug sections. (tc_gen_reloc): Always set the reloc addend to fixp->fx_offset for OBJ_ELF.
This commit is contained in:
@ -4410,13 +4410,25 @@ find_real_start (symbolP)
|
|||||||
/* This definitonmust agree with the one in gcc/config/arm/thumb.c */
|
/* This definitonmust agree with the one in gcc/config/arm/thumb.c */
|
||||||
#define STUB_NAME ".real_start_of"
|
#define STUB_NAME ".real_start_of"
|
||||||
|
|
||||||
|
if (name == NULL)
|
||||||
|
abort();
|
||||||
|
|
||||||
|
/* Names that start with '.' are local labels, not function entry points.
|
||||||
|
The compiler may generate BL instructions to these labels because it
|
||||||
|
needs to perform a branch to a far away location. */
|
||||||
|
if (name[0] == '.')
|
||||||
|
return symbolP;
|
||||||
|
|
||||||
real_start = malloc (strlen (name) + strlen (STUB_NAME) + 1);
|
real_start = malloc (strlen (name) + strlen (STUB_NAME) + 1);
|
||||||
sprintf (real_start, "%s%s", STUB_NAME, name);
|
sprintf (real_start, "%s%s", STUB_NAME, name);
|
||||||
|
|
||||||
new_target = symbol_find (real_start);
|
new_target = symbol_find (real_start);
|
||||||
|
|
||||||
if (new_target == NULL)
|
if (new_target == NULL)
|
||||||
abort();
|
{
|
||||||
|
as_warn ("Failed to find real start of function: %s\n", name);
|
||||||
|
new_target = symbolP;
|
||||||
|
}
|
||||||
|
|
||||||
free (real_start);
|
free (real_start);
|
||||||
|
|
||||||
@ -4990,6 +5002,13 @@ md_section_align (segment, size)
|
|||||||
segT segment;
|
segT segment;
|
||||||
valueT size;
|
valueT size;
|
||||||
{
|
{
|
||||||
|
/* start-sanitize-armelf */
|
||||||
|
#ifdef OBJ_ELF
|
||||||
|
/* Don't align the dwarf2 debug sections */
|
||||||
|
if (!strncmp(segment->name,".debug",5))
|
||||||
|
return size;
|
||||||
|
#endif
|
||||||
|
/* end-sanitize-armelf */
|
||||||
/* Round all sects to multiple of 4 */
|
/* Round all sects to multiple of 4 */
|
||||||
return (size + 3) & ~3;
|
return (size + 3) & ~3;
|
||||||
}
|
}
|
||||||
@ -5504,10 +5523,14 @@ tc_gen_reloc (section, fixp)
|
|||||||
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
|
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
|
||||||
|
|
||||||
/* @@ Why fx_addnumber sometimes and fx_offset other times? */
|
/* @@ Why fx_addnumber sometimes and fx_offset other times? */
|
||||||
|
#ifndef OBJ_ELF
|
||||||
if (fixp->fx_pcrel == 0)
|
if (fixp->fx_pcrel == 0)
|
||||||
reloc->addend = fixp->fx_offset;
|
reloc->addend = fixp->fx_offset;
|
||||||
else
|
else
|
||||||
reloc->addend = fixp->fx_offset = reloc->address;
|
reloc->addend = fixp->fx_offset = reloc->address;
|
||||||
|
#else /* OBJ_ELF */
|
||||||
|
reloc->addend = fixp->fx_offset;
|
||||||
|
#endif
|
||||||
|
|
||||||
switch (fixp->fx_r_type)
|
switch (fixp->fx_r_type)
|
||||||
{
|
{
|
||||||
@ -5598,30 +5621,6 @@ tc_gen_reloc (section, fixp)
|
|||||||
return reloc;
|
return reloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
CONST int md_short_jump_size = 4;
|
|
||||||
CONST int md_long_jump_size = 4;
|
|
||||||
|
|
||||||
/* These should never be called on the arm */
|
|
||||||
void
|
|
||||||
md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
|
|
||||||
char *ptr;
|
|
||||||
addressT from_addr, to_addr;
|
|
||||||
fragS *frag;
|
|
||||||
symbolS *to_symbol;
|
|
||||||
{
|
|
||||||
as_fatal (_("md_create_long_jump\n"));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
|
|
||||||
char *ptr;
|
|
||||||
addressT from_addr, to_addr;
|
|
||||||
fragS *frag;
|
|
||||||
symbolS *to_symbol;
|
|
||||||
{
|
|
||||||
as_fatal (_("md_create_short_jump\n"));
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
md_estimate_size_before_relax (fragP, segtype)
|
md_estimate_size_before_relax (fragP, segtype)
|
||||||
fragS *fragP;
|
fragS *fragP;
|
||||||
|
@ -2299,13 +2299,19 @@ s_mri (ignore)
|
|||||||
#ifdef TC_M68K
|
#ifdef TC_M68K
|
||||||
flag_m68k_mri = 1;
|
flag_m68k_mri = 1;
|
||||||
#endif
|
#endif
|
||||||
|
macro_mri_mode (1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
flag_mri = 0;
|
flag_mri = 0;
|
||||||
flag_m68k_mri = 0;
|
flag_m68k_mri = 0;
|
||||||
|
macro_mri_mode (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Operator precedence changes in m68k MRI mode, so we need to
|
||||||
|
update the operator rankings. */
|
||||||
|
expr_set_precedence ();
|
||||||
|
|
||||||
#ifdef MRI_MODE_CHANGE
|
#ifdef MRI_MODE_CHANGE
|
||||||
if (on != old_flag)
|
if (on != old_flag)
|
||||||
MRI_MODE_CHANGE (on);
|
MRI_MODE_CHANGE (on);
|
||||||
@ -4390,7 +4396,7 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* The following awkward logic is to parse ZERO or more strings,
|
* The following awkward logic is to parse ZERO or more strings,
|
||||||
* comma seperated. Recall a string expression includes spaces
|
* comma separated. Recall a string expression includes spaces
|
||||||
* before the opening '\"' and spaces after the closing '\"'.
|
* before the opening '\"' and spaces after the closing '\"'.
|
||||||
* We fake a leading ',' if there is (supposed to be)
|
* We fake a leading ',' if there is (supposed to be)
|
||||||
* a 1st, expression. We keep demanding expressions for each
|
* a 1st, expression. We keep demanding expressions for each
|
||||||
|
Reference in New Issue
Block a user