[PATCH] MachO: support N_INDR aliases in the assembler
Tim Northover
t.p.northover at gmail.com
Fri May 23 11:21:00 PDT 2014
Hi Nick,
Thanks for taking a look.
On 23 May 2014 18:43, kledzik at apple.com <kledzik at apple.com> wrote:
> What is the visibility of alias symbols? An earlier patch had them global by default,
> which is unlike other symbols in assembler which are non-extern by default.
It should be local by default now. That's one of the things I fixed today.
> The test case relies on the order of the symbols (or relies on llvm-nm sorting
> them a certain way). Is there a defined order to where the N_INDR symbols are
> in the symbol table? The range of global symbols are sorted alphabetically.
N_INDR symbols aren't split into a separate group. The generic order
seems to be: local (alphabetically); external (alphabetically);
undefined (alphabetically). As far as I can tell
(MachObjectWriter.cpp:520) this is purely to make diffing "as" output
easier, which doesn't apply here because "as" doesn't seem to support
N_INDR.
> Since no public linker supports this yet, we need to make sure that the C side is not enabled and hope no assembly files rely on the old behavior.
For the C side, I believe there's already a Darwin check in Clang,
which disables "__attribute__((alias(...)))".
Cheers.
Tim.
More information about the llvm-commits
mailing list