Update relaxing code to work in 64-bit address spaces.
+2003-06-24 Nick Clifton <nickc@redhat.com>
+
+ * read.c (s_comm): Change error message to assume an unsigned size
+ has been passed to .comm.
+ * config/tc-sparc.c (s_common): Likewise.
+ * write.c (write_contents): Replace 'unsigned long' with
+ 'addressT' and 'long' with offsetT in order to allow computations
+ with very large values to work for 64-bit addressed targets.
+ (relax_and_size_all_segments): Likewise.
+ (relax_frag): Likewise.
+ (relax_segment): Likewise.
+
2003-06-23 Mark Mitchell <mark@codesourcery.com>
* config/tc-ppc.c (ppc_cleanup): Use bytes to count APUinfo slots.
xtensa-relax.o: $(srcdir)/config/xtensa-relax.c
$(COMPILE) -c $(srcdir)/config/xtensa-relax.c
-
# The m68k operand parser.
int icnt;
expressionS *ep;
{
- char *f = NULL;;
+ char *f = NULL;
if (HAVE_NEWABI)
{
char *name;
char c;
char *p;
- int temp, size;
+ offsetT temp, size;
symbolS *symbolP;
name = input_line_pointer;
if ((temp = get_absolute_expression ()) < 0)
{
- as_bad (_(".COMMon length (%d.) <0! Ignored."), temp);
+ as_bad (_(".COMMon length (%lu) out of range ignored"),
+ (unsigned long) temp);
ignore_rest_of_line ();
return;
}
{
char *pfrag;
int temp = get_absolute_expression ();
-
+
pfrag = frag_var (rs_org, 1, 1, (relax_substateT)0, (symbolS *)0,
(offsetT) temp, (char *) 0);
*pfrag = 0;
if ((temp = get_absolute_expression ()) < 0)
{
- as_warn (_(".COMMon length (%ld) < 0 ignored"), (long) temp);
+ as_warn (_(".COMMon length (%lu) out of range ignored"),
+ (unsigned long) temp);
ignore_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
PTR xxx ATTRIBUTE_UNUSED;
{
segment_info_type *seginfo = seg_info (sec);
- unsigned long offset = 0;
+ addressT offset = 0;
fragS *f;
/* Write out the frags. */
f = f->fr_next)
{
int x;
- unsigned long fill_size;
+ addressT fill_size;
char *fill_literal;
- long count;
+ offsetT count;
assert (f->fr_type == rs_fill);
if (f->fr_fix)
#ifdef OBJ_BOUT
/* See above comments on b.out data section address. */
{
- long bss_vma;
+ addressT bss_vma;
if (data_last_frag == 0)
bss_vma = H_GET_TEXT_SIZE (&headers);
else
const relax_typeS *start_type;
relax_substateT next_state;
relax_substateT this_state;
- long growth;
+ offsetT growth;
offsetT aim;
addressT target;
addressT address;
/* Do relax(). */
{
- long stretch; /* May be any size, 0 or negative. */
+ offsetT stretch; /* May be any size, 0 or negative. */
/* Cumulative number of addresses we have relaxed this pass.
We may have relaxed more than one address. */
int stretched; /* Have we stretched on this pass? */
for (fragP = segment_frag_root; fragP; fragP = fragP->fr_next)
{
- long growth = 0;
+ offsetT growth = 0;
addressT was_address;
offsetT offset;
symbolS *symbolP;
cannot have fewer than 0 chars. That is, we can't
.org backwards. */
as_bad_where (fragP->fr_file, fragP->fr_line,
- _("attempt to .org backwards"));
+ _("attempt to move .org backwards"));
/* We've issued an error message. Change the
frag to avoid cascading errors. */
case rs_leb128:
{
valueT value;
- int size;
+ offsetT size;
value = resolve_symbol_value (fragP->fr_symbol);
size = sizeof_leb128 (value, fragP->fr_subtype);