From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAbUm-0001iU-6w for qemu-devel@nongnu.org; Mon, 23 Apr 2018 09:27:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAbUl-0001KW-Gh for qemu-devel@nongnu.org; Mon, 23 Apr 2018 09:27:04 -0400 Received: from mail-ot0-x243.google.com ([2607:f8b0:4003:c0f::243]:41148) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fAbUl-0001K8-Au for qemu-devel@nongnu.org; Mon, 23 Apr 2018 09:27:03 -0400 Received: by mail-ot0-x243.google.com with SMTP id m22-v6so17143490otf.8 for ; Mon, 23 Apr 2018 06:27:03 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20180423075215.4572-1-christophe.lyon@st.com> <20180423075215.4572-3-christophe.lyon@st.com> From: Peter Maydell Date: Mon, 23 Apr 2018 14:26:42 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [Qemu-devel] [ARM/FDPIC v2 2/4] linux-user: ARM-FDPIC: Identify ARM FDPIC binaries List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christophe Lyon Cc: QEMU Developers , Christophe Lyon , Riku Voipio , Laurent Vivier On 23 April 2018 at 13:53, Christophe Lyon wrote: > On 23/04/2018 14:17, Peter Maydell wrote: >> I have a strong dislike for per-target ifdef ladders. Can we instead >> put the target's implementation of elf_is_fdpic() into >> linux-user/$ARCH/target_elf.h >> and also have that header do >> #define TARGET_HAS_ELF_FDPIC >> >> and then in the generic code we can protect the default elf_is_fdpic() >> with #ifndef TARGET_HAS_ELF_FDPIC. >> > > How invasive could that be? > Your proposal is appealing, but target_elf.h is only included by > linux-user/main.c, which does not define elfhdr etc... > All that knowledge is in linux-user/elfload.c, which controls what > include/elf.h defines. Hmm, I see what you mean. We can't even put the function inside the existing per-target ifdef ladder, because that comes before the include of elf.h halfway down elfload.c. That's a bit of a mess, but it's a mess we shouldn't try to clean up as part of this patchset, so Reviewed-by: Peter Maydell thanks -- PMM