[PATCH] Fix ld.so trace mode
Jakub Jelinek
jakub@redhat.com
Thu Mar 8 01:11:00 GMT 2001
Hi!
LD_TRACE_LOADED_OBJECTS=1 always used to warn about undefined symbols if
LD_WARN=1 was specified at the same time, but current test does it the other
way around.
This is snippet from older rtld.c:
/* LAZY is determined by the environment variable LD_WARN and
LD_BIND_NOW if we trace the binary. */
if (__builtin_expect (mode, normal) == trace)
*lazyp = _dl_verbose ? !bind_now : -1;
else
*lazyp = !bind_now;
ie. _dl_lazy was set to -1 if tracing and LD_WARN was not set.
2001-03-08 Jakub Jelinek <jakub@redhat.com>
* elf/rtld.c (dl_main): If tracing, warn about undefined symbols if
LD_WARN=1, not if LD_WARN is unset.
--- libc/elf/rtld.c.jj Mon Mar 5 11:57:47 2001
+++ libc/elf/rtld.c Thu Mar 8 11:05:04 2001
@@ -896,8 +896,8 @@ of this helper program; chances are you
}
else
{
- /* Unless LD_WARN is set warn do not about undefined symbols. */
- if (_dl_lazy >= 0 && !_dl_verbose)
+ /* If LD_WARN is set warn about undefined symbols. */
+ if (_dl_lazy >= 0 && _dl_verbose)
{
/* We have to do symbol dependency testing. */
struct relocate_args args;
Jakub
More information about the Libc-hacker
mailing list