* PR27101, as: Reject (byte) .align 0x100000000
@ 2021-01-04 0:38 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2021-01-04 0:38 UTC (permalink / raw)
To: bintuils
This allows alignments up to 2**TC_ALIGN_LIMIT, which might be larger
than an unsigned int can hold.
PR 27101
* read.c (s_align): Use a large enough type for "align" to hold
the result of get_absolute_expression.
diff --git a/gas/read.c b/gas/read.c
index cf704b31ca..9d0ba27ea8 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -1548,7 +1548,7 @@ static void
s_align (signed int arg, int bytes_p)
{
unsigned int align_limit = TC_ALIGN_LIMIT;
- unsigned int align;
+ addressT align;
char *stop = NULL;
char stopc = 0;
offsetT fill = 0;
@@ -1595,7 +1595,7 @@ s_align (signed int arg, int bytes_p)
if (align > align_limit)
{
align = align_limit;
- as_warn (_("alignment too large: %u assumed"), align);
+ as_warn (_("alignment too large: %u assumed"), align_limit);
}
if (*input_line_pointer != ',')
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-04 7:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 0:38 PR27101, as: Reject (byte) .align 0x100000000 Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).