Re: [PATCH] [arch/i386/boot]: for better readability in clearing BSS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Denis Cheng wrote:
> 
> 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.
> 

Bullsh*t.

> 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

Here you change _edata.._end into _bss.._end.

> 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

Here you change __bss_start.._end to __bss_start..__bss_end, and have to
change the linker script for it not to break.

There is no consistency improvement, and as such, it's just churn.

	-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux