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.
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
xtensa-relax.o: $(srcdir)/config/xtensa-relax.c
$(COMPILE) -c $(srcdir)/config/xtensa-relax.c
# The m68k operand parser.
# The m68k operand parser.
int icnt;
expressionS *ep;
{
int icnt;
expressionS *ep;
{
char *name;
char c;
char *p;
char *name;
char c;
char *p;
symbolS *symbolP;
name = input_line_pointer;
symbolS *symbolP;
name = input_line_pointer;
if ((temp = get_absolute_expression ()) < 0)
{
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;
}
ignore_rest_of_line ();
return;
}
{
char *pfrag;
int temp = get_absolute_expression ();
{
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;
pfrag = frag_var (rs_org, 1, 1, (relax_substateT)0, (symbolS *)0,
(offsetT) temp, (char *) 0);
*pfrag = 0;
if ((temp = get_absolute_expression ()) < 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);
ignore_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
PTR xxx ATTRIBUTE_UNUSED;
{
segment_info_type *seginfo = seg_info (sec);
PTR xxx ATTRIBUTE_UNUSED;
{
segment_info_type *seginfo = seg_info (sec);
- unsigned long offset = 0;
fragS *f;
/* Write out the frags. */
fragS *f;
/* Write out the frags. */
- unsigned long fill_size;
assert (f->fr_type == rs_fill);
if (f->fr_fix)
assert (f->fr_type == rs_fill);
if (f->fr_fix)
#ifdef OBJ_BOUT
/* See above comments on b.out data section address. */
{
#ifdef OBJ_BOUT
/* See above comments on b.out data section address. */
{
if (data_last_frag == 0)
bss_vma = H_GET_TEXT_SIZE (&headers);
else
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;
const relax_typeS *start_type;
relax_substateT next_state;
relax_substateT this_state;
offsetT aim;
addressT target;
addressT address;
offsetT aim;
addressT target;
addressT address;
- 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? */
/* 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)
{
for (fragP = segment_frag_root; fragP; fragP = fragP->fr_next)
{
addressT was_address;
offsetT offset;
symbolS *symbolP;
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,
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. */
/* We've issued an error message. Change the
frag to avoid cascading errors. */
case rs_leb128:
{
valueT value;
case rs_leb128:
{
valueT value;
value = resolve_symbol_value (fragP->fr_symbol);
size = sizeof_leb128 (value, fragP->fr_subtype);
value = resolve_symbol_value (fragP->fr_symbol);
size = sizeof_leb128 (value, fragP->fr_subtype);