Xen Test Framework
arch
x86
include
arch
link.lds.h
Go to the documentation of this file.
1
7
#ifdef LINKER_HEADER
8
9
/* Don't clobber the ld directive */
10
#undef i386
11
12
#if defined(__x86_64__)
13
14
OUTPUT_FORMAT(
"elf64-x86-64"
)
15
OUTPUT_ARCH(i386:x86-64)
16
17
#elif defined(__i386__)
18
19
OUTPUT_FORMAT(
"elf32-i386"
)
20
OUTPUT_ARCH(i386)
21
22
#else
23
# error Bad architecture to link with
24
#endif
25
26
ENTRY(_elf_start)
27
28
#endif
/* LINKER_HEADER */
29
30
#ifdef LINKER_FOOTER
31
32
ASSERT
(
IS_ALIGNED
(
hypercall_page
,
PAGE_SIZE
),
"hypercall_page misaligned"
);
33
34
#ifdef CONFIG_HVM
35
36
/* Check everything lives within l1_identmap[] for user and r/o mappings. */
37
ASSERT
(
_end
< (1 << (
PT_ORDER
+
PAGE_SHIFT
)),
"Mappings exceed l1_identmap[]"
);
38
39
ASSERT
(
IS_ALIGNED
(pae_l1_identmap,
PAGE_SIZE
),
"pae_l1_identmap misaligned"
);
40
ASSERT
(
IS_ALIGNED
(pae_l2_identmap,
PAGE_SIZE
),
"pae_l2_identmap misaligned"
);
41
ASSERT
(
IS_ALIGNED
(pae_l3_identmap,
PAGE_SIZE
),
"pae_l3_identmap misaligned"
);
42
ASSERT
(
IS_ALIGNED
(pae_l4_identmap,
PAGE_SIZE
),
"pae_l4_identmap misaligned"
);
43
44
ASSERT
(
IS_ALIGNED
(pae32_l3_identmap, 32),
"pae32_l3_ident misaligned"
);
45
46
ASSERT
(
IS_ALIGNED
(pse_l1_identmap,
PAGE_SIZE
),
"pse_l1_identmap misaligned"
);
47
ASSERT
(
IS_ALIGNED
(pse_l2_identmap,
PAGE_SIZE
),
"pse_l2_identmap misaligned"
);
48
49
#else
/* CONFIG_HVM */
50
51
ASSERT
(
IS_ALIGNED
(
gdt
,
PAGE_SIZE
),
"gdt misaligned"
);
52
53
#endif
/* CONFIG_HVM */
54
55
#endif
/* LINKER_FOOTER */
56
57
/*
58
* Local variables:
59
* mode: C
60
* c-file-style: "BSD"
61
* c-basic-offset: 4
62
* tab-width: 4
63
* indent-tabs-mode: nil
64
* End:
65
*/
_end
char _end[]
Definition:
xtf.h:19
gdt
user_desc gdt[NR_GDT_ENTRIES]
hypercall_page
uint8_t hypercall_page[PAGE_SIZE]
ASSERT
#define ASSERT(cond)
Definition:
lib.h:14
IS_ALIGNED
#define IS_ALIGNED(val, align)
Return a boolean indicating whether val is aligned on align.
Definition:
numbers.h:38
PAGE_SIZE
#define PAGE_SIZE
Definition:
page.h:11
PAGE_SHIFT
#define PAGE_SHIFT
Definition:
page.h:10
PT_ORDER
#define PT_ORDER
Definition:
page.h:64
Generated by
1.9.4