From: Denis Cheng <crquan@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Linux-Kernel@vger.kernel.org, cr_quan@163.com
Subject: [PATCH] [arch/i386/boot]: for better readability in clearing BSS
Date: Sat, 25 Aug 2007 17:54:32 +0800 [thread overview]
Message-ID: <11880356722224-git-send-email-crquan@gmail.com> (raw)
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 +-
| 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
--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
next reply other threads:[~2007-08-25 9:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-25 9:54 Denis Cheng [this message]
2007-08-26 23:52 ` [PATCH] [arch/i386/boot]: for better readability in clearing BSS H. Peter Anvin
2007-08-26 23:57 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11880356722224-git-send-email-crquan@gmail.com \
--to=crquan@gmail.com \
--cc=Linux-Kernel@vger.kernel.org \
--cc=cr_quan@163.com \
--cc=hpa@zytor.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.