libabigail/tests
Dodji Seketeli 103a6eb94f Control symbols exported from libabigail.so
Symbols of pretty much all member functions of types that are meant to
be "private" to translation units that contribute to libabigail.so
were exported because we didn't do much to prevent that.

This patch starts controlling the set of symbols that are exported.

By default, symbols of any entity declared in a translation unit that
contributes to libabigail.so are hidden by default.  Only symbols of
entities declared in public headers (headers in include/*.h) are
exported.

There are many ways to achieve that.  This patch chooses to avoid
cluttering declarations of entities in the public header by adding
__attribute__((visibility="default")) to every declared type of
function in there.

Rather, the patch uses "#pragma GCC visibility push(default)" before
entities declared on those headers.  By doing so, all those entities
have their symbol marked as "visible" by the compiler.  Once the
header are #included, the #pragma GCC visibility pop" is used, so that
anything else has its symbol be hidden from that point on.

Note that for ease of maintenance the patch uses the macros
ABG_BEGIN_EXPORT_DECLARATIONS and ABG_END_EXPORT_DECLARATIONS rather
than using the pragma directive directly.

I believe this is a more elegant way of handling visibility, compared
to cluttering every single declaration in public headers with a
"__attribute__((visibility=("default")))" or with a macro which
expands to it.

This reduces the the set of symbols exported by libabigail.so from
20000+ to less than 5000.

	* VISIBILITY: New documentation about this visiblity business.
	* CONTRIBUTING: Update the "contributing guide" to refer to symbol
	visibility issues.
	* configure.ac: Define a variable VISIBILITY_FLAGS that is set to
	the -fvisibility=hidden flag to pass to GCC, when its available.
	* src/Makefile.am: Add VISIBILITY to source distribution.  Also
	add COMPILING and COMMIT-LOG-GUIDELINES that were missing.
	* src/Makefile.am: Use the new $(VISIBILITY_FLAGS) when buiding
	the library.
	* tests/Makefile.am: Use the new $(VISIBILITY_FLAGS) when buiding
	tests.
	* tools/Makefile.am: Use the new $(VISIBILITY_FLAGS) when buiding
	tools.
	* src/abg-comp-filter.cc: Enclose inclusion of public headers in
	ABG_BEGIN_EXPORT_DECLARATIONS and ABG_END_EXPORT_DECLARATIONS to
	export the symbols of entities declared in there.
	* src/abg-comparison.cc: Likewise.
	* src/abg-config.cc: Likewise.
	* src/abg-corpus.cc: Likewise.
	* src/abg-diff-utils.cc: Likewise.
	* src/abg-dwarf-reader.cc: Likewise.
	* src/abg-hash.cc: Likewise.
	* src/abg-ini.cc: Likewise.
	* src/abg-ir.cc: Likewise.
	* src/abg-libxml-utils.cc: Likewise.
	* src/abg-libzip-utils.cc: Likewise.
	* src/abg-reader.cc: Likewise.
	* src/abg-suppression.cc: Likewise.
	* src/abg-tools-utils.cc: Likewise.
	* src/abg-traverse.cc: Likewise.
	* src/abg-viz-common.cc: Likewise.
	* src/abg-viz-dot.cc: Likewise.
	* src/abg-viz-svg.cc: Likewise.
	* src/abg-workers.cc: Likewise.
	* src/abg-writer.cc: Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-07-27 12:51:02 +02:00
..
data Support DW_TAG_type_unit 2016-07-26 20:07:03 +02:00
Makefile.am Control symbols exported from libabigail.so 2016-07-27 12:51:02 +02:00
mockfedabipkgdiff.in Make fedabipkgdiff consistent with Libabigail's other tests 2016-07-15 19:41:08 +02:00
print-diff-tree.cc
runtestcanonicalizetypes.sh.in Bug 20180 - Support system-wide suppression specifications 2016-05-30 18:39:49 +02:00
runtestdefaultsupprs.py.in Fix python interpreter path for el6 2016-06-28 09:12:40 +02:00
runtestfedabipkgdiff.py.in Make fedabipkgdiff consistent with Libabigail's other tests 2016-07-15 19:41:08 +02:00
test-abicompat.cc Implement a [suppress_file] suppression directive 2016-05-08 12:39:26 +02:00
test-abidiff-exit.cc Bug 20180 - Support system-wide suppression specifications 2016-05-30 18:39:49 +02:00
test-abidiff.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-alt-dwarf-file.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-core-diff.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-diff2.cc
test-diff-dwarf-abixml.cc Bug 20180 - Support system-wide suppression specifications 2016-05-30 18:39:49 +02:00
test-diff-dwarf.cc Bug 19964 - Cannot load function aliases on ppc64 2016-04-25 14:48:11 +02:00
test-diff-filter.cc Better recognize qualified void type 2016-07-07 14:04:10 +02:00
test-diff-pkg.cc Make fedabipkgdiff consistent with Libabigail's other tests 2016-07-15 19:41:08 +02:00
test-diff-suppr.cc Escape all characters when reading a string in ini files 2016-05-31 12:37:57 +02:00
test-dot.cc
test-ir-walker.cc
test-lookup-syms.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-read-dwarf.cc Support DW_TAG_type_unit 2016-07-26 20:07:03 +02:00
test-read-write.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-svg.cc
test-types-stability.cc Bug 19204 - libabigail aborts on DWARF referencing non-existing DIE 2016-01-21 10:48:32 +01:00
test-utils.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-utils.h Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-valgrind-suppressions.supp Support running "make check-valgrind" 2016-05-22 23:20:12 +02:00
test-write-read-archive.cc
update-test-read-dwarf-output.py Add a script to update the reference output of runtestreaddwarf 2015-10-17 16:20:58 +02:00