Hi Honza,

On 23 Jun 2014, at 18:36, Jan Hubicka wrote:

>> The tests gcc.dg/globalalias-2.c and gcc.dg/localalias-2.c fail on darwin 
>> with
>> 
>> /opt/gcc/work/gcc/testsuite/gcc.dg/globalalias-2.c:20:2: warning: alias 
>> definitions not supported in Mach-O; ignored
>> 
>> I think they should be protected by
>> 
>> /* { dg-require-alias "" } */
> 
> I see, the anoying property of dg.exp where we compile the additional sources 
> separately, too.  Will fix that.
> Is it really the case that Mach-O have no way of creating alias, even by 
> putting alternative symbol into the
> source as we intend to do for AIX?

The status is this: 

There is a symbol flag in Mach-O (N_INDR) that would permit marking one symbol 
as an alias of another.

At present, this is ignored by ld64 (and not emitted by cctools-as)
[although, ironically, it used to be acted on in the ancient ld_classic of 
~2004 vintage]

Fortunately, it seems that the darwin/OSX community within llvm is interested 
in having support for this functionality which is Good News, since without ld64 
suppport, it would make maintaining it for future systems very difficult.

The statement is "it's on the TODO, but not a high priority".

----

For any darwin < 13 (or maybe even 14) it would mean that we would have to roll 
our own implementation.

Actually, I am quite close to having both GAS ports and a more generally 
buildable ld64 version - so rolling our own is really a possibility.  

However, as I'm sure you know, Darwin stuff on GCC/GAS is on a volunteer basis, 
so it's difficult to say in which decade the support might appear ;)

cheers
Iain

Reply via email to