2009-09-17 04:44:27 +08: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 01:12:47 +08:00
|
|
|
OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT)
|
|
|
|
|
2009-04-30 18:03:16 +08:00
|
|
|
#undef i386
|
|
|
|
|
2009-11-13 19:54:40 +08:00
|
|
|
#include <asm/cache.h>
|
2009-05-09 07:20:34 +08: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 01:12:47 +08:00
|
|
|
#ifdef CONFIG_X86_64
|
2007-05-03 01:27:07 +08: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 01:12:47 +08:00
|
|
|
#else
|
|
|
|
OUTPUT_ARCH(i386)
|
|
|
|
ENTRY(startup_32)
|
|
|
|
#endif
|
|
|
|
|
2007-05-03 01:27:07 +08:00
|
|
|
SECTIONS
|
|
|
|
{
|
2008-02-02 00:49:41 +08:00
|
|
|
/* Be careful parts of head_64.S assume startup_32 is at
|
2008-01-30 20:33:37 +08:00
|
|
|
* address 0.
|
2007-05-03 01:27:07 +08:00
|
|
|
*/
|
|
|
|
. = 0;
|
2009-09-17 04:44:27 +08:00
|
|
|
.head.text : {
|
2007-05-03 01:27:07 +08:00
|
|
|
_head = . ;
|
2009-09-17 04:44:27 +08:00
|
|
|
HEAD_TEXT
|
2007-05-03 01:27:07 +08:00
|
|
|
_ehead = . ;
|
2008-01-30 20:33:38 +08:00
|
|
|
}
|
2010-02-20 08:03:46 +08:00
|
|
|
.rodata..compressed : {
|
|
|
|
*(.rodata..compressed)
|
2008-01-30 20:33:38 +08:00
|
|
|
}
|
|
|
|
.text : {
|
2007-05-03 01:27:07 +08:00
|
|
|
_text = .; /* Text */
|
|
|
|
*(.text)
|
|
|
|
*(.text.*)
|
|
|
|
_etext = . ;
|
|
|
|
}
|
|
|
|
.rodata : {
|
|
|
|
_rodata = . ;
|
|
|
|
*(.rodata) /* read-only data */
|
|
|
|
*(.rodata.*)
|
|
|
|
_erodata = . ;
|
|
|
|
}
|
|
|
|
.data : {
|
|
|
|
_data = . ;
|
|
|
|
*(.data)
|
|
|
|
*(.data.*)
|
|
|
|
_edata = . ;
|
|
|
|
}
|
2009-11-13 19:54:40 +08:00
|
|
|
. = ALIGN(L1_CACHE_BYTES);
|
2007-05-03 01:27:07 +08:00
|
|
|
.bss : {
|
|
|
|
_bss = . ;
|
|
|
|
*(.bss)
|
|
|
|
*(.bss.*)
|
|
|
|
*(COMMON)
|
2009-05-09 07:20:34 +08:00
|
|
|
. = ALIGN(8); /* For convenience during zeroing */
|
2008-04-11 06:06:38 +08:00
|
|
|
_ebss = .;
|
2007-05-03 01:27:07 +08:00
|
|
|
}
|
2009-05-09 07:20:34 +08:00
|
|
|
#ifdef CONFIG_X86_64
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
.pgtable : {
|
|
|
|
_pgtable = . ;
|
|
|
|
*(.pgtable)
|
|
|
|
_epgtable = . ;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
_end = .;
|
2007-05-03 01:27:07 +08:00
|
|
|
}
|