/* write.c - emit .o file
- Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
/* We've made fx_size a narrow field; check that it's wide enough. */
if (fixP->fx_size != size)
{
- as_bad ("field fx_size too small to hold %d", size);
+ as_bad (_("field fx_size too small to hold %d"), size);
abort ();
}
fixP->fx_addsy = add_symbol;
#if defined(TC_RVA_RELOC)
r_type = TC_RVA_RELOC;
#else
- as_fatal("rva not supported");
+ as_fatal(_("rva not supported"));
#endif
#endif
break;
if (seg == absolute_section)
return;
#ifdef BFD_ASSEMBLER
- if (align > bfd_get_section_alignment (stdoutput, seg))
+ if ((unsigned int) align > bfd_get_section_alignment (stdoutput, seg))
bfd_set_section_alignment (stdoutput, seg, align);
#else
if (align > section_alignment[(int) seg])
- fragP->fr_fix) / fragP->fr_var;
if (fragP->fr_offset < 0)
{
- as_bad ("attempt to .org/.space backwards? (%ld)",
+ as_bad (_("attempt to .org/.space backwards? (%ld)"),
(long) fragP->fr_offset);
}
fragP->fr_type = rs_fill;
}
break;
+ case rs_cfa:
+ eh_frame_convert_frag (fragP);
+ break;
+
case rs_machine_dependent:
#ifdef BFD_ASSEMBLER
md_convert_frag (stdoutput, sec, fragP);
md_convert_frag (headersP, sec, fragP);
#endif
- assert (fragP->fr_next == NULL || (fragP->fr_next->fr_address - fragP->fr_address == fragP->fr_fix));
+ assert (fragP->fr_next == NULL
+ || ((offsetT) (fragP->fr_next->fr_address - fragP->fr_address)
+ == fragP->fr_fix));
/*
* After md_convert_frag, we make the frag into a ".space 0".
symbolS *sym;
asection *symsec;
- reduce_fixup:
-
#ifdef DEBUG5
fprintf (stderr, "\n\nadjusting fixup:\n");
print_fixup (fixp);
case bfd_reloc_ok:
break;
case bfd_reloc_overflow:
- as_bad_where (fixp->fx_file, fixp->fx_line, "relocation overflow");
+ as_bad_where (fixp->fx_file, fixp->fx_line, _("relocation overflow"));
break;
default:
- as_fatal ("%s:%u: bad return from bfd_install_relocation",
+ as_fatal (_("%s:%u: bad return from bfd_install_relocation"),
fixp->fx_file, fixp->fx_line);
}
relocs[i++] = reloc;
if (fixp->fx_where + fixp->fx_size
> fixp->fx_frag->fr_fix + fixp->fx_frag->fr_offset)
as_bad_where (fixp->fx_file, fixp->fx_line,
- "internal error: fixup not contained within frag");
+ _("internal error: fixup not contained within frag"));
for (j = 0; reloc[j]; j++)
{
s = bfd_install_relocation (stdoutput, reloc[j],
break;
case bfd_reloc_overflow:
as_bad_where (fixp->fx_file, fixp->fx_line,
- "relocation overflow");
+ _("relocation overflow"));
break;
default:
- as_fatal ("%s:%u: bad return from bfd_install_relocation",
+ as_fatal (_("%s:%u: bad return from bfd_install_relocation"),
fixp->fx_file, fixp->fx_line);
}
}
if (x == false)
{
bfd_perror (stdoutput->filename);
- as_perror ("FATAL: Can't write %s", stdoutput->filename);
+ as_perror (_("FATAL: Can't write %s"), stdoutput->filename);
exit (EXIT_FAILURE);
}
offset += f->fr_fix;
if (x == false)
{
bfd_perror (stdoutput->filename);
- as_perror ("FATAL: Can't write %s", stdoutput->filename);
+ as_perror (_("FATAL: Can't write %s"), stdoutput->filename);
exit (EXIT_FAILURE);
}
offset += fill_size;
buf, (file_ptr) offset,
(bfd_size_type) n_per_buf * fill_size);
if (x != true)
- as_fatal ("Cannot write to output file.");
+ as_fatal (_("Cannot write to output file."));
offset += n_per_buf * fill_size;
}
}
if (flag_always_generate_output)
{
if (n_warns || n_errs)
- as_warn ("%d error%s, %d warning%s, generating bad object file.\n",
+ as_warn (_("%d error%s, %d warning%s, generating bad object file.\n"),
n_errs, n_errs == 1 ? "" : "s",
n_warns, n_warns == 1 ? "" : "s");
}
else
{
if (n_errs)
- as_fatal ("%d error%s, %d warning%s, no object file generated.\n",
+ as_fatal (_("%d error%s, %d warning%s, no object file generated.\n"),
n_errs, n_errs == 1 ? "" : "s",
n_warns, n_warns == 1 ? "" : "s");
}
if (symp->sy_mri_common)
{
if (S_IS_EXTERNAL (symp))
- as_bad ("%s: global symbols not supported in common sections",
+ as_bad (_("%s: global symbols not supported in common sections"),
S_GET_NAME (symp));
symbol_remove (symp, &symbol_rootP, &symbol_lastP);
continue;
/* They only differ if `name' is a fb or dollar local
label name. */
if (name2 != name && ! S_IS_DEFINED (symp))
- as_bad ("local label %s is not defined", name2);
+ as_bad (_("local label %s is not defined"), name2);
}
/* Do it again, because adjust_reloc_syms might introduce
/* Make sure we really got a value for the symbol. */
if (! symp->sy_resolved)
{
- as_bad ("can't resolve value for symbol \"%s\"",
+ as_bad (_("can't resolve value for symbol \"%s\""),
S_GET_NAME (symp));
symp->sy_resolved = 1;
}
if (offset % fragP->fr_var != 0)
{
- as_bad ("alignment padding (%lu bytes) not a multiple of %ld",
+ as_bad (_("alignment padding (%lu bytes) not a multiple of %ld"),
(unsigned long) offset, (long) fragP->fr_var);
offset -= (offset % fragP->fr_var);
}
address += fragP->fr_offset = 1;
break;
+ case rs_cfa:
+ address += eh_frame_estimate_size_before_relax (fragP);
+ break;
+
default:
BAD_CASE (fragP->fr_type);
break;
{
char buf[50];
sprint_value (buf, (addressT) lie->addnum);
- as_warn (".word %s-%s+%s didn't fit",
+ as_warn (_(".word %s-%s+%s didn't fit"),
S_GET_NAME (lie->add),
S_GET_NAME (lie->sub),
buf);
/* Growth may be negative, but variable part of frag
cannot have fewer than 0 chars. That is, we can't
.org backwards. */
- as_bad ("attempt to .org backwards ignored");
+ as_bad (_("attempt to .org backwards ignored"));
growth = 0;
}
|| S_IS_COMMON (symbolP)
|| ! S_IS_DEFINED (symbolP))
as_bad_where (fragP->fr_file, fragP->fr_line,
- ".space specifies non-absolute value");
+ _(".space specifies non-absolute value"));
fragP->fr_symbol = 0;
if (growth < 0)
{
- as_warn (".space or .fill with negative value, ignored");
+ as_warn (_(".space or .fill with negative value, ignored"));
growth = 0;
}
}
}
break;
+ case rs_cfa:
+ growth = eh_frame_relax_frag (fragP);
+ break;
+
default:
BAD_CASE (fragP->fr_type);
break;
else
bad_sub_reloc:
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Negative of non-absolute symbol %s",
+ _("Negative of non-absolute symbol %s"),
S_GET_NAME (sub_symbolP));
}
else if (S_GET_SEGMENT (sub_symbolP) == add_symbol_segment
as the target of a call instruction. */
if (fixP->fx_tcbit)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "callj to difference of 2 symbols");
+ _("callj to difference of 2 symbols"));
#endif /* TC_I960 */
add_number += S_GET_VALUE (add_symbolP) -
S_GET_VALUE (sub_symbolP);
char buf[50];
sprint_value (buf, fragP->fr_address + where);
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Can't emit reloc {- %s-seg symbol \"%s\"} @ file address %s.",
+ _("Can't emit reloc symbol \"%s\" {%s segment} - symbol \"%s\" {%s segment} at file address %s."),
+ S_GET_NAME (add_symbolP),
+ segment_name (S_GET_SEGMENT (add_symbolP)),
+ S_GET_NAME (sub_symbolP),
segment_name (S_GET_SEGMENT (sub_symbolP)),
- S_GET_NAME (sub_symbolP), buf);
+ buf);
}
}
}
* relocation.
*/
as_bad_where (fixP->fx_file, fixP->fx_line,
- "can't use COBR format with external label");
+ _("can't use COBR format with external label"));
fixP->fx_addsy = NULL;
fixP->fx_done = 1;
continue;
if (!fixP->fx_bit_fixP && !fixP->fx_no_overflow && size > 0)
{
- if (size < sizeof (valueT))
+ if ((size_t) size < sizeof (valueT))
{
valueT mask, hibit;
else
sprintf (buf2, "%ld", (long) add_number);
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Value of %s too large for field of %d bytes at %s",
+ _("Value of %s too large for field of %d bytes at %s"),
buf2, size, buf);
} /* generic error checking */
}
&& size == 2
&& add_number > 0x7fff)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Signed .word overflow; switch may be too large; %ld at 0x%lx",
+ _("Signed .word overflow; switch may be too large; %ld at 0x%lx"),
(long) add_number,
(unsigned long) (fragP->fr_address + where));
#endif
valueT val;
int n;
{
- if (n > sizeof (val)|| n <= 0)
+ if ((size_t) n > sizeof (val) || n <= 0)
abort ();
while (n--)
{
valueT val;
int n;
{
- if (n > sizeof (val) || n <= 0)
+ if ((size_t) n > sizeof (val) || n <= 0)
abort ();
while (n--)
{
fprintf (stderr, ">");
}
fprintf (stderr, "\n");
+#ifdef TC_FIX_DATA_PRINT
+ TC_FIX_DATA_PRINT (stderr, fixp);
+#endif
}
/* end of write.c */