2009-09-17 03:44:27 +07:00
|
|
|
#include <asm-generic/vmlinux.lds.h>
|
|
|
|
|
x86: unify arch/x86/boot/compressed/vmlinux_*.lds
Look at the:
diff -u arch/x86/boot/compressed/vmlinux_*.lds
output and realize that they're basially exactly the same except for
trivial naming differences, and the fact that the 64-bit version has a
"pgtable" thing.
So unify them.
There's some trivial cleanup there (make the output format a Kconfig thing
rather than doing #ifdef's for it, and unify both 32-bit and 64-bit BSS
end to "_ebss", where 32-bit used to use the traditional "_end"), but
other than that it's really very mindless and straigt conversion.
For example, I think we should aim to remove "startup_32" vs "startup_64",
and just call it "startup", and get rid of one more difference. I didn't
do that.
Also, notice the comment in the unified vmlinux.lds.S talks about
"head_64" and "startup_32" which is an odd and incorrect mix, but that was
actually what the old 64-bit only lds file had, so the confusion isn't
new, and now that mixing is arguably more accurate thanks to the
vmlinux.lds.S file being shared between the two cases ;)
[ Impact: cleanup, unification ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-04-27 00:12:47 +07:00
|
|
|
OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT)
|
|
|
|
|
2009-04-30 17:03:16 +07:00
|
|
|
#undef i386
|
|
|
|
|
2009-11-13 18:54:40 +07:00
|
|
|
#include <asm/cache.h>
|
2009-05-09 06:20:34 +07:00
|
|
|
#include <asm/page_types.h>
|
|
|
|
|
x86: unify arch/x86/boot/compressed/vmlinux_*.lds
Look at the:
diff -u arch/x86/boot/compressed/vmlinux_*.lds
output and realize that they're basially exactly the same except for
trivial naming differences, and the fact that the 64-bit version has a
"pgtable" thing.
So unify them.
There's some trivial cleanup there (make the output format a Kconfig thing
rather than doing #ifdef's for it, and unify both 32-bit and 64-bit BSS
end to "_ebss", where 32-bit used to use the traditional "_end"), but
other than that it's really very mindless and straigt conversion.
For example, I think we should aim to remove "startup_32" vs "startup_64",
and just call it "startup", and get rid of one more difference. I didn't
do that.
Also, notice the comment in the unified vmlinux.lds.S talks about
"head_64" and "startup_32" which is an odd and incorrect mix, but that was
actually what the old 64-bit only lds file had, so the confusion isn't
new, and now that mixing is arguably more accurate thanks to the
vmlinux.lds.S file being shared between the two cases ;)
[ Impact: cleanup, unification ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-04-27 00:12:47 +07:00
|
|
|
#ifdef CONFIG_X86_64
|
2007-05-03 00:27:07 +07:00
|
|
|
OUTPUT_ARCH(i386:x86-64)
|
|
|
|
ENTRY(startup_64)
|
x86: unify arch/x86/boot/compressed/vmlinux_*.lds
Look at the:
diff -u arch/x86/boot/compressed/vmlinux_*.lds
output and realize that they're basially exactly the same except for
trivial naming differences, and the fact that the 64-bit version has a
"pgtable" thing.
So unify them.
There's some trivial cleanup there (make the output format a Kconfig thing
rather than doing #ifdef's for it, and unify both 32-bit and 64-bit BSS
end to "_ebss", where 32-bit used to use the traditional "_end"), but
other than that it's really very mindless and straigt conversion.
For example, I think we should aim to remove "startup_32" vs "startup_64",
and just call it "startup", and get rid of one more difference. I didn't
do that.
Also, notice the comment in the unified vmlinux.lds.S talks about
"head_64" and "startup_32" which is an odd and incorrect mix, but that was
actually what the old 64-bit only lds file had, so the confusion isn't
new, and now that mixing is arguably more accurate thanks to the
vmlinux.lds.S file being shared between the two cases ;)
[ Impact: cleanup, unification ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-04-27 00:12:47 +07:00
|
|
|
#else
|
|
|
|
OUTPUT_ARCH(i386)
|
|
|
|
ENTRY(startup_32)
|
|
|
|
#endif
|
|
|
|
|
2007-05-03 00:27:07 +07:00
|
|
|
SECTIONS
|
|
|
|
{
|
2008-02-01 23:49:41 +07:00
|
|
|
/* Be careful parts of head_64.S assume startup_32 is at
|
2008-01-30 19:33:37 +07:00
|
|
|
* address 0.
|
2007-05-03 00:27:07 +07:00
|
|
|
*/
|
|
|
|
. = 0;
|
2009-09-17 03:44:27 +07:00
|
|
|
.head.text : {
|
2007-05-03 00:27:07 +07:00
|
|
|
_head = . ;
|
2009-09-17 03:44:27 +07:00
|
|
|
HEAD_TEXT
|
2007-05-03 00:27:07 +07:00
|
|
|
_ehead = . ;
|
2008-01-30 19:33:38 +07:00
|
|
|
}
|
2010-02-20 07:03:46 +07:00
|
|
|
.rodata..compressed : {
|
|
|
|
*(.rodata..compressed)
|
2008-01-30 19:33:38 +07:00
|
|
|
}
|
|
|
|
.text : {
|
2007-05-03 00:27:07 +07:00
|
|
|
_text = .; /* Text */
|
|
|
|
*(.text)
|
|
|
|
*(.text.*)
|
|
|
|
_etext = . ;
|
|
|
|
}
|
|
|
|
.rodata : {
|
|
|
|
_rodata = . ;
|
|
|
|
*(.rodata) /* read-only data */
|
|
|
|
*(.rodata.*)
|
|
|
|
_erodata = . ;
|
|
|
|
}
|
|
|
|
.data : {
|
|
|
|
_data = . ;
|
|
|
|
*(.data)
|
|
|
|
*(.data.*)
|
|
|
|
_edata = . ;
|
|
|
|
}
|
2009-11-13 18:54:40 +07:00
|
|
|
. = ALIGN(L1_CACHE_BYTES);
|
2007-05-03 00:27:07 +07:00
|
|
|
.bss : {
|
|
|
|
_bss = . ;
|
|
|
|
*(.bss)
|
|
|
|
*(.bss.*)
|
|
|
|
*(COMMON)
|
2009-05-09 06:20:34 +07:00
|
|
|
. = ALIGN(8); /* For convenience during zeroing */
|
2008-04-11 05:06:38 +07:00
|
|
|
_ebss = .;
|
2007-05-03 00:27:07 +07:00
|
|
|
}
|
2009-05-09 06:20:34 +07:00
|
|
|
#ifdef CONFIG_X86_64
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
.pgtable : {
|
|
|
|
_pgtable = . ;
|
|
|
|
*(.pgtable)
|
|
|
|
_epgtable = . ;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
_end = .;
|
2007-05-03 00:27:07 +07:00
|
|
|
}
|