Displaying 2 results from an estimated 2 matches for "set_sigstack".
2009 May 14
0
[LLVMdev] Grouping related functions in a code section
...ge 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_handler - // a function stored in this page
(unsigned long) &__syscall_stub_start; // from linker script
set_sigstack((void *) STUB_DATA, UM_KERN_PAGE_SIZE);
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_ONSTACK | SA_NODEFER;
sa.sa_handler = (void *) v; // Use this function.
The stub_segv_handler function is defined with:
void __attribute__ ((__section__ (".__syscall_stub")))
stub_segv_handler(int sig...
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