graphic: 0.899 architecture: 0.897 assembly: 0.874 mistranslation: 0.846 x86: 0.790 kernel: 0.682 device: 0.653 performance: 0.595 peripherals: 0.484 files: 0.458 PID: 0.418 debug: 0.412 network: 0.412 semantic: 0.396 socket: 0.342 ppc: 0.330 vnc: 0.291 permissions: 0.279 hypervisor: 0.278 user-level: 0.245 virtual: 0.218 register: 0.197 boot: 0.197 arm: 0.195 risc-v: 0.154 VMM: 0.148 TCG: 0.120 KVM: 0.091 i386: 0.031 x86_64 Auxillary vector reports platform as i686 which doesn't match the linux kernel Description of problem: Based on the kernel source in the auxiliary vector AT_PLATFORM should be `x86_64` (confirmed by running outside qemu). However qemu sets it to `i686`. This was originally reported with docker-for-mac, but was reduced on `x86_64` which is why it is pointless Steps to reproduce: 1. Compile the following for x86_64 (statically if you don't want have an x86_64 dynamic linker) (code originally from https://stackoverflow.com/questions/26520163/accessing-auxiliary-vectors-c) ``` #include #include int main(int argc, char** argv, char* envp[]) { Elf64_auxv_t *auxv; while(*envp++ != NULL); /*from stack diagram above: *envp = NULL marks end of envp*/ int i = 0 ; for (auxv = (Elf64_auxv_t *)envp; auxv->a_type != AT_NULL; auxv++) /* auxv->a_type = AT_NULL marks the end of auxv */ { if( auxv->a_type == AT_PLATFORM) printf("AT_PLATFORM is: %s\n", ((char*)auxv->a_un.a_val)); } } ``` 2. Run with `qemu-x86_64-static` 3. See `AT_PLATFORM is: i686` 4. Compare to "real" x86_64 bit system which gives `AT_PLATFORM is: x86_64` Additional information: I think that adding `#define ELF_PLATFORM "x86_64"` [here](https://gitlab.com/qemu-project/qemu/-/blob/master/linux-user/elfload.c#L134) should work (but I don't fully understand the code). Otherwise we just end up getting the 32-bit case.