mirror of
git://sourceware.org/git/libabigail.git
synced 2025-03-04 21:57:42 +00:00
abg-dwarf-reader split: create abg-elf-helpers.{h,cc} and test case
abg-elf-helpers.{h,cc} shall contain the ELF related parts of the abg-dwarf-reader. Create the stub files, an empty unit test and hook everything up in the make system. * src/Makefile.am: Add new source files abg-elf-helpers.{h,cc}. * src/abg-elf-helpers.cc: New source file. * src/abg-elf-helpers.h: New header file. * tests/.gitignore: Exclude runtestelfhelpers from being committed. * tests/Makefile.am: Add new test case runtestelfhelpers. * tests/test-elf-helpers.cc: New test source file. Reviewed-by: Giuliano Procida <gprocida@google.com> Signed-off-by: Matthias Maennich <maennich@google.com> Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
56302e9c52
commit
b4d97cdd0f
@ -39,6 +39,8 @@ abg-config.cc \
|
||||
abg-ini.cc \
|
||||
abg-workers.cc \
|
||||
abg-tools-utils.cc \
|
||||
abg-elf-helpers.h \
|
||||
abg-elf-helpers.cc \
|
||||
$(CXX11_SOURCES)
|
||||
|
||||
libabigail_la_LIBADD = $(DEPS_LIBS)
|
||||
|
34
src/abg-elf-helpers.cc
Normal file
34
src/abg-elf-helpers.cc
Normal file
@ -0,0 +1,34 @@
|
||||
// -*- Mode: C++ -*-
|
||||
//
|
||||
// Copyright (C) 2020 Google, Inc.
|
||||
//
|
||||
// This file is part of the GNU Application Binary Interface Generic
|
||||
// Analysis and Instrumentation Library (libabigail). This library is
|
||||
// free software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU Lesser General Public License as published by the
|
||||
// Free Software Foundation; either version 3, or (at your option) any
|
||||
// later version.
|
||||
|
||||
// This library 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 Lesser Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this program; see the file COPYING-LGPLV3. If
|
||||
// not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/// @file
|
||||
///
|
||||
/// This contains the definitions of the ELF utilities for the dwarf reader.
|
||||
|
||||
#include "abg-elf-helpers.h"
|
||||
|
||||
namespace abigail
|
||||
{
|
||||
|
||||
namespace elf_helpers
|
||||
{
|
||||
|
||||
} // end namespace elf_helpers
|
||||
} // end namespace abigail
|
37
src/abg-elf-helpers.h
Normal file
37
src/abg-elf-helpers.h
Normal file
@ -0,0 +1,37 @@
|
||||
// -*- Mode: C++ -*-
|
||||
//
|
||||
// Copyright (C) 2020 Google, Inc.
|
||||
//
|
||||
// This file is part of the GNU Application Binary Interface Generic
|
||||
// Analysis and Instrumentation Library (libabigail). This library is
|
||||
// free software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU Lesser General Public License as published by the
|
||||
// Free Software Foundation; either version 3, or (at your option) any
|
||||
// later version.
|
||||
|
||||
// This library 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 Lesser Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this program; see the file COPYING-LGPLV3. If
|
||||
// not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/// @file
|
||||
///
|
||||
/// This contains a set of ELF utilities used by the dwarf reader.
|
||||
|
||||
#ifndef __ABG_ELF_HELPERS_H__
|
||||
#define __ABG_ELF_HELPERS_H__
|
||||
|
||||
namespace abigail
|
||||
{
|
||||
|
||||
namespace elf_helpers
|
||||
{
|
||||
|
||||
} // end namespace elf_helpers
|
||||
} // end namespace abigail
|
||||
|
||||
#endif // __ABG_ELF_HELPERS_H__
|
1
tests/.gitignore
vendored
1
tests/.gitignore
vendored
@ -22,6 +22,7 @@ runtestdiffdwarfabixml
|
||||
runtestdifffilter
|
||||
runtestdiffpkg
|
||||
runtestdiffsuppr
|
||||
runtestelfhelpers
|
||||
runtestini
|
||||
runtestkmiwhitelist
|
||||
runtestlookupsyms
|
||||
|
@ -46,6 +46,7 @@ runtestabidiffexit \
|
||||
runtestini \
|
||||
runtesttoolsutils \
|
||||
runtestkmiwhitelist \
|
||||
runtestelfhelpers \
|
||||
$(CXX11_TESTS)
|
||||
|
||||
if ENABLE_RUNNING_TESTS_WITH_PY3
|
||||
@ -142,6 +143,9 @@ runtesttoolsutils_LDADD = libtestutils.la $(top_builddir)/src/libabigail.la
|
||||
runtestkmiwhitelist_SOURCES = test-kmi-whitelist.cc
|
||||
runtestkmiwhitelist_LDADD = libtestutils.la libcatch.la $(top_builddir)/src/libabigail.la
|
||||
|
||||
runtestelfhelpers_SOURCES = test-elf-helpers.cc
|
||||
runtestelfhelpers_LDADD = libcatch.la $(top_builddir)/src/libabigail.la
|
||||
|
||||
runtestsvg_SOURCES=test-svg.cc
|
||||
runtestsvg_LDADD=$(top_builddir)/src/libabigail.la
|
||||
|
||||
@ -172,7 +176,7 @@ runtestfedabipkgdiffpy3.sh$(EXEEXT):
|
||||
runtestdefaultsupprspy3_sh_SOURCES =
|
||||
runtestdefaultsupprspy3.sh$(EXEEXT):
|
||||
|
||||
AM_CPPFLAGS=-I${abs_top_srcdir}/include \
|
||||
AM_CPPFLAGS=-I${abs_top_srcdir}/include -I${abs_top_srcdir}/src \
|
||||
-I${abs_top_builddir}/include -I${abs_top_srcdir}/tools -fPIC
|
||||
|
||||
clean-local: clean-local-check
|
||||
|
30
tests/test-elf-helpers.cc
Normal file
30
tests/test-elf-helpers.cc
Normal file
@ -0,0 +1,30 @@
|
||||
// -*- Mode: C++ -*-
|
||||
//
|
||||
// Copyright (C) 2020 Google, Inc.
|
||||
//
|
||||
// This file is part of the GNU Application Binary Interface Generic
|
||||
// Analysis and Instrumentation Library (libabigail). This library is
|
||||
// free software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU Lesser General Public License as published by the
|
||||
// Free Software Foundation; either version 3, or (at your option) any
|
||||
// later version.
|
||||
|
||||
// This library 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 Lesser Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this program; see the file COPYING-LGPLV3. If
|
||||
// not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Author: Matthias Maennich
|
||||
|
||||
/// @file
|
||||
///
|
||||
/// This program tests libabigail's ELF helpers.
|
||||
|
||||
#include "lib/catch.hpp"
|
||||
|
||||
#include "abg-elf-helpers.h"
|
||||
|
Loading…
Reference in New Issue
Block a user