2001-09-13  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-deps.c (_dl_map_object_deps): Fix filter handling if filter
	is already found earlier in the search scope.

2001-09-12  Jakub Jelinek  <jakub@redhat.com>

	* rt/Makefile (LDFLAGS-rt.so): Use shared thread library as librt's
	filter.
This commit is contained in:
Ulrich Drepper 2001-09-14 04:25:14 +00:00
parent 31a5468806
commit 23382b36a7
3 changed files with 22 additions and 19 deletions

View File

@ -1,3 +1,13 @@
2001-09-13 Jakub Jelinek <jakub@redhat.com>
* elf/dl-deps.c (_dl_map_object_deps): Fix filter handling if filter
is already found earlier in the search scope.
2001-09-12 Jakub Jelinek <jakub@redhat.com>
* rt/Makefile (LDFLAGS-rt.so): Use shared thread library as librt's
filter.
2001-09-13 Ulrich Drepper <drepper@redhat.com> 2001-09-13 Ulrich Drepper <drepper@redhat.com>
* sysdeps/powerpc/fpu/libm-test-ulps: Adjust expected errors for j0. * sysdeps/powerpc/fpu/libm-test-ulps: Adjust expected errors for j0.

View File

@ -362,11 +362,11 @@ _dl_map_object_deps (struct link_map *map,
/* This object is already in the search list we /* This object is already in the search list we
are building. Don't add a duplicate pointer. are building. Don't add a duplicate pointer.
Just added by _dl_map_object. */ Just added by _dl_map_object. */
for (late = newp; late->next; late = late->next) for (late = newp; late->next != NULL; late = late->next)
if (late->next->map == args.aux) if (late->next->map == args.aux)
break; break;
if (late->next) if (late->next != NULL)
{ {
/* The object is somewhere behind the current /* The object is somewhere behind the current
position in the search path. We have to position in the search path. We have to
@ -380,9 +380,9 @@ _dl_map_object_deps (struct link_map *map,
late->next = late->next->next; late->next = late->next->next;
/* We must move the object earlier in the chain. */ /* We must move the object earlier in the chain. */
if (args.aux->l_prev) if (args.aux->l_prev != NULL)
args.aux->l_prev->l_next = args.aux->l_next; args.aux->l_prev->l_next = args.aux->l_next;
if (args.aux->l_next) if (args.aux->l_next != NULL)
args.aux->l_next->l_prev = args.aux->l_prev; args.aux->l_next->l_prev = args.aux->l_prev;
args.aux->l_prev = newp->map->l_prev; args.aux->l_prev = newp->map->l_prev;
@ -394,21 +394,10 @@ _dl_map_object_deps (struct link_map *map,
else else
{ {
/* The object must be somewhere earlier in the /* The object must be somewhere earlier in the
list. That's good, we only have to insert list. Undo to the current list element what
an entry for the duplicate list. */ we did above. */
orig->next = NULL; /* Never used. */ memcpy (orig, newp, sizeof (*newp));
continue;
/* Now we have a problem. The element
pointing to ORIG in the list must
point to NEWP now. This is the only place
where we need this backreference and this
situation is really not that frequent. So
we don't use a double-linked list but
instead search for the preceding element. */
late = known;
while (late->next != orig)
late = late->next;
late->next = newp;
} }
} }
else else

View File

@ -54,6 +54,10 @@ include ../Rules
$(objpfx)librt.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a \ $(objpfx)librt.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a \
$(shared-thread-library) $(shared-thread-library)
ifeq (yes,$(have-thread-library))
LDFLAGS-rt.so += -Wl,-F,lib$(libprefix)$(patsubst lib%.so,%,$(notdir $(shared-thread-library))).so$($(notdir $(shared-thread-library))-version)
endif
ifeq (yes,$(build-shared)) ifeq (yes,$(build-shared))
$(addprefix $(objpfx),$(tests)): $(objpfx)librt.so $(shared-thread-library) $(addprefix $(objpfx),$(tests)): $(objpfx)librt.so $(shared-thread-library)
else else