Re:Why are my Go executable files so large?
by saagarjha on Sunday December 29, 2019 @03:58PM
(#21908419)
Go has had to walk back on some of its choices recently; most notably on platforms without a stable syscall ABI and a very strong push for dynamic linking (…so macOS) they link against the system libraries.
[ Parent
| on HN ]
Re:Why are my Go executable files so large?
by naniwaduni on Sunday December 29, 2019 @04:56PM
(#21908824)
The only popular platform with a stable syscall ABI is Linux. This is a product of the historical accident that Linux doesn't control a libc and ensuing drama.
Almost everyone else doesn't have a stable ABI below the (C) linker level.
Re:Why are my Go executable files so large?
by zzzcpan on Sunday December 29, 2019 @05:35PM
(#21909077)
I don't think Linux actually guarantees syscall-level compatibility, so no need to single it out, it's just like everyone else.
Re:Why are my Go executable files so large?
by nneonneo on Sunday December 29, 2019 @05:59PM
(#21909225)
It does - the syscalls are part of the official userspace interface which the Linux kernel promises not to break. They can add new syscalls, options or flags, but can’t break existing ones.
Re:Why are my Go executable files so large?
by loeg on Sunday December 29, 2019 @10:14PM
(#21910515)
It very much does, explicitly, in a way that every other operating system does not.
Re:Why are my Go executable files so large?
by zzzcpan on Monday December 30, 2019 @07:49AM
(#21912984)
It's still not an explicit guarantee. Actually, Linux the kernel doesn't guarantee or promise anything, it's only distros that try, and those that do promise some compatibility, don't promise all that much. The best promise you can find is like a promise of ABI compatibility within a couple of future releases.
Re:Why are my Go executable files so large?
by loeg on Monday December 30, 2019 @08:08PM
(#21918181)
You are extremely wrong, so it's probably worth thinking for a moment about how you became so misinformed and why you feel so strongly that you're not misinformed.
https://www.kernel.org/doc/Documentation/ABI/README
Most interfaces (like syscalls) are expected to never change and always be available.
https://www.kernel.org/doc/Documentation/ABI/stable/syscalls This interface matches much of the POSIX interface and is based
on it and other Unix based interfaces. It will only be added to
over time, and not have things removed from it.
This is literally an explicit promise of the Linux kernel; distros have no influence over the Linux syscall ABI whatsoever.I think you're perhaps extremely confused about the difference between the userspace syscall -> kernel interface, and kernelspace API/ABI such as out-of-tree kernel modules might use. About the latter, yes, there are no API/ABI guarantees in vanilla Linux.
Re:Why are my Go executable files so large?
by zzzcpan on Monday December 30, 2019 @09:37PM
(#21918536)
Expecting something is not a promise, just an attitude they want to have towards it at the moment. I think you are also confusing who is even in a position to promise what. Kernel is not an OS people can use, but only something an OS (distro) itself can use and, given the license, in any way it wants. And so kernel cannot promise or force ABI compatibility or anything really on behalf of any OS that uses it. It's up to the OS, but OSes modify kernels, backport things, build with various ABIs and so on. Look for example at the mess around x32 ABI, some distros had it, some didn't, some had it and dropped it, some had and promised ABI compatibility for some time, but Linus wants to drop it from the kernel (don't know if he actually did it), so they are in a pickle. Read RedHat's application compatibility guide if you want an example on what the best a linux distro can promise wrt ABI compatibility.
Re:Why are my Go executable files so large?
by duskwuff on Sunday December 29, 2019 @05:46PM
(#21909139)
> platforms without a stable syscall ABI and a very strong push for dynamic linking (…so macOS)
That's an even better description of Windows. The macOS system call table isn't officially stable, but it's at least slow to change. The Windows equivalent has been known to change from service pack to service pack.