From 18618fd74777576cc20dce341bb71be327f9ed48 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 28 Jul 2005 21:29:22 +0000 Subject: [PATCH] Merge all of libdwfl.a into libdw.a. libdwfl.a is not installed. Fix building of libdwfl. libdwfl.a must not depend on libwu.a since the latter is not available after installation. Add copies of the crc32 files to libdwfl. --- libdw/ChangeLog | 5 +++++ libdw/Makefile.am | 5 +++-- libdwfl/ChangeLog | 10 ++++++++++ libdwfl/Makefile.am | 1 + libdwfl/find-debuginfo.c | 3 ++- libdwfl/libdwflP.h | 4 ++++ tests/ChangeLog | 4 ++++ tests/Makefile.am | 2 +- 8 files changed, 30 insertions(+), 4 deletions(-) diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 3ec3b65ca..85f12c4e9 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,8 @@ +2005-07-28 Ulrich Drepper + + * Makefile.am (libdw.so): No need to link with libeu.a anymore. + (libdw_a_LIBADD): Add all files from libdwfl.a. + 2005-07-27 Roland McGrath * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in, diff --git a/libdw/Makefile.am b/libdw/Makefile.am index 92ca94183..097ec3a25 100644 --- a/libdw/Makefile.am +++ b/libdw/Makefile.am @@ -72,7 +72,7 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os) libdw_so_SOURCES = libdw.so: $(srcdir)/libdw.map libdw_pic.a \ - ../libdwfl/libdwfl_pic.a ../libebl/libebl.a ../lib/libeu.a \ + ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \ ../libelf/libelf.so $(CC) -shared -o $@ -Wl,--soname,$@.$(VERSION),-z,defs \ -Wl,--version-script,$<,--no-undefined \ @@ -81,7 +81,6 @@ libdw.so: $(srcdir)/libdw.map libdw_pic.a \ if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi ln -fs $@ $@.$(VERSION) - %.os: %.c %.o if $(COMPILE) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ @@ -103,6 +102,8 @@ uninstall: uninstall-am rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/elfutils endif +libdw_a_LIBADD = $(addprefix ../libdwfl/,$(shell $(AR) t ../libdwfl/libdwfl.a)) + noinst_HEADERS = libdwP.h memory-access.h dwarf_abbrev_hash.h EXTRA_DIST = libdw.map diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 8120125a4..398676324 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,13 @@ +2005-07-28 Ulrich Drepper + + * libdwfl_crc32.c: New file. + * libdwfl_crc32_file.c: New file. + * libdwflP.h: Declare the new functions. + * Makefile.am (libdwfl_a_SOURCES): Add libdwfl_crc32.c and + libdwfl_crc32_file.c. + * libdwfl/find-debuginfo.c (check_crc): Use __libdwfl_crc32_file + instead of crc32_file. + 2005-07-28 Roland McGrath * ptest.c: Moved to ../tests/dwflmodtest.c. diff --git a/libdwfl/Makefile.am b/libdwfl/Makefile.am index 8fb9775d1..5b52dc3ff 100644 --- a/libdwfl/Makefile.am +++ b/libdwfl/Makefile.am @@ -47,6 +47,7 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c \ lines.c dwfl_lineinfo.c dwfl_linemodule.c \ dwfl_module_getsrc.c dwfl_getsrc.c \ dwfl_module_getsrc_file.c \ + libdwfl_crc32.c libdwfl_crc32_file.c \ elf-from-memory.c diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c index c9e640dd1..372ece9e8 100644 --- a/libdwfl/find-debuginfo.c +++ b/libdwfl/find-debuginfo.c @@ -54,7 +54,8 @@ static inline bool check_crc (int fd, GElf_Word debuglink_crc) { uint32_t file_crc; - return crc32_file (fd, &file_crc) == 0 && file_crc == debuglink_crc; + return (__libdwfl_crc32_file (fd, &file_crc) == 0 + && file_crc == debuglink_crc); } int diff --git a/libdwfl/libdwflP.h b/libdwfl/libdwflP.h index ccf6ba5ce..e8fb88c8c 100644 --- a/libdwfl/libdwflP.h +++ b/libdwfl/libdwflP.h @@ -205,6 +205,10 @@ extern Dwfl_Error __libdwfl_cu_getsrclines (struct dwfl_cu *cu) internal_function; +extern uint32_t __libdwfl_crc32 (uint32_t crc, unsigned char *buf, size_t len) + attribute_hidden; +extern int __libdwfl_crc32_file (int fd, uint32_t *resp) attribute_hidden; + /* Avoid PLT entries. */ diff --git a/tests/ChangeLog b/tests/ChangeLog index eb15083b3..957bb3423 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2005-07-28 Ulrich Drepper + + * Makefile.am (dwflmodtest_LDADD): Add $(libebl). + 2005-07-28 Roland McGrath * dwflmodtest.c: New file, moved from ../libdwfl/ptest.c to here. diff --git a/tests/Makefile.am b/tests/Makefile.am index 5504326d4..5560d6eed 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -110,6 +110,6 @@ asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -dwflmodtest_LDADD = $(libdw) $(libelf) $(libmudflap) +dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) CLEANFILES = xxx -- 2.47.2