Blame SPECS/annobin.spec

8f7a3d
8f7a3d
%define __python /opt/rh/gcc-toolset-9/root/usr/bin/python3
8f7a3d
%{?scl:%{?scl_package:%scl_package annobin}}
8f7a3d
8f7a3d
Name:    %{?scl_prefix}annobin
8f7a3d
Summary: Binary annotation plugin for GCC
8f7a3d
Version: 8.79
8f7a3d
Release: 2%{?dist}
8f7a3d
8f7a3d
License: GPLv3+
8f7a3d
URL:     https://fedoraproject.org/wiki/Toolchain/Watermark
8f7a3d
# Maintainer: nickc@redhat.com
8f7a3d
8f7a3d
8f7a3d
# # Do not build the annobin plugin with annotation enabled.
8f7a3d
# # This is because if we are bootstrapping a new build environment we can have
8f7a3d
# # a new version of gcc installed, but without a new of annobin installed.
8f7a3d
# # (i.e. we are building the new version of annobin to go with the new version
8f7a3d
# # of gcc).  If the *old* annobin plugin is used whilst building this new
8f7a3d
# # version, the old plugin will complain that version of gcc for which it
8f7a3d
# # was built is different from the version of gcc that is now being used, and
8f7a3d
# # then it will abort.
8f7a3d
#
8f7a3d
# Suppress this for BZ 1630550.
8f7a3d
# The problem should now only arise when rebasing to a new major version
8f7a3d
# of gcc, in which case the undefine below can be temporarily reinstated.
8f7a3d
#
8f7a3d
# %%undefine _annotated_build
8f7a3d
#
8f7a3d
# Do not use annobin whilst building annobin.  Needed when bootstrapping annobin.
8f7a3d
%undefine _annotated_build
8f7a3d
8f7a3d
# Use "--without tests" to disable the testsuite.  The default is to run them.
8f7a3d
%bcond_without tests
8f7a3d
8f7a3d
# Use "--without annocheck" to disable the installation of the annocheck program.
8f7a3d
%bcond_without annocheck
8f7a3d
8f7a3d
# Set this to zero to disable the requirement for a specific version of gcc.
8f7a3d
# This should only be needed if there is some kind of problem with the version
8f7a3d
# checking logic or when building on RHEL-7 or earlier.
8f7a3d
%global with_hard_gcc_version_requirement 1
8f7a3d
8f7a3d
#---------------------------------------------------------------------------------
8f7a3d
#Source: https://nickc.fedorapeople.org/annobin-%%{version}.tar.xz
8f7a3d
Source:  annobin-%{version}.tar.xz
8f7a3d
# For the latest sources use:  git clone git://sourceware.org/git/annobin.git
8f7a3d
8f7a3d
# Insert patches here, if needed.
8f7a3d
# Patch01: annobin-xxx.patch
8f7a3d
8f7a3d
#---------------------------------------------------------------------------------
8f7a3d
8f7a3d
%{?scl:Requires:%scl_runtime}
8f7a3d
# We need the gcc-toolset-9 to build annobin, as otherwise the versions will not match.
8f7a3d
%{?scl:Requires:%scl_require_package %{scl} gcc}
8f7a3d
8f7a3d
BuildRequires: %{?scl_prefix}gcc %{?scl_prefix}gcc-plugin-devel %{?scl_prefix}gcc-c++
8f7a3d
%{?scl:BuildRequires:%scl_runtime}
8f7a3d
%{?scl:BuildRequires:scl-utils-build}
8f7a3d
8f7a3d
%define gcc_for_annobin %{?_scl_root}/usr/bin/gcc
8f7a3d
%define gxx_for_annobin %{?_scl_root}/usr/bin/g++
8f7a3d
8f7a3d
# [Stolen from gcc-python-plugin]
8f7a3d
# GCC will only load plugins that were built against exactly that build of GCC
8f7a3d
# We thus need to embed the exact GCC version as a requirement within the
8f7a3d
# metadata.
8f7a3d
#
8f7a3d
# Define "gcc_vr", a variable to hold the VERSION-RELEASE string for the gcc
8f7a3d
# we are being built against.
8f7a3d
#
8f7a3d
# Unfortunately, we can't simply run:
8f7a3d
#   rpm -q --qf="%%{version}-%%{release}"
8f7a3d
# to determine this, as there's no guarantee of a sane rpm database within
8f7a3d
# the chroots created by our build system
8f7a3d
#
8f7a3d
# So we instead query the version from gcc's output.
8f7a3d
#
8f7a3d
# gcc.spec has:
8f7a3d
#   Version: %%{gcc_version}
8f7a3d
#   Release: %%{gcc_release}%%{?dist}
8f7a3d
#   ...snip...
8f7a3d
#   echo 'Red Hat %%{version}-%%{gcc_release}' > gcc/DEV-PHASE
8f7a3d
#
8f7a3d
# So, given this output:
8f7a3d
#
8f7a3d
#   $ gcc --version
8f7a3d
#   gcc (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9)
8f7a3d
#   Copyright (C) 2011 Free Software Foundation, Inc.
8f7a3d
#   This is free software; see the source for copying conditions.  There is NO
8f7a3d
#   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8f7a3d
#
8f7a3d
# we can scrape out the "4.6.1" from the version line.
8f7a3d
#
8f7a3d
# The following implements the above:
8f7a3d
%global gcc_vr %(%gcc_for_annobin --version | head -n 1 | sed -e 's|.*(Red\ Hat\ ||g' -e 's|)$||g')
8f7a3d
8f7a3d
# We need the major version of gcc.
8f7a3d
%global gcc_major %(echo "%{gcc_vr}" | cut -f1 -d".")
8f7a3d
%global gcc_next  %(v="%{gcc_major}"; echo $((++v)))
8f7a3d
8f7a3d
# Needed when building the srpm.
8f7a3d
%if 0%{?gcc_major} == 0
8f7a3d
%global gcc_major 0
8f7a3d
%endif
8f7a3d
8f7a3d
# This is a gcc plugin, hence gcc is required.
8f7a3d
%if %{with_hard_gcc_version_requirement}
8f7a3d
# BZ 1607430 - There is an exact requirement on the major version of gcc.
8f7a3d
Requires: (%{?scl_prefix}gcc >= %{gcc_major} with %{?scl_prefix}gcc < %{gcc_next})
8f7a3d
%else
8f7a3d
Requires: %{?scl_prefix}gcc
8f7a3d
%endif
8f7a3d
8f7a3d
8f7a3d
%description
8f7a3d
Provides a plugin for GCC that records extra information in the files
8f7a3d
that it compiles.
8f7a3d
8f7a3d
Note - the plugin is automatically enabled in gcc builds via flags
8f7a3d
provided by the redhat-rpm-macros package.
8f7a3d
8f7a3d
#---------------------------------------------------------------------------------
8f7a3d
%if %{with tests}
8f7a3d
8f7a3d
%package tests
8f7a3d
Summary: Test scripts and binaries for checking the behaviour and output of the annobin plugin
8f7a3d
8f7a3d
%description tests
8f7a3d
Provides a means to test the generation of annotated binaries and the parsing
8f7a3d
of the resulting files.
8f7a3d
8f7a3d
%endif
8f7a3d
8f7a3d
#---------------------------------------------------------------------------------
8f7a3d
%if %{with annocheck}
8f7a3d
8f7a3d
%package annocheck
8f7a3d
Summary: A tool for checking the security hardening status of binaries
8f7a3d
8f7a3d
BuildRequires: gcc elfutils elfutils-devel elfutils-libelf-devel rpm-devel binutils-devel
8f7a3d
8f7a3d
%description annocheck
8f7a3d
Installs the annocheck program which uses the notes generated by annobin to
8f7a3d
check that the specified files were compiled with the correct security
8f7a3d
hardening options.
8f7a3d
8f7a3d
%endif
8f7a3d
8f7a3d
#---------------------------------------------------------------------------------
8f7a3d
8f7a3d
%global ANNOBIN_PLUGIN_DIR %(%gcc_for_annobin --print-file-name=plugin)
8f7a3d
8f7a3d
#---------------------------------------------------------------------------------
8f7a3d
8f7a3d
%prep
8f7a3d
if [ -z "%{gcc_vr}" ]; then
8f7a3d
    echo "*** Missing gcc_vr spec file macro, cannot continue." >&2
8f7a3d
    exit 1
8f7a3d
fi
8f7a3d
8f7a3d
echo "Requires: (%{?scl_prefix}gcc >= %{gcc_major} with %{?scl_prefix}gcc < %{gcc_next})"
8f7a3d
8f7a3d
# Cannot use autosetup as it untar's the sources into annobin-<version>
8f7a3d
# but then tries to change directory into <scl-prefix>-annobin-<version>.
8f7a3d
# %%autosetup -p1
8f7a3d
%setup -q -n annobin-%{version}
8f7a3d
8f7a3d
# The plugin has to be configured with the same arcane configure
8f7a3d
# scripts used by gcc.  Hence we must not allow the Fedora build
8f7a3d
# system to regenerate any of the configure files.
8f7a3d
touch aclocal.m4 plugin/config.h.in
8f7a3d
touch configure */configure Makefile.in */Makefile.in
8f7a3d
# Similarly we do not want to rebuild the documentation.
8f7a3d
touch doc/annobin.info
8f7a3d
8f7a3d
#---------------------------------------------------------------------------------
8f7a3d
8f7a3d
%build
8f7a3d
%configure --quiet --with-gcc-plugin-dir=%{ANNOBIN_PLUGIN_DIR} CC=%gcc_for_annobin CXX=%gxx_for_annobin
8f7a3d
8f7a3d
%make_build
8f7a3d
# Rebuild the plugin, this time using the plugin itself!  This
8f7a3d
# ensures that the plugin works, and that it contains annotations
8f7a3d
# of its own.  This could mean that we end up with a plugin with
8f7a3d
# double annotations in it.  (If the build system enables annotations
8f7a3d
# for plugins by default).  I have not tested this yet, but I think
8f7a3d
# that it should be OK.
8f7a3d
cp plugin/.libs/annobin.so.0.0.0 %{_tmppath}/tmp_annobin.so
8f7a3d
make -C plugin clean
8f7a3d
BUILD_FLAGS="-fplugin=%{_tmppath}/tmp_annobin.so -fplugin-arg-tmp_annobin-rename"
8f7a3d
# If building on RHEL7, enable the next option as the .attach_to_group assembler pseudo op is not available in the assembler.
8f7a3d
# BUILD_FLAGS="$BUILD_FLAGS -fplugin-arg-tmp_annobin-no-attach"
8f7a3d
make -C plugin CXXFLAGS="%{optflags} $BUILD_FLAGS"
8f7a3d
rm %{_tmppath}/tmp_annobin.so
8f7a3d
8f7a3d
#---------------------------------------------------------------------------------
8f7a3d
8f7a3d
%install
8f7a3d
%make_install
8f7a3d
%{__rm} -f %{buildroot}%{_infodir}/dir
8f7a3d
8f7a3d
#---------------------------------------------------------------------------------
8f7a3d
8f7a3d
%if %{with tests}
8f7a3d
%check
8f7a3d
# On RHEL7 the assembler does not support all of the annobin tests.
8f7a3d
# With scl the tests are run with the wrong version of gcc.
8f7a3d
make check GCC=%gcc_for_annobin 
8f7a3d
if [ -f tests/test-suite.log ]; then
8f7a3d
    cat tests/test-suite.log
8f7a3d
fi
8f7a3d
%endif
8f7a3d
8f7a3d
#---------------------------------------------------------------------------------
8f7a3d
8f7a3d
%files
8f7a3d
%{ANNOBIN_PLUGIN_DIR}
8f7a3d
%{_bindir}/built-by
8f7a3d
%{_bindir}/check-abi
8f7a3d
%{_bindir}/hardened
8f7a3d
%{_bindir}/run-on-binaries-in
8f7a3d
%license COPYING3 LICENSE
8f7a3d
%exclude %{_datadir}/doc/annobin-plugin/COPYING3
8f7a3d
%exclude %{_datadir}/doc/annobin-plugin/LICENSE
8f7a3d
%doc %{_datadir}/doc/annobin-plugin/annotation.proposal.txt
8f7a3d
%{_infodir}/annobin.info*
8f7a3d
%{_mandir}/man1/annobin.1*
8f7a3d
%{_mandir}/man1/built-by.1*
8f7a3d
%{_mandir}/man1/check-abi.1*
8f7a3d
%{_mandir}/man1/hardened.1*
8f7a3d
%{_mandir}/man1/run-on-binaries-in.1*
8f7a3d
8f7a3d
%if %{with annocheck}
8f7a3d
%files annocheck
8f7a3d
%{_bindir}/annocheck
8f7a3d
%{_mandir}/man1/annocheck.1*
8f7a3d
%endif
8f7a3d
8f7a3d
#---------------------------------------------------------------------------------
8f7a3d
8f7a3d
%changelog
8f7a3d
* Thu Aug 08 2019 Nick Clifton <nickc@redhat.com> - 8.79-2
8f7a3d
- Import the missing tests/ sub-directory.
8f7a3d
8f7a3d
* Thu Aug 08 2019 Nick Clifton <nickc@redhat.com> - 8.79-1
8f7a3d
- Allow the compiler used to run tests to be specified on the command line.
8f7a3d
8f7a3d
* Tue Aug 06 2019 Nick Clifton <nickc@redhat.com> - 8.78-1
8f7a3d
- Fix a memory allocation error in the annobin plugin.  (#1737306)
8f7a3d
8f7a3d
* Tue Jul 23 2019 Nick Clifton <nickc@redhat.com> - 8.77-4
8f7a3d
- Change the requirement of gcc-toolset-9 to gcc-toolset-9-gcc.  (#1732767)
8f7a3d
8f7a3d
* Tue Jul 23 2019 Nick Clifton <nickc@redhat.com> - 8.77-2
8f7a3d
- Version bump to allow rebuilding with scl_prefix.
8f7a3d
8f7a3d
* Tue Jul 23 2019 Nick Clifton <nickc@redhat.com> - 8.77-1
8f7a3d
- gcc-toolset-9: INITIAL IMPORT OF ANNOBIN FROM RAWHIDE.  (#1730483)
8f7a3d
8f7a3d
* Mon Jun 24 2019 Nick Clifton <nickc@redhat.com> - 8.77-1
8f7a3d
- Another attempt at fixing the detection and reporting of missing -D_FORTIFY_SOURCE options.  (#1703500)
8f7a3d
8f7a3d
* Mon Jun 10 22:13:17 CET 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 8.76-4
8f7a3d
- Rebuild for RPM 4.15
8f7a3d
8f7a3d
* Mon Jun 10 15:42:00 CET 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 8.76-3
8f7a3d
- Rebuild for RPM 4.15
8f7a3d
8f7a3d
* Thu Jun 06 2019 Panu Matilainen <pmatilai@redhat.com> - 8.76-2
8f7a3d
- Really enable annocheck sub-package
8f7a3d
8f7a3d
* Tue Apr 30 2019 Nick Clifton <nickc@redhat.com> - 8.76-1
8f7a3d
- Report a missing -D_FORTIFY_SOUCRE option if -D_GLIBCXX_ASSERTIONS was detected.  (#1703499)
8f7a3d
- Do not report problems with -fstack-protection if the binary was not built by gcc or clang.  (#1703788)    
8f7a3d
8f7a3d
* Fri Apr 26 2019 Nick Clifton <nickc@redhat.com> - 8.74-1
8f7a3d
- Add tests of clang command line options recorded in the DW_AT_producer attribute.
8f7a3d
8f7a3d
* Wed Apr 24 2019 Nick Clifton <nickc@redhat.com> - 8.73-1
8f7a3d
- Fix test for an executable stack segment.  (#1700924)
8f7a3d
8f7a3d
* Thu Apr 18 2019 Nick Clifton <nickc@redhat.com> - 8.72-1
8f7a3d
- Rebuild annobin with the latest rawhide gcc sources.  (#1700923)
8f7a3d
8f7a3d
* Thu Feb 28 2019 Nick Clifton <nickc@redhat.com> - 8.71-1
8f7a3d
- Annobin: Suppress more calls to free() which are triggering memory checker errors.  (#1684148)
8f7a3d
8f7a3d
* Fri Feb 01 2019 Nick Clifton <nickc@redhat.com> - 8.70-1
8f7a3d
- Add section flag matching ability to section size tool.
8f7a3d
8f7a3d
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.69-7
8f7a3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
8f7a3d
8f7a3d
* Tue Jan 29 2019 Björn Esser <besser82@fedoraproject.org> - 8.69-6
8f7a3d
- Use 'with' for rich dependency on gcc
8f7a3d
8f7a3d
* Tue Jan 29 2019 Björn Esser <besser82@fedoraproject.org> - 8.69-5
8f7a3d
- Really fix rhbz#1607430.
8f7a3d
8f7a3d
* Mon Jan 28 2019 Björn Esser <besser82@fedoraproject.org> - 8.69-4
8f7a3d
- Rebuilt with annotations enabled
8f7a3d
8f7a3d
* Mon Jan 28 2019 Björn Esser <besser82@fedoraproject.org> - 8.69-3
8f7a3d
- Fix rpm query for gcc version.
8f7a3d
8f7a3d
* Mon Jan 28 2019 Nick Clifton <nickc@redhat.com> - 8.69-2
8f7a3d
- Add an exact requirement on the major version of gcc. (#1607430)
8f7a3d
8f7a3d
* Thu Jan 24 2019 Nick Clifton <nickc@redhat.com> - 8.69-1
8f7a3d
- Annobin: Add support for .text.startup and .text.exit sections generated by gcc 9.
8f7a3d
- Annocheck: Add a note displaying tool.
8f7a3d
8f7a3d
* Wed Jan 23 2019 Nick Clifton <nickc@redhat.com> - 8.68-1
8f7a3d
- Annocheck: Skip checks for -D_FORTIFY_SOURCE and -D_GLIBCXX_ASSERTIONS if there is no compiler generated code in the binary.
8f7a3d
8f7a3d
* Mon Jan 21 2019 Björn Esser <besser82@fedoraproject.org> - 8.67-3
8f7a3d
- Rebuilt with annotations enabled
8f7a3d
8f7a3d
* Mon Jan 21 2019 Björn Esser <besser82@fedoraproject.org> - 8.67-2
8f7a3d
- Rebuilt for GCC 9
8f7a3d
8f7a3d
* Thu Jan 17 2019 Nick Clifton <nickc@redhat.com> - 8.67-1
8f7a3d
- Annocheck: Only skip specific checks for specific symbols.  (#1666823)
8f7a3d
- Annobin: Record the setting of the -fomit-frame-pointer option.
8f7a3d
8f7a3d
* Wed Jan 02 2019 Nick Clifton <nickc@redhat.com> - 8.66-1
8f7a3d
- Annocheck: Do not ignore -Og when checking to see if an optimization level has been set.  (#1624162)
8f7a3d
8f7a3d
* Tue Dec 11 2018 Nick Clifton <nickc@redhat.com> - 8.65-1
8f7a3d
- Annobin: Fix handling of multiple .text.unlikely sections.
8f7a3d
8f7a3d
* Fri Nov 30 2018 Nick Clifton <nickc@redhat.com> - 8.64-1
8f7a3d
- Annocheck: Skip gaps in PPC64 executables covered by start_bcax_ symbols.  (#1630564)
8f7a3d
8f7a3d
* Mon Nov 26 2018 Nick Clifton <nickc@redhat.com> - 8.63-1
8f7a3d
- Annocheck: Disable ENDBR test for shared libraries.  (#1652925)
8f7a3d
8f7a3d
* Mon Nov 26 2018 Nick Clifton <nickc@redhat.com> - 8.62-1
8f7a3d
- Annocheck: Add test for ENDBR instruction at entry address of x86/x86_64 executables.  (#1652925)
8f7a3d
8f7a3d
* Tue Nov 20 2018 David Cantrell <dcantrell@redhat.com> - 8.61-2
8f7a3d
- Adjust how the gcc_vr macro is set.
8f7a3d
8f7a3d
* Mon Nov 19 2018 Nick Clifton <nickc@redhat.com> - 8.61-1
8f7a3d
- Fix building with gcc version 4.
8f7a3d
8f7a3d
* Tue Nov 13 2018 Nick Clifton <nickc@redhat.com> - 8.60-1
8f7a3d
- Skip -Wl,-z,now and -Wl,-z,relro checks for non-gcc produced binaries.  (#1624421)
8f7a3d
8f7a3d
* Mon Nov 05 2018 Nick Clifton <nickc@redhat.com> - 8.59-1
8f7a3d
- Ensure GNU Property notes are 8-byte aligned in x86_64 binaries.  (#1645817)
8f7a3d
8f7a3d
* Thu Oct 18 2018 Nick Clifton <nickc@redhat.com> - 8.58-1
8f7a3d
- Skip PPC64 linker stubs created in the middle of text sections (again). (#1630640)
8f7a3d
8f7a3d
* Thu Oct 18 2018 Nick Clifton <nickc@redhat.com> - 8.57-1
8f7a3d
- Suppress free of invalid pointer. (#1638371)
8f7a3d
8f7a3d
* Thu Oct 18 2018 Nick Clifton <nickc@redhat.com> - 8.56-1
8f7a3d
- Skip PPC64 linker stubs created in the middle of text sections. (#1630640)
8f7a3d
8f7a3d
* Tue Oct 16 2018 Nick Clifton <nickc@redhat.com> - 8.55-1
8f7a3d
- Reset the (PPC64) section start symbol to 0 if its section is empty.  (#1638251)
8f7a3d
8f7a3d
* Thu Oct 11 2018 Nick Clifton <nickc@redhat.com> - 8.53-1
8f7a3d
- Also skip virtual thinks created by G++.  (#1630619)
8f7a3d
8f7a3d
* Wed Oct 10 2018 Nick Clifton <nickc@redhat.com> - 8.52-1
8f7a3d
- Use uppercase for all fail/mayb/pass results.  (#1637706)
8f7a3d
8f7a3d
* Wed Oct 10 2018 Nick Clifton <nickc@redhat.com> - 8.51-1
8f7a3d
- Generate notes for unlikely sections.  (#1630620)
8f7a3d
8f7a3d
* Mon Oct 08 2018 Nick Clifton <nickc@redhat.com> - 8.50-1
8f7a3d
- Fix edge case computing section names for end symbols.  (#1637039)
8f7a3d
8f7a3d
* Mon Oct 08 2018 Nick Clifton <nickc@redhat.com> - 8.49-1
8f7a3d
- Skip dynamic checks for binaries without a dynamic segment.  (#1636606)
8f7a3d
8f7a3d
* Fri Oct 05 2018 Nick Clifton <nickc@redhat.com> - 8.48-1
8f7a3d
- Delay generating attach_to_group directives until the end of the compilation.  (#1636265)
8f7a3d
8f7a3d
* Mon Oct 01 2018 Nick Clifton <nickc@redhat.com> - 8.47-1
8f7a3d
- Fix bug introduced in previous delta which would trigger a seg-fault when scanning for gaps.
8f7a3d
8f7a3d
* Mon Oct 01 2018 Nick Clifton <nickc@redhat.com> - 8.46-1
8f7a3d
- Annobin:   Fix section name selection for startup sections.
8f7a3d
- Annocheck: Improve gap skipping heuristics.   (#1630574)
8f7a3d
8f7a3d
* Mon Oct 01 2018 Nick Clifton <nickc@redhat.com> - 8.45-1
8f7a3d
- Fix function section support (again).   (#1630574)
8f7a3d
8f7a3d
* Fri Sep 28 2018 Nick Clifton <nickc@redhat.com> - 8.44-1
8f7a3d
- Skip compiler option checks for non-GNU producers.  (#1633749)
8f7a3d
8f7a3d
* Wed Sep 26 2018 Nick Clifton <nickc@redhat.com> - 8.43-1
8f7a3d
- Fix function section support (again).   (#1630574)
8f7a3d
8f7a3d
* Tue Sep 25 2018 Nick Clifton <nickc@redhat.com> - 8.42-1
8f7a3d
- Ignore ppc64le notes where start = end + 2.  (#1632259)
8f7a3d
8f7a3d
* Tue Sep 25 2018 Nick Clifton <nickc@redhat.com> - 8.41-1
8f7a3d
- Make annocheck ignore symbols suffixed with ".end".  (#1639618)
8f7a3d
8f7a3d
* Mon Sep 24 2018 Nick Clifton <nickc@redhat.com> - 8.40-1
8f7a3d
- Reinstate building annobin with annobin enabled.  (#1630550)
8f7a3d
8f7a3d
* Fri Sep 21 2018 Nick Clifton <nickc@redhat.com> - 8.39-1
8f7a3d
- Tweak tests.
8f7a3d
8f7a3d
* Fri Sep 21 2018 Nick Clifton <nickc@redhat.com> - 8.38-1
8f7a3d
- Generate notes and groups for .text.hot and .text.unlikely sections.
8f7a3d
- When -ffunction-sections is active, put notes for startup sections into .text.startup.foo rather than .text.foo.
8f7a3d
- Similarly put exit section notes into .text.exit.foo.  (#1630574)
8f7a3d
- Change annocheck's maybe result for GNU Property note being missing into a PASS if it is not needed and a FAIL if it is needed.
8f7a3d
8f7a3d
* Wed Sep 19 2018 Nick Clifton <nickc@redhat.com> - 8.37-1
8f7a3d
- Make the --skip-* options skip all messages about the specified test.
8f7a3d
8f7a3d
* Tue Sep 18 2018 Nick Clifton <nickc@redhat.com> - 8.36-1
8f7a3d
- Improve error message when an ET_EXEC binary is detected.
8f7a3d
8f7a3d
* Mon Sep 17 2018 Nick Clifton <nickc@redhat.com> - 8.35-1
8f7a3d
- Skip failures for PIC vs PIE.  (#1629698)
8f7a3d
8f7a3d
* Mon Sep 17 2018 Nick Clifton <nickc@redhat.com> - 8.34-1
8f7a3d
- Ensure 4 byte alignment of note sub-sections.  (#1629671)
8f7a3d
8f7a3d
* Wed Sep 12 2018 Nick Clifton <nickc@redhat.com> - 8.33-1
8f7a3d
- Add timing tool to report on speed of the checks.
8f7a3d
- Add check for conflicting use of the -fshort-enum option.
8f7a3d
- Add check of the GNU Property notes.
8f7a3d
- Skip check for -O2 if compiled with -Og.  (#1624162)
8f7a3d
8f7a3d
* Mon Sep 03 2018 Nick Clifton <nickc@redhat.com> - 8.32-1
8f7a3d
- Add test for ET_EXEC binaries.  (#1625627)
8f7a3d
- Document --report-unknown option.
8f7a3d
8f7a3d
* Thu Aug 30 2018 Nick Clifton <nickc@redhat.com> - 8.31-1
8f7a3d
- Fix bug in hardened tool which would skip gcc compiled files if the notes were too small.
8f7a3d
- Fix bugs in section-size tool.
8f7a3d
- Fix bug in built-by tool.
8f7a3d
8f7a3d
* Wed Aug 29 2018 Nick Clifton <nickc@redhat.com> - 8.30-1
8f7a3d
- Generate notes for comdat sections. (#1619267)
8f7a3d
8f7a3d
* Thu Aug 23 2018 Nick Clifton <nickc@redhat.com> - 8.29-1
8f7a3d
- Add more names to the gap skip list. (#1619267)
8f7a3d
8f7a3d
* Thu Aug 23 2018 Nick Clifton <nickc@redhat.com> - 8.28-1
8f7a3d
- Skip gaps covered by _x86.get_pc_thunk and _savegpr symbols. (#1619267)
8f7a3d
- Merge ranges where one is wholly covered by another.
8f7a3d
8f7a3d
* Wed Aug 22 2018 Nick Clifton <nickc@redhat.com> - 8.27-1
8f7a3d
- Skip gaps at the end of functions. (#1619267)
8f7a3d
8f7a3d
* Tue Aug 21 2018 Nick Clifton <nickc@redhat.com> - 8.26-1
8f7a3d
- Fix thinko in ppc64 gap detection code. (#1619267)
8f7a3d
8f7a3d
* Mon Aug 20 2018 Nick Clifton <nickc@redhat.com> - 8.25-1
8f7a3d
- Skip gaps at the end of the .text section in ppc64 binaries. (#1619267)
8f7a3d
8f7a3d
* Wed Aug 15 2018 Nick Clifton <nickc@redhat.com> - 8.24-1
8f7a3d
- Skip checks in stack_chk_local_fail.c
8f7a3d
- Treat gaps as FAIL results rather than MAYBE.
8f7a3d
8f7a3d
* Wed Aug 08 2018 Nick Clifton <nickc@redhat.com> - 8.23-1
8f7a3d
- Skip checks in __stack_chk_local_fail.
8f7a3d
8f7a3d
* Wed Aug 08 2018 Nick Clifton <nickc@redhat.com> - 8.22-1
8f7a3d
- Reduce version check to gcc major version number only.  Skip compiler option checks if binary not built with gcc.  (#1603089)
8f7a3d
8f7a3d
* Tue Aug 07 2018 Nick Clifton <nickc@redhat.com> - 8.21-1
8f7a3d
- Fix bug in annobin plugin.  Add --section-size=NAME option to annocheck.
8f7a3d
8f7a3d
* Thu Aug  2 2018 Peter Robinson <pbrobinson@fedoraproject.org> 8.20-2
8f7a3d
- rebuild for new gcc
8f7a3d
8f7a3d
* Thu Aug 02 2018 Nick Clifton <nickc@redhat.com> - 8.20-1
8f7a3d
- Correct name of man page for run-on-binaries-in script.  (#1611155)
8f7a3d
8f7a3d
* Wed Jul 25 2018 Nick Clifton <nickc@redhat.com> - 8.19-1
8f7a3d
- Allow $ORIGIN to be at the start of entries in DT_RPATH and DT_RUNPATH.
8f7a3d
8f7a3d
* Mon Jul 23 2018 Nick Clifton <nickc@redhat.com> - 8.18-1
8f7a3d
- Add support for big endian targets.
8f7a3d
8f7a3d
* Mon Jul 23 2018 Nick Clifton <nickc@redhat.com> - 8.17-1
8f7a3d
- Count passes and failures on a per-component basis and report gaps.
8f7a3d
8f7a3d
* Fri Jul 20 2018 Nick Clifton <nickc@redhat.com> - 8.16-1
8f7a3d
- Use our own copy of the targetm.asm_out.function_section() function.  (#159861 comment#17)
8f7a3d
8f7a3d
* Fri Jul 20 2018 Nick Clifton <nickc@redhat.com> - 8.15-1
8f7a3d
- Generate grouped note section name all the time.  (#159861 comment#16)
8f7a3d
8f7a3d
* Thu Jul 19 2018 Nick Clifton <nickc@redhat.com> - 8.14-1
8f7a3d
- Fix section conflict problem.  (#1603071)
8f7a3d
8f7a3d
* Wed Jul 18 2018 Nick Clifton <nickc@redhat.com> - 8.13-1
8f7a3d
- Fix for building with gcc version 4.
8f7a3d
- Fix symbol placement in functions with local assembler.
8f7a3d
8f7a3d
* Tue Jul 17 2018 Nick Clifton <nickc@redhat.com> - 8.12-1
8f7a3d
- Fix assertions in range checking code.  Add detection of -U options.
8f7a3d
8f7a3d
* Tue Jul 17 2018 Nick Clifton <nickc@redhat.com> - 8.11-1
8f7a3d
- Handle function sections properly.  Handle .text.startup and .text.unlikely sections.  Improve gap detection and reporting.  (#1601055)
8f7a3d
8f7a3d
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.10-2
8f7a3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
8f7a3d
8f7a3d
* Thu Jul 12 2018 Nick Clifton <nickc@redhat.com> - 8.10-1
8f7a3d
- Fix construction of absolute versions of --dwarf-dir and --debug-rpm options.
8f7a3d
8f7a3d
* Tue Jul 10 2018 Nick Clifton <nickc@redhat.com> - 8.9-1
8f7a3d
- Fix buffer overrun when very long symbol names are encountered.
8f7a3d
8f7a3d
* Tue Jul 10 2018 Nick Clifton <nickc@redhat.com> - 8.8-1
8f7a3d
- Do not force the generation of function notes when -ffunction-sections is active.  (#1598961)
8f7a3d
8f7a3d
* Mon Jul 09 2018 Nick Clifton <nickc@redhat.com> - 8.7-1
8f7a3d
- Skip the .annobin_ prfix when reporting symbols.  (#1599315)
8f7a3d
8f7a3d
* Mon Jul 09 2018 Nick Clifton <nickc@redhat.com> - 8.6-1
8f7a3d
- Use the assembler (c++ mangled) version of function names when switching sections.  (#1598579)
8f7a3d
8f7a3d
* Mon Jul 09 2018 Nick Clifton <nickc@redhat.com> - 8.5-1
8f7a3d
- Do not call function_section.  (#1598961)
8f7a3d
8f7a3d
* Fri Jul 06 2018 Nick Clifton <nickc@redhat.com> - 8.4-1
8f7a3d
- Ignore cross-section gaps.  (#1598551)
8f7a3d
8f7a3d
* Thu Jul 05 2018 Nick Clifton <nickc@redhat.com> - 8.3-1
8f7a3d
- Do not skip empty range notes in object files.  (#1598361)
8f7a3d
8f7a3d
* Mon Jul 02 2018 Nick Clifton <nickc@redhat.com> - 8.2-1
8f7a3d
- Create the start symbol at the start of the function and the end symbol at the end.  (#1596823)
8f7a3d
8f7a3d
* Mon Jul 02 2018 Nick Clifton <nickc@redhat.com> - 8.1-1
8f7a3d
- Fix --debug-rpm when used inside a directory.
8f7a3d
8f7a3d
* Thu Jun 28 2018 Nick Clifton <nickc@redhat.com> - 8.0-1
8f7a3d
- Use a prefix for all annobin generated symbols, and make them hidden.
8f7a3d
- Only generate weak symbol definitions for linkonce sections.
8f7a3d
8f7a3d
* Wed Jun 27 2018 Nick Clifton <nickc@redhat.com> - 7.1-1
8f7a3d
- Skip some checks for relocatable object files, and dynamic objects.
8f7a3d
- Stop bogus complaints about stackrealignment not being enabled.
8f7a3d
8f7a3d
* Mon Jun 25 2018 Nick Clifton <nickc@redhat.com> - 7.0-1
8f7a3d
- Add -debug-rpm= option to annocheck.
8f7a3d
- Only use a 2 byte offset for the initial symbol on PowerPC.
8f7a3d
8f7a3d
* Fri Jun 22 2018 Nick Clifton <nickc@redhat.com> - 6.6-1
8f7a3d
- Use --dwarf-path when looking for build-id based debuginfo files.
8f7a3d
8f7a3d
* Fri Jun 22 2018 Nick Clifton <nickc@redhat.com> - 6.5-1
8f7a3d
- Fix premature closing of dwarf handle.
8f7a3d
8f7a3d
* Fri Jun 22 2018 Nick Clifton <nickc@redhat.com> - 6.4-1
8f7a3d
- Fix scoping bug computing the name of a separate debuginfo file.
8f7a3d
8f7a3d
* Tue Jun 19 2018 Nick Clifton <nickc@redhat.com> - 6.3-1
8f7a3d
- Fix file descriptor leak.
8f7a3d
8f7a3d
* Tue Jun 19 2018 Nick Clifton <nickc@redhat.com> - 6.2-1
8f7a3d
- Add command line options to annocheck to disable individual tests.
8f7a3d
8f7a3d
* Fri Jun 08 2018 Nick Clifton <nickc@redhat.com> - 6.1-1
8f7a3d
- Remove C99-ism from annocheck sources.
8f7a3d
8f7a3d
* Wed Jun 06 2018 Nick Clifton <nickc@redhat.com> - 6.0-1
8f7a3d
- Add the annocheck program.
8f7a3d
8f7a3d
* Fri Jun 01 2018 Nick Clifton <nickc@redhat.com> - 5.11-1
8f7a3d
- Do not use the SHF_GNU_BUILD_NOTE section flag.
8f7a3d
8f7a3d
* Thu May 31 2018 Nick Clifton <nickc@redhat.com> - 5.10-1
8f7a3d
- Remove .sh extension from shell scripts.
8f7a3d
8f7a3d
* Wed May 30 2018 Nick Clifton <nickc@redhat.com> - 5.9-1
8f7a3d
- Record the setting of the -mstackrealign option for i686 binaries.
8f7a3d
8f7a3d
* Mon May 14 2018 Nick Clifton <nickc@redhat.com> - 5.8-1
8f7a3d
- Hide the annobin start of file symbol.
8f7a3d
8f7a3d
* Tue May 08 2018 Nick Clifton <nickc@redhat.com> - 5.7-1
8f7a3d
- Fix script bug in hardended.sh.  (Thanks to: Stefan Sørensen <stefan.sorensen@spectralink.com>)
8f7a3d
8f7a3d
* Thu May 03 2018 Nick Clifton <nickc@redhat.com> - 5.6-3
8f7a3d
- Version number bump so that the plugin can be rebuilt with the latest version of GCC.
8f7a3d
8f7a3d
* Mon Apr 30 2018 Nick Clifton <nickc@redhat.com> - 5.6-2
8f7a3d
- Rebuild the plugin with the newly created plugin enabled.  (#1573082)
8f7a3d
8f7a3d
* Mon Apr 30 2018 Nick Clifton <nickc@redhat.com> - 5.6-1
8f7a3d
- Skip the isa_flags check in the ABI test because the crt[in].o files are compiled with different flags from the test files.
8f7a3d
8f7a3d
* Fri Apr 20 2018 Nick Clifton <nickc@redhat.com> - 5.3-1
8f7a3d
- Add manual pages for annobin and the scripts.
8f7a3d
8f7a3d
* Tue Apr 03 2018 Nick Clifton <nickc@redhat.com> - 5.2-1
8f7a3d
- Do not record a stack protection setting of -1.  (#1563141)
8f7a3d
8f7a3d
* Tue Mar 20 2018 Nick Clifton <nickc@redhat.com> - 5.1-1
8f7a3d
- Do not complain about a dwarf_version value of -1.  (#1557511)
8f7a3d
8f7a3d
* Thu Mar 15 2018 Nick Clifton <nickc@redhat.com> - 5.0-1
8f7a3d
- Bias file start symbols by 2 in order to avoid them confused with function symbols.  (#1554332)
8f7a3d
- Version jump is to sync the version number with the annobin plugins internal version number.
8f7a3d
8f7a3d
* Mon Mar 12 2018 Nick Clifton <nickc@redhat.com> - 3.6-1
8f7a3d
- Add --ignore-gaps option to check-abi.sh script.
8f7a3d
- Use this option in the abi-test check.
8f7a3d
- Tweak hardening test to skip pic and stack protection checks.
8f7a3d
8f7a3d
* Tue Mar 06 2018 Nick Clifton <nickc@redhat.com> - 3.5-1
8f7a3d
- Handle functions with specific assembler names.  (#1552018)
8f7a3d
8f7a3d
* Fri Feb 23 2018 Nick Clifton <nickc@redhat.com> - 3.4-2
8f7a3d
- Add an explicit requirement on the version of gcc used to built the plugin.  (#1547260)
8f7a3d
8f7a3d
* Fri Feb 09 2018 Nick Clifton <nickc@redhat.com> - 3.4-1
8f7a3d
- Change type and size of symbols to STT_NOTYPE/0 so that they do not confuse GDB.  (#1539664)
8f7a3d
- Add run-on-binaries-in.sh script to allow the other scripts to be run over a repository.
8f7a3d
8f7a3d
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-2
8f7a3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
8f7a3d
8f7a3d
* Tue Jan 30 2018 Nick Clifton <nickc@redhat.com> - 3.3-1
8f7a3d
- Rebase on 3.3 release, which adds support for recording -mcet and -fcf-protection.
8f7a3d
8f7a3d
* Mon Jan 29 2018 Florian Weimer <fweimer@redhat.com> - 3.2-3
8f7a3d
- Rebuild for GCC 8
8f7a3d
8f7a3d
* Fri Jan 26 2018 Nick Clifton <nickc@redhat.com> - 3.2-2
8f7a3d
- Fix the installation of the annobin.info file.
8f7a3d
8f7a3d
* Fri Jan 26 2018 Nick Clifton <nickc@redhat.com> - 3.2-1
8f7a3d
- Rebase on 3.2 release, which now contains documentation!
8f7a3d
8f7a3d
* Fri Jan 26 2018 Richard W.M. Jones <rjones@redhat.com> - 3.1-3
8f7a3d
- Rebuild against GCC 7.3.1.
8f7a3d
8f7a3d
* Tue Jan 16 2018 Nick Clifton <nickc@redhat.com> - 3.1-2
8f7a3d
- Add --with-gcc-plugin-dir option to the configure command line.
8f7a3d
8f7a3d
* Thu Jan 04 2018 Nick Clifton <nickc@redhat.com> - 3.1-1
8f7a3d
- Rebase on version 3.1 sources.
8f7a3d
8f7a3d
* Mon Dec 11 2017 Nick Clifton <nickc@redhat.com> - 2.5.1-5
8f7a3d
- Do not generate notes when there is no output file.  (#1523875)
8f7a3d
8f7a3d
* Fri Dec 08 2017 Nick Clifton <nickc@redhat.com> - 2.5.1-4
8f7a3d
- Invent an input filename when reading from a pipe.  (#1523401)
8f7a3d
8f7a3d
* Thu Nov 30 2017 Florian Weimer <fweimer@redhat.com> - 2.5.1-3
8f7a3d
- Use DECL_ASSEMBLER_NAME for symbol references (#1519165)
8f7a3d
8f7a3d
* Tue Oct 03 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.5.1-2
8f7a3d
- Cleanups in spec
8f7a3d
8f7a3d
* Tue Sep 26 2017 Nick Clifton <nickc@redhat.com> - 2.5.1-1
8f7a3d
- Touch the auto-generated files in order to stop them from being regenerated.
8f7a3d
8f7a3d
* Tue Sep 26 2017 Nick Clifton <nickc@redhat.com> - 2.5-2
8f7a3d
- Stop the plugin complaining about compiler datestamp mismatches.
8f7a3d
8f7a3d
* Thu Sep 21 2017 Nick Clifton <nickc@redhat.com> - 2.4-1
8f7a3d
- Tweak tests so that they will run on older machines.
8f7a3d
8f7a3d
* Thu Sep 21 2017 Nick Clifton <nickc@redhat.com> - 2.3-1
8f7a3d
- Add annobin-tests subpackage containing some preliminary tests.
8f7a3d
- Remove link-time test for unsupported targets.
8f7a3d
8f7a3d
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-3
8f7a3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
8f7a3d
8f7a3d
* Mon Jul 31 2017 Florian Weimer <fweimer@redhat.com> - 2.0-2
8f7a3d
- Rebuild with binutils fix for ppc64le (#1475636)
8f7a3d
8f7a3d
* Wed Jun 28 2017 Nick Clifton <nickc@redhat.com> - 2.0-1
8f7a3d
- Fixes for problems reported by the package submission review:
8f7a3d
   * Add %%license entry to %%file section.
8f7a3d
   * Update License and BuildRequires tags.
8f7a3d
   * Add Requires tag.
8f7a3d
   * Remove %%clean.
8f7a3d
   * Add %%check.
8f7a3d
   * Clean up the %%changelog.
8f7a3d
- Update to use version 2 of the specification and sources.
8f7a3d
8f7a3d
* Thu May 11 2017 Nick Clifton <nickc@redhat.com> - 1.0-1
8f7a3d
- Initial submission.