summaryrefslogtreecommitdiffstats
path: root/src/gsm
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-04-04 22:05:24 +0200
committerHarald Welte <laforge@gnumonks.org>2012-04-04 22:43:25 +0200
commit1c72bfb2cb00e8e677700643bdefadbb9509b496 (patch)
tree9e6fe0932a5242508ab61e41496a596885b49819 /src/gsm
parent738f13395d1d8a005011e45ebbc6a869bbcfd9a6 (diff)
libosmogsm: Introduce explicit list of exported symbols
There is now a "libosmogsm.map" file containing an explicit list of to-be-exported symbols. This should prevent us from leaking non-static symbols into the global namespace. A similar scheme should be adopted by all other osmocom libraries
Diffstat (limited to 'src/gsm')
-rw-r--r--src/gsm/Makefile.am4
-rw-r--r--src/gsm/auth_core.c2
-rw-r--r--src/gsm/libosmogsm.map230
3 files changed, 233 insertions, 3 deletions
diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am
index 46d40a11..b65f2a23 100644
--- a/src/gsm/Makefile.am
+++ b/src/gsm/Makefile.am
@@ -3,7 +3,7 @@
LIBVERSION=2:0:1
INCLUDES = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -fPIC -Wall
+AM_CFLAGS = -fPIC -Wall ${GCC_FVISIBILITY_HIDDEN}
# FIXME: this should eventually go into a milenage/Makefile.am
noinst_HEADERS = milenage/aes.h milenage/aes_i.h milenage/aes_wrap.h \
@@ -21,5 +21,5 @@ libosmogsm_la_SOURCES = a5.c rxlev_stat.c tlv_parser.c comp128.c gsm_utils.c \
milenage/aes-encblock.c milenage/aes-internal.c \
milenage/aes-internal-enc.c milenage/milenage.c
-libosmogsm_la_LDFLAGS = -version-info $(LIBVERSION)
+libosmogsm_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libosmogsm.map -version-info $(LIBVERSION)
libosmogsm_la_LIBADD = $(top_builddir)/src/libosmocore.la
diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c
index f790ff5b..5e886eef 100644
--- a/src/gsm/auth_core.c
+++ b/src/gsm/auth_core.c
@@ -100,7 +100,7 @@ int osmo_auth_gen_vec_auts(struct osmo_auth_vector *vec,
return impl->gen_vec_auts(vec, aud, rand_auts, auts, _rand);
}
-const struct value_string auth_alg_vals[] = {
+static const struct value_string auth_alg_vals[] = {
{ OSMO_AUTH_ALG_NONE, "None" },
{ OSMO_AUTH_ALG_COMP128v1, "COMP128v1" },
{ OSMO_AUTH_ALG_COMP128v2, "COMP128v2" },
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
new file mode 100644
index 00000000..c15d0e04
--- /dev/null
+++ b/src/gsm/libosmogsm.map
@@ -0,0 +1,230 @@
+LIBOSMOGSM_1.0 {
+global:
+
+abis_nm_adm_state_names;
+abis_nm_att_settable;
+abis_nm_avail_name;
+abis_nm_chcomb4pchan;
+abis_nm_debugp_foh;
+abis_nm_event_type_name;
+abis_nm_nack_cause_name;
+abis_nm_nack_name;
+abis_nm_att_tlvdef;
+abis_nm_obj_class_names;
+abis_nm_opstate_name;
+abis_nm_nacks;
+abis_nm_no_ack_nack;
+abis_nm_pchan4chcomb;
+abis_nm_reports;
+abis_nm_severity_name;
+abis_nm_sw_load_msgs;
+abis_nm_test_name;
+
+osmo_sitype_strs;
+
+comp128;
+dbm2rxlev;
+
+gprs_cipher_gen_input_i;
+gprs_cipher_gen_input_ui;
+gprs_cipher_load;
+gprs_cipher_register;
+gprs_cipher_run;
+gprs_cipher_supported;
+gprs_tlli_type;
+gprs_tmsi2tlli;
+
+gsm0480_create_notifySS;
+gsm0480_create_unstructuredSS_Notify;
+gsm0480_create_ussd_resp;
+gsm0480_decode_ussd_request;
+gsm0480_wrap_facility;
+gsm0480_wrap_invoke;
+
+gsm0502_calc_paging_group;
+
+gsm0808_att_tlvdef;
+gsm0808_bssap_name;
+gsm0808_bssmap_name;
+gsm0808_create_assignment_completed;
+gsm0808_create_assignment_failure;
+gsm0808_create_cipher_complete;
+gsm0808_create_cipher_reject;
+gsm0808_create_classmark_update;
+gsm0808_create_clear_command;
+gsm0808_create_clear_complete;
+gsm0808_create_clear_rqst;
+gsm0808_create_dtap;
+gsm0808_create_layer3;
+gsm0808_create_reset;
+gsm0808_create_sapi_reject;
+gsm0808_prepend_dtap_header;
+
+gsm338_get_sms_alphabet;
+
+gsm340_gen_oa;
+gsm340_gen_scts;
+gsm340_scts;
+gsm340_validity_period;
+
+gsm411_bcdify;
+gsm411_msgb_alloc;
+gsm411_push_cp_header;
+gsm411_push_rp_header;
+gsm411_smc_clear;
+gsm411_smc_init;
+gsm411_smc_recv;
+gsm411_smc_send;
+gsm411_smr_clear;
+gsm411_smr_init;
+gsm411_smr_recv;
+gsm411_smr_send;
+gsm411_unbcdify;
+gsm411_cp_cause_strs;
+gsm411_rp_cause_strs;
+
+gsm48_att_tlvdef;
+gsm48_cc_msg_name;
+gsm48_cc_state_name;
+gsm48_construct_ra;
+gsm48_decode_bcd_number;
+gsm48_decode_bearer_cap;
+gsm48_decode_called;
+gsm48_decode_callerid;
+gsm48_decode_calling;
+gsm48_decode_cause;
+gsm48_decode_cccap;
+gsm48_decode_connected;
+gsm48_decode_facility;
+gsm48_decode_freq_list;
+gsm48_decode_keypad;
+gsm48_decode_notify;
+gsm48_decode_progress;
+gsm48_decode_redirecting;
+gsm48_decode_signal;
+gsm48_decode_ssversion;
+gsm48_decode_useruser;
+gsm48_encode_bcd_number;
+gsm48_encode_bearer_cap;
+gsm48_encode_called;
+gsm48_encode_callerid;
+gsm48_encode_calling;
+gsm48_encode_cause;
+gsm48_encode_cccap;
+gsm48_encode_connected;
+gsm48_encode_facility;
+gsm48_encode_keypad;
+gsm48_encode_more;
+gsm48_encode_notify;
+gsm48_encode_progress;
+gsm48_encode_redirecting;
+gsm48_encode_signal;
+gsm48_encode_ssversion;
+gsm48_encode_useruser;
+gsm48_generate_lai;
+gsm48_generate_mid_from_imsi;
+gsm48_generate_mid_from_tmsi;
+gsm48_mi_to_string;
+gsm48_mm_att_tlvdef;
+gsm48_number_of_paging_subchannels;
+gsm48_parse_ra;
+gsm48_rr_att_tlvdef;
+
+gsm_7bit_decode;
+gsm_7bit_decode_hdr;
+gsm_7bit_encode;
+
+gsm_arfcn2band;
+gsm_arfcn2freq10;
+gsm_band_name;
+gsm_band_parse;
+gsm_fn2gsmtime;
+gsm_get_octet_len;
+gsm_gsmtime2fn;
+
+gsm_milenage;
+gsm_septet_encode;
+gsm_septets2octets;
+
+lapd_dl_exit;
+lapd_dl_init;
+lapd_dl_reset;
+lapd_msgb_alloc;
+lapd_ph_data_ind;
+lapd_recv_dlsap;
+lapd_set_mode;
+lapd_state_names;
+
+lapdm_channel_exit;
+lapdm_channel_init;
+lapdm_channel_reset;
+lapdm_channel_set_flags;
+lapdm_channel_set_l1;
+lapdm_channel_set_l3;
+lapdm_channel_set_mode;
+lapdm_entity_exit;
+lapdm_entity_init;
+lapdm_entity_reset;
+lapdm_entity_set_flags;
+lapdm_entity_set_mode;
+lapdm_phsap_dequeue_prim;
+lapdm_phsap_up;
+lapdm_rslms_recvmsg;
+
+milenage_auts;
+milenage_check;
+milenage_f1;
+milenage_f2345;
+milenage_generate;
+milenage_opc_gen;
+
+ms_class_gmsk_dbm;
+ms_pwr_ctl_lvl;
+ms_pwr_dbm;
+
+osmo_a5;
+osmo_a5_1;
+osmo_a5_2;
+
+osmo_auth_alg_name;
+osmo_auth_alg_parse;
+osmo_auth_gen_vec;
+osmo_auth_gen_vec_auts;
+osmo_auth_load;
+osmo_auth_register;
+osmo_auth_supported;
+
+osmo_rsl2sitype;
+osmo_sitype2rsl;
+
+rr_cause_name;
+
+rsl_att_tlvdef;
+rsl_ccch_conf_to_bs_cc_chans;
+rsl_ccch_conf_to_bs_ccch_sdcch_comb;
+rsl_chan_nr_str;
+rsl_dec_chan_nr;
+rsl_enc_chan_nr;
+rsl_err_name;
+rsl_init_cchan_hdr;
+rsl_init_rll_hdr;
+rsl_ipac_msg_name;
+rsl_msg_name;
+rsl_rll_push_hdr;
+rsl_rll_push_l3;
+rsl_rll_simple;
+rsl_rlm_cause_name;
+
+rxlev2dbm;
+rxlev_stat_dump;
+rxlev_stat_get_next;
+rxlev_stat_input;
+rxlev_stat_reset;
+
+tlv_def_patch;
+tlv_dump;
+tlv_parse;
+tlv_parse_one;
+
+local: *;
+};