Date: Thu, 19 Sep 2019 21:26:18 +0300 From: info@...ile-stream.com To: Rich Felker <dalias@...c.org> CC: musl@...ts.openwall.com Subject: Re: [PATCH] mips: add single-instruction math functions >> 2) -mabs=2008 application will work correctly with -mabs=legacy musl >> on a -mabs=2008 system. R> Are you sure? This seems to disagree with what you're saying below Yes, assuming they all were built with the same -mnan= option. The -mabs=2008 option has no ABI tag, it is just a compiler flag that controls how many instructions are used for |x| and -x. I think there is some optimisation flag in gcc that does exactly the same without declaring __mips_abs2008. Only -mnan=xxx consistency is enforced by the kernel basing on the corresponding bits in the ELF header and FCSR. But yes, IIUC kernel assumes nan2008 binary is abs2008 too though this has no deep (or whatever) meaning on cores with hard-wired feature bits in FCSR. R> musl supports multiple ecosystems in the same filesystem regardless of R> whether a cpu does; that's the whole point of supporting even multiple R> unrelated archs like mips and arm or x86 and riscv and why they all R> have differing ldso names. For example you can be running the foreign R> ISA via qemu-user with binfmt_misc or explicitly. OK. Though qemu-user has -L option for things like this. R> In that case, it seems like the kernel would refuse to load R> -mabs=legacy binaries on nan2008 hardware, gratuitously due to No, no. The kernel only knows -mnan=xxx status for binary. All this mess is because architecture spec defines these features as distinct, compilers have independent options for them (gcc even has --with-nan= in ./configure but no --with-abs=), kernel code is written like it can change FCSR bits etc. It reality these bits are always either both zero (non-existant on <= R3) or both set in hardware and only NAN2008 FCSR bit has reflection in the ELF header flags.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.