* 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:
Catherine Moore 1998-07-31 21:15:51 +00:00
parent 6e723af99a
commit 0a8aeb55e4
2 changed files with 31 additions and 26 deletions

View File

@ -4410,13 +4410,25 @@ find_real_start (symbolP)
/* This definitonmust agree with the one in gcc/config/arm/thumb.c */
#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);
sprintf (real_start, "%s%s", STUB_NAME, name);
new_target = symbol_find (real_start);
if (new_target == NULL)
abort();
{
as_warn ("Failed to find real start of function: %s\n", name);
new_target = symbolP;
}
free (real_start);
@ -4990,6 +5002,13 @@ md_section_align (segment, size)
segT segment;
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 */
return (size + 3) & ~3;
}
@ -5504,10 +5523,14 @@ tc_gen_reloc (section, fixp)
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
/* @@ Why fx_addnumber sometimes and fx_offset other times? */
#ifndef OBJ_ELF
if (fixp->fx_pcrel == 0)
reloc->addend = fixp->fx_offset;
else
reloc->addend = fixp->fx_offset = reloc->address;
#else /* OBJ_ELF */
reloc->addend = fixp->fx_offset;
#endif
switch (fixp->fx_r_type)
{
@ -5598,30 +5621,6 @@ tc_gen_reloc (section, fixp)
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
md_estimate_size_before_relax (fragP, segtype)
fragS *fragP;

View File

@ -2299,13 +2299,19 @@ s_mri (ignore)
#ifdef TC_M68K
flag_m68k_mri = 1;
#endif
macro_mri_mode (1);
}
else
{
flag_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
if (on != old_flag)
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,
* comma seperated. Recall a string expression includes spaces
* comma separated. Recall a string expression includes spaces
* before the opening '\"' and spaces after the closing '\"'.
* We fake a leading ',' if there is (supposed to be)
* a 1st, expression. We keep demanding expressions for each