3 ms·
Assuming you're not being sarcastic: they already are, the purpose of libbfd[1] was exactly that. After all, they already support A.OUT, ELF, COFF, PECOFF, Linu
by AceJohnny2 10y ago
Assuming you're not being sarcastic: they already are, the purpose of libbfd[1] was exactly that. After all, they already support A.OUT, ELF, COFF, PECOFF, Linux on various HW targets, Windows...
...but not Mach-O, Apple's format.
[1] https://en.wikipedia.org/wiki/Binary_File_Descriptor_library https://en.wikipedia.org/wiki/Binary_File_Descriptor_library
https://sourceware.org/binutils/binutils-porting-guide.txt https://sourceware.org/binutils/binutils-porting-guide.txt
https://sourceware.org/binutils/docs-2.27/bfd/index.html https://sourceware.org/binutils/docs-2.27/bfd/index.html
- Ericson2314 10y agoI mean no longer pick a single target at compile time. It looks like one still needs to?
- AceJohnny2 10y agoWhat do you mean by "target" in this case? For me, "target" means the machine you're compiling for. In which case, there is no reason to want ld/other binutils tools to generate output for multiple targets at a time. And if you do need to build for multiple targets, you just run the binutils tools multiple times with the right options for each, because they're never identical.
- Ericson2314 10y agoI mean target in the sense of auto tools. LLVM for example is multi-target. LLVM binaries by default support every possible platform LLVM supoorts. Compiling per-target toolchains is an annoying chore, and binutils is the last holdover bugging me with this when I work with Rust.
- emaste 10y ago> And if you do need to build for multiple targets, you just run the binutils tools multiple times The question here is whether you can run the same tool (the same binary) for two different targets, or if you have to run a different version of e.g. ld built specifically for each target.