OSDev.org https://forum.osdev.org/ |
|
why won't this PIE run? https://forum.osdev.org/viewtopic.php?f=13&t=33582 |
Page 1 of 1 |
Author: | Korona [ Sat Mar 16, 2019 12:19 pm ] |
Post subject: | Re: why won't this PIE run? |
That is a very stupid question, but does "gcc -pie hello.o" work? What is your hello.lds? EDIT: The offset 0 R/W segment is quite strange - your linker script maps the file header as R/W? EDIT2: The linker (or kernel) might also just refuse to map something as RWE. |
Author: | nullplan [ Sat Mar 16, 2019 1:39 pm ] |
Post subject: | Re: why won't this PIE run? |
Korona wrote: EDIT: The offset 0 R/W segment is quite strange - your linker script maps the file header as R/W? That I thought as well, but the second load segment also has file size 0. There just isn't a .data section in the file, so no reference to any file data is made. I didn't even know this could happen. |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |