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
+6 -2
View File
@@ -31,6 +31,11 @@
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
/*ENTRY(_start)*/
PHDRS /* force exactly 1 ELF32_Phdr: in particular, no PT_GNU_STACK */
{
phdr0 PT_LOAD FILEHDR PHDRS FLAGS(7);
}
SECTIONS
{
/* 0x00401000: l_lx_exec86.asm assumes 1 page up from 64KB boundary */
@@ -41,6 +46,5 @@ SECTIONS
*(.data)
*(.bss)
*(COMMON)
}
/* save other Phdr for the overlay */
} : phdr0
}
+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
}
+6 -7
View File
@@ -31,22 +31,21 @@
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
/*ENTRY(_start)*/
PHDRS /* force exactly 1 ELF32_Phdr: in particular, no PT_GNU_STACK */
{
phdr0 PT_LOAD FILEHDR PHDRS FLAGS(7);
}
SECTIONS
{
/* 0x00800000: avoid 0x00400000 for shell itself being compressed */
. = 0x00800000 + SIZEOF_HEADERS;
. = ALIGN(0x80);
/*
.text : {
*(.text)
*(.data)
}
*/
.data : { /* put everything together in one Phdr */
*(.text)
*(.rodata)
*(.data)
*(.bss)
*(COMMON)
}
} : phdr0
}