Benefits of latest gas?

Stan Shebs shebs@apple.com
Wed Mar 24 14:37:00 GMT 2004


Ian Lance Taylor wrote:

>Stan Shebs <shebs@apple.com> writes:
>
>
>>As some of you may know, Mac OS X has long been using gas 1.38, pre-BFD
>>and all, as its system assembler, heavily hacked to do Mach-O and
>>support all of Apple's various extensions. Recently I had occasion
>>to look at the some of the barbaric expression code in our version,
>>and thinking "surely the latest code is much improved", went and looked
>>at the latest version, and it didn't really seem changed by that much,
>>which was disappointing. In fact, quite a bit of 1.38 seems the same as
>>current gas sources.
>>
>>Up to now I've been generally assuming that staying on the old gas was
>>a poor strategy, and that the massive effort that would be needed to get
>>Mach-O into latest gas would be an investment quickly repaid in better
>>quality, better error-checking, etc. But now I'm not so sure. We really
>>only have the one target (PPC), plus x86 for Darwin, so portability
>>arguments aren't that compelling, and the assembler is pretty much in
>>the noise compile-time-wise already.
>>
>>So what are the features of latest gas vs 1.38 that would make my
>>management whip out the checkbook for a merge/upgrade project?
>>
>
>I would say that the major new features are for people who program in
>assembler: macros, better conditionals, better error handling, more
>pseudo-ops.  For C/C++ code, I would say that as long as you stick
>with Mach-O, you aren't going to see much improvement by upgrading to
>the current assembler.  I don't even know whether the current
>assembler is faster--the pre-2.0 versions were pretty fast.
>
>Over time you might some savings as other people do work for
>you--adding support for new processor variants, fixing bugs, speeding
>up the assembler, etc.
>
>
Thanks, that's some good insight!

>But all in all I think you would be better off using that checkbook to
>pay your kernel hackers to add ELF support.  That would get you the
>current gas for free, and I think it would simplify your life quite a
>bit over the long run.
>
It's been suggested a few times. :-) Mach-O has had a lot of special
features added over the years - unusual kinds of directives and relocs,
multi-architecture files, etc, all of which OS X development depends
on. Getting the equivalent functionality into ELF would not be
impossible, but certainly quite expensive. The kernel work is very
nearly the easiest part of the project.

Stan



More information about the Binutils mailing list