Using FS segment register
Using FS segment register
- Subject: Using FS segment register
- From: Shahzeb Nihalahmed Patel <email@hidden>
- Date: Fri, 13 May 2016 16:12:00 -0400
Hi,I'm working on a project that aims to run ELF type of files on OS X environment with other features. It makes use of the %fs register for thread local storage. What is the best way to make use of this register. I need to occasionally store an address in this register and then retrive it later. Basically I am looking for what is is achieved through sysarch system call on FreeBSD like the following.
unsigned long ret_addr;
ret = INLINE_SYSCALL(sysarch, 2, AMD64_GET_FSBASE, &ret_addr);
I found one relevant archive but it doesn't look to work because I think making call gates have been prevented after a security patch that I can across.
Please suggest the best possible way to do this.
Thank you,
Shahzeb Patel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden