kernel: make clang-buildable

This commit is contained in:
Arun Thomas
2011-06-28 15:34:19 +02:00
parent 08c8ee9f52
commit daa14edc0d
3 changed files with 15 additions and 62 deletions

View File

@@ -2,12 +2,7 @@ OUTPUT_ARCH("i386")
ENTRY(MINIX)
SECTIONS
{
. = 0x0;
_text = .;
begtext = .;
.text.head . : AT (0x0) {
*(.text.head)
}
. = 0x200000 + SIZEOF_HEADERS;
.text . : AT (ADDR(.text) - 0x0000) {
*(.text)
*(.text.*)
@@ -16,8 +11,6 @@ SECTIONS
_etext = .;
etext = .;
_data = .;
begdata = .;
.data . : AT (ADDR(.data) - 0x0000) {
_rodata = .;
/* kernel data starts with this magic number */
@@ -27,17 +20,15 @@ SECTIONS
_erodata = .;
*(.data)
*(.data.*)
. = ALIGN(4096);
}
_edata = .;
_bss = .;
begbss = .;
.bss . : AT (ADDR(.bss) - 0x0000) {
*(.bss)
*(.bss.*)
*(COMMON)
}
_ebss = .;
endbss = .;
_end = .;
end = .;

View File

@@ -1,43 +0,0 @@
OUTPUT_ARCH("i386")
ENTRY(MINIX)
SECTIONS
{
. = 0x200000 + SIZEOF_HEADERS;
.text . : AT (ADDR(.text) - 0x0000) {
*(.text)
*(.text.*)
. = ALIGN(4096);
}
_etext = .;
etext = .;
.data . : AT (ADDR(.data) - 0x0000) {
_rodata = .;
/* kernel data starts with this magic number */
SHORT(0x526f);
*(.rodata)
*(.rodata.*)
_erodata = .;
*(.data)
*(.data.*)
. = ALIGN(4096);
}
_edata = .;
.bss . : AT (ADDR(.bss) - 0x0000) {
*(.bss)
*(.bss.*)
*(COMMON)
}
_end = .;
end = .;
/DISCARD/ :
{
*(.eh_frame)
*(.comment)
*(.comment.*)
*(.note)
*(.note.*)
}
}