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