Re: [PATCH v2] Cygwin: autoload: Add AArch64 implementation
Jon Turney <[email protected]> Sat, 13 Jun 2026 18:53:10 +0100
| Newsgroups | gmane.os.cygwin.patches |
|---|---|
| Message-ID | <[email protected]> |
On 04/06/2026 08:35, Chandru Kumaresan wrote: > Hi Evgeny, > >> LoadDLLprime contains only data. It might make sense to keep only >> one version for x86_64 and aarch64, and use WORD64 for .quad/.xword. > > In v2, we introduced a WORD64 macro: > > #if defined(__x86_64__) > # define WORD64 ".quad" > #elif defined(__aarch64__) > # define WORD64 ".xword" > #else > # error unimplemented for this target > #endif > > And unified LoadDLLprime into a single shared definition using WORD64, > removing the duplicate x86_64/aarch64 versions. > Also added inline comments throughout AArch64 assembly blocks > documenting execution flow. > > Please let me know if anything needs further clarification. Thanks very much! (and thanks for adding copious comments on the assembly! that really helps!) I've applied this patch. I did a little burnishing to update the introductory comments (dropping the obsolete 32-bit sizings for the fields), but this is all sufficiently convoluted I'm not 100% sure I've got it all right! :) I have to say, I'm not 100% convinced that the "elide the call to LoadLibrary() for subsequent symbols in the same DLL" functionality alluded to in the comment is actually there, but perhaps I need to do a bit more staring at the code... Just so I'm doing my due diligence, I'd like you confirm that you are submitting this under an open source license as per [1], and you and your colleagues at multicoreware are authorized to do so. [1] https://cygwin.com/contrib/dll.html Some notes on possible future work I made in the course of my review, saved here: * Looking at the git history, the comment on the problem the no_resolve_on_fork flag is working around has disappeared, but the functionality is still there. Is it still needed? * Since it's just data, it seems to me that the initializations of the various instances of struct dll_info could actually all be written in C.