Messages in this thread Patch in this message | | | From | Denis Cheng <> | Subject | [PATCH] [arch/i386/boot]: for better readability in clearing BSS | Date | Sat, 25 Aug 2007 17:54:32 +0800 |
| |
there are three different linker scripts with different usages,
arch/i386/boot/setup.ld arch/i386/boot/compressed/vmlinux.lds arch/i386/kernel/vmlinux.lds
accompanlying with three different sections of clearing BSS,
arch/i386/boot/header.S arch/i386/boot/compressed/head.S arch/i386/kernel/head.S
but their label names in .bss section are different, when reading these files, they are apt to confuse,
this patch kept them in the same style of clearing.
Signed-off-by: Denis Cheng <crquan@gmail.com> --- arch/i386/boot/compressed/head.S | 2 +- arch/i386/boot/header.S | 2 +- arch/i386/boot/setup.ld | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/i386/boot/compressed/head.S b/arch/i386/boot/compressed/head.S index f35ea22..e499db0 100644 --- a/arch/i386/boot/compressed/head.S +++ b/arch/i386/boot/compressed/head.S @@ -113,7 +113,7 @@ relocated: * Clear BSS */ xorl %eax,%eax - leal _edata(%ebx),%edi + leal _bss(%ebx),%edi leal _end(%ebx), %ecx subl %edi,%ecx cld diff --git a/arch/i386/boot/header.S b/arch/i386/boot/header.S index 7f4a2c5..cd074c1 100644 --- a/arch/i386/boot/header.S +++ b/arch/i386/boot/header.S @@ -254,7 +254,7 @@ setup2: # Zero the bss movw $__bss_start, %di - movw $_end+3, %cx + movw $__bss_end, %cx xorl %eax, %eax subw %di, %cx shrw $2, %cx diff --git a/arch/i386/boot/setup.ld b/arch/i386/boot/setup.ld index df9234b..f9d6897 100644 --- a/arch/i386/boot/setup.ld +++ b/arch/i386/boot/setup.ld @@ -36,15 +36,15 @@ SECTIONS LONG(0x5a5aaa55) } - . = ALIGN(16); .bss : { __bss_start = .; *(.bss) + . = ALIGN(16); __bss_end = .; } - . = ALIGN(16); + _end = .; /DISCARD/ : { *(.note*) } -- 1.5.3.rc4 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |