linux-stable/tools/lib
Andrey Ignatov ab9e084821 libbpf: Per-symbol visibility for DSO
Make global symbols in libbpf DSO hidden by default with
-fvisibility=hidden and export symbols that are part of ABI explicitly
with __attribute__((visibility("default"))).

This is common practice that should prevent from accidentally exporting
a symbol, that is not supposed to be a part of ABI what, in turn,
improves both libbpf developer- and user-experiences. See [1] for more
details.

Export control becomes more important since more and more projects use
libbpf.

The patch doesn't export a bunch of netlink related functions since as
agreed in [2] they'll be reworked. That doesn't break bpftool since
bpftool links libbpf statically.

[1] https://www.akkadia.org/drepper/dsohowto.pdf (2.2 Export Control)
[2] https://www.mail-archive.com/netdev@vger.kernel.org/msg251434.html

Signed-off-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-10-16 15:16:47 -07:00
..
api docs: Fix some broken references 2018-06-15 18:10:01 -03:00
bpf libbpf: Per-symbol visibility for DSO 2018-10-16 15:16:47 -07:00
lockdep tools lib traceevent, tools lib lockdep: Rename 'enum pevent_errno' to 'enum tep_errno' 2018-08-13 15:23:07 -03:00
subcmd perf tools: Add '\n' at the end of parse-options error messages 2018-04-18 15:35:51 -03:00
symbol tools lib symbols: Introduce kallsyms__is_function() 2018-04-26 13:47:14 -03:00
traceevent tools lib traceevent: Change to SPDX License format 2018-08-20 08:54:58 -03:00
bitmap.c tools lib: Add bitmap_and function 2016-08-02 16:33:27 -03:00
find_bit.c lib: optimize cpumask_next_and() 2018-02-06 18:32:44 -08:00
hweight.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rbtree.c tools: Copy lib/rbtree.c to tools/lib/ 2015-07-05 22:48:21 -03:00
str_error_r.c objtool, perf: Fix GCC 8 -Wrestrict error 2018-03-19 13:51:54 -03:00
string.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vsprintf.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00