OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 5:41 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Purpose of eh_frame section?
PostPosted: Fri Feb 01, 2019 5:37 am 
Offline
Member
Member

Joined: Mon May 15, 2017 11:04 am
Posts: 50
XenOS wrote:
Have you had a look at running objdump on your output file? What does your .bss section contain? What is at the address from which you get the fault when NX is enabled? Is that address in the .bss section?

Yeah i did a objdump in disassembly and data mode of my output file and it seems like in .bss is just data. I can't get the address where the fault occurs because i get a tripple-fault as soon as the table is loaded. I debugged it and it seems like my kernel is not able to return from my setCR3-function, which would indicate a problem with the stack:

Code:
1.
2. [global setCR3]
3. setCR3:
4.   mov cr3, rdi
5.   ret

Attachment:
setCR3.PNG
setCR3.PNG [ 32.47 KiB | Viewed 414 times ]



EDIT: Please don't hit me. At least not in my face. I know I'm stupid. :mrgreen:
You know what was wrong? I never set the NXE-Bit in the IA32_EFER-MSR... So obviously it didn't work... :mrgreen:
Weired thing that it did work with the .data-section, because Bit 63 is reserved and must be 0 if the NXE-Bit is not set...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 78 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group