diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/build/tools/cflags.sh | 3 | ||||
-rw-r--r-- | src/include/usr/gcov.h | 15 | ||||
-rw-r--r-- | src/module.ld | 3 |
3 files changed, 17 insertions, 4 deletions
diff --git a/src/build/tools/cflags.sh b/src/build/tools/cflags.sh index 09483f3eb..0ca39f374 100755 --- a/src/build/tools/cflags.sh +++ b/src/build/tools/cflags.sh @@ -40,7 +40,8 @@ if [ ! "$HOSTBOOT_PROFILE" ] ; then fi make_path_abs () { - local ABSPATH=$(readlink -f "$1") + local ABSPATH + ABSPATH=$(readlink -f "$1") if [ $? -ne 0 ] ; then ABSPATH="$1" diff --git a/src/include/usr/gcov.h b/src/include/usr/gcov.h index 8b506a935..975e755a9 100644 --- a/src/include/usr/gcov.h +++ b/src/include/usr/gcov.h @@ -114,8 +114,10 @@ static_assert(sizeof(gcov_type) == 8, "gcov_type isn't 64 bits for some reason") #if __GNUC__ == 4 && __GNUC_MINOR__ == 9 #define GCOV_COUNTERS 9 +#elif __GNUC__ == 8 && __GNUC_MINOR__ <= 3 +#define GCOV_COUNTERS 9 #else -#error We dont support this compiler yet +#error GCOV implementation does not support this compiler yet #endif /* Structures embedded in coveraged program. The structures generated @@ -332,7 +334,7 @@ void __gcov_module_copychain(gcov_info** const chain_ptr) } #endif -/** Unneeded function but must be defined to compile. +/** Unneeded function but must be defined to link. * * This function appears to be typically used by libgcov.so when instrumented * on a real linux-based system. It can be used to merge counters across @@ -346,4 +348,13 @@ void __gcov_merge_add() while(1); } +/** Unneeded function but must be defined to link. */ + +extern "C" +void __gcov_exit() +{ + MAGIC_INSTRUCTION(MAGIC_BREAK); + while (1); +} + #endif diff --git a/src/module.ld b/src/module.ld index 02239b8d3..38f36719d 100644 --- a/src/module.ld +++ b/src/module.ld @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2010,2015 */ +/* Contributors Listed Below - COPYRIGHT 2010,2019 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -76,5 +76,6 @@ SECTIONS /DISCARD/ : { *(.dtors) + *(.dtors.*) } } |