[LLVMdev] [RFC] Alias should not point to declarations

Tim Northover
Wed, 30 Oct 2013 20:16:21 -0000

Hi Rafael,

> With all that in mind, the attached patch changes the verifier to
> reject aliases to declarations and updates that language reference.

MachO has an R_INDR (== "indirect") symbol flag/type that (from my
understanding) exactly reflects this. The linker is supposed to record
the alias and define both symbols when the referee is defined. In
fact, I've been working on exposing this to C code very recently so
I'd obviously quite like it to stick around.

Currently I've not submitted a patch because, even though it's
documented, ld64 doesn't have support just yet so I can't actually
test things properly.

I think the only benefit is going to be to compile-time and
source-structure, but it would still be a shame to lose it when LLVM
is so close to having the ideal model right now.

Cheers.

Tim.