search for: __mod_init_func

Displaying 6 results from an estimated 6 matches for "__mod_init_func".

2017 Jun 06
4
LLD support for ld64 mach-o linker synthesised symbols
...), %rsi leaq start(%rip), %rdx subq __start_static(%rip), %rdx call __start_c In C: /* run C++ constructors in __libc_start_main for x86_64-xnu-musl */ typedef void (*__init_fn)(int, char **, char **, char **); extern __init_fn __init_start __asm("section$start$__DATA$__mod_init_func"); extern __init_fn __init_end __asm("section$end$__DATA$__mod_init_func”); static void __init_mod(int argc, char **argv, char **envp, char **applep) { for (__init_fn *p = &__init_start; p < &__init_end; ++p) { (*p)(argc, argv, envp, applep);...
2020 Feb 24
4
ORC JIT Weekly #6 -- General initializer support and JITLink optimizations
...e and executes them when requested. On the other hand, MachOPlatform implements a scheme that mimics the behavior of the Darwin dynamic loader, dyld: By installing an ObjectLinkingLayer::Plugin, the MachOPlatform can scan all objects as they are materialized to discover known special sections (E.g. __mod_init_func, __objc_classlist, and __objc_selref), then handle them according the usual platform rules (__mod_init_func pointers are executed, Objective-C classes and selectors are registered with the Objective-C runtime). While this system is still very new, it is far enough along that the lli command line t...
2017 Jun 06
2
LLD support for ld64 mach-o linker synthesised symbols
...subq __start_static(%rip), %rdx > call __start_c > > In C: > > /* run C++ constructors in __libc_start_main for x86_64-xnu-musl */ > > typedef void (*__init_fn)(int, char **, char **, char **); > extern __init_fn __init_start __asm("section$start$__DATA$__mod_init_func"); > extern __init_fn __init_end __asm("section$end$__DATA$__mod_init_func”); > > static void __init_mod(int argc, char **argv, char **envp, char **applep) > { > for (__init_fn *p = &__init_start; p < &__init_end; ++p) { > (*p)(arg...
2008 Jun 21
3
[LLVMdev] llvm-gcc -O0 compile times
...onst): 100 | Section (__DATA, __const): 136 Section (__TEXT, __cstring): 11543 | Section (__TEXT, __cstring): 12678 Section (__DATA, __data): 64 | Section (__DATA, __data): 76 Section (__DATA, __const_coal): 48 | Section (__TEXT, __const_coal): 128 | Section (__DATA, __mod_init_func): 4 | Section (__DATA, __mod_init_func): 4 Section (__DATA, __bss): 32 | Section (__DATA, __bss): 65 Section (__TEXT, __textcoal_nt): 116324 | Section (__TEXT, __textcoal_nt): 168920 Section (__TEXT, __literal8): 8 | Section (__TEXT, __eh_frame): 88636 Section (__TEX...
2017 Jun 07
3
LLD support for ld64 mach-o linker synthesised symbols
On Tue, Jun 6, 2017 at 11:14 PM, Michael Clark via llvm-dev < llvm-dev at lists.llvm.org> wrote: > OK. I see that the Mach-O linker is not even built when LLD is enabled in > Release_40, only the PE/COFF and ELF linkers are built. > > From looking at reviews it appears that Clang was able to be linked with > LLD on Darwin about 2 years ago, so Mach-O support seems to have
2010 Jun 21
2
[LLVMdev] MC: Object file specific parsing
..._SYMBOL_POINTERS, - 4); - - if (IDVal == ".dyld") - return ParseDirectiveSectionSwitch("__DATA", "__dyld"); - if (IDVal == ".mod_init_func") - return ParseDirectiveSectionSwitch("__DATA", "__mod_init_func", - MCSectionMachO::S_MOD_INIT_FUNC_POINTERS, - 4); - if (IDVal == ".mod_term_func") - return ParseDirectiveSectionSwitch("__DATA", "__mod_term_func", -...