Turned out the generated kernel_m68k had a single PT_LOAD segment (RWE) instead of separate text and data like every other single binary, and everything on other platforms. This works around it by forcing sections to separate headers. It's still beyong me why I have to do this here, ld should do it on its own. Anyone has a clue ?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26536 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol
2008-07-21 00:36:31 +00:00
parent 1e5538f5e8
commit 3c5029f112
+11 -3
View File
@@ -3,11 +3,19 @@ OUTPUT_ARCH(m68k)
ENTRY(_start)
SEARCH_DIR("libgcc");
/* XXX: this shouldn't be needed to make kernel_m68k have separate text and data segments!!! */
PHDRS
{
headers PT_PHDR PHDRS ;
text PT_LOAD FILEHDR PHDRS ;
data PT_LOAD ;
dynamic PT_DYNAMIC ;
}
SECTIONS
{
. = 0x80000000 + SIZEOF_HEADERS;
.interp : { *(.interp) }
.interp : { *(.interp) } :text
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
@@ -35,14 +43,14 @@ SECTIONS
.plt : { *(.plt) }
/* text/read-only data */
.text : { *(.text .gnu.linkonce.t.*) } =0x9090
.text : { *(.text .gnu.linkonce.t.*) } :text =0x9090
.rodata : { *(.rodata) }
/* writable data */
. = ALIGN(0x1000);
__data_start = .;
.data : { *(.data .gnu.linkonce.d.*) }
.data : { *(.data .gnu.linkonce.d.*) } :data
. = ALIGN(0x4);
__ctor_list = .;