[llvm] r263521 - [MachO] Add MachO alt-entry directive support.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 22 11:25:20 PDT 2016

> Where would we handle that under your proposal? As far as I know MC doesn't
> have a robust symbolic arithmetic expression evaluator.

It does. It has to have one. Without one it would be unable to know
what value to write in the symbol table.

> What happens if the
> user types
> foo:
>         nop
> bar = . + expr_that_evals_to_foo_minus_bar.
> ?

Not sure what you mean. You have "bar = expression with bar in it"
which I hope is an error.

> This is no worse than the bug you pointed out, but no better either. The
> real fix for this is to teach ld64 to allow the alt_entry bit on direct
> aliases, then just set it for all alias expressions. I have an internal bug
> filed for that.

If ld64 cannot handle it than doing this in MC is even more important.
It should be able to get all cases right since it is the one computing
the values of foo and bar it should be able to decide if foo == bar.
Another advantage is that there are no changes to CodeGen and with
that we know that we do the right thing for user written assembly.


More information about the llvm-commits mailing list