gas 2.34 on MacOS
Kevan Hashemi
hashemi@brandeis.edu
Wed May 6 15:12:54 GMT 2020
Dear Nick,
> I would think that 100 hours is much more likely than 1000 hours.
In that case, I will start reading. I have assembler and linker problems to surmount if I am to get a 64-bit version of my software working on MacOS. Understanding the assembler and linker, and being able to modify ther behavior, is my preferred path to success.
> Since there already is a port for the x86_64 architecture, all that
> you will need to do is tweak it so that its output is suitable for
> the MacOS format.
Indeed, that reduces the work by a factor of ten. Even better, there is a 64-bit GNU Assembler bundled with the MacOS Command Line Tools. Here's what it says about itself:
% as -v
Apple Inc version cctools-900, GNU assembler version 1.38
This assembler acts like a GNU Assembler: recognises .stabs directives, for example, and talks like a GNU Assembler. So I have been assuming it actuall is a GNU Assembler. Its source code would be of great utility. But I can't figure out where it came from. On Linux and MinGW, the assembler version number matches the binutils version number. Given that binutils 2.7 was released in 1996, however, I find it hard to believe that it comes from binutils 1.38. So, I have written to Apple to see if they will hand over the source files.
> Plus the assembler already supports generating 32-bit MacOS binaries,
> so there is that to follow as well.86)
Also a good starting point.
> There are a couple of files in the source repository that document
> *some* of the internals (gas/doc/internals.texi,
> bfd/doc/bfdint.texi)
Those look good. It would have taken me ages to find them on my own.
> https://sourceware.org/binutils/binutils-porting-guide.txt
Also looks most helpful. You are modest about the documentation, but it's looking pretty good to me.
Best, Kevan
--
Kevan Hashemi, Electrical Engineer
Physics Department, Brandeis University
http://www.bndhep.net
More information about the Binutils
mailing list