3 ms·
Perhaps I’m misunderstanding the problem here, but isn’t the solution here that a libc must carry multiple ABI-compatible functions and pick the right one based
by saagarjha 6y ago
Perhaps I’m misunderstanding the problem here, but isn’t the solution here that a libc must carry multiple ABI-compatible functions and pick the right one based on metadata in the binary? Is there anything specific here that applies only to intmax_t or is this just a general issue with ABIs?
- mulle_nat 6y agoThe solution is to recompile, which you have to do with such ABI changes, since the dawn of time.
- toast0 6y agoI would expect it will work a lot better if you have one libc library per ABI, and link in the matching one to the executable (and the same for all your other libraries). The only thing that may need to deal with multiple supported ABIs simultaneously is the kernel. But maybe kernels are using more explicit types? Personally, I don't like to write code with int/long/etc. I want to know how many bits are in the thing, because it usually doesn't make sense for the program to sometimes have one number of bits, and sometimes another (pointer/memory offsets excluded).
- loeg 6y ago> The only thing that may need to deal with multiple supported ABIs simultaneously is the kernel. But maybe kernels are using more explicit types? Right. Kernel ABIs use explicit-width types, and if an ABI change is needed, a new syscall is added. The old one continues to exist with the old ABI indefinitely.
- loeg 6y agoYeah, I think you can handle this with symbol versioning. Which is a sort of hand-coded linker magic for symbol mangling that the author complains about. But I don't buy that it's the major problem the author claims.