[PATCH] MCJIT honor symbol visibility settings when populating the global symbol table

Lang Hames lhames at gmail.com
Fri Aug 22 13:15:29 PDT 2014


The RuntimeDyld side of this looks good to me.

Rafael - I'd appreciate your take on the ELF changes. If the "st_other"
field in Elf_Sym_Base is going to be used solely for visibility (as it
seems in this patch), should it be renamed to "st_visibility" ?

Cheers,
Lang.


On Thu, Aug 21, 2014 at 10:18 AM, Anthony Pesch <inolen at gmail.com> wrote:

> I ran into the situation where I was loading multiple modules into the
> same MCJIT instance, and needed it to honor symbol visibility settings
> when populating the global symbol table.
>
> I went the route of adding a new SymbolRef::SF_Exported flag, which
> controls if a symbol is added to RuntimeDyld's internal
> GlobalSymbolTable. I believe I've set this flag correctly for ELF
> objects, but MachO was quite confusing to dig through. After doing a
> quite a few test compiles and scanning through Apple's MachO reference
> doc, it seems if N_PEXT is not set, the symbol is visible, but I'm not
> entirely confident in that.
>
>  - Anthony
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140822/5639df47/attachment.html>


More information about the llvm-commits mailing list