Skip to content
Snippets Groups Projects
Commit 3529103a authored by Bernd Machenschalk's avatar Bernd Machenschalk
Browse files

Try something different: try to dlopen("libgcc_s.so.1") in the program

This reverts commit 46322af6.
parent 46322af6
No related branches found
Tags einstein_S6LV1_1.15
No related merge requests found
......@@ -252,9 +252,9 @@ else
WITH_SSL="--with-ssl=$ssldir"
fi
if [ ".$release" = ".true" ]; then
CPPFLAGS="-DEXT_STACKTRACE -I$INSTALL/include/bfd $CPPFLAGS"
CPPFLAGS="-DDLOPEN_LIBGCC -DEXT_STACKTRACE -I$INSTALL/include/bfd $CPPFLAGS"
export RELEASE_DEPS="erp_execinfo_plus.o libstdc++.a libz.a"
export RELEASE_LDADD="erp_execinfo_plus.o -lbfd -liberty /lib/libgcc_s.so.1"
export RELEASE_LDADD="erp_execinfo_plus.o -lbfd -liberty -ldl"
build_binutils=true
enable_linux_compatibility_workarounds=true
fi ;;
......
......@@ -69,6 +69,11 @@
#include <gnu/libc-version.h>
#endif
/* try to dlopen("libgcc_s.so.1") */
#ifdef DLOPEN_LIBGCC
#include <dlfcn.h>
#endif
/* our own exception handler / runtime debugger */
#if HAVE_EXCHNDL
#include "exchndl.h"
......@@ -1098,6 +1103,18 @@ static void worker (void) {
LogPrintf (LOG_DEBUG, "glibc version/release: %s/%s\n", gnu_get_libc_version(), gnu_get_libc_release());
#endif
#ifdef DLOPEN_LIBGCC
{
void *lib_handle = dlopen("libgcc_s.so.1", RTLD_LAZY);
if(lib_handle) {
LogPrintf (LOG_DEBUG, "Successfully loaded libgcc_s.so.1\n");
/* dlclose(lib_handle); */
} else {
LogPrintf (LOG_DEBUG, "Couldn't load libgcc_s.so.1: %s\n", dlerror());
}
}
#endif
/* if there already was an error, there is no use in continuing */
if (res) {
LogPrintf (LOG_CRITICAL, "ERROR: error %d in command-line parsing\n", res);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment