Segment.c 346 B

1234567891011121314
  1. /* This Hello World simply print out "Hello World" */
  2. #include "pal.h"
  3. #include "pal_debug.h"
  4. void* private = &private;
  5. int main(int argc, char** argv, char** envp) {
  6. DkSegmentRegister(PAL_SEGMENT_FS, private);
  7. void* ptr;
  8. __asm__ volatile("mov %%fs:0, %0" : "=r"(ptr)::"memory");
  9. pal_printf("TLS = %p\n", ptr);
  10. return 0;
  11. }