]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Merge tag 'elfutils-0.170' into mjw/RH-DTS dts-0.170
authorMark Wielaard <mark@klomp.org>
Thu, 3 Aug 2017 10:37:37 +0000 (12:37 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 3 Aug 2017 12:21:08 +0000 (14:21 +0200)
elfutils 0.170 release

Conflicts:
libcpu/Makefile.am
libdw/Makefile.am
tests/Makefile.am

12 files changed:
1  2 
backends/Makefile.am
configure.ac
libasm/Makefile.am
libcpu/Makefile.am
libdw/Makefile.am
libebl/Makefile.am
libebl/eblopenbackend.c
libelf/Makefile.am
tests/Makefile.am
tests/run-addrcfi.sh
tests/run-allregs.sh
tests/run-strip-g.sh

index 96004dcc754eaaaacee55a2e1bc40095e6941e57,37dc2d20f545001a3cf6042313b1613b30b0bc6d..03b9d2019b15290ed4e758d71c064cb4056b5c2a
@@@ -46,32 -45,8 +46,33 @@@ lib_LIBRARIES = libebl_static_pic.
  
  libelf = ../libelf/libelf.so
  libdw = ../libdw/libdw.so
+ libeu = ../lib/libeu.a
  
-            ppc64_resolve_sym.c \
 +# The following is minimal set of backends that we link with libdw to
 +# avoid dlopen. Note repeats files below because some backends reuse
 +# each others files.
 +static_SRCS = i386_init.c i386_symbol.c i386_corenote.c i386_cfi.c \
 +           i386_retval.c i386_regs.c i386_auxv.c i386_syscall.c \
 +           i386_initreg.c i386_unwind.c \
 +           x86_64_init.c x86_64_symbol.c x86_64_corenote.c x86_64_cfi.c \
 +           x86_64_retval.c x86_64_regs.c x86_64_syscall.c \
 +           x86_64_initreg.c x86_64_unwind.c x32_corenote.c \
 +           ia64_init.c ia64_symbol.c ia64_regs.c ia64_retval.c \
 +           aarch64_init.c aarch64_regs.c aarch64_symbol.c   \
 +           aarch64_corenote.c aarch64_retval.c aarch64_cfi.c \
 +           aarch64_initreg.c aarch64_unwind.c \
 +           ppc_init.c ppc_symbol.c ppc_retval.c ppc_regs.c \
 +           ppc_corenote.c ppc_auxv.c ppc_attrs.c ppc_syscall.c \
 +           ppc_cfi.c ppc_initreg.c \
 +           ppc64_init.c ppc64_symbol.c ppc64_retval.c ppc64_corenote.c \
++           ppc64_resolve_sym.c ppc64_unwind.c \
 +           s390_init.c s390_symbol.c s390_regs.c s390_retval.c \
 +           s390_corenote.c s390x_corenote.c s390_cfi.c s390_initreg.c \
 +           s390_unwind.c bpf_init.c bpf_regs.c
 +
 +libebl_static_pic_a_SOURCES = $(static_SRCS)
 +am_libebl_static_pic_a_OBJECTS = $(static_SRCS:.c=.os)
 +
  i386_SRCS = i386_init.c i386_symbol.c i386_corenote.c i386_cfi.c \
            i386_retval.c i386_regs.c i386_auxv.c i386_syscall.c \
            i386_initreg.c i386_unwind.c
diff --cc configure.ac
Simple merge
Simple merge
index 33c30a902f93445a169c852a95819d33924d5ad3,94de56efb5dc73f2c6072ac308d875eaa621daaa..d16ba69be6e59344b7b579e883faacc2d01ae62d
@@@ -50,10 -48,6 +50,8 @@@ x86_64_disasm.o: x86_64.mnemonics $(src
  noinst_LIBRARIES += libcpu_bpf.a
  libcpu_bpf_a_SOURCES = bpf_disasm.c
  libcpu_bpf_a_CFLAGS = $(AM_CFLAGS) -Wno-format-nonliteral
- endif
 +libcpu_static_pic_a_SOURCES += $(libcpu_bpf_a_SOURCES)
 +bpf_disasm_CFLAGS = -fPIC -Wno-format-nonliteral
  
  %_defs: $(srcdir)/defs/i386
        $(AM_V_GEN)m4 -D$* -DDISASSEMBLER $< > $@T
index 4cb36716f62198bf9a1557e76d492eb00e5d9c6d,ff8c291e021c8f010d9747dd07e6b2f1a545d3ec..b3e781d80dce6205767988ccd2fc2c0abb2f919a
@@@ -90,22 -89,8 +90,23 @@@ libdw_a_SOURCES = dwarf_begin.c dwarf_b
                  dwarf_aggregate_size.c dwarf_getlocation_implicit_pointer.c \
                  dwarf_getlocation_die.c dwarf_getlocation_attr.c \
                  dwarf_getalt.c dwarf_setalt.c dwarf_cu_getdwarf.c \
-                 dwarf_cu_die.c dwarf_peel_type.c
+                 dwarf_cu_die.c dwarf_peel_type.c dwarf_default_lower_bound.c
  
-               dwarf_bytesize.c dwarf_bitsize.c dwarf_peel_type.c
 +# Minimal library with symbols needed by those libebl backends that we
 +# ship statically.  This is so that e.g. strip doesn't end up bringing
 +# in the whole of libdw, and depending on libbz2, liblzma, etc.
 +libdw_static_pic_a_SOURCES = libdw_form.c dwarf_child.c dwarf_attr.c \
 +              dwarf_attr_integrate.c dwarf_formref_die.c dwarf_error.c \
 +              dwarf_tag.c dwarf_formref.c \
 +              dwarf_abbrev_hash.c dwarf_sig8_hash.c \
 +              dwarf_formudata.c libdw_findcu.c dwarf_offdie.c \
 +              dwarf_getabbrev.c dwarf_nextcu.c libdw_alloc.c \
 +              dwarf_hasattr_integrate.c dwarf_hasattr.c \
 +              dwarf_aggregate_size.c dwarf_siblingof.c dwarf_formsdata.c \
 +              dwarf_srclang.c dwarf_formflag.c dwarf_diecu.c \
++              dwarf_bytesize.c dwarf_bitsize.c dwarf_peel_type.c \
++              dwarf_default_lower_bound.c
 +
  if MAINTAINER_MODE
  BUILT_SOURCES = $(srcdir)/known-dwarf.h
  MAINTAINERCLEANFILES = $(srcdir)/known-dwarf.h
@@@ -116,21 -101,21 +117,24 @@@ endi
  
  libdw_pic_a_SOURCES =
  am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
 +am_libdw_static_pic_a_OBJECTS = $(libdw_static_pic_a_SOURCES:.c=.os)
  
- libdw_so_SOURCES =
- libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
+ libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \
 -        ../libdwfl/libdwfl_pic.a ../libebl/libebl.a
 +        ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
 +        ../backends/libebl_static_pic.a \
-         ../libcpu/libcpu_static_pic.a \
-         ../libelf/libelf.so
++        ../libcpu/libcpu_static_pic.a
+ libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so
+ libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS)
+ libdw_so_SOURCES =
+ libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
  # The rpath is necessary for libebl because its $ORIGIN use will
  # not fly in a setuid executable that links in libdw.
-       $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--soname,$@.$(VERSION),-z,defs \
+       $(AM_V_CCLD)$(LINK) -shared -o $@ \
+               -Wl,--soname,$@.$(VERSION),-z,defs,-z,relro \
                -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
                -Wl,--version-script,$<,--no-undefined \
-               -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
-               -ldl -lz $(argp_LDADD) $(zip_LIBS)
+               -Wl,--whole-archive $(libdw_so_LIBS) -Wl,--no-whole-archive \
+               $(libdw_so_LDLIBS)
        @$(textrel_check)
        $(AM_V_at)ln -fs $@ $@.$(VERSION)
  
index 7034b61cb0cd394dfb7bf26b1ea86daf9f2a5e1f,2491df80903a1b828e960e6f1e99707e35fd7dbd..6d5b07f6cf6c26e08b2db8ef4837004ed21bed24
@@@ -53,9 -53,9 +53,10 @@@ gen_SOURCES = eblopenbackend.c eblclose
              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
+             eblunwind.c eblresolvesym.c eblcheckreloctargettype.c \
+             ebl_data_marker_symbol.c
  
 +libebl_a_CFLAGS = -fvisibility=hidden $(AM_CFLAGS)
  libebl_a_SOURCES = $(gen_SOURCES)
  
  noinst_HEADERS = libeblP.h ebl-hooks.h
Simple merge
Simple merge
index d17ffd4736902275946b5b4fc46c04255c04d920,3735084fed8b03a26e7b05c45e0a95e6b6a222bd..483f3878ffb00a3cafe8c8da59d8d3be23dd0e8c
@@@ -80,9 -80,10 +80,10 @@@ TESTS = run-arextract.sh run-arsymtest.
        newscn run-strip-test.sh run-strip-test2.sh \
        run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \
        run-strip-test6.sh run-strip-test7.sh run-strip-test8.sh \
 -      run-strip-test9.sh run-strip-test10.sh run-strip-test11.sh \
 +      run-strip-test9.sh run-strip-test10.sh \
+       run-strip-nothing.sh run-strip-g.sh \
        run-strip-groups.sh run-strip-reloc.sh run-strip-strmerge.sh \
-       run-strip-nobitsalign.sh \
+       run-strip-nobitsalign.sh run-strip-remove-keep.sh \
        run-unstrip-test.sh run-unstrip-test2.sh run-unstrip-test3.sh \
        run-unstrip-test4.sh run-unstrip-M.sh run-elfstrmerge-test.sh \
        run-ecp-test.sh run-ecp-test2.sh run-alldts.sh \
Simple merge
Simple merge
index 0000000000000000000000000000000000000000,13038195dbae11ec63652ea8c0ea7f1b1cd265e7..8024aa5273cb431fec60f69bdaab4be0232f7e18
mode 000000,100755..100755
--- /dev/null
@@@ -1,0 -1,102 +1,77 @@@
 -echo $status
 -if test $status -ne 0; then
 -  echo no symtab found in strip.out
 -  exit 1
 -fi
 -
 -status=0
 -testrun ${abs_top_builddir}/src/readelf -S debug.out > readelf.out
 -grep SYMTAB readelf.out || status=$?
 -echo $status
 -if test $status -ne 1; then
 -  echo symtab found in debug.out
 -  exit 1
 -fi
 -
 -# arm (with data marker in .debug_frame). See tests/run-addrcfi.sh
 -testfiles testfilearm
 -
 -echo arm strip -g to file with debug file
 -testrun ${abs_top_builddir}/src/strip -g -o strip.out -f debug.out testfilearm ||
 -  { echo "*** failed to strip -g -o strip.out -f debug.out a.out"; exit -1; }
 -
 -status=0
 -testrun ${abs_top_builddir}/src/readelf -S strip.out > readelf.out
 -grep SYMTAB readelf.out || status=$?
+ #! /bin/sh
+ # Copyright (C) 2017 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 the GNU General Public License as published by
+ # the Free Software Foundation; either version 3 of the License, or
+ # (at your option) any later version.
+ #
+ # 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 a copy of the GNU General Public License
+ # along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ . $srcdir/test-subr.sh
+ # When stripping just the debug sections/symbols we keep the symtab
+ # in the main ELF file. There should be no symbols pointing into the
+ # debug sections and so there should not be a copy in the debug file
+ # except for a NOBITS one.
+ tempfiles a.out strip.out debug.out readelf.out
+ echo Create debug a.out.
+ echo "int main() { return 1; }" | gcc -g -xc -
+ echo strip -g to file with debug file
+ testrun ${abs_top_builddir}/src/strip -g -o strip.out -f debug.out ||
+   { echo "*** failed to strip -g -o strip.out -f debug.out a.out"; exit -1; }
+ status=0
+ testrun ${abs_top_builddir}/src/readelf -S strip.out > readelf.out
+ grep SYMTAB readelf.out || status=$?
+ echo $status
+ if test $status -ne 0; then
+   echo no symtab found in strip.out
+   exit 1
+ fi
+ status=0
+ testrun ${abs_top_builddir}/src/readelf -S debug.out > readelf.out
+ grep SYMTAB readelf.out || status=$?
+ echo $status
+ if test $status -ne 1; then
+   echo symtab found in debug.out
+   exit 1
+ fi
+ # aarch64 (with data marker in .debug_frame). See tests/run-addrcfi.sh
+ testfiles testfileaarch64
+ echo aarch64 strip -g to file with debug file
+ testrun ${abs_top_builddir}/src/strip -g -o strip.out -f debug.out testfileaarch64 ||
+   { echo "*** failed to strip -g -o strip.out -f debug.out a.out"; exit -1; }
+ status=0
+ testrun ${abs_top_builddir}/src/readelf -S strip.out > readelf.out
+ grep SYMTAB readelf.out || status=$?
+ echo $status
+ if test $status -ne 0; then
+   echo no symtab found in strip.out
+   exit 1
+ fi
+ status=0
+ testrun ${abs_top_builddir}/src/readelf -S debug.out > readelf.out
+ grep SYMTAB readelf.out || status=$?
+ echo $status
+ if test $status -ne 1; then
+   echo symtab found in debug.out
+   exit 1
+ fi
+ exit 0