Re: [PATCH] x86_64: Re-positioning the bss segment

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

 



Vivek Goyal <[email protected]> writes:

> o Currently bss segment is being placed somewhere in the middle (after .data)
>   section and after bss lots of init section and data sections are coming.
>   Is it intentional?
>
> o One side affect of placing bss in the middle is that objcopy keeps the
>   bss in raw binary image (vmlinux.bin) hence unnecessarily increasing
>   the size of raw binary image. (In my case ~600K). It also increases
>   the size of generated bzImage, though the increase is very small
>   (896 bytes), probably a very high compression ratio for stream
>   of zeros.
>
> o This patch moves the bss at the end hence reducing the size of
>   bzImage by 896 bytes and size of vmlinux.bin by 600K.
>
> o This change benefits in the context of relocatable kernel patches. If
>   kernel bss is not part of compressed data (vmlinux.bin) then it does
>   not have to be decompressed and this area can be used by the decompressor
>   for its execution hence keeping the memory requirements bounded and 
>   decompressor code does not stomp over any other data loaded beyond
>   kernel image (As might be the case with bootloaders like kexec).

Looks sane here.  I don't know if there are any side effects from placing
the .bss after the .init sections that we discard at after boot.

Unless this has undesirable side effects this should have us doing the
expected thing, with the .bss section which is less likely to confuse people
in general.

> Signed-off-by: Vivek Goyal <[email protected]>
Acked-by: Eric Biederman <[email protected]>

Eric
-
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