summaryrefslogtreecommitdiff
path: root/other/burneye/src/stub/stub.lds
blob: bce02ea7867465f67751fa2bac0f4c23b0299bac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)

ENTRY(entry_point)

PHDRS
{
	text PT_LOAD FILEHDR PHDRS FLAGS (0x0007);	/* PF_R | PF_W | PF_X */
	data PT_LOAD FLAGS (0x0006);			/* PF_R | PF_W */
}

SECTIONS
{
	. = 0x05371000 ;
	.text : {
		cipher-glfsr.o(.text)
		init.o(.text)
		*(.text)
		*(.data)
		*(.rodata)
		*(.bss)
		callgate.o(.text)

		PROVIDE (be_stubhdr_u = ABSOLUTE(.)) ;
		LONG (0x41012345) ;
	} : text


	/* dummy segment to set fixed brk(0) value in kernelspace */
	. = 0x08048000 ;
	.data : {
	} : data

	/* save calls to objcopy, huh */
	/DISCARD/ : {
		*(.eh_frame)
		*(.comment)
		*(.note)
	}
}