summaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-05-25 01:12:55 +0000
committerUlrich Drepper <drepper@redhat.com>1997-05-25 01:12:55 +0000
commitcf29ffbef960c4c454d94919c6f27206f77961ff (patch)
tree564fc08211b378cac2f8d830d497898d02893ad1 /elf
parenta133e7a4d2fd162f67b1fa6eb34b490a710459e5 (diff)
1997-05-25 03:00 Ulrich Drepper <drepper@cygnus.com> * elf/dynamic-link.h (_dl_verbose): New variable, declare. * elf/rtld.c (_dl_verbose): New variable, define. (dl_main): Define _dl-verbose based on DL_WARN environment variable. * sysdeps/i386/dl-machine.h (elf_machine_rel): Print warning about changed size in copy relocation only if symbol in shared object is larger or _dl_verbose is nonzero. * sysdeps/m68k/dl-machine.h (elf_machine_rel): Likewise. * sysdeps/powerpc/dl-machine.h (elf_machine_rel): Likewise. * sysdeps/sparc/dl-machine.h (elf_machine_rel): Likewise. * nis/nss_nis/nis-ethers.c: Don't use relative include paths, use <...>. * nis/nss_nis/nis-grp.c: Likewise. * nis/nss_nis/nis-hosts.c: Likewise. * nis/nss_nis/nis-network.c: Likewise. * nis/nss_nis/nis-proto.c: Likewise. * nis/nss_nis/nis-pwd.c: Likewise. * nis/nss_nis/nis-rpc.c: Likewise. * nis/nss_nis/nis-spwd.c: Likewise. * sysdeps/unix/sysv/sysd-stdio.c: Likewise. * wcsmbs/wcscoll.c: Likewise. * wcsmbs/wcstod.c: Likewise. * wcsmbs/wcstof.c: Likewise. * wcsmbs/wcstol.c: Likewise. * wcsmbs/wcstold.c: Likewise. * wcsmbs/wcsxfrm.c: Likewise. Reported by Zack Weinberg <zack@rabi.phys.columbia.edu>. * time/strftime.c: Implement # flag which changes case of output for %a, %b, %B, %p, and %Z format. When printing numbers, the given field width is always respected. This means that padding happens only up to the given width. Proposed by Stephen Gildea <gildea@intouchsys.com>. 1997-05-25 00:44 Ulrich Drepper <drepper@cygnus.com> * sysdeps/i386/fpu/__math.h (logb): Fix thinko, reverse output values. Reported by Andreas Jaeger <aj@arthur.rhein-neckar.de>. 1997-05-24 21:03 Philip Blundell <pjb27@cam.ac.uk> * db/btree/bt_open.c (__bt_open): Only try to use st_blksize (from struct stat) if it exists for this port. 1997-05-24 20:34 Philip Blundell <pjb27@cam.ac.uk> * sysdeps/standalone/arm/errnos.h: Add EPERM. 1997-05-23 16:28 Philip Blundell <phil@kings-cross.london.uk.eu.org> * linewrap.h: New file, needed to compile argp without libio. 1997-05-24 11:59 Andreas Jaeger <aj@arthur.rhein-neckar.de> * manual/stdio.texi (Formatted Messages): Corrected some typos. 1997-05-24 11:58 Philip Blundell <pjb27@cam.ac.uk> * sysdeps/stub/start.c: Fix typo.
Diffstat (limited to 'elf')
-rw-r--r--elf/dynamic-link.h5
-rw-r--r--elf/rtld.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h
index da63633361..3377ee7ff6 100644
--- a/elf/dynamic-link.h
+++ b/elf/dynamic-link.h
@@ -22,6 +22,11 @@
#include <assert.h>
+/* Global read-only variable defined in rtld.c which is nonzero if we
+ shall give more warning messages. */
+extern int _dl_verbose __attribute__ ((unused));
+
+
/* Read the dynamic section at DYN and fill in INFO with indices DT_*. */
static inline void __attribute__ ((unused))
diff --git a/elf/rtld.c b/elf/rtld.c
index bad01a8844..ffa569e729 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -56,6 +56,7 @@ static void print_missing_version (int errcode, const char *objname,
int _dl_argc;
char **_dl_argv;
const char *_dl_rpath;
+int _dl_verbose;
/* Set nonzero during loading and initialization of executable and
libraries, cleared before the executable's entry point runs. This
@@ -206,12 +207,13 @@ dl_main (const ElfW(Phdr) *phdr,
int has_interp = 0;
mode = getenv ("LD_TRACE_LOADED_OBJECTS") != NULL ? trace : normal;
+ _dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1;
- /* LAZY is determined by the parameters --datadeps and --function-deps
- if we trace the binary. */
+ /* LAZY is determined by the environment variable LD_WARN and
+ LD_BIND_NOW if we trace the binary. */
if (mode == trace)
- lazy = (*(getenv ("LD_WARN") ?: "") == '\0' ? -1
- : (*(getenv ("LD_BIND_NOW") ?: "") == '\0' ? 1 : 0));
+ lazy = (_dl_verbose
+ ? (*(getenv ("LD_BIND_NOW") ?: "") == '\0' ? 1 : 0) : -1);
else
lazy = !__libc_enable_secure && *(getenv ("LD_BIND_NOW") ?: "") == '\0';