[PATCH] D17854: add .alt_entry assembly directive for Mach-O

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 3 12:31:44 PST 2016


On 3 March 2016 at 15:20, Bob Wilson <bob.wilson at apple.com> wrote:
> bob.wilson added a comment.
>
> The object files have a new SF_AltEntry flag to distinguish symbols that do not start a new atom. ld64 has had support for that for a while now.

OK, so the idea is that the

.alt_entry foo

directive causes foo to have the SF_AltEntry flag which tells the
linker that foo doesn't define an atom.

Another possibility would be to close pr25381 as working as intended and have

foo = bar
and
foo = bar + 42

not start new atoms and produce SF_AltEntry (maybe dropping it for
offset 0 as an optimization).

This would have the advantage of not needing a new directive and
avoiding having to diagnose things like

foo:
.alt_entry foo


> You're right about the need for a test of the object files. I'll see if I can get something.

Thanks,
Rafael


More information about the llvm-commits mailing list