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