* ubsan: obj-macho.c:503 left shift cannot be represented
@ 2020-09-02 8:42 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2020-09-02 8:42 UTC (permalink / raw)
To: binutils
* config/obj-macho.c (obj_mach_o_zerofill): Correct type of
constant shifted left.
diff --git a/gas/config/obj-macho.c b/gas/config/obj-macho.c
index 4b54a667a0..c3ce9993b3 100644
--- a/gas/config/obj-macho.c
+++ b/gas/config/obj-macho.c
@@ -500,7 +500,7 @@ obj_mach_o_zerofill (int ignore ATTRIBUTE_UNUSED)
}
size = exp.X_add_number;
- size &= ((offsetT) 2 << (stdoutput->arch_info->bits_per_address - 1)) - 1;
+ size &= ((valueT) 2 << (stdoutput->arch_info->bits_per_address - 1)) - 1;
if (exp.X_add_number != size || !exp.X_unsigned)
{
as_warn (_("size (%ld) out of range, ignored"),
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-02 8:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02 8:42 ubsan: obj-macho.c:503 left shift cannot be represented 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).