about summary refs log tree commit diff
path: root/Makerules
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-11-14 03:59:56 +0000
committerRoland McGrath <roland@gnu.org>2002-11-14 03:59:56 +0000
commit6e3d59bc0581399e0d8218f7b7fb10961735a82b (patch)
treecc8ae99aadd6f0b845944b173aa3d7b3102e8686 /Makerules
parentcdedcc7943114bbbcbc2be1a0ef5716b0ef2e862 (diff)
downloadglibc-6e3d59bc0581399e0d8218f7b7fb10961735a82b.tar.gz
glibc-6e3d59bc0581399e0d8218f7b7fb10961735a82b.tar.xz
glibc-6e3d59bc0581399e0d8218f7b7fb10961735a82b.zip
* scripts/abilist.awk: New file.
	* Makefile (distribute): Add it.
	* Makerules ($(objpfx)%.dynsym, $(objpfx)%.symlist): New rules.
	(tests): Depend on .symlist file for each $(install-lib.so-versioned).
	[! subdir] (tests): Depend on libc.symlist.
	(generated): Add those files.
	* aclocal.m4 (LIBC_PROG_BINUTILS): Check for objdump, set OBJDUMP.
	* configure: Regenerated.
	* config.make.in (OBJDUMP): New variable, substituted by configure.

	* malloc/mcheck.c (struct hdr): New members `block' and `magic2'.
	(mallochook, reallochook): Set them up.
	(checkhdr): Check HDR->magic2 value.
	(freehook): Reset HDR->magic2.
	(memalignhook): New static function.
	(old_memalign_hook): New static variable.
	(mcheck, reallochook): Set __memalign_hook to memalignhook.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules22
1 files changed, 22 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index 461451f8a4..1fab920a0a 100644
--- a/Makerules
+++ b/Makerules
@@ -1073,6 +1073,28 @@ endif
 
 # The include magic above causes those files to use this variable for flags.
 CPPFLAGS-nonlib = -DNOT_IN_libc=1
+
+
+ifeq ($(versioning),yes)
+# Generate normalized lists of symbols, versions, and data sizes.
+# This is handy for checking against existing library binaries.
+
+$(objpfx)%.symlist: $(..)scripts/abilist.awk $(objpfx)%.dynsym
+	$(AWK) -f $^ > $@T
+	mv -f $@T $@
+
+$(objpfx)%.dynsym: $(objpfx)%.so
+	$(OBJDUMP) --dynamic-syms $< > $@T
+	mv -f $@T $@
+
+tests: $(patsubst %.so,$(objpfx)%.symlist,$(install-lib.so-versioned))
+generated += $(install-lib.so-versioned:.so=.symlist)
+
+ifndef subdir
+tests: $(objpfx)libc.symlist
+generated += libc.symlist
+endif
+endif
 
 .PHONY: TAGS
 TAGS: $(objpfx)distinfo $(..)MakeTAGS