From: Mark Wielaard Date: Wed, 10 Jun 2020 22:06:30 +0000 (+0200) Subject: Merge tag 'elfutils-0.178' into mjw/RH-DTS X-Git-Tag: dts-0.178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49f13584d60322578c19b6118393ab04236ca7bf;p=thirdparty%2Felfutils.git Merge tag 'elfutils-0.178' into mjw/RH-DTS elfutils 0.178 release Adopt ebl backends loading from trunk. --- 49f13584d60322578c19b6118393ab04236ca7bf diff --cc backends/Makefile.am index 2c0c7f0b9,f4052125b..92c50f256 --- a/backends/Makefile.am +++ b/backends/Makefile.am @@@ -163,43 -97,17 +97,17 @@@ riscv_SRCS = riscv_init.c riscv_symbol. csky_SRCS = csky_attrs.c csky_init.c csky_symbol.c csky_cfi.c \ csky_regs.c csky_initreg.c csky_corenote.c - libebl_csky_pic_a_SOURCES = $(csky_SRCS) - am_libebl_csky_pic_a_OBJECTS = $(csky_SRCS:.c=.os) - - libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu) - @rm -f $(@:.so=.map) - $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ - > $(@:.so=.map) - $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $(@:.map=.so) \ - -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ - -Wl,--version-script,$(@:.so=.map),--no-undefined \ - -Wl,--as-needed $(libelf) $(libdw) $(libeu) - @$(textrel_check) - - libebl_i386.so: $(cpu_i386) - libebl_x86_64.so: $(cpu_x86_64) - libebl_bpf.so: $(cpu_bpf) - - install: install-am install-ebl-modules - install-ebl-modules: - $(mkinstalldirs) $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR) - for m in $(modules); do \ - $(INSTALL_PROGRAM) libebl_$${m}.so $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}-$(PACKAGE_VERSION).so; \ - ln -fs libebl_$${m}-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}.so; \ - done - - uninstall: uninstall-am - for m in $(modules); do \ - rm -f $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}-$(PACKAGE_VERSION).so; \ - rm -f $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}.so; \ - done - rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR) + -libebl_backends_a_SOURCES = $(i386_SRCS) $(sh_SRCS) $(x86_64_SRCS) \ - $(ia64_SRCS) $(alpha_SRCS) $(arm_SRCS) \ - $(aarch64_SRCS) $(sparc_SRCS) $(ppc_SRCS) \ - $(ppc64_SRCS) $(s390_SRCS) $(tilegx_SRCS) \ - $(m68k_SRCS) $(bpf_SRCS) $(riscv_SRCS) $(csky_SRCS) ++libebl_backends_a_CFLAGS = -fPIC $(AM_CFLAGS) ++libebl_backends_a_SOURCES = $(i386_SRCS) $(x86_64_SRCS) \ ++ $(ia64_SRCS) $(aarch64_SRCS) $(ppc_SRCS) \ ++ $(ppc64_SRCS) $(s390_SRCS) \ ++ $(bpf_SRCS) + + libebl_backends_pic_a_SOURCES = + am_libebl_backends_pic_a_OBJECTS = $(libebl_backends_a_SOURCES:.c=.os) noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c - EXTRA_DIST = $(foreach m,$(modules),$($(m)_SRCS)) $(modules:=_reloc.def) + EXTRA_DIST = $(modules:=_reloc.def) - CLEANFILES += $(foreach m,$(modules),\ - libebl_$(m).map libebl_$(m).so \ - $(am_libebl_$(m)_pic_a_OBJECTS)) + MOSTLYCLEANFILES = $(am_libebl_backends_pic_a_OBJECTS) diff --cc configure.ac index 3afc51ea7,5a2dc373e..4ec5dea2f --- a/configure.ac +++ b/configure.ac @@@ -17,14 -17,8 +17,14 @@@ dnl GNU General Public License for mor dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . - AC_INIT([elfutils],[0.177],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/]) + AC_INIT([elfutils],[0.178],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/]) +dnl Workaround for older autoconf < 2.64 +m4_ifndef([AC_PACKAGE_URL], + [AC_DEFINE([PACKAGE_URL], ["http://elfutils.org/"], + [Define to home page for this package]) + AC_SUBST([PACKAGE_URL], ["http://elfutils.org/"])]) + dnl Workaround for older autoconf < 2.64 m4_ifndef([AC_PACKAGE_URL], [AC_DEFINE([PACKAGE_URL], ["http://elfutils.org/"], diff --cc debuginfod/Makefile.am index 000000000,52ead30ae..7ae74e060 mode 000000,100644..100644 --- a/debuginfod/Makefile.am +++ b/debuginfod/Makefile.am @@@ -1,0 -1,118 +1,119 @@@ + ## Makefile.am for libdebuginfod library subdirectory in elfutils. + ## + ## Process this file with automake to create Makefile.in + ## + ## Copyright (C) 2019 Red Hat, Inc. + ## This file is part of elfutils. + ## + ## This file is free software; you can redistribute it and/or modify + ## it under the terms of either + ## + ## * the GNU Lesser General Public License as published by the Free + ## Software Foundation; either version 3 of the License, or (at + ## your option) any later version + ## + ## or + ## + ## * the GNU General Public License as published by the Free + ## Software Foundation; either version 2 of the License, or (at + ## your option) any later version + ## + ## or both in parallel, as here. + ## + ## elfutils 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 + ## General Public License for more details. + ## + ## You should have received copies of the GNU General Public License and + ## the GNU Lesser General Public License along with this program. If + ## not, see . + ## + include $(top_srcdir)/config/eu.am + AM_CPPFLAGS += -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ + -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf \ + $(libmicrohttpd_CFLAGS) $(libcurl_CFLAGS) $(sqlite3_CFLAGS) \ + $(libarchive_CFLAGS) + VERSION = 1 + + # Disable eu- prefixing for artifacts (binaries & man pages) in this + # directory, since they do not conflict with binutils tools. + program_prefix= + program_transform_name = s,x,x, + + if BUILD_STATIC + libasm = ../libasm/libasm.a + libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread + libelf = ../libelf/libelf.a -lz + libdebuginfod = ./libdebuginfod.a $(libcurl_LIBS) + else + libasm = ../libasm/libasm.so + libdw = ../libdw/libdw.so + libelf = ../libelf/libelf.so + libdebuginfod = ./libdebuginfod.so + endif + libebl = ../libebl/libebl.a + libeu = ../lib/libeu.a + + AM_LDFLAGS = -Wl,-rpath-link,../libelf:../libdw:. + + bin_PROGRAMS = debuginfod debuginfod-find + debuginfod_SOURCES = debuginfod.cxx + debuginfod_LDADD = $(libdw) $(libelf) $(libeu) $(libdebuginfod) $(libmicrohttpd_LIBS) $(libcurl_LIBS) $(sqlite3_LIBS) $(libarchive_LIBS) -lpthread -ldl + + debuginfod_find_SOURCES = debuginfod-find.c + debuginfod_find_LDADD = $(libeu) $(libdebuginfod) + -noinst_LIBRARIES = libdebuginfod.a -noinst_LIBRARIES += libdebuginfod_pic.a ++lib_LIBRARIES = libdebuginfod.a ++noinst_LIBRARIES = libdebuginfod_pic.a + ++libdebuginfod_a_CFLAGS = -fPIC $(AM_CFLAGS) + libdebuginfod_a_SOURCES = debuginfod-client.c + libdebuginfod_pic_a_SOURCES = debuginfod-client.c + am_libdebuginfod_pic_a_OBJECTS = $(libdebuginfod_a_SOURCES:.c=.os) + + pkginclude_HEADERS = debuginfod.h + + libdebuginfod_so_LIBS = libdebuginfod_pic.a + libdebuginfod_so_LDLIBS = $(libcurl_LIBS) + libdebuginfod.so$(EXEEXT): $(srcdir)/libdebuginfod.map $(libdebuginfod_so_LIBS) + $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \ + -Wl,--soname,$@.$(VERSION) \ + -Wl,--version-script,$<,--no-undefined \ + -Wl,--whole-archive $(libdebuginfod_so_LIBS) -Wl,--no-whole-archive \ + $(libdebuginfod_so_LDLIBS) + @$(textrel_check) + $(AM_V_at)ln -fs $@ $@.$(VERSION) + + install: install-am libdebuginfod.so + $(mkinstalldirs) $(DESTDIR)$(libdir) + $(INSTALL_PROGRAM) libdebuginfod.so $(DESTDIR)$(libdir)/libdebuginfod-$(PACKAGE_VERSION).so + ln -fs libdebuginfod-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libdebuginfod.so.$(VERSION) + ln -fs libdebuginfod.so.$(VERSION) $(DESTDIR)$(libdir)/libdebuginfod.so + + uninstall: uninstall-am + rm -f $(DESTDIR)$(libdir)/libdebuginfod-$(PACKAGE_VERSION).so + rm -f $(DESTDIR)$(libdir)/libdebuginfod.so.$(VERSION) + rm -f $(DESTDIR)$(libdir)/libdebuginfod.so + rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/elfutils + + EXTRA_DIST = libdebuginfod.map + MOSTLYCLEANFILES = $(am_libdebuginfod_pic_a_OBJECTS) libdebuginfod.so.$(VERSION) + CLEANFILES += $(am_libdebuginfod_pic_a_OBJECTS) libdebuginfod.so + + # automake std-options override: arrange to pass LD_LIBRARY_PATH + installcheck-binPROGRAMS: $(bin_PROGRAMS) + bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ + case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ + *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ + esac; \ + f=`echo "$$p" | \ + sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + for opt in --help --version; do \ + if LD_LIBRARY_PATH=$(DESTDIR)$(libdir) \ + $(DESTDIR)$(bindir)/$$f $$opt > c$${pid}_.out 2> c$${pid}_.err \ + && test -n "`cat c$${pid}_.out`" \ + && test -z "`cat c$${pid}_.err`"; then :; \ + else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \ + done; \ + done; rm -f c$${pid}_.???; exit $$bad diff --cc libasm/Makefile.am index fcc7ffc9e,b2bff9292..a92b63adc --- a/libasm/Makefile.am +++ b/libasm/Makefile.am @@@ -38,7 -38,6 +38,7 @@@ noinst_LIBRARIES = libasm_pic. noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so) pkginclude_HEADERS = libasm.h - libasm_a_CFLAGS = -fPIC -fvisibility=hidden $(AM_CFLAGS) ++libasm_a_CFLAGS = -fPIC $(AM_CFLAGS) libasm_a_SOURCES = asm_begin.c asm_abort.c asm_end.c asm_error.c \ asm_getelf.c asm_newscn.c asm_newscn_ingrp.c \ asm_newsubscn.c asm_newsym.c asm_newcomsym.c \ diff --cc libdw/Makefile.am index 166e37cfe,33b5838dc..ef566399a --- a/libdw/Makefile.am +++ b/libdw/Makefile.am @@@ -41,7 -41,6 +41,7 @@@ noinst_PROGRAMS = $(noinst_LIBRARIES:_p include_HEADERS = dwarf.h pkginclude_HEADERS = libdw.h known-dwarf.h - libdw_a_CFLAGS = -fPIC -fvisibility=hidden $(AM_CFLAGS) ++libdw_a_CFLAGS = -fPIC $(AM_CFLAGS) libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \ dwarf_getpubnames.c dwarf_getabbrev.c dwarf_tag.c \ dwarf_error.c dwarf_nextcu.c dwarf_diename.c dwarf_offdie.c \ diff --cc libdwelf/Makefile.am index dd7adf079,a35a2873c..4932b8ddc --- a/libdwelf/Makefile.am +++ b/libdwelf/Makefile.am @@@ -39,7 -39,6 +39,7 @@@ noinst_LIBRARIES = libdwelf.a libdwelf_ pkginclude_HEADERS = libdwelf.h noinst_HEADERS = libdwelfP.h - libdwelf_a_CFLAGS = -fPIC -fvisibility=hidden $(AM_CFLAGS) ++libdwelf_a_CFLAGS = -fPIC $(AM_CFLAGS) libdwelf_a_SOURCES = dwelf_elf_gnu_debuglink.c dwelf_dwarf_gnu_debugaltlink.c \ dwelf_elf_gnu_build_id.c dwelf_scn_gnu_compressed_size.c \ dwelf_strtab.c dwelf_elf_begin.c \ diff --cc libdwfl/Makefile.am index d9d13b283,47bd62a5e..af77bb0c4 --- a/libdwfl/Makefile.am +++ b/libdwfl/Makefile.am @@@ -39,7 -39,7 +39,7 @@@ noinst_LIBRARIES += libdwfl_pic. pkginclude_HEADERS = libdwfl.h - libdwfl_a_CFLAGS = -fPIC -fvisibility=hidden $(AM_CFLAGS) - ++libdwfl_a_CFLAGS = -fPIC $(AM_CFLAGS) libdwfl_a_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c dwfl_version.c \ dwfl_module.c dwfl_report_elf.c relocate.c \ dwfl_module_build_id.c dwfl_module_report_build_id.c \ diff --cc libebl/Makefile.am index ecebdd065,d0d475b83..e488dd36f --- a/libebl/Makefile.am +++ b/libebl/Makefile.am @@@ -28,37 -28,37 +28,39 @@@ ## not, see . ## include $(top_srcdir)/config/eu.am + if BUILD_STATIC AM_CFLAGS += $(fpic_CFLAGS) + endif AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libdw -I$(srcdir)/../libasm VERSION = 1 - LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ - lib_LIBRARIES = libebl.a + noinst_LIBRARIES = libebl.a libebl_pic.a - pkginclude_HEADERS = libebl.h + libebl_a_SOURCES = eblopenbackend.c eblclosebackend.c eblreloctypename.c \ + eblsegmenttypename.c eblsectiontypename.c \ + eblmachineflagname.c eblsymboltypename.c \ + ebldynamictagname.c eblsectionname.c \ + eblsymbolbindingname.c eblbackendname.c eblosabiname.c \ + eblmachineflagcheck.c eblmachinesectionflagcheck.c \ + eblreloctypecheck.c eblrelocvaliduse.c \ + eblrelocsimpletype.c ebldynamictagcheck.c \ + eblcorenotetypename.c eblobjnotetypename.c eblcorenote.c \ + eblobjnote.c ebldebugscnp.c eblgotpcreloccheck.c \ + eblcopyrelocp.c eblsectionstripp.c eblelfclass.c \ + eblelfdata.c eblelfmachine.c ebl_check_special_symbol.c \ + eblbsspltp.c eblretval.c eblreginfo.c eblnonerelocp.c \ + eblrelativerelocp.c eblsysvhashentrysize.c eblauxvinfo.c \ + eblcheckobjattr.c ebl_check_special_section.c \ + ebl_syscall_abi.c eblabicfi.c eblstother.c eblinitreg.c \ + ebldwarftoregno.c eblnormalizepc.c eblunwind.c \ + eblresolvesym.c eblcheckreloctargettype.c \ + ebl_data_marker_symbol.c - gen_SOURCES = eblopenbackend.c eblclosebackend.c \ - eblreloctypename.c eblsegmenttypename.c \ - eblsectiontypename.c eblmachineflagname.c \ - eblsymboltypename.c ebldynamictagname.c eblsectionname.c \ - eblsymbolbindingname.c eblbackendname.c eblosabiname.c \ - eblmachineflagcheck.c eblmachinesectionflagcheck.c \ - eblreloctypecheck.c eblrelocvaliduse.c eblrelocsimpletype.c \ - ebldynamictagcheck.c eblcorenotetypename.c eblobjnotetypename.c \ - eblcorenote.c eblobjnote.c ebldebugscnp.c \ - eblgotpcreloccheck.c eblcopyrelocp.c eblsectionstripp.c \ - eblelfclass.c eblelfdata.c eblelfmachine.c \ - ebl_check_special_symbol.c eblbsspltp.c eblretval.c \ - eblreginfo.c eblnonerelocp.c eblrelativerelocp.c \ - eblsysvhashentrysize.c eblauxvinfo.c eblcheckobjattr.c \ - ebl_check_special_section.c ebl_syscall_abi.c eblabicfi.c \ - eblstother.c eblinitreg.c ebldwarftoregno.c eblnormalizepc.c \ - eblunwind.c eblresolvesym.c eblcheckreloctargettype.c \ - ebl_data_marker_symbol.c + libebl_pic_a_SOURCES = + am_libebl_pic_a_OBJECTS = $(libebl_a_SOURCES:.c=.os) - libebl_a_CFLAGS = -fvisibility=hidden $(AM_CFLAGS) - libebl_a_SOURCES = $(gen_SOURCES) ++libebl_a_CFLAGS = -fPIC $(AM_CFLAGS) + - noinst_HEADERS = libeblP.h ebl-hooks.h + noinst_HEADERS = libebl.h libeblP.h ebl-hooks.h - CLEANFILES += $(am_libebl_pic_a_OBJECTS) + MOSTLYCLEANFILES = $(am_libebl_pic_a_OBJECTS) diff --cc libebl/eblopenbackend.c index 9431897be,210b47e88..db0006328 --- a/libebl/eblopenbackend.c +++ b/libebl/eblopenbackend.c @@@ -41,14 -41,22 +41,14 @@@ #include #include - const char *i386_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen); - const char *x86_64_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen); - const char *ppc_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen); - const char *ppc64_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen); - const char *ia64_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen); - const char *s390_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen); - const char *aarch64_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen); - const char *bpf_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen); -const char *i386_init (Elf *, GElf_Half, Ebl *, size_t); -const char *sh_init (Elf *, GElf_Half, Ebl *, size_t); -const char *x86_64_init (Elf *, GElf_Half, Ebl *, size_t); -const char *ia64_init (Elf *, GElf_Half, Ebl *, size_t); -const char *alpha_init (Elf *, GElf_Half, Ebl *, size_t); -const char *arm_init (Elf *, GElf_Half, Ebl *, size_t); -const char *aarch64_init (Elf *, GElf_Half, Ebl *, size_t); -const char *sparc_init (Elf *, GElf_Half, Ebl *, size_t); -const char *ppc_init (Elf *, GElf_Half, Ebl *, size_t); -const char *ppc64_init (Elf *, GElf_Half, Ebl *, size_t); -const char *s390_init (Elf *, GElf_Half, Ebl *, size_t); -const char *tilegx_init (Elf *, GElf_Half, Ebl *, size_t); -const char *m68k_init (Elf *, GElf_Half, Ebl *, size_t); -const char *bpf_init (Elf *, GElf_Half, Ebl *, size_t); -const char *riscv_init (Elf *, GElf_Half, Ebl *, size_t); -const char *csky_init (Elf *, GElf_Half, Ebl *, size_t); ++const char *i386_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); ++const char *x86_64_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); ++const char *ppc_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); ++const char *ppc64_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); ++const char *ia64_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); ++const char *s390_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); ++const char *aarch64_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); ++const char *bpf_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); /* This table should contain the complete list of architectures as far as the ELF specification is concerned. */ diff --cc libelf/Makefile.am index 0d8679f26,d5d63f733..51e86dc80 --- a/libelf/Makefile.am +++ b/libelf/Makefile.am @@@ -51,7 -51,6 +51,7 @@@ endi pkginclude_HEADERS = elf-knowledge.h - libelf_a_CFLAGS = -fPIC -fvisibility=hidden $(AM_CFLAGS) ++libelf_a_CFLAGS = -fPIC $(AM_CFLAGS) libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \ elf_begin.c elf_next.c elf_rand.c elf_end.c elf_kind.c \ gelf_getclass.c elf_getbase.c elf_getident.c \