mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Update.
2003-05-14 Jakub Jelinek <jakub@redhat.com> * elf/rtld.c (dl_main): For LD_TRACE_PRELINKING print search scope even if no DT_NEEDED is present.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2003-05-14 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* elf/rtld.c (dl_main): For LD_TRACE_PRELINKING print search scope
|
||||||
|
even if no DT_NEEDED is present.
|
||||||
|
|
||||||
2003-05-13 David Mosberger <davidm@hpl.hp.com>
|
2003-05-13 David Mosberger <davidm@hpl.hp.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/ia64/setjmp.S: Fix the fix from
|
* sysdeps/unix/sysv/linux/ia64/setjmp.S: Fix the fix from
|
||||||
|
89
elf/rtld.c
89
elf/rtld.c
@ -1262,56 +1262,51 @@ cannot allocate TLS data structures for initial thread");
|
|||||||
important that we do this before real relocation, because the
|
important that we do this before real relocation, because the
|
||||||
functions we call below for output may no longer work properly
|
functions we call below for output may no longer work properly
|
||||||
after relocation. */
|
after relocation. */
|
||||||
if (! GL(dl_loaded)->l_info[DT_NEEDED])
|
struct link_map *l;
|
||||||
|
|
||||||
|
if (GL(dl_debug_mask) & DL_DEBUG_PRELINK)
|
||||||
|
{
|
||||||
|
struct r_scope_elem *scope = &GL(dl_loaded)->l_searchlist;
|
||||||
|
|
||||||
|
for (i = 0; i < scope->r_nlist; i++)
|
||||||
|
{
|
||||||
|
l = scope->r_list [i];
|
||||||
|
if (l->l_faked)
|
||||||
|
{
|
||||||
|
_dl_printf ("\t%s => not found\n", l->l_libname->name);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (_dl_name_match_p (GL(dl_trace_prelink), l))
|
||||||
|
GL(dl_trace_prelink_map) = l;
|
||||||
|
_dl_printf ("\t%s => %s (0x%0*Zx, 0x%0*Zx)",
|
||||||
|
l->l_libname->name[0] ? l->l_libname->name
|
||||||
|
: rtld_progname ?: "<main program>",
|
||||||
|
l->l_name[0] ? l->l_name
|
||||||
|
: rtld_progname ?: "<main program>",
|
||||||
|
(int) sizeof l->l_map_start * 2, l->l_map_start,
|
||||||
|
(int) sizeof l->l_addr * 2, l->l_addr);
|
||||||
|
#ifdef USE_TLS
|
||||||
|
if (l->l_tls_modid)
|
||||||
|
_dl_printf (" TLS(0x%Zx, 0x%0*Zx)\n", l->l_tls_modid,
|
||||||
|
(int) sizeof l->l_tls_offset * 2,
|
||||||
|
l->l_tls_offset);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
_dl_printf ("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (! GL(dl_loaded)->l_info[DT_NEEDED])
|
||||||
_dl_printf ("\tstatically linked\n");
|
_dl_printf ("\tstatically linked\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
struct link_map *l;
|
for (l = GL(dl_loaded)->l_next; l; l = l->l_next)
|
||||||
|
if (l->l_faked)
|
||||||
if (GL(dl_debug_mask) & DL_DEBUG_PRELINK)
|
/* The library was not found. */
|
||||||
{
|
_dl_printf ("\t%s => not found\n", l->l_libname->name);
|
||||||
struct r_scope_elem *scope = &GL(dl_loaded)->l_searchlist;
|
else
|
||||||
|
_dl_printf ("\t%s => %s (0x%0*Zx)\n", l->l_libname->name,
|
||||||
for (i = 0; i < scope->r_nlist; i++)
|
l->l_name, (int) sizeof l->l_map_start * 2,
|
||||||
{
|
l->l_map_start);
|
||||||
l = scope->r_list [i];
|
|
||||||
if (l->l_faked)
|
|
||||||
{
|
|
||||||
_dl_printf ("\t%s => not found\n", l->l_libname->name);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (_dl_name_match_p (GL(dl_trace_prelink), l))
|
|
||||||
GL(dl_trace_prelink_map) = l;
|
|
||||||
_dl_printf ("\t%s => %s (0x%0*Zx, 0x%0*Zx)",
|
|
||||||
l->l_libname->name[0] ? l->l_libname->name
|
|
||||||
: rtld_progname ?: "<main program>",
|
|
||||||
l->l_name[0] ? l->l_name
|
|
||||||
: rtld_progname ?: "<main program>",
|
|
||||||
(int) sizeof l->l_map_start * 2,
|
|
||||||
l->l_map_start,
|
|
||||||
(int) sizeof l->l_addr * 2,
|
|
||||||
l->l_addr);
|
|
||||||
#ifdef USE_TLS
|
|
||||||
if (l->l_tls_modid)
|
|
||||||
_dl_printf (" TLS(0x%Zx, 0x%0*Zx)\n", l->l_tls_modid,
|
|
||||||
(int) sizeof l->l_tls_offset * 2,
|
|
||||||
l->l_tls_offset);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
_dl_printf ("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (l = GL(dl_loaded)->l_next; l; l = l->l_next)
|
|
||||||
if (l->l_faked)
|
|
||||||
/* The library was not found. */
|
|
||||||
_dl_printf ("\t%s => not found\n", l->l_libname->name);
|
|
||||||
else
|
|
||||||
_dl_printf ("\t%s => %s (0x%0*Zx)\n", l->l_libname->name,
|
|
||||||
l->l_name, (int) sizeof l->l_map_start * 2,
|
|
||||||
l->l_map_start);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__builtin_expect (mode, trace) != trace)
|
if (__builtin_expect (mode, trace) != trace)
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2003-05-14 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* Makefile (crti-objs, crtn-objs): New variables.
|
||||||
|
(omit-deps, extra-objs): Add crtn.
|
||||||
|
($(objpfx)libpthread.so): Depend on both crti and crtn
|
||||||
|
and links to them in multidir.
|
||||||
|
($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
|
||||||
|
|
||||||
2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
|
2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
|
* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
|
||||||
|
@ -209,8 +209,25 @@ $(objpfx)libpthread_nonshared.a: $(addprefix $(objpfx),$(addsuffix .os,$(libpthr
|
|||||||
$(AR) $(ARFLAGS) $@ $^
|
$(AR) $(ARFLAGS) $@ $^
|
||||||
|
|
||||||
ifeq ($(build-shared),yes)
|
ifeq ($(build-shared),yes)
|
||||||
extra-objs += crti.o
|
|
||||||
omit-deps += crti
|
# Set the `multidir' variable by grabbing the variable from the compiler.
|
||||||
|
# We do it once and save the result in a generated makefile.
|
||||||
|
-include $(objpfx)multidir.mk
|
||||||
|
$(objpfx)multidir.mk: $(common-objpfx)config.make
|
||||||
|
dir=`$(CC) $(CFLAGS) $(CPPFLAGS) -print-multi-directory`; \
|
||||||
|
echo "multidir := $$dir" > $@T
|
||||||
|
mv -f $@T $@
|
||||||
|
|
||||||
|
crti-objs := crti.o
|
||||||
|
crtn-objs := crtn.o
|
||||||
|
ifneq (,$(patsubst .,,$(multidir)))
|
||||||
|
generated-dirs := $(firstword $(subst /, , $(multidir)))
|
||||||
|
crti-objs += $(multidir)/crti.o
|
||||||
|
crtn-objs += $(multidir)/crtn.o
|
||||||
|
omit-deps += $(multidir)/crti $(multidir)/crtn
|
||||||
|
endif
|
||||||
|
extra-objs += $(crti-objs) $(crtn-objs)
|
||||||
|
omit-deps += crti crtn
|
||||||
|
|
||||||
CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions
|
CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions
|
||||||
endif
|
endif
|
||||||
@ -292,8 +309,9 @@ $(objpfx)tst-cond11: $(common-objpfx)rt/librt.a
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
extra-B-pthread.so = -B$(common-objpfx)nptl/
|
extra-B-pthread.so = -B$(common-objpfx)nptl/
|
||||||
$(objpfx)libpthread.so: $(objpfx)crti.o
|
$(objpfx)libpthread.so: $(addprefix $(objpfx),$(crti-objs) $(crtn-objs))
|
||||||
$(objpfx)libpthread.so: +preinit += $(objpfx)crti.o
|
$(objpfx)libpthread.so: +preinit += $(addprefix $(objpfx),$(crti-objs))
|
||||||
|
$(objpfx)libpthread.so: +postinit += $(addprefix $(objpfx),$(crtn-objs))
|
||||||
|
|
||||||
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
|
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
|
||||||
# This ensures they will load libc.so for needed symbols if loaded by
|
# This ensures they will load libc.so for needed symbols if loaded by
|
||||||
@ -339,6 +357,10 @@ $(objpfx)crti.S: $(objpfx)pt-initfini.s
|
|||||||
sed -n -e '1,/@HEADER_ENDS/p' \
|
sed -n -e '1,/@HEADER_ENDS/p' \
|
||||||
-e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
|
-e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
|
||||||
-e '/@TRAILER_BEGINS/,$$p' $< > $@
|
-e '/@TRAILER_BEGINS/,$$p' $< > $@
|
||||||
|
$(objpfx)crtn.S: $(objpfx)pt-initfini.s
|
||||||
|
sed -n -e '1,/@HEADER_ENDS/p' \
|
||||||
|
-e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
|
||||||
|
-e '/@TRAILER_BEGINS/,$$p' $< > $@
|
||||||
|
|
||||||
$(objpfx)defs.h: $(objpfx)pt-initfini.s
|
$(objpfx)defs.h: $(objpfx)pt-initfini.s
|
||||||
sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
|
sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
|
||||||
@ -347,26 +369,19 @@ $(objpfx)defs.h: $(objpfx)pt-initfini.s
|
|||||||
$(objpfx)crti.o: $(objpfx)crti.S $(objpfx)defs.h
|
$(objpfx)crti.o: $(objpfx)crti.S $(objpfx)defs.h
|
||||||
$(compile.S) -g0 $(ASFLAGS-.os) -o $@
|
$(compile.S) -g0 $(ASFLAGS-.os) -o $@
|
||||||
|
|
||||||
# Set the `multidir' variable by grabbing the variable from the compiler.
|
$(objpfx)crtn.o: $(objpfx)crtn.S $(objpfx)defs.h
|
||||||
# We do it once and save the result in a generated makefile.
|
$(compile.S) -g0 $(ASFLAGS-.os) -o $@
|
||||||
-include $(objpfx)multidir.mk
|
|
||||||
$(objpfx)multidir.mk: $(common-objpfx)config.make
|
|
||||||
dir=`$(CC) $(CFLAGS) $(CPPFLAGS) -print-multi-directory`; \
|
|
||||||
echo "multidir := $$dir" > $@T
|
|
||||||
mv -f $@T $@
|
|
||||||
|
|
||||||
generated += crti.S defs.h pt-initfini.s multidir.mk
|
ifneq ($(multidir),.)
|
||||||
|
|
||||||
extra-objs += crti.o
|
|
||||||
omit-deps += crti
|
|
||||||
ifneq (,$(filter-out .,$(multidir)))
|
|
||||||
generated-dirs := $(firstword $(subst /, , $(multidir)))
|
|
||||||
extra-objs += $(multidir)/crti.o
|
|
||||||
omit-deps += $(multidir)/crti
|
|
||||||
$(objpfx)$(multidir)/crti.o: $(objpfx)crti.o $(objpfx)$(multidir)/
|
$(objpfx)$(multidir)/crti.o: $(objpfx)crti.o $(objpfx)$(multidir)/
|
||||||
ln -f $< $@
|
ln -f $< $@
|
||||||
|
|
||||||
|
$(objpfx)$(multidir)/crtn.o: $(objpfx)crtn.o $(objpfx)$(multidir)/
|
||||||
|
ln -f $< $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
generated += crti.S crtn.S defs.h pt-initfini.s
|
||||||
|
|
||||||
generated += $(objpfx)tst-atfork2.mtrace \
|
generated += $(objpfx)tst-atfork2.mtrace \
|
||||||
$(addsuffix .so,$(strip $(modules-names)))
|
$(addsuffix .so,$(strip $(modules-names)))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user