explicit PHDRS to control number of Elf32_Phdr: no PT_GNU_STACK

l_lx_elf86.lds l_lx_exec86.lds l_lx_sep86.lds l_lx_sh86.lds

committer: jreiser <jreiser> 1083997506 +0000
This commit is contained in:
John Reiser
2004-05-08 06:25:06 +00:00
parent 767e4e2ce6
commit fee6f17caf
3 changed files with 19 additions and 11 deletions
+7 -2
View File
@@ -31,15 +31,20 @@
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(_start)
PHDRS /* force exactly 2 ELF32_Phdr: in particular, no PT_GNU_STACK */
{
phdr0 PT_LOAD FILEHDR PHDRS FLAGS(7);
phdr1 PT_LOAD;
}
SECTIONS
{
. = 0x00400000 + SIZEOF_HEADERS;
.text : {
*(.text)
*(.data)
}
} : phdr0
/* 0x08048000: customary Linux/x86 Elf .text start */
. = 0x08048000 + (0xfff & .);
.data : {
}
} : phdr1
}