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

Anthony Pesch inolen at gmail.com
Thu Aug 21 10:18:36 PDT 2014


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: symvis.patch
Type: application/octet-stream
Size: 7681 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140821/f04ceebf/attachment.obj>


More information about the llvm-commits mailing list