aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-06-24 11:10:47 +0000
committerNick Clifton <nickc@redhat.com>2003-06-24 11:10:47 +0000
commit685736be243a01effb89a6d3e81a3bc6b55fafa2 (patch)
tree4ca8154d36e997d7be84351d5ebd63a365eab792 /gas
parente98d298cda0b56de2678425854788bb88e7091c8 (diff)
downloadfsf-binutils-gdb-685736be243a01effb89a6d3e81a3bc6b55fafa2.zip
fsf-binutils-gdb-685736be243a01effb89a6d3e81a3bc6b55fafa2.tar.gz
fsf-binutils-gdb-685736be243a01effb89a6d3e81a3bc6b55fafa2.tar.bz2
Update .comm error messages to assume an unsigned value.
Update relaxing code to work in 64-bit address spaces.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog12
-rw-r--r--gas/Makefile.am1
-rw-r--r--gas/config/tc-mips.c2
-rw-r--r--gas/config/tc-sparc.c5
-rw-r--r--gas/config/tc-v850.c2
-rw-r--r--gas/read.c3
-rw-r--r--gas/write.c18
7 files changed, 28 insertions, 15 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ce9a6ab..0769843 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,15 @@
+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.
diff --git a/gas/Makefile.am b/gas/Makefile.am
index a723fa9..c29641d 100644
--- a/gas/Makefile.am
+++ b/gas/Makefile.am
@@ -609,7 +609,6 @@ e-criself.o: $(srcdir)/config/e-criself.c
xtensa-relax.o: $(srcdir)/config/xtensa-relax.c
$(COMPILE) -c $(srcdir)/config/xtensa-relax.c
-
# The m68k operand parser.
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 8b89be8..101afe7 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -3279,7 +3279,7 @@ macro_build_jalr (icnt, ep)
int icnt;
expressionS *ep;
{
- char *f = NULL;;
+ char *f = NULL;
if (HAVE_NEWABI)
{
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index 3156883..2278411 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -3764,7 +3764,7 @@ s_common (ignore)
char *name;
char c;
char *p;
- int temp, size;
+ offsetT temp, size;
symbolS *symbolP;
name = input_line_pointer;
@@ -3785,7 +3785,8 @@ s_common (ignore)
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;
}
diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c
index 81c12fd..5ee3c34 100644
--- a/gas/config/tc-v850.c
+++ b/gas/config/tc-v850.c
@@ -195,7 +195,7 @@ v850_offset (ignore)
{
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;
diff --git a/gas/read.c b/gas/read.c
index 061dfd4..4179348 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -1389,7 +1389,8 @@ s_comm (ignore)
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);
diff --git a/gas/write.c b/gas/write.c
index 3c6adf5..1419ab5 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -1135,7 +1135,7 @@ write_contents (abfd, sec, xxx)
PTR xxx ATTRIBUTE_UNUSED;
{
segment_info_type *seginfo = seg_info (sec);
- unsigned long offset = 0;
+ addressT offset = 0;
fragS *f;
/* Write out the frags. */
@@ -1148,9 +1148,9 @@ write_contents (abfd, sec, xxx)
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)
@@ -1310,7 +1310,7 @@ relax_and_size_all_segments ()
#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
@@ -2070,7 +2070,7 @@ relax_frag (segment, fragP, stretch)
const relax_typeS *start_type;
relax_substateT next_state;
relax_substateT this_state;
- long growth;
+ offsetT growth;
offsetT aim;
addressT target;
addressT address;
@@ -2293,7 +2293,7 @@ relax_segment (segment_frag_root, segment)
/* 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? */
@@ -2308,7 +2308,7 @@ relax_segment (segment_frag_root, segment)
for (fragP = segment_frag_root; fragP; fragP = fragP->fr_next)
{
- long growth = 0;
+ offsetT growth = 0;
addressT was_address;
offsetT offset;
symbolS *symbolP;
@@ -2443,7 +2443,7 @@ relax_segment (segment_frag_root, segment)
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. */
@@ -2502,7 +2502,7 @@ relax_segment (segment_frag_root, segment)
case rs_leb128:
{
valueT value;
- int size;
+ offsetT size;
value = resolve_symbol_value (fragP->fr_symbol);
size = sizeof_leb128 (value, fragP->fr_subtype);