Conversation
|
I don't think it will fix #5882, as it's a header problem, not a glibc-stub problem. Testing an example from #9485 with https://github.com/ziglang/zig/tree/glibc-stubs: |
|
I confirmed what @motiejus said by verifying that issue #9485 still reproduces with this branch. It appears that in order to really fix this issue, Zig would need a way to version the glibc headers as well (not just the libraries we link to). Maybe a new project is in order to solve this? I think it may be fairly ambitious to do this in an efficient way (i.e. not including an instance of the glibc headers for every version) but maybe we could start there and make incremental improvements? Maybe compression would be a good start to see how feasible it would be? P.S. Actually "git" already has a good mechanism for this. If we thought of the glibc headers as a repo, and we only stored the "diff" between each version that might be a good solution. The zig compiler could use the initial version and the "diff database" to instantiate any version of the glibc headers as needed. |
|
I verified #7667 is fixed, thanks to this repro: #7667 (comment) Not sure how to repro #8714 but it does look to be fixed. Zig now emits accurate glibc .so files that contain #8896 is definitely fixed; I can see in the output of Thanks for letting me know about #5882 and #9485. Those will have to be addressed with yet another creative piece of engineering, separate from this PR. |
This commit upgrades glibc shared library stub-creating code to use the new abilists file which is generated by the new glibc-abi-tool project: https://github.com/ziglang/glibc-abi-tool/ The abilists file is different in these ways: * It additionally encodes whether a symbol is a function or an object, and if it is an object, it additionally encodes the size in bytes. * It additionally encodes migrations of symbols from one library to another between glibc versions. * It is binary data instead of ascii. * It is one file instead of three. * It is 165 KB instead of 200 KB. This solves three bugs: Fixes #7667 Fixes #8714 Fixes #8896
0d7331b to
87aaabe
Compare
This commit upgrades glibc shared library stub-creating code to use the
new abilists file which is generated by the new glibc-abi-tool project:
https://github.com/ziglang/glibc-abi-tool/
The abilists file is different in these ways:
and if it is an object, it additionally encodes the size in bytes.
another between glibc versions.
This solves a handful of bugs.
Fixes #7667
Fixes #8714
Fixes #8896
cc @LemonBoy
I have not yet verified that all these issues are fixed; I will do that before merging the PR.