grub not liking ". = ALIGN (0x1000);" in ld script
Posted: Tue Sep 04, 2012 10:14 pm
Here is my ld script where grub outputs "Error 13: Invalid or unsupported executable format'".
The other sections are standard (.rodata, .data, .bss) and work fine as-is.
Removing the ". = ALIGN(0x1000);" works fine, but I'd like syscall.o aligned on its own pages (just so I can mark those pages as accessible from ring 3). Possibly there is another way to do this?
Code: Select all
ENTRY (loaded)
SECTIONS
{
. = 0x00100000;
.text ALIGN (0x1000) :
{
syscall.o (.text)
. = ALIGN (0x1000);
* (.text)
}
}
Removing the ". = ALIGN(0x1000);" works fine, but I'd like syscall.o aligned on its own pages (just so I can mark those pages as accessible from ring 3). Possibly there is another way to do this?