Skip to content

Commit

Permalink
build/trivial: reorder symbols in linker version scripts and add comment
Browse files Browse the repository at this point in the history
We export some symbols that are in private headers. We shouldn't do
that. Highlight them in the version script by grouping them and add
a comment.

We might want to hide these symbols later.

Some of these symbols symbols are used by libnl internal libraries.
So removing those is more complicated and only possible if we don't
required compatibility of different libnl libraries between each other
(i.e. that we require that within one installation the library versions
match).

Signed-off-by: Thomas Haller <thaller@redhat.com>
  • Loading branch information
thom311 committed Mar 4, 2015
1 parent e89aec9 commit 337af71
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 41 deletions.
18 changes: 14 additions & 4 deletions libnl-3.sym
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
libnl_3 {
global:
# these functions are in private header files and should have never
# been exported. We might hide them later.
nl_cache_parse;

# these functions are in private header files and should have never
# been exported. They are used by libnl internals
__flags2str;
__list_str2type;
__list_type2str;
__nl_cache_mngt_require;
__nl_read_num_str_file;
__str2flags;
__str2type;
__trans_list_add;
__trans_list_clear;
__type2str;

# internal symbols that are in public headers
__nl_cache_mngt_require;

# variables
nl_debug;
nl_debug_dp;

nl_addr2str;
nl_addr_alloc;
nl_addr_alloc_attr;
Expand Down Expand Up @@ -82,7 +95,6 @@ global:
nl_cache_ops_lookup_safe;
nl_cache_ops_put;
nl_cache_ops_set_flags;
nl_cache_parse;
nl_cache_parse_and_add;
nl_cache_pickup;
nl_cache_put;
Expand Down Expand Up @@ -119,8 +131,6 @@ global:
nl_data_free;
nl_data_get;
nl_data_get_size;
nl_debug;
nl_debug_dp;
nl_dump;
nl_dump_line;
nl_ether_proto2str;
Expand Down
5 changes: 4 additions & 1 deletion libnl-genl-3.sym
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
libnl_3 {
global:
# these functions are in private header files and should have never
# been exported. We might hide them later.
genl_resolve_id;

genl_connect;
genl_ctrl_alloc_cache;
genl_ctrl_resolve;
Expand Down Expand Up @@ -27,7 +31,6 @@ global:
genl_ops_resolve;
genl_register;
genl_register_family;
genl_resolve_id;
genl_send_simple;
genl_unregister;
genl_unregister_family;
Expand Down
10 changes: 6 additions & 4 deletions libnl-idiag-3.sym
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
libnl_3 {
global:
# ops structure
idiagnl_meminfo_obj_ops;
idiagnl_msg_obj_ops;
idiagnl_req_obj_ops;
idiagnl_vegasinfo_obj_ops;

idiagnl_attrs2str;
idiagnl_connect;
idiagnl_exts2str;
Expand All @@ -9,7 +15,6 @@ global:
idiagnl_meminfo_get_rmem;
idiagnl_meminfo_get_tmem;
idiagnl_meminfo_get_wmem;
idiagnl_meminfo_obj_ops;
idiagnl_meminfo_put;
idiagnl_meminfo_set_fmem;
idiagnl_meminfo_set_rmem;
Expand Down Expand Up @@ -39,7 +44,6 @@ global:
idiagnl_msg_get_uid;
idiagnl_msg_get_vegasinfo;
idiagnl_msg_get_wqueue;
idiagnl_msg_obj_ops;
idiagnl_msg_parse;
idiagnl_msg_put;
idiagnl_msg_set_cong;
Expand Down Expand Up @@ -72,7 +76,6 @@ global:
idiagnl_req_get_ifindex;
idiagnl_req_get_src;
idiagnl_req_get_states;
idiagnl_req_obj_ops;
idiagnl_req_parse;
idiagnl_req_put;
idiagnl_req_set_dbs;
Expand All @@ -96,7 +99,6 @@ global:
idiagnl_vegasinfo_get_minrtt;
idiagnl_vegasinfo_get_rtt;
idiagnl_vegasinfo_get_rttcnt;
idiagnl_vegasinfo_obj_ops;
idiagnl_vegasinfo_put;
idiagnl_vegasinfo_set_enabled;
idiagnl_vegasinfo_set_minrtt;
Expand Down
6 changes: 4 additions & 2 deletions libnl-nf-3.sym
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
libnl_3 {
global:
# ops structure
ct_obj_ops;
exp_obj_ops;
log_msg_obj_ops;
log_obj_ops;
queue_msg_obj_ops;
queue_obj_ops;

nfnl_connect;
nfnl_ct_add;
nfnl_ct_alloc;
Expand Down Expand Up @@ -307,8 +311,6 @@ global:
nfnlmsg_res_id;
nfnlmsg_subsys;
nfnlmsg_subtype;
queue_msg_obj_ops;
queue_obj_ops;
local:
*;
};
70 changes: 40 additions & 30 deletions libnl-route-3.sym
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
libnl_3 {
global:
# these functions are in private header files and should have never
# been exported. We might hide them later.
rtnl_link_af_alloc;
rtnl_link_af_data;
rtnl_link_af_data_compare;
rtnl_link_af_ops_lookup;
rtnl_link_af_ops_put;
rtnl_link_af_register;
rtnl_link_af_unregister;
rtnl_link_info_ops_lookup;
rtnl_link_info_ops_put;
rtnl_link_register_info;
rtnl_link_unregister_info;
rtnl_tc_build_rate_table;
rtnl_tc_clone;
rtnl_tc_compare;
rtnl_tc_data;
rtnl_tc_data_check;
rtnl_tc_dump_details;
rtnl_tc_dump_line;
rtnl_tc_dump_stats;
rtnl_tc_free_data;
rtnl_tc_msg_build;
rtnl_tc_msg_parse;
rtnl_tc_register;
rtnl_tc_type_register;
rtnl_tc_type_unregister;
rtnl_tc_unregister;

# these functions are in private header files and should have never
# been exported. They are used by libnl internals
rtnl_tc_get_ops;
rtnl_tc_lookup_ops;

# internal symbols that are in public headers
rtln_link_policy;

# ops structure
route_obj_ops;

flnl_lookup;
flnl_lookup_build_request;
flnl_request_alloc;
Expand Down Expand Up @@ -29,8 +69,6 @@ global:
nl_str2ovl_strategy;
nl_str2police;
nl_str2rtntype;
route_obj_ops;
rtln_link_policy;
rtnl_act_add;
rtnl_act_alloc;
rtnl_act_append;
Expand Down Expand Up @@ -189,13 +227,6 @@ global:
rtnl_htb_set_rate;
rtnl_htb_set_rbuffer;
rtnl_link_add;
rtnl_link_af_alloc;
rtnl_link_af_data;
rtnl_link_af_data_compare;
rtnl_link_af_ops_lookup;
rtnl_link_af_ops_put;
rtnl_link_af_register;
rtnl_link_af_unregister;
rtnl_link_alloc;
rtnl_link_alloc_cache;
rtnl_link_bond_add;
Expand Down Expand Up @@ -286,8 +317,6 @@ global:
rtnl_link_inet_get_conf;
rtnl_link_inet_set_conf;
rtnl_link_inet_str2devconf;
rtnl_link_info_ops_lookup;
rtnl_link_info_ops_put;
rtnl_link_info_parse;
rtnl_link_ip6_tnl_add;
rtnl_link_ip6_tnl_alloc;
Expand Down Expand Up @@ -381,7 +410,6 @@ global:
rtnl_link_name2i;
rtnl_link_operstate2str;
rtnl_link_put;
rtnl_link_register_info;
rtnl_link_release;
rtnl_link_release_ifindex;
rtnl_link_set_addr;
Expand Down Expand Up @@ -434,7 +462,6 @@ global:
rtnl_link_str2mode;
rtnl_link_str2operstate;
rtnl_link_str2stat;
rtnl_link_unregister_info;
rtnl_link_unset_flags;
rtnl_link_veth_add;
rtnl_link_veth_alloc;
Expand Down Expand Up @@ -763,35 +790,21 @@ global:
rtnl_sfq_set_quantum;
rtnl_str2prio;
rtnl_str2scope;
rtnl_tc_build_rate_table;
rtnl_tc_calc_bufsize;
rtnl_tc_calc_cell_log;
rtnl_tc_calc_txtime;
rtnl_tc_clone;
rtnl_tc_compare;
rtnl_tc_data;
rtnl_tc_data_check;
rtnl_tc_dump_details;
rtnl_tc_dump_line;
rtnl_tc_dump_stats;
rtnl_tc_free_data;
rtnl_tc_get_handle;
rtnl_tc_get_ifindex;
rtnl_tc_get_kind;
rtnl_tc_get_link;
rtnl_tc_get_linktype;
rtnl_tc_get_mpu;
rtnl_tc_get_mtu;
rtnl_tc_get_ops;
rtnl_tc_get_overhead;
rtnl_tc_get_parent;
rtnl_tc_get_stat;
rtnl_tc_handle2str;
rtnl_tc_lookup_ops;
rtnl_tc_msg_build;
rtnl_tc_msg_parse;
rtnl_tc_read_classid_file;
rtnl_tc_register;
rtnl_tc_set_handle;
rtnl_tc_set_ifindex;
rtnl_tc_set_kind;
Expand All @@ -802,9 +815,6 @@ global:
rtnl_tc_set_overhead;
rtnl_tc_set_parent;
rtnl_tc_str2handle;
rtnl_tc_type_register;
rtnl_tc_type_unregister;
rtnl_tc_unregister;
rtnl_u32_add_action;
rtnl_u32_add_key;
rtnl_u32_add_key_in6_addr;
Expand Down

0 comments on commit 337af71

Please sign in to comment.