Received: from eggs.gnu.org ([2001:4830:134:3::10]:51242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCaUu-0001Vx-H0 for qemu-devel@nongnu.org; Mon, 13 Jun 2016 18:38:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCaUp-0005Lq-GT for qemu-devel@nongnu.org; Mon, 13 Jun 2016 18:38:19 -0400 Received: from mail-qk0-x232.google.com ([2607:f8b0:400d:c09::232]:34149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCaUp-0005Lb-Bm for qemu-devel@nongnu.org; Mon, 13 Jun 2016 18:38:15 -0400 Received: by mail-qk0-x232.google.com with SMTP id s186so78825657qkc.1 for ; Mon, 13 Jun 2016 15:38:15 -0700 (PDT) Sender: Richard Henderson References: <1465854326-19160-1-git-send-email-rth@twiddle.net> <1465854326-19160-5-git-send-email-rth@twiddle.net> <4b334fac-c413-aae8-cd06-2010ef512c69@twiddle.net> From: Richard Henderson Message-ID: <26f316ba-dc15-e759-db49-27174e468592@twiddle.net> Date: Mon, 13 Jun 2016 15:38:12 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/6] linux-user: Provide safe_syscall for aarch64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , Riku Voipio On 06/13/2016 03:28 PM, Peter Maydell wrote: > On 13 June 2016 at 23:21, Richard Henderson wrote: >> On 06/13/2016 03:04 PM, Peter Maydell wrote: >>>> >>>> + .global safe_syscall_base >>>> + .global safe_syscall_start >>>> + .global safe_syscall_end >>>> + .type safe_syscall_base, #function >>>> + .type safe_syscall_start, #function >>>> + .type safe_syscall_end, #function >>> >>> >>> _start and _end aren't function entry points, so is it OK >>> to mark them as functions? >> >> >> Yes. Indeed, if you don't, the objdump will think these are data symbols >> and fail to disassemble the instructions that follow. > > I was told this was an objdump bug... it certainly > seems like an objdump bug to me, because this works > on the other architectures. > https://bugs.linaro.org/show_bug.cgi?id=815 This may be a hold-over from arm32, which as you recall has a rather complicated scheme for annotating data vs instructions. >> I took glibc as definitive, since that's code that definitely works. > > If we never use the 7th syscall argument (and we can't, > since it doesn't exist on some hosts), then it's > unnecessary work, though I guess coming back to fix > all these host functions later might be tedious. You're probably right about the 7th syscall argument on a 64-bit host. > glibc's syscall() takes the system parameter as an int and > does a sign-extending move into x0 with an uxtw. > safe_syscall() takes a long, so it's already 64 bits. Well, uxtw is a zero-extending move. So... r~