Add rather more detail. In particular, note the cases where the
default propagation type is MS_PRIVATE vs MS_SHARED.
Reported-by: Rob Landley <rob@landley.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signals such as the SIGSEGV that results from an invalid
memory access can be caught only with a handler.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Refer to recently added descriptions of
/proc/sys/vm/admin_reserve_kbytes and
/proc/sys/vm/user_reserve_kbytes.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This was correctly noted in recv(2), but the unix(7) page
was not correspondingly updated for the Linux 3.4 change.
Reported-by: Sergey Polovko <sergey@polovko.me>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
As far as I can tell from testing and a short read of the glibc
source code, LD_BIND_NOT has an effect only for function symbols.
This is consistent also with the Solaris documentation, which
says:
When the runtime linker performs a function relocation, it
rewrites data associated with the functions .plt so that any
subsequent calls will go directly to the function. The
environment variable LD_BIND_NOT can be set to any value to
prevent this data update. By using this variable together
with the debugging request for detailed bindings, you can
get a complete runtime account of all function binding.
Test case:
$ cat prog.c
int
main(int argc, char *argv[])
{
for (;;) {
sleep(1);
optind = 0;
}
exit(EXIT_SUCCESS);
}
$ cc prog.c
And then in the run below, in each loop, we see repeated resolutions
only for the function symbol, sleep() (and not for optind).
$ LD_BIND_NOT=1 LD_DEBUG=symbols,bindings ./a.out
...
30481: transferring control: ./t
30481:
30481: symbol=sleep; lookup in file=./t [0]
30481: symbol=sleep; lookup in file=/lib64/libc.so.6 [0]
30481: binding file ./t [0] to /lib64/libc.so.6 [0]: normal symbol `sleep' [GLIBC_2.2.5]
30481: symbol=sleep; lookup in file=./t [0]
30481: symbol=sleep; lookup in file=/lib64/libc.so.6 [0]
30481: binding file ./t [0] to /lib64/libc.so.6 [0]: normal symbol `sleep' [GLIBC_2.2.5]
30481: symbol=sleep; lookup in file=./t [0]
30481: symbol=sleep; lookup in file=/lib64/libc.so.6 [0]
30481: binding file ./t [0] to /lib64/libc.so.6 [0]: normal symbol `sleep' [GLIBC_2.2.5]
30481: symbol=sleep; lookup in file=./t [0]
30481: symbol=sleep; lookup in file=/lib64/libc.so.6 [0]
30481: binding file ./t [0] to /lib64/libc.so.6 [0]: normal symbol `sleep' [GLIBC_2.2.5]
30481: symbol=sleep; lookup in file=./t [0]
30481: symbol=sleep; lookup in file=/lib64/libc.so.6 [0]
30481: binding file ./t [0] to /lib64/libc.so.6 [0]: normal symbol `sleep' [GLIBC_2.2.5]
30481: symbol=sleep; lookup in file=./t [0]
30481: symbol=sleep; lookup in file=/lib64/libc.so.6 [0]
30481: binding file ./t [0] to /lib64/libc.so.6 [0]: normal symbol `sleep' [GLIBC_2.2.5]
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>