From: Mark Wielaard Date: Sun, 18 May 2014 20:41:19 +0000 (+0200) Subject: tests: Don't use static functions in testfile-backtrace-demangle. X-Git-Tag: elfutils-0.159~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85482fc073442a056e0e3663eb454fa76d883271;p=thirdparty%2Felfutils.git tests: Don't use static functions in testfile-backtrace-demangle. Compilers and demanglers might treat local/static functions different between versions. In particular g++ 4.1.2 and libstdc++ mangle and demangle the static void cxxfunc (int i) function as _Z7cxxfunci. While g++ 4.8.2 and libstdc++ mangle and demangle it as _ZL7cxxfunci. Signed-off-by: Mark Wielaard --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 380facd89..bb0ad0d4b 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,10 @@ +2014-05-18 Mark Wielaard + + * testfile-backtrace-demangle.cc (cxxfunc): Make non-static. + (f): Likewise. + * testfile-backtrace-demangle.bz2: Regenerate. + * testfile-backtrace-demangle.core.bz2: Likewise. + 2014-05-02 Mark Wielaard * Makefile.am (TESTS): run-readelf-dwz-multi.sh and diff --git a/tests/testfile-backtrace-demangle.bz2 b/tests/testfile-backtrace-demangle.bz2 old mode 100644 new mode 100755 index c3156e89b..f0294df1a Binary files a/tests/testfile-backtrace-demangle.bz2 and b/tests/testfile-backtrace-demangle.bz2 differ diff --git a/tests/testfile-backtrace-demangle.cc b/tests/testfile-backtrace-demangle.cc index 6daa4297a..27fff685b 100644 --- a/tests/testfile-backtrace-demangle.cc +++ b/tests/testfile-backtrace-demangle.cc @@ -21,7 +21,7 @@ #define NOINLINE_NOCLONE __attribute__ ((noinline)) #endif -static void NOINLINE_NOCLONE +void NOINLINE_NOCLONE cxxfunc (int i) { *(volatile int *)0=0; @@ -31,7 +31,7 @@ cxxfunc (int i) extern "C" { - static void NOINLINE_NOCLONE + void NOINLINE_NOCLONE f (void) { cxxfunc(1); diff --git a/tests/testfile-backtrace-demangle.core.bz2 b/tests/testfile-backtrace-demangle.core.bz2 index c68edce1f..263c3049f 100644 Binary files a/tests/testfile-backtrace-demangle.core.bz2 and b/tests/testfile-backtrace-demangle.core.bz2 differ