The Advanced Bash Scripting Guide states that
In addition to all the above, /dev/zero is needed by ELF (Executable and Linking Format) UNIX/Linux binaries.
However I cannot find documentation about such dependency anywhere.
Actually I was unable to find it into the ELF loaders of the Linux kernel too.
Do such dependency still exists? And if so, how is /dev/zero used?
Before
MAP_ANONYMOUSwas common,/dev/zerowas used to get a set of zeroed out pages (for the.bsssection).But now it's just
mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0), andstrace /bin/date |& grep zeroshows no output (i.e./dev/zerois not used at all).