From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41920 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PD0QU-0007ON-Cf for qemu-devel@nongnu.org; Mon, 01 Nov 2010 15:52:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PD0IQ-0006qe-8r for qemu-devel@nongnu.org; Mon, 01 Nov 2010 15:43:59 -0400 Received: from mail-fx0-f45.google.com ([209.85.161.45]:53941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PD0IQ-0006qU-2p for qemu-devel@nongnu.org; Mon, 01 Nov 2010 15:43:58 -0400 Received: by fxm4 with SMTP id 4so5482159fxm.4 for ; Mon, 01 Nov 2010 12:43:57 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4CCF187A.1060105@redhat.com> Date: Mon, 01 Nov 2010 20:43:54 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1288623713-28062-1-git-send-email-agraf@suse.de> <1288623713-28062-3-git-send-email-agraf@suse.de> <4CCF09C1.7050006@redhat.com> <7017E7AA-5488-45CD-AD25-416891E2A311@suse.de> In-Reply-To: <7017E7AA-5488-45CD-AD25-416891E2A311@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 02/40] elf: Add notes implementation List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-devel Developers , Gerd Hoffmann On 11/01/2010 07:52 PM, Alexander Graf wrote: >>> @@ -237,6 +242,8 @@ static uint64_t elf_default_translate(void *opaque, uint64_t addr) >>> ElfHandlers elf_default_handlers = { >>> .translate_fn = elf_default_translate, >>> .translate_opaque = NULL, >>> + .note_fn = elf_default_note, >>> + .note_opaque = NULL, >> >> Don't you have to add the definition to every user of translate_fn? >> >> Maybe it's better to guard calls through the pointers with an if. > > All users either pass NULL as translate (which means they default to > elf_default_translate) or initialize their structure with the values in > elf_default_translate :) But do the MIPS users initialize note_fn? Paolo