qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.
Date: Fri, 13 Feb 2015 04:56:18 +0000

On 13 February 2015 at 04:43, Chen Gang S <address@hidden> wrote:
> Originally, I have tried to remove TARGET_NR_open and others, they can
> not pass building, and I also noticed about NR_openat. But at last, I
> still remain TARGET_NR_open and others (with related comments):
>
>  - Another platforms (e.g. microblaze, arm64) defined them, too.
>
>  - It is only for linux-user, can bypass Linux tile kernel. So it is
>    still correct.

The question is, does the Linux kernel for this architecture implement
a particular syscall (eg NR_open)? (That is, is there a syscall number
defined, and if you try to execute a syscall with this syscall number,
does it work, or does it fail?) If it does implement it, then you need to
#define TARGET_NR_open appropriately. If not, then don't define that.
If QEMU doesn't build as a result, this probably means our linux-user
code doesn't expect a target architecture with no implementation of
that syscall. In that case you should fix the linux-user code (eg
by adding ifdefs).

>  - It really wastes memory and storage a little, but for me, the related
>    maintainers (not me) need to consider about whether let the code more
>    complex or save memory a little.

Neither code complexity nor memory use are important here. It is an
issue of correctness.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]