build failure for ia64 (due to -Werror)
Andreas Schwab
schwab@suse.de
Sat Mar 19 01:56:00 GMT 2005
Alan Modra <amodra@bigpond.net.au> writes:
> This only hides other more serious bugs in this function if bfd_vma is
> 32-bit. For instance,
>
> case IA64_OPND_IMMU64:
> hit_addr -= (long) hit_addr & 0x3;
> t0 = bfd_getl64 (hit_addr);
> t1 = bfd_getl64 (hit_addr + 8);
Ok, this is broken too. I've reviewed all uses of bfd_vma and came up
with this patch. I think that should cover all those problems. Maybe we
should even dump ia64_insn and use bfd_uint64_t throughout instead?
Andreas.
2005-03-19 Andreas Schwab <schwab@suse.de>
* elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Change type of insn to
ia64_insn and type of dword to bfd_uint64_t.
(elfNN_ia64_install_value): Change type of t0, t1 and dword to
bfd_uint64_t.
(elfNN_ia64_unwind_entry_compare): Change type of av and bv to
bfd_uint64_t.
Index: bfd/elfxx-ia64.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-ia64.c,v
retrieving revision 1.150
diff -u -a -p -a -u -p -r1.150 bfd/elfxx-ia64.c
--- bfd/elfxx-ia64.c 18 Mar 2005 21:31:31 -0000 1.150
+++ bfd/elfxx-ia64.c 19 Mar 2005 00:14:10 -0000
@@ -1213,7 +1213,8 @@ elfNN_ia64_relax_ldxmov (contents, off)
bfd_vma off;
{
int shift, r1, r3;
- bfd_vma dword, insn;
+ ia64_insn insn;
+ bfd_uint64_t dword;
switch ((int)off & 0x3)
{
@@ -3119,7 +3120,7 @@ elfNN_ia64_install_value (hit_addr, v, r
{
const struct ia64_operand *op;
int bigendian = 0, shift = 0;
- bfd_vma t0, t1, dword;
+ bfd_uint64_t t0, t1, dword;
ia64_insn insn;
enum ia64_opnd opnd;
const char *err;
@@ -3652,7 +3653,7 @@ elfNN_ia64_unwind_entry_compare (a, b)
const PTR a;
const PTR b;
{
- bfd_vma av, bv;
+ bfd_uint64_t av, bv;
av = bfd_get_64 (elfNN_ia64_unwind_entry_compare_bfd, a);
bv = bfd_get_64 (elfNN_ia64_unwind_entry_compare_bfd, b);
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Binutils
mailing list