From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6945 invoked by alias); 19 Mar 2005 00:18:38 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 5770 invoked from network); 19 Mar 2005 00:17:55 -0000 Received: from unknown (HELO Cantor.suse.de) (195.135.220.2) by sourceware.org with SMTP; 19 Mar 2005 00:17:55 -0000 Received: from hermes.suse.de (hermes-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 2F23615EF459; Sat, 19 Mar 2005 01:17:54 +0100 (CET) To: James E Wilson Cc: Nick Clifton , Ben Elliston , binutils@sources.redhat.com Subject: Re: build failure for ia64 (due to -Werror) References: <423A2ADB.6090807@au.ibm.com> <423ABA6A.4030409@redhat.com> <20050318122113.GY21148@bubble.modra.org> <1111177693.9897.18.camel@aretha.corp.specifixinc.com> <20050318234920.GE21148@bubble.modra.org> From: Andreas Schwab X-Yow: This is PLEASANT! Date: Sat, 19 Mar 2005 01:56:00 -0000 In-Reply-To: <20050318234920.GE21148@bubble.modra.org> (Alan Modra's message of "Sat, 19 Mar 2005 10:19:20 +1030") Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2005-03/txt/msg00563.txt.bz2 Alan Modra 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 * 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."