Avoid crashing in LD_DEBUG when program name is unavailable
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Wed, 29 May 2013 16:00:20 +0000 (21:30 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Wed, 29 May 2013 16:04:12 +0000 (21:34 +0530)
commitb937534868c8d7aec3b6d645bf5fd657bbfccd42
tree18936faaea13f35bcaf698f97447752c0e1c4567
parentd0501bfbe228897c17875fcead8809d017135d6f
Avoid crashing in LD_DEBUG when program name is unavailable

Resolves: #15465

The program name may be unavailable if the user application tampers
with argc and argv[].  Some parts of the dynamic linker caters for
this while others don't, so this patch consolidates the check and
fallback into a single macro and updates all users.
41 files changed:
ChangeLog
NEWS
elf/Makefile
elf/dl-conflict.c
elf/dl-deps.c
elf/dl-error.c
elf/dl-fini.c
elf/dl-init.c
elf/dl-load.c
elf/dl-lookup.c
elf/dl-open.c
elf/dl-reloc.c
elf/dl-version.c
elf/rtld.c
elf/tst-null-argv-lib.c [new file with mode: 0644]
elf/tst-null-argv.c [new file with mode: 0644]
ports/ChangeLog.aarch64
ports/ChangeLog.arm
ports/ChangeLog.hppa
ports/ChangeLog.m68k
ports/ChangeLog.microblaze
ports/ChangeLog.mips
ports/ChangeLog.tile
ports/sysdeps/aarch64/dl-machine.h
ports/sysdeps/arm/dl-machine.h
ports/sysdeps/hppa/dl-machine.h
ports/sysdeps/m68k/dl-machine.h
ports/sysdeps/microblaze/dl-machine.h
ports/sysdeps/mips/dl-lookup.c
ports/sysdeps/mips/dl-machine.h
ports/sysdeps/tile/dl-machine.h
sysdeps/generic/ldsodefs.h
sysdeps/i386/dl-machine.h
sysdeps/powerpc/powerpc32/dl-machine.c
sysdeps/powerpc/powerpc64/dl-machine.h
sysdeps/s390/s390-32/dl-machine.h
sysdeps/s390/s390-64/dl-machine.h
sysdeps/sh/dl-machine.h
sysdeps/sparc/sparc32/dl-machine.h
sysdeps/sparc/sparc64/dl-machine.h
sysdeps/x86_64/dl-machine.h