Hiding all non-API symbols from the linker by use of --version-script

This commit is contained in:
Thomas Schmitt 2010-07-05 12:29:50 +00:00
parent 90c1fcd0e9
commit 2e06df4dd0
5 changed files with 293 additions and 7 deletions

View File

@ -231,6 +231,7 @@ EXTRA_DIST = \
COPYRIGHT \
COPYING \
INSTALL \
libisoburn/libisoburn.ver \
xorriso/changelog.txt \
xorriso/xorriso_buildstamp_none.h \
xorriso/README_gnu_xorriso \

View File

@ -55,11 +55,14 @@ Then become superuser and execute
make install
which will make available libisoburn.so.1 and the program xorriso.
For the API concepts and calls see
./libisoburn/libisoburn.h
as well as
/usr/lib/libisofs/libisofs.h
/usr/lib/libburn/libburn.h
By use of a version script, the libisoburn.so library exposes no other function
names but those of the API definitions in <libsoburn/libisoburn.h> and
<libisoburn/xorriso.h>.
If -Wl,--version-script=... makes problems with the local compiler, then
disable this encapsulation feature by
./configure --disable-versioned-libs
make clean ; make
xorriso
@ -103,6 +106,15 @@ if 64 KB rather than 32 KB are transmitted in each write operation.
--enable-dvd-obs-64k
libisoburn, libisofs, and libburn C language API
For the lower API concepts and calls see
./libisoburn/libisoburn.h
as well as
/usr/include/libisofs/libisofs.h
/usr/include/libburn/libburn.h
xorriso C language API
Actually the dynamically linked xorriso binary is only a small start program
@ -119,7 +131,7 @@ The header file xorriso.h gets installed suitable for
#include <libisoburn/xorriso.h>
So after installation of a binary libisoburn package you may find it e.g. as
/usr/local/include/libisoburn/xorriso.h
/usr/include/libisoburn/xorriso.h
Drives and Disk File Objects

View File

@ -251,6 +251,25 @@ else
fi
AC_SUBST(XORRISO_DVD_OBS_64K)
dnl ts B00705
# Library versioning normally serves a complex purpose.
# Since libisoburn obeys strict ABI backward compatibility, it needs only the
# simple feature to declare function names "global:" or "local:". Only the
# global ones are visible to applications at library load time.
dnl
dnl >>> TODO:
dnl >>> make an actual try whether -Wl,--version-script=libburn/libburn.ver
dnl >>> is accepted by the compiler
dnl
AC_ARG_ENABLE(versioned-libs,
[ --enable-versioned-libs Enable strict symbol encapsulation , default=yes],
, enable_versioned_libs=yes)
if test x$enable_versioned_libs = xyes; then
LDFLAGS="$LDFLAGS -Wl,--version-script=libisoburn/libisoburn.ver"
echo "enabled strict symbol encapsulation"
else
echo "disabled strict symbol encapsulation"
fi
AC_CHECK_HEADER(libburn/libburn.h)
AC_CHECK_HEADER(libisofs/libisofs.h)

View File

@ -0,0 +1,254 @@
LIBISOBURN1 {
global:
isoburn_activate_session;
isoburn_attach_image;
isoburn_cancel_prepared_write;
isoburn_disc_available_space;
isoburn_disc_erasable;
isoburn_disc_erase;
isoburn_disc_get_msc1;
isoburn_disc_get_status;
isoburn_disc_track_lba_nwa;
isoburn_disc_write;
isoburn_drive_aquire;
isoburn_drive_grab;
isoburn_drive_release;
isoburn_drive_scan_and_grab;
isoburn_drive_set_msgs_submit;
isoburn_drive_wrote_well;
isoburn_finish;
isoburn_get_attached_image;
isoburn_get_fifo_status;
isoburn_get_min_start_byte;
isoburn_get_mount_params;
isoburn_igopt_destroy;
isoburn_igopt_get_data_start;
isoburn_igopt_get_effective_lba;
isoburn_igopt_get_extensions;
isoburn_igopt_get_fifo_size;
isoburn_igopt_get_level;
isoburn_igopt_get_out_charset;
isoburn_igopt_get_over_mode;
isoburn_igopt_get_over_ugid;
isoburn_igopt_get_pvd_times;
isoburn_igopt_get_relaxed;
isoburn_igopt_get_scdbackup_tag;
isoburn_igopt_get_sort_files;
isoburn_igopt_get_system_area;
isoburn_igopt_new;
isoburn_igopt_set_extensions;
isoburn_igopt_set_fifo_size;
isoburn_igopt_set_level;
isoburn_igopt_set_out_charset;
isoburn_igopt_set_over_mode;
isoburn_igopt_set_over_ugid;
isoburn_igopt_set_pvd_times;
isoburn_igopt_set_relaxed;
isoburn_igopt_set_scdbackup_tag;
isoburn_igopt_set_sort_files;
isoburn_igopt_set_system_area;
isoburn_initialize;
isoburn_is_compatible;
isoburn_libburn_req;
isoburn_libisofs_req;
isoburn_needs_emulation;
isoburn_prepare_blind_grow;
isoburn_prepare_disc;
isoburn_prepare_new_image;
isoburn_read_image;
isoburn_read_iso_head;
isoburn_ropt_destroy;
isoburn_ropt_get_auto_incharset;
isoburn_ropt_get_default_dirperms;
isoburn_ropt_get_default_perms;
isoburn_ropt_get_extensions;
isoburn_ropt_get_input_charset;
isoburn_ropt_get_size_what;
isoburn_ropt_new;
isoburn_ropt_set_auto_incharset;
isoburn_ropt_set_default_dirperms;
isoburn_ropt_set_default_perms;
isoburn_ropt_set_extensions;
isoburn_ropt_set_input_charset;
isoburn_set_msc1;
isoburn_set_msgs_submit;
isoburn_set_read_pacifier;
isoburn_sync_after_write;
isoburn_toc_disc_free;
isoburn_toc_disc_get_sectors;
isoburn_toc_disc_get_sessions;
isoburn_toc_drive_get_disc;
isoburn_toc_session_get_leadout_entry;
isoburn_toc_session_get_sectors;
isoburn_toc_session_get_tracks;
isoburn_toc_track_get_emul;
isoburn_toc_track_get_entry;
isoburn_version;
Xorriso_change_is_pending;
Xorriso_destroy;
Xorriso_dialog;
Xorriso_eval_problem_status;
Xorriso_execute_option;
Xorriso__get_patch_level_text;
Xorriso_get_problem_status;
Xorriso_interpreter;
Xorriso__is_compatible;
Xorriso_lst_destroy_all;
Xorriso_lst_get_next;
Xorriso_lst_get_prev;
Xorriso_lst_get_text;
Xorriso_make_return_value;
Xorriso_msgs_submit;
Xorriso_msgs_submit_void;
Xorriso_new;
Xorriso_option_abort_on;
Xorriso_option_abstract_file;
Xorriso_option_acl;
Xorriso_option_add;
Xorriso_option_add_plainly;
Xorriso_option_alter_date;
Xorriso_option_application_id;
Xorriso_option_as;
Xorriso_option_assert_volid;
Xorriso_option_auto_charset;
Xorriso_option_backslash_codes;
Xorriso_option_ban_stdio_write;
Xorriso_option_biblio_file;
Xorriso_option_blank;
Xorriso_option_boot_image;
Xorriso_option_calm_drive;
Xorriso_option_cdi;
Xorriso_option_cdx;
Xorriso_option_charset;
Xorriso_option_check_md5;
Xorriso_option_check_media;
Xorriso_option_check_media_defaults;
Xorriso_option_chgrpi;
Xorriso_option_chmodi;
Xorriso_option_chowni;
Xorriso_option_close;
Xorriso_option_close_filter_list;
Xorriso_option_commit;
Xorriso_option_commit_eject;
Xorriso_option_compare;
Xorriso_option_compliance;
Xorriso_option_copyright_file;
Xorriso_option_cpri;
Xorriso_option_cpx;
Xorriso_option_cut_out;
Xorriso_option_dev;
Xorriso_option_devices;
Xorriso_option_dialog;
Xorriso_option_disk_dev_ino;
Xorriso_option_disk_pattern;
Xorriso_option_drive_class;
Xorriso_option_dummy;
Xorriso_option_dvd_obs;
Xorriso_option_eject;
Xorriso_option_end;
Xorriso_option_errfile_log;
Xorriso_option_error_behavior;
Xorriso_option_external_filter;
Xorriso_option_extract;
Xorriso_option_extract_cut;
Xorriso_option_file_size_limit;
Xorriso_option_find;
Xorriso_option_follow;
Xorriso_option_fs;
Xorriso_option_getfacli;
Xorriso_option_gid;
Xorriso_option_grow_blindly;
Xorriso_option_hardlinks;
Xorriso_option_help;
Xorriso_option_hide;
Xorriso_option_history;
Xorriso_option_iso_rr_pattern;
Xorriso_option_joliet;
Xorriso_option_list_delimiter;
Xorriso_option_list_formats;
Xorriso_option_list_profiles;
Xorriso_option_load;
Xorriso_option_logfile;
Xorriso_option_lsi;
Xorriso_option_lsx;
Xorriso_option_map;
Xorriso_option_map_l;
Xorriso_option_mark;
Xorriso_option_md5;
Xorriso_option_mkdiri;
Xorriso_option_mount;
Xorriso_option_mount_opts;
Xorriso_option_mvi;
Xorriso_option_no_rc;
Xorriso_option_not_leaf;
Xorriso_option_not_list;
Xorriso_option_not_mgt;
Xorriso_option_not_paths;
Xorriso_option_options_from_file;
Xorriso_option_osirrox;
Xorriso_option_overwrite;
Xorriso_option_pacifier;
Xorriso_option_padding;
Xorriso_option_page;
Xorriso_option_paste_in;
Xorriso_option_path_list;
Xorriso_option_pathspecs;
Xorriso_option_pkt_output;
Xorriso_option_print;
Xorriso_option_print_size;
Xorriso_option_prog;
Xorriso_option_prog_help;
Xorriso_option_prompt;
Xorriso_option_publisher;
Xorriso_option_pvd_info;
Xorriso_option_pwdi;
Xorriso_option_pwdx;
Xorriso_option_read_mkisofsrc;
Xorriso_option_reassure;
Xorriso_option_report_about;
Xorriso_option_return_with;
Xorriso_option_rmi;
Xorriso_option_rollback;
Xorriso_option_rom_toc_scan;
Xorriso_option_scdbackup_tag;
Xorriso_option_scsi_log;
Xorriso_option_session_log;
Xorriso_option_setfacli;
Xorriso_option_setfacl_listi;
Xorriso_option_setfattri;
Xorriso_option_setfattr_listi;
Xorriso_option_set_filter;
Xorriso_option_speed;
Xorriso_option_split_size;
Xorriso_option_status;
Xorriso_option_status_history_max;
Xorriso_option_stdio_sync;
Xorriso_option_stream_recording;
Xorriso_option_system_id;
Xorriso_option_tell_media_space;
Xorriso_option_temp_mem_limit;
Xorriso_option_toc;
Xorriso_option_uid;
Xorriso_option_unregister_filter;
Xorriso_option_update;
Xorriso_option_use_readline;
Xorriso_option_version;
Xorriso_option_volid;
Xorriso_option_volset_id;
Xorriso_option_volume_date;
Xorriso_option_xattr;
Xorriso_option_zisofs;
Xorriso_prescan_args;
Xorriso__preset_signal_behavior;
Xorriso_process_errfile;
Xorriso_process_msg_queues;
Xorriso_program_arg_bsl;
Xorriso_pull_outlists;
Xorriso_push_outlists;
Xorriso_read_rc;
Xorriso_set_problem_status;
Xorriso_startup_libraries;
Xorriso__version;
local: *;
};

View File

@ -1 +1 @@
#define Xorriso_timestamP "2010.07.05.090409"
#define Xorriso_timestamP "2010.07.05.122901"