ORC JIT Update / Office Hours – November 2022

Hi All,

This is doubling as the October and November update. There were no office hours held in October.

Office hours for November will be held on the Monday the 14th from 8-9am PST. I’ll post a zoom link below shortly.

JIT Updates since September:

LLVM Developer’s Meeting 2022 JIT Talks

Both Anubhab Ghosh and Sunho Kim will present their GSoC work at the LLVM Developer’s Meeting this year. Anubhab will speak about the new slab-based, shared-memory-backed memory manager that he developed. Sunho will present his work on Windows JITLink and runtime support, and show how to use ORC on Windows with examples.

More ELF/i386 support

Kshitij Jain’s recent commit added support for several new relocations to the ELF/i386 backend. It’s exciting to see progress on JITLink’s first 32-bit backend!

Groundwork for Cross-JITDylib Weak Symbol Support

Some recent commits have improved the plumbing for symbol linkages and scopes in ORC: When external symbols are resolved in a LinkGraph they will have their linkage and scope updated to reflect the linkage and scope of the definition that they resolved to. E.g. if an external reference

extern int X;

is resolved to the following definition:

int __attribute__((weak)) __attribute__((visibility("hidden"))) X = 0;

then the external symbol node for X will be updated to Linkage::Weak and Scope::Hidden. This is a critical step towards correct handling of cross-JITDylib weak symbols: If we track the location of references to default-scope weak symbols (i.e. their GOT entries, at least in position independent code) we can update these entries at dlopen time to reflect the globally selected weak definition.

This may sound esoteric, but it’s on a critical path for significant improvements to the ORC runtime: Once we get correct cross-JITDylib weak symbol handling we can split the ORC runtime into pre-linked and JIT-linked parts. And once the ORC runtime has been split into pre-linked and JIT-linked parts we can move the OrcTargetProcess library and bootstrapping code into the pre-linked part, which will simplify the implementation of the ORC runtime (and LLVM Platform classes).

MachO dlclose refinement

The __orc_rt_macho_dlclose function will now correctly reset data sections on a JITDylib, so the sequence dlopen(“jd”); mess with JD global state; dlclose(“jd”); dlopen(“jd”); very that JD global state is reset; behaves correctly.

1 Like

Zoom Link for Office Hours:

Office Hours will be 8-9am PST, Monday November 14th.

Everyone is welcome – bring your JIT questions / comments / bug-reports / demos. :slight_smile: