search for: stub_code

Displaying 2 results from an estimated 2 matches for "stub_code".

Did you mean: stub_clone
2009 May 14
0
[LLVMdev] Grouping related functions in a code section
...function stored in this code. Here's an outline of the whole process: // In the newly-cloned process, map in the magic page // __syscall_stub_start defined in linker script fd = phys_mapping(to_phys(&__syscall_stub_start), &offset); // Get executable permission: addr = mmap64((void *) STUB_CODE, UM_KERN_PAGE_SIZE, PROT_EXEC, MAP_FIXED | MAP_PRIVATE, fd, offset); The previous code maps the page of code into memory: the page address is stored in the linker-script-defined __syscall_stub_start symbol. Then we have: unsigned long v = STUB_CODE + (unsigned long) stub_segv...
2009 May 11
3
[LLVMdev] Assign symbol the address of a section
Hello, The binaries produced by LLVM and other compilers divide code up into various sections, e.g. the .text section. What is the recommended approach to assigning a symbol the address of a section using LLVM? Using GCC/LD, you can do this with a linker script, e.g. in a linker script you can do: _text = .; _stext = .; These symbols are then available in the corresponding C code using an