Support for other platforms/architectures? #21
Replies: 3 comments 2 replies
-
Hi @heavyrain266! I'd definitely like to expand support to other platforms and architectures. There's still known bugs and missing features with what's currently there, so that's where I'm mostly focusing at the moment. Adding support for ARM is likely to be considerably easier than adding support for Windows. I think all the CPU-specific code is in Windows support would be considerably more work, since it uses a whole different object format. It's something I'd like to do eventually though. There's lots of assumptions about elf in lots of places. So probably I'll need to define a trait, make various bits of code generic over that trait, then wherever there's elf-specific stuff, move it into an implementation of the trait. The interface that Wild exposes as a library is something that I'd expect to evolve once someone actually wants to use it as a library. At the moment, it's pretty much just the command-line interface, but as a library. If there's things I can change to make the code easier to read with a screen reader, I'd definitely like to try to do what I can. When you say missing new lines, do you mean that I should try to leave the occasional line blank so as to group bits of code more within functions? |
Beta Was this translation helpful? Give feedback.
-
Great that you'd like to help! Are you wanting to work on adding Windows support, or start with a few easier things first? If you'd like to discuss via a video call, feel free to book some time in my calendar. It's linked from my github profile. I'll try to make a little more use of vertical whitespace when I'm coding. I suspect the biggest things I could do to aid readability are to look for opportunities to extract out functions. Some functions have grown a little too large. Although it can sometimes be hard to extract out functions without either ending up with functions that take lots of arguments, or structs with lifetime parameters - but I'm sure there's more than can be done even without either of those. |
Beta Was this translation helpful? Give feedback.
-
Cool. It's worth noting that the linker hasn't been extensively tested on C++ codebases - I've mostly tested on Rust code. Rust code generally doesn't mess with the flags passed to the Rust compiler, however C++ projects often use very different flags. Those differences in flags can make a big difference to the linker. i.e. failures are more likely than not. |
Beta Was this translation helpful? Give feedback.
-
Hey, do you have any plans for Linux on ARM or Windows support? macOS in this case feels useless after Apple introduced "ld_prime" as fast threaded linker for their platforms. Always happy to help.
Happy to see that Wild comes as a library, Mold's author refused to expose it in such form! in particular, I'm interested in testing Wild on the build farm that works on Ampere Altra Max (aarc64) mainly used to build Android and games from friendly studios. And in the future also to link GPU firmware that runs on RISC-V co-processor but the architecture itself varies between implementations... (missing/modified/replaced or added instructions)
Unrelated, but noticed that the source code is rather hard to read and doesn't play well with screen readers (missing new lines etc).
Beta Was this translation helpful? Give feedback.
All reactions