aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2018-10-12 11:38:40 -0400
committerMark Hatle <mark.hatle@windriver.com>2018-10-12 12:02:49 -0400
commit990c806d6747a4d40668a95dde4c70d70fb75541 (patch)
tree6b73c8818c64eb4cc493dfb5fb8c7f73af7610ce
parentd73bf2e3ef7070f92446329b8833b6e609b5f756 (diff)
downloadprelink-cross-990c806d6747a4d40668a95dde4c70d70fb75541.tar.gz
prelink-cross-990c806d6747a4d40668a95dde4c70d70fb75541.tar.bz2
prelink-cross-990c806d6747a4d40668a95dde4c70d70fb75541.zip
testsuite/reloc12.sh: Detect if compiler/linker support test
If the compiler and don't support protected symbols in certain relocations, and error may occur such as: relocation R_X86_64_PC32 against protected symbol `foo' can not be used when making a shared object Detect this and skip the test if it is not possible to run. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-rw-r--r--ChangeLog3
-rwxr-xr-xtestsuite/reloc12.sh4
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 74d70da..8acac09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2018-10-12 Mark Hatle <mark.hatle@windriver.com>
+ * testsuite/reloc12.sh: Detect if compiler/linker support test
+
2018-10-12 Robert Yang <liezhi.yang@windriver.com>
* src/arch-mips.c: Make tls offset optional on tls usage
diff --git a/testsuite/reloc12.sh b/testsuite/reloc12.sh
index a8a43c7..6cbc1f9 100755
--- a/testsuite/reloc12.sh
+++ b/testsuite/reloc12.sh
@@ -4,6 +4,10 @@ rm -f reloc12 reloc12lib*.so reloc12.log
rm -f prelink.cache
$RUN_HOST $CC -shared -O2 -fpic -o reloc12lib1.so $srcdir/reloc12lib1.c
$RUN_HOST $CC -shared -O2 -fpic -o reloc12lib2.so $srcdir/reloc12lib2.c
+if [ $? -ne 0 ]; then
+ echo "tested relocation not available in this GCC/Linker"
+ exit 77
+fi
BINS="reloc12"
LIBS="reloc12lib1.so reloc12lib2.so"
$RUN_HOST $CCLINK -o reloc12 $srcdir/reloc12.c -Wl,--rpath-link,. ${LIBS}