Re: Automaticly eliminating redundant zero initialisers

From: Russell King (rmk@arm.linux.org.uk)
Date: Mon May 01 2000 - 08:12:07 EST


George Anzinger writes:
> Soon as you depend on this some OS dude will fill bss with -1s so he can
> tell what was used... or some such. Seems like a bad idea to depend on
> bss being anything at all.

The BSS is defined to be the segment which is filled with zeros. If you
fill it with any other value at startup, any program that uses it will
break. Therefore, you have two choices:

1. Have a BSS, and fill it with zeros, or
2. Don't have a BSS at all.

In the age old days of Linux, option 2 was the one selected. Today, all
Linux kernels have a BSS, and it is filled with zeros.
   _____
  |_____| ------------------------------------------------- ---+---+-
  | | Russell King rmk@arm.linux.org.uk --- ---
  | | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
  | +-+-+ --- -+-
  / | THE developer of ARM Linux |+| /|\
 / | | | --- |
    +-+-+ ------------------------------------------------- /\\\ |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:08 EST