[PATCH] [lld] [mach-o]: Initial support for reading dylibs during link.
Tim Northover
t.p.northover at gmail.com
Thu Jun 26 12:35:37 PDT 2014
Hi Nick,
On 26 June 2014 20:20, Nick Kledzik <kledzik at apple.com> wrote:
> I’m not sure where you are seeing N_PEXT symbols in a dylib that
> are linkable. Here is an example to show they are not:
Ah, I'm seeing "non-external (was private-external)" on mine, from:
$ cat tmp.c
__private_extern__ int var = 42;
$ clang -fPIC -shared tmp.c -o tmp.dylib
$ nm -nm tmp.dylib
0000000000001000 (__DATA,__data) non-external (was a private external) _var
The symbol seems to be N_PEXT (but not N_EXT) with type N_SECT. The
absence of N_EXT certainly explains why it's not linkable (by the
looks of it your libfoo.dylib had the same combination), but the
question of what to do with a symbol that's both N_EXT and N_PEXT
remains (assuming that's a valid combination in a .dylib).
Cheers.
Tim.
More information about the llvm-commits
mailing list