On 12 March 2014 12:14, Michel Fortin <[email protected]> wrote: > On 2014-03-12 09:26:56 +0000, Iain Buclaw <[email protected]> said: > >> On 12 March 2014 07:10, Jacob Carlborg <[email protected]> wrote: >>> >>> Yeah, since Objective-C uses the C calling convention it's mostly about >>> outputting symbols and data to the object files. >> >> >> In what ABI may I ask? Your choices are: >> - Traditional (32bit) ABI without properties and Obj-C 2.0 additions >> - Traditional (32bit) ABI with properties and Obj-C 2.0 additions >> - Modern (64bit) ABI > > > I made the 32-bit legacy runtime support, Jacob added the 64-bit modern > runtime support. > > There's no support at this time for properties declarations in the ABI, but > it doesn't really have much impact. As far as I'm aware, Objective-C 2.0 > additions only include property declarations and attributes in the ABI. > > > >> That can be mixed in with either: >> - GNU Runtime ABI >> - NeXT Runtime ABI > > > It's been tested with the Apple (NeXT) runtime only. In all honesty, I, and > probably most people out there, don't care about the GNU runtime. Although > probably the GCC guys do. Do you think it'd make it more difficult to merge > GCC in the GCC project if it had support for Apple's runtime and not for the > GNU one? >
gobjc supports both, there's two ABI's for the NeXT - which I take to mean the difference between the difference between 32bit and 64bit. It seems that (now I read up on it) the GNU runtime came about from decades back when NeXT was not open sourced by Apple. From what I can gather, a move towards the modern ABI is the direction, but not considered production ready. >From my POV, I wouldn't want to support the ABI of a language that GCC itself doesn't support. So code compiled by GNU ObjC should be compatible with extern(ObjC) code generated by GDC - even if it isn't compatible with Clang ObjC. But then, I'd be surprised if it wasn't compatible. > Also, is there a list of differences between the two runtimes somewhere? > That's hard to say at an initial glance. There's a handy hook system into each ABI to allow you to switch between versions easily. The common differences I do however see are: NeXT: NSConstantString objc_getClass objc_getMetaClass objc_msgSend objc_msgSendSuper GNU: NXConstantString objc_get_class objc_get_meta_class objc_msg_lookup objc_msg_lookup_super Some which greps for s(n)printf also show: NeXT: ".objc_class_name_%s" ".objc_category_name_%s_%s" GNU: "__objc_class_name_%s" "__objc_category_name_%s_%s" Most others look the same? Maybe you'll be able to find out more with this information.
