From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KlUEj-0005FG-SE for qemu-devel@nongnu.org; Thu, 02 Oct 2008 15:53:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KlUEj-0005Eb-5g for qemu-devel@nongnu.org; Thu, 02 Oct 2008 15:53:21 -0400 Received: from [199.232.76.173] (port=60266 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlUEi-0005EU-RZ for qemu-devel@nongnu.org; Thu, 02 Oct 2008 15:53:20 -0400 Received: from rn-out-0910.google.com ([64.233.170.191]:64937) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KlUEi-0000hT-4n for qemu-devel@nongnu.org; Thu, 02 Oct 2008 15:53:20 -0400 Received: by rn-out-0910.google.com with SMTP id m61so913525rnd.8 for ; Thu, 02 Oct 2008 12:53:19 -0700 (PDT) Message-ID: Date: Thu, 2 Oct 2008 22:53:18 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH] Fix symbol lookup for mips64* targets In-Reply-To: <48E52067.6080408@mail.berlios.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48E52067.6080408@mail.berlios.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 10/2/08, Stefan Weil wrote: > For 64 bit targets, lookup_symbol() compares a 64-bit target address > with a 32 bit symbol address. This only works for addresses less than 2^32. > > MIPS64 kernels use addresses larger than 0xffffffff80000000, > so qemu.log never shows symbolic names. > > My patch is a workaround which works with Qemu's 32 bit address hack. > Please apply it to Qemu trunk. This applies to all architectures, not just MIPS64, so it need not be conditional to TARGET_MIPS64. > Maybe a better solution would use symbol addresses without shortening > them to 32 bits. Yes. That would mean using elf_sym instead of Elf32_sym in places where symbols are used and removing the SZ==64 hacks in elf_ops.h.