-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft: Preview of WIP in refactoring ABI functions and related ELF/Mach-O changes. #2350
Conversation
…g_macho Remove libmachista in favour of own binfmt_macho. Promote pkg_elf to all platforms and fix libelf building on Darwin. Remove inactive branches in automake files. NB: this temporarily disables Mach-O functionality in pkg.
So far only ABI detection.
in order to be able to work without you on this (in particular adding the regression tests, I will create a dedicated branch and already merge this into that dedicated branch |
Hi Baptiste, sounds great. My thinking for Fat libraries, which is a wonderful concept and very nicely managed in Mach-O (btw. there was FatELF earlier under Linux), goes like this: While bootstrapping the configuration with ABI_FILE, allow to use a descriptor like ABI_FILE=/bin/sh#amd64 and use that descriptor for selecting the right entry. In all cases proper debug1 messaging should ensure that any error condition becomes easily trace-able. This feels like a natural extension to ABI_FILE to me. |
Thinking about the Linux 3.2.0 case, in fact this is a good choice for ABI, as that seems to be the last time Linux changed its ABI. I would prefer 3.2, though. |
beside some corner cases which I haven't decided yet what to do about (old arm FreeBSD arm binaries) pkg should deal with os specificity dynamically, I have switch the linux ABI to be 3.2. Is there any part in particular where you need me to add some regression tests ASAP? |
I have added more tests for macho including macosfat binary (the ABI probably needs some work there :D ) |
Well, the unit under test here is Expectations on flags, shlibs_provided, shlibs_required, self-reference (provided==depends), annotation no_provide_shlib, interaction with ALLOW_BASE_SHLIBS. I know this is quite complex and a lot of combinations are possible, moreover the tests are likely OS dependent. Best would be to start agreeing on how to deal with binary input to the test cases in the first place. If building them is done as a subproject, there is full control on how they can be tuned to support the test cases above. GitHub/Sourcehut CI can build them on the major platforms and we can reference them as a sub-module to the tests. |
right I will work on adding those tests, I think we can continue like with the .bin adding minimalistic libraries to the test suite is enough, I don't think it is worth building them and trying to setup some cross building. I think we can merge the abi_refactoring branch, as it is stable for me right now, what do you think? |
I just ran through your changes in the branch. Impressive. I honestly would not merge until I have confirmation that shlibs (on ELF) works the same on before/after (even if only with FreeBSD), but I might be too conservative here. Obviously it would make the workflow smooth if you just merge and I continue with my small changes. Technically I would then just close/abandon this pull request, right? |
A first naive test has been added, library tests are faster to run than frontend test, so I ended up using them ;) |
Just a small note |
this has been merged! thank you! |
This is a preview of what hopefully may come soon: Making ELF and Mach-O co-exist with identical feature level across all platforms.
As this is not a trivial change, I am posting here partial results for initial feedback.
As detailed in the separate commits, I am:
Currently unsolved issues:
Work continues:
Feedback welcome. Unit tests welcome.