about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-13 00:56:24 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-13 00:56:24 +0000
commitfc618fd0fdf3f7e2e8b448894bbe5cc49788934d (patch)
treef050a842a1f71f7aff2a096748d4118f046aea83
parentefd56f5391638567bef3755a28be639d1a763167 (diff)
downloadglibc-fc618fd0fdf3f7e2e8b448894bbe5cc49788934d.tar.gz
glibc-fc618fd0fdf3f7e2e8b448894bbe5cc49788934d.tar.xz
glibc-fc618fd0fdf3f7e2e8b448894bbe5cc49788934d.zip
Update.
	* stdlib/Makefile: Remove code to automatically import GMP.
-rw-r--r--ChangeLog2
-rw-r--r--elf/check-textrel.c30
-rw-r--r--stdlib/Makefile52
3 files changed, 28 insertions, 56 deletions
diff --git a/ChangeLog b/ChangeLog
index 54c7be688e..fabc9681ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
 
+	* stdlib/Makefile: Remove code to automatically import GMP.
+
 	* elf/Makefile (tests): Add rules to build and run check-textrel.
 	* elf/check-textrel.c: New file.
 
diff --git a/elf/check-textrel.c b/elf/check-textrel.c
index 43e0206ab8..c0592a2336 100644
--- a/elf/check-textrel.c
+++ b/elf/check-textrel.c
@@ -1,3 +1,23 @@
+/* Check for text relocations in DSOs.
+   Copyright (C) 2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contribute by Ulrich Drepper <drepper@redhat.com>. 2002.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
 #include <byteswap.h>
 #include <elf.h>
 #include <endian.h>
@@ -77,13 +97,15 @@ AB(handle_file) (const char *fname, int fd)
      bit set.  */
   for (cnt = 0; (cnt + 1) * sizeof (E(Dyn)) - 1 < pmemsz; ++cnt)
     {
-      if (dyn[cnt].d_tag == DT_NULL)
+      unsigned int tag = SWAP (dyn[cnt].d_tag);
+
+      if (tag == DT_NULL)
 	/* We reached the end.  */
 	break;
 
-      if (dyn[cnt].d_tag == DT_TEXTREL
-	  || (dyn[cnt].d_tag == DT_FLAGS
-	      && (dyn[cnt].d_un.d_val & DF_TEXTREL) != 0))
+      if (tag == DT_TEXTREL
+	  || (tag == DT_FLAGS
+	      && (SWAP (dyn[cnt].d_un.d_val) & DF_TEXTREL) != 0))
 	{
 	  /* Urgh!  The DSO has text relocations.  */
 	  printf ("%s: text relocations used\n", fname);
diff --git a/stdlib/Makefile b/stdlib/Makefile
index b4f2758d57..90b6d8b1c8 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -94,58 +94,6 @@ endif
 
 include ../Rules
 
-
-ifdef gmp-srcdir
-
-gmp-srcdir := $(firstword $(filter-out ..//%,$(..)$(gmp-srcdir) $(gmp-srcdir)))
-
-# Copy the mpn source files we use from the GNU MP source directory.
-# `gmp-srcdir' is set by doing `configure --with-gmp=DIR'.
-# (Do not try this at home.  You need an as yet unreleased version of GNU MP.)
-
-mpn-sysdep := $(addsuffix .c,$(mpn-routines)) \
-	      $(addsuffix .S,$(mpn-routines)) \
-	      $(addsuffix .s,$(mpn-routines)) gmp-mparam.h asm-syntax.h
-
-mpn-try := $(addprefix $(gmp-srcdir)/mpn/*/,$(mpn-sysdep)) \
-	   $(addprefix $(gmp-srcdir)/mpn/*/*/,$(mpn-sysdep))
-mpn-found = $(wildcard $(mpn-try))
-
-include mpn-copy.mk
-%.mk: gen-%; sh $< > $@
-
-mpn-copy-1 := $(patsubst $(gmp-srcdir)/mpn/%,$(sysdep_dir)/%,$(mpn-found))
-mpn-copy-sysdep := $(mpn-copy-sysdep) $(mpn-copy-1)
-mpn-copy-sysdep := $(filter $(addsuffix %,\
-		     $(wildcard $(sort $(dir $(mpn-copy-sysdep))))), \
-		    $(mpn-copy-sysdep))
-$(mpn-copy-1): $(sysdep_dir)/%: $(ignore gmp2glibc.sed) $(gmp-srcdir)/mpn/%
-	$(gmp2glibc)
-
-mpn-stuff = $(mpn-copy-sysdep) $(mpn-copy)
-
-# chmod so I don't edit them by mistake.
-define gmp2glibc
-$(ignore sed -f $^ > $@-tmp)
-cp $< $@-tmp
-chmod a-w $@-tmp
-mv -f $@-tmp $@
-endef
-
-mpn-copy = $(filter-out $(mpn-sysdep),$(mpn-headers))# mp_clz_tab.c)
-$(mpn-copy): %: $(ignore gmp2glibc.sed) $(gmp-srcdir)/%; $(gmp2glibc)
-
-.PHONY: copy-mpn clean-mpn mpn-stuff
-mpn-stuff: $(mpn-stuff)
-copy-mpn: $(mpn-stuff)
-ifeq ($(with-cvs),yes)
-	test ! -d CVS || cvs $(CVSOPTS) commit -m'Updated from $(gmp-srcdir)' $+
-endif
-clean-mpn:
-	rm -f $(mpn-stuff)
-
-endif
-
 # Testdir has to be named stdlib and needs to be writable
 test-canon-ARGS = --test-dir=${common-objpfx}stdlib