AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../libctf
AM_CFLAGS = @ac_libsframe_warn_cflags@
libsframe_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
+# libsframe does not restrict the set of exported symbols. So, if linker does
+# not support symbol versioning, there is no need to fall back on libtool's
+# -export-symbols option.
+if HAVE_LD_VERSION_SCRIPT
+if HAVE_SOLARIS_LD
+ libsframe_version_script = -Wl,-M -Wl,$(srcdir)/libsframe.ver
+else
+ libsframe_version_script = -Wl,--version-script=$(srcdir)/libsframe.ver
+endif
+endif
if INSTALL_LIBBFD
lib_LTLIBRARIES = libsframe.la
libsframe_la_SOURCES = sframe.c sframe-dump.c sframe-error.c
libsframe_la_CPPFLAGS = $(AM_CPPFLAGS)
-libsframe_la_LDFLAGS = $(libsframe_version_info)
+libsframe_la_LDFLAGS = $(libsframe_version_info) $(libsframe_version_script)
-EXTRA_DIST = libtool-version
+EXTRA_DIST = libtool-version libsframe.ver
diststuff: $(EXTRA_DIST) info
include doc/local.mk
AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../libctf
AM_CFLAGS = @ac_libsframe_warn_cflags@
libsframe_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
+@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_FALSE@libsframe_version_script = -Wl,--version-script=$(srcdir)/libsframe.ver
+# libsframe does not restrict the set of exported symbols. So, if linker does
+# not support symbol versioning, there is no need to fall back on libtool's
+# -export-symbols option.
+@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_TRUE@libsframe_version_script = -Wl,-M -Wl,$(srcdir)/libsframe.ver
@INSTALL_LIBBFD_TRUE@lib_LTLIBRARIES = libsframe.la
@INSTALL_LIBBFD_FALSE@include_HEADERS =
@INSTALL_LIBBFD_TRUE@include_HEADERS = $(INCDIR)/sframe.h $(INCDIR)/sframe-api.h
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libsframe.la
libsframe_la_SOURCES = sframe.c sframe-dump.c sframe-error.c
libsframe_la_CPPFLAGS = $(AM_CPPFLAGS)
-libsframe_la_LDFLAGS = $(libsframe_version_info)
-EXTRA_DIST = libtool-version
+libsframe_la_LDFLAGS = $(libsframe_version_info) $(libsframe_version_script)
+EXTRA_DIST = libtool-version libsframe.ver
@BUILD_INFO_TRUE@AM_MAKEINFOFLAGS = --no-split
# Setup the testing framework
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
+HAVE_LD_VERSION_SCRIPT_FALSE
+HAVE_LD_VERSION_SCRIPT_TRUE
+HAVE_SOLARIS_LD_FALSE
+HAVE_SOLARIS_LD_TRUE
BUILD_INFO_FALSE
BUILD_INFO_TRUE
COMPAT_DEJAGNU
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11485 "configure"
+#line 11489 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11591 "configure"
+#line 11595 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if using Solaris linker" >&5
+$as_echo_n "checking if using Solaris linker... " >&6; }
+SLD=`$LD --version 2>&1 | grep Solaris`
+if test "$SLD"; then
+ have_solaris_ld=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ have_solaris_ld=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+ if test "$have_solaris_ld" = "yes"; then
+ HAVE_SOLARIS_LD_TRUE=
+ HAVE_SOLARIS_LD_FALSE='#'
+else
+ HAVE_SOLARIS_LD_TRUE='#'
+ HAVE_SOLARIS_LD_FALSE=
+fi
+
+
+if test "$have_solaris_ld" = "yes"; then
+ GLD=`$LD --help < /dev/null 2>&1 | grep 'M mapfile'`
+else
+ GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
+fi
+
+if test "$GLD"; then
+ have_ld_version_script=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ have_ld_version_script=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Versioned symbols not enabled." >&5
+$as_echo "$as_me: WARNING: *** Versioned symbols not enabled." >&2;}
+fi
+ if test "$have_ld_version_script" = "yes"; then
+ HAVE_LD_VERSION_SCRIPT_TRUE=
+ HAVE_LD_VERSION_SCRIPT_FALSE='#'
+else
+ HAVE_LD_VERSION_SCRIPT_TRUE='#'
+ HAVE_LD_VERSION_SCRIPT_FALSE=
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
as_fn_error $? "conditional \"BUILD_INFO\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${HAVE_SOLARIS_LD_TRUE}" && test -z "${HAVE_SOLARIS_LD_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_SOLARIS_LD\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_LD_VERSION_SCRIPT_TRUE}" && test -z "${HAVE_LD_VERSION_SCRIPT_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
AM_CONDITIONAL(BUILD_INFO, test "${build_info}" = yes)
+dnl Determine if using Solaris linker
+AC_MSG_CHECKING([if using Solaris linker])
+SLD=`$LD --version 2>&1 | grep Solaris`
+if test "$SLD"; then
+ have_solaris_ld=yes
+ AC_MSG_RESULT(yes)
+else
+ have_solaris_ld=no
+ AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(HAVE_SOLARIS_LD, test "$have_solaris_ld" = "yes")
+
+if test "$have_solaris_ld" = "yes"; then
+ GLD=`$LD --help < /dev/null 2>&1 | grep 'M mapfile'`
+else
+ GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
+fi
+
+if test "$GLD"; then
+ have_ld_version_script=yes
+ AC_MSG_RESULT(yes)
+else
+ have_ld_version_script=no
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN(*** Versioned symbols not enabled.)
+fi
+AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
+
AM_MAINTAINER_MODE
AM_INSTALL_LIBBFD
--- /dev/null
+LIBSFRAME_0.0 { };
+
+LIBSFRAME_1.0 {
+ global:
+ sframe_decoder_free;
+ sframe_fde_create_func_info;
+ sframe_calc_fre_type;
+ sframe_fre_get_base_reg_id;
+ sframe_fre_get_cfa_offset;
+ sframe_fre_get_fp_offset;
+ sframe_fre_get_ra_offset;
+ sframe_fre_get_ra_mangled_p;
+ sframe_decode;
+ sframe_decoder_get_hdr_size;
+ sframe_decoder_get_abi_arch;
+ sframe_decoder_get_fixed_fp_offset;
+ sframe_decoder_get_fixed_ra_offset;
+ sframe_get_funcdesc_with_addr;
+ sframe_find_fre;
+ sframe_decoder_get_num_fidx;
+ sframe_decoder_get_funcdesc;
+ sframe_decoder_get_fre;
+ sframe_encode;
+ sframe_encoder_free;
+ sframe_encoder_get_hdr_size;
+ sframe_encoder_get_abi_arch;
+ sframe_encoder_get_num_fidx;
+ sframe_encoder_add_fre;
+ sframe_encoder_add_funcdesc;
+ sframe_encoder_write;
+ dump_sframe;
+ sframe_errmsg;
+
+ local:
+ *;
+} LIBSFRAME_0.0;