summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/fstack-protector-strong.C
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-07-05 08:58:28 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-10-09 05:44:24 -0700
commit27684d5c6505f50a90358594343882e5e28e1f1b (patch)
tree1ebbf5995db1fde78c45b98307fe22aa587ac2a8 /gcc/testsuite/g++.dg/fstack-protector-strong.C
parentb94cb4704526cffc09ea17fa10d6f91276467898 (diff)
downloadgcc-hjl/pr35514.tar.gz
Output ELF symbol type for undefined symbolshjl/pr35514
Update default_elf_asm_output_external to also output symbol type to help ELF linker properly issue diagnostic message. We don't output symbol type for reference to external TLS symbol since assembler will generate TLS symbol type based on TLS relocation and Solaris assembler only supports the @tls_obj type directive, not the @tls_object type directive used by GNU assmbler, which doesn't understand the @tls_obj type directive. gcc/ PR target/35514 * varasm.c (default_elf_asm_output_external): Also output symbol type. gcc/testsuite/ PR target/35514 * g++.dg/fstack-protector-strong.C: Adjust scan-assembler-times for ELF targets. * g++.dg/opt/devirt2.C: Likewise. * g++.dg/pr49718.C: Likewise. * g++.dg/stackprotectexplicit2.C : Likewise. * gcc.dg/fstack-protector-strong.c: Likewise. * gcc.dg/tree-ssa/loop-1.c: Likewise. * gcc.target/i386/memcpy-strategy-3.c: Likewise. * gcc.target/i386/memset-strategy-1.c: Likewise. * gfortran.dg/bind_c_array_params_2.f90: Likewise. * gcc.dg/pr35514-1.c: New file. * gcc.dg/pr35514-2.c: Likewise. * lib/target-supports.exp (check_effective_target_elf): New.
Diffstat (limited to 'gcc/testsuite/g++.dg/fstack-protector-strong.C')
-rw-r--r--gcc/testsuite/g++.dg/fstack-protector-strong.C3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/fstack-protector-strong.C b/gcc/testsuite/g++.dg/fstack-protector-strong.C
index ae6d2fdb8df..7be72fafb73 100644
--- a/gcc/testsuite/g++.dg/fstack-protector-strong.C
+++ b/gcc/testsuite/g++.dg/fstack-protector-strong.C
@@ -85,4 +85,5 @@ int foo7 (B *p)
return p->return_slot ().a1;
}
-/* { dg-final { scan-assembler-times "stack_chk_fail" 7 } } */
+/* { dg-final { scan-assembler-times "stack_chk_fail" 8 { target elf } } } */
+/* { dg-final { scan-assembler-times "stack_chk_fail" 7 { target { ! elf } } } } */