summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--NEWS2
-rw-r--r--configure.ac13
-rw-r--r--libasm/ChangeLog4
-rw-r--r--libasm/Makefile.am10
-rw-r--r--libdw/ChangeLog4
-rw-r--r--libdw/Makefile.am10
-rw-r--r--libebl/ChangeLog4
-rw-r--r--libebl/Makefile.am56
-rw-r--r--libelf/ChangeLog4
-rw-r--r--libelf/Makefile.am8
-rw-r--r--src/ChangeLog6
-rw-r--r--src/Makefile.am4
-rw-r--r--src/strings.c5
-rw-r--r--tests/ChangeLog5
-rw-r--r--tests/Makefile.am4
16 files changed, 93 insertions, 50 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a7850aa..b390eeda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-08-28 Ulrich Drepper <drepper@redhat.com>
+
+ * configure.ac: Add --enable-gcov option.
+
2005-08-06 Ulrich Drepper <drepper@redhat.com>
* configure.ac: Add --enable-gprof option.
diff --git a/NEWS b/NEWS
index 77dc2a67..7d5d4afc 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ libelf: speed-ups of non-mmap reading.
strings: New program.
+Implement --enable-gcov option for configure.
+
Version 0.114:
libelf: new function elf_getaroff
diff --git a/configure.ac b/configure.ac
index cdade456..f721310d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,8 +138,19 @@ if test "$use_gprof" = yes; then
LDFLAGS="$LDFLAGS -pg"
fi
AM_CONDITIONAL(GPROF, test "$use_gprof" = yes)
+
+# Enable gcov suport.
+AC_ARG_ENABLE([gcov],
+AC_HELP_STRING([--enable-gcov],
+[build binaries with gcov support]), [use_gcov=yes], [use_gcov=no])
+if test "$use_gcov" = yes; then
+ CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
+ LDFLAGS="$LDFLAGS -fprofile-arcs"
+fi
+AM_CONDITIONAL(GPROF, test "$use_gprof" = yes)
+
AM_CONDITIONAL(BUILD_STATIC, [dnl
-test "$use_mudflap" = yes -o "$use_gprof" = yes])
+test "$use_mudflap" = yes -o "$use_gprof" = yes -o "$use_gcov" = yes])
LIBEBL_SUBDIR="$PACKAGE"
AC_ARG_ENABLE([libebl-subdir],
diff --git a/libasm/ChangeLog b/libasm/ChangeLog
index 6adeef1e..c9a26b9a 100644
--- a/libasm/ChangeLog
+++ b/libasm/ChangeLog
@@ -1,3 +1,7 @@
+2005-08-28 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
+
2005-08-02 Ulrich Drepper <drepper@redhat.com>
* Makefile.am (AM_CFLAGS): Add -std=gnu99.
diff --git a/libasm/Makefile.am b/libasm/Makefile.am
index 7802a5c0..172143c3 100644
--- a/libasm/Makefile.am
+++ b/libasm/Makefile.am
@@ -51,10 +51,10 @@ am_libasm_pic_a_OBJECTS = $(libasm_a_SOURCES:.c=.os)
libasm_so_SOURCES =
libasm.so: libasm_pic.a libasm.map
- $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
- -Wl,--version-script,$(srcdir)/libasm.map,--no-undefined \
- -Wl,--soname,$@.$(VERSION) \
- ../libebl/libebl.a ../libelf/libelf.so
+ $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+ -Wl,--version-script,$(srcdir)/libasm.map,--no-undefined \
+ -Wl,--soname,$@.$(VERSION) \
+ ../libebl/libebl.a ../libelf/libelf.so
if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
ln -fs $@ $@.$(VERSION)
@@ -83,4 +83,4 @@ endif
noinst_HEADERS = libasmP.h symbolhash.h
EXTRA_DIST = libasm.map
-CLEANFILES = $(am_libasm_pic_a_OBJECTS)
+CLEANFILES = $(am_libasm_pic_a_OBJECTS) *.gcno *.gcda
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index 3b84ab9e..14a0ce6b 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,7 @@
+2005-08-28 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
+
2005-08-23 Roland McGrath <roland@redhat.com>
* dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
diff --git a/libdw/Makefile.am b/libdw/Makefile.am
index ad6b28a1..1f659702 100644
--- a/libdw/Makefile.am
+++ b/libdw/Makefile.am
@@ -76,10 +76,10 @@ libdw_so_SOURCES =
libdw.so: $(srcdir)/libdw.map libdw_pic.a \
../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
../libelf/libelf.so
- $(CC) -shared -o $@ -Wl,--soname,$@.$(VERSION),-z,defs \
- -Wl,--version-script,$<,--no-undefined \
- -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive \
- -ldl
+ $(LINK) -shared -o $@ -Wl,--soname,$@.$(VERSION),-z,defs \
+ -Wl,--version-script,$<,--no-undefined \
+ -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
+ -ldl
if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
ln -fs $@ $@.$(VERSION)
@@ -110,4 +110,4 @@ noinst_HEADERS = libdwP.h memory-access.h dwarf_abbrev_hash.h
EXTRA_DIST = libdw.map
-CLEANFILES = $(am_libdw_pic_a_OBJECTS)
+CLEANFILES = $(am_libdw_pic_a_OBJECTS) *.gcno *.gcda
diff --git a/libebl/ChangeLog b/libebl/ChangeLog
index cb0d0095..d5248293 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -1,3 +1,7 @@
+2005-08-28 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am: Use $(LINK) not $(CC) when creating DSOs.
+
2005-08-13 Roland McGrath <roland@redhat.com>
* ia64_symbol.c (ia64_machine_flag_check): New function.
diff --git a/libebl/Makefile.am b/libebl/Makefile.am
index ead129bd..93271e52 100644
--- a/libebl/Makefile.am
+++ b/libebl/Makefile.am
@@ -69,9 +69,9 @@ textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
libebl_i386_so_SOURCES =
libebl_i386.so: libebl_i386_pic.a libebl_i386.map
- $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
- -Wl,--version-script,$(srcdir)/libebl_i386.map \
- -Wl,-z,defs $(libelf) $(libmudflap)
+ $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+ -Wl,--version-script,$(srcdir)/libebl_i386.map \
+ -Wl,-z,defs $(libelf) $(libmudflap)
$(textrel_check)
@@ -81,9 +81,9 @@ am_libebl_sh_pic_a_OBJECTS = $(sh_SRCS:.c=.os)
libebl_sh_so_SOURCES =
libebl_sh.so: libebl_sh_pic.a libebl_sh.map
- $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
- -Wl,--version-script,$(srcdir)/libebl_sh.map \
- -Wl,-z,defs $(libmudflap)
+ $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+ -Wl,--version-script,$(srcdir)/libebl_sh.map \
+ -Wl,-z,defs $(libmudflap)
$(textrel_check)
@@ -93,9 +93,9 @@ am_libebl_x86_64_pic_a_OBJECTS = $(x86_64_SRCS:.c=.os)
libebl_x86_64_so_SOURCES =
libebl_x86_64.so: libebl_x86_64_pic.a libebl_x86_64.map
- $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
- -Wl,--version-script,$(srcdir)/libebl_x86_64.map \
- -Wl,-z,defs $(libelf) $(libmudflap)
+ $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+ -Wl,--version-script,$(srcdir)/libebl_x86_64.map \
+ -Wl,-z,defs $(libelf) $(libmudflap)
$(textrel_check)
@@ -105,9 +105,9 @@ am_libebl_ia64_pic_a_OBJECTS = $(ia64_SRCS:.c=.os)
libebl_ia64_so_SOURCES =
libebl_ia64.so: libebl_ia64_pic.a libebl_ia64.map
- $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
- -Wl,--version-script,$(srcdir)/libebl_ia64.map \
- -Wl,-z,defs $(libmudflap)
+ $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+ -Wl,--version-script,$(srcdir)/libebl_ia64.map \
+ -Wl,-z,defs $(libmudflap)
$(textrel_check)
@@ -117,9 +117,9 @@ am_libebl_alpha_pic_a_OBJECTS = $(alpha_SRCS:.c=.os)
libebl_alpha_so_SOURCES =
libebl_alpha.so: libebl_alpha_pic.a libebl_alpha.map
- $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
- -Wl,--version-script,$(srcdir)/libebl_alpha.map \
- -Wl,-z,defs $(libmudflap)
+ $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+ -Wl,--version-script,$(srcdir)/libebl_alpha.map \
+ -Wl,-z,defs $(libmudflap)
$(textrel_check)
@@ -129,9 +129,9 @@ am_libebl_arm_pic_a_OBJECTS = $(arm_SRCS:.c=.os)
libebl_arm_so_SOURCES =
libebl_arm.so: libebl_arm_pic.a libebl_arm.map
- $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
- -Wl,--version-script,$(srcdir)/libebl_arm.map \
- -Wl,-z,defs $(libmudflap)
+ $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+ -Wl,--version-script,$(srcdir)/libebl_arm.map \
+ -Wl,-z,defs $(libmudflap)
$(textrel_check)
@@ -141,9 +141,9 @@ am_libebl_sparc_pic_a_OBJECTS = $(sparc_SRCS:.c=.os)
libebl_sparc_so_SOURCES =
libebl_sparc.so: libebl_sparc_pic.a libebl_sparc.map
- $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
- -Wl,--version-script,$(srcdir)/libebl_sparc.map \
- -Wl,-z,defs $(libmudflap)
+ $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+ -Wl,--version-script,$(srcdir)/libebl_sparc.map \
+ -Wl,-z,defs $(libmudflap)
$(textrel_check)
@@ -153,9 +153,9 @@ am_libebl_ppc_pic_a_OBJECTS = $(ppc_SRCS:.c=.os)
libebl_ppc_so_SOURCES =
libebl_ppc.so: libebl_ppc_pic.a libebl_ppc.map
- $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
- -Wl,--version-script,$(srcdir)/libebl_ppc.map \
- -Wl,-z,defs $(libelf) $(libmudflap)
+ $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+ -Wl,--version-script,$(srcdir)/libebl_ppc.map \
+ -Wl,-z,defs $(libelf) $(libmudflap)
$(textrel_check)
@@ -165,9 +165,9 @@ am_libebl_ppc64_pic_a_OBJECTS = $(ppc64_SRCS:.c=.os)
libebl_ppc64_so_SOURCES =
libebl_ppc64.so: libebl_ppc64_pic.a libebl_ppc64.map
- $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
- -Wl,--version-script,$(srcdir)/libebl_ppc64.map \
- -Wl,-z,defs $(libelf) $(libmudflap)
+ $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+ -Wl,--version-script,$(srcdir)/libebl_ppc64.map \
+ -Wl,-z,defs $(libelf) $(libmudflap)
$(textrel_check)
@@ -199,5 +199,5 @@ noinst_HEADERS = libeblP.h $(noinst_LIBRARIES:%_pic.a=%.h)
EXTRA_DIST = $(noinst_LIBRARIES:%_pic.a=%.map) \
$(foreach m,$(modules),$($(m)_SRCS))
-CLEANFILES = $(am_libebl_pic_a_OBJECTS) \
+CLEANFILES = $(am_libebl_pic_a_OBJECTS) *.gcno *.gcda \
$(foreach m,$(modules),$(am_libebl_$(m)_pic_a_OBJECTS))
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index 6c8b5b1e..17b7136e 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,7 @@
+2005-08-28 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
+
2005-08-27 Ulrich Drepper <drepper@redhat.com>
* elf_begin.c (file_read_elf): Avoid reading ELF header from file
diff --git a/libelf/Makefile.am b/libelf/Makefile.am
index 28d0d6ed..17851fc5 100644
--- a/libelf/Makefile.am
+++ b/libelf/Makefile.am
@@ -92,9 +92,9 @@ am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
libelf_so_SOURCES =
libelf.so: libelf_pic.a libelf.map
- $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
- -Wl,--version-script,$(srcdir)/libelf.map,--no-undefined \
- -Wl,--soname,$@.$(VERSION),-z,-defs
+ $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+ -Wl,--version-script,$(srcdir)/libelf.map,--no-undefined \
+ -Wl,--soname,$@.$(VERSION),-z,-defs
if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
ln -fs $@ $@.$(VERSION)
@@ -122,4 +122,4 @@ noinst_HEADERS = elf.h abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
version_xlate.h dl-hash.h
EXTRA_DIST = libelf.map
-CLEANFILES = $(am_libelf_pic_a_OBJECTS)
+CLEANFILES = $(am_libelf_pic_a_OBJECTS) *.gcno *.gcda
diff --git a/src/ChangeLog b/src/ChangeLog
index d0928825..9494dd00 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
2005-08-28 Ulrich Drepper <drepper@redhat.com>
+ * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
+ (CLEANFILES): Add *.gcno *.gcda *.gconv.
+
+ * strings.c (process_chunk): Reorder expressions in conditional
+ (process_chunk_mb): Likewise.
+
* strings.c: New file.
* Makefile.am (bin_PROGRAMS): Add strings.
(strings_no_Wstring): Define.
diff --git a/src/Makefile.am b/src/Makefile.am
index ef944776..1a489497 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -67,7 +67,7 @@ libmudflap = -lmudflap
endif
if BUILD_STATIC
-libdw = ../libdw/libdw.a $(libelf) $(libebl)
+libdw = ../libdw/libdw.a $(libelf) $(libebl) -ldl
libelf = ../libelf/libelf.a
else
libdw = ../libdw/libdw.so
@@ -148,4 +148,4 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS)
done; \
done; rm -f c$${pid}_.???; exit $$bad
-CLEANFILES = none_ld.os $(ld_modules:.c=.os)
+CLEANFILES = none_ld.os $(ld_modules:.c=.os) *.gcno *.gcda *.gconv
diff --git a/src/strings.c b/src/strings.c
index fa7efa4a..1898ac74 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -334,7 +334,7 @@ process_chunk_mb (const char *fname, const unsigned char *buf, off64_t to,
ch = buf[3] << 24 | buf[2] << 16 | buf[1] << 8 | buf[0];
}
- if (ch <= 255 && (ch == '\t' || isprint (ch)))
+ if (ch <= 255 && (isprint (ch) || ch == '\t'))
{
++buf;
++curlen;
@@ -399,8 +399,7 @@ process_chunk (const char *fname, const unsigned char *buf, off64_t to,
const unsigned char *start = buf;
while (len > 0)
{
- if ((*buf == '\t' || isprint (*buf))
- && (! char_7bit || *buf <= 127))
+ if ((isprint (*buf) || *buf == '\t') && (! char_7bit || *buf <= 127))
{
++buf;
++curlen;
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 514f4a48..81f8d1d6 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,10 @@
2005-08-28 Ulrich Drepper <drepper@redhat.com>
+ * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
+ (CLEANFILES): Add *.gcno *.gcda *.gconv.
+
+2005-08-28 Ulrich Drepper <drepper@redhat.com>
+
* run-strings-test.sh: New file.
* Makefile.am (TESTS, EXTRA_DIST): Add it.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 78cf502b..1fb0c1c9 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -78,7 +78,7 @@ libmudflap = -lmudflap
endif
if BUILD_STATIC
-libdw = ../libdw/libdw.a $(libelf) $(libebl)
+libdw = ../libdw/libdw.a $(libelf) $(libebl) -ldl
libelf = ../libelf/libelf.a
libasm = ../libasm/libasm.a
else
@@ -126,4 +126,4 @@ asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
-CLEANFILES = xxx
+CLEANFILES = xxx *.gcno *.gcda *gconv