gas 2.34 on MacOS
Matt Rice
ratmice@gmail.com
Wed May 6 16:00:05 GMT 2020
On Wed, May 6, 2020 at 3:24 PM Kevan Hashemi <hashemi@brandeis.edu> wrote:
>
> 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.
>
While the source files are here:
https://opensource.apple.com/source/cctools/
https://opensource.apple.com/source/cctools/cctools-949.0.1/as/cctools.plist.auto.html
Does in fact have a link to
<string>http://ftp.gnu.org/gnu/binutils/binutils-1.38.1.tar.gz</string>
given that these were forked so long ago, apples own changes seem to
be released under the following rather than the GPL.
https://opensource.apple.com/source/cctools/cctools-949.0.1/APPLE_LICENSE.auto.html
afaik I don't really recall apple ever proposing to upstream any of
it/triggering any kind of copyright assignment,
What i'm getting I guess, is it seems unlikely these sources are going
to help in any way with regards to getting this architecture support
upstreamed to FSF binutils.
> > 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