This is an automated email from the git hooks/post-receive script.
unknown user pushed a commit to branch hjl/indbr/master in repository gcc.
commit 599f1c8c986ed8518edc393c4c56acf6a0db0440 Author: H.J. Lu hjl.tools@gmail.com Date: Thu Jul 23 10:51:15 2015 -0700
Check if x86 gas supports indirect branch via GOT
Define HAVE_LD_IX86_INDBR_RELOC to 1 if 32-bit x86 assembler supports "jmp *foo@GOT".
* configure.ac (HAVE_LD_IX86_INDBR_RELOC): New. Defined to 1 if 32-bit assembler supports "jmp *foo@GOT". Otherise, defined to 0. * config.in: Regenerated. * configure: Likewise. --- gcc/config.in | 6 ++++++ gcc/configure | 30 ++++++++++++++++++++++++++++++ gcc/configure.ac | 22 ++++++++++++++++++++++ 3 files changed, 58 insertions(+)
diff --git a/gcc/config.in b/gcc/config.in index 541963a..2c79db2 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -1428,6 +1428,12 @@ #endif
+/* Define 0/1 if Define if your linker supports indirect branch relocation. */ +#ifndef USED_FOR_TARGET +#undef HAVE_LD_IX86_INDBR_RELOC +#endif + + /* Define if your PowerPC64 linker supports a large TOC. */ #ifndef USED_FOR_TARGET #undef HAVE_LD_LARGE_TOC diff --git a/gcc/configure b/gcc/configure index c8928d8..1a182ae 100755 --- a/gcc/configure +++ b/gcc/configure @@ -25649,6 +25649,36 @@ cat >>confdefs.h <<_ACEOF _ACEOF
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for indirect branch r [...] +$as_echo_n "checking linker for indirect branch relocation... " >&6; } +if test "${gcc_cv_ld_ix86_indirect_branch+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + gcc_cv_ld_ix86_indirect_branch=no + if test $in_tree_ld = yes ; then + if grep R_386_INDBR_GOT32 $srcdir/../include/elf/i386.h > /dev/null 2>&1; then + gcc_cv_ld_ix86_indirect_branch=yes + fi + elif test x$gcc_cv_as != x -a x$gcc_cv_readelf != x; then + cat > conftest.s <<EOF + jmp *foo@GOT +EOF + if $gcc_cv_as --32 -o conftest.o conftest.s > /dev/null 2>&1; then + if $gcc_cv_readelf --relocs --wide conftest.o 2>&1 \ + | grep R_386_INDBR_GOT32 > /dev/null 2>&1; then + gcc_cv_ld_ix86_indirect_branch=yes + fi + fi + fi + rm -f conftest.s conftest.o +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_ix86_indirect_branch" >&5 +$as_echo "$gcc_cv_ld_ix86_indirect_branch" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_LD_IX86_INDBR_RELOC `if test x"$gcc_cv_ld_ix86_indirect_branch" = xye [...] +_ACEOF + ;;
ia64*-*-*) diff --git a/gcc/configure.ac b/gcc/configure.ac index a192ad9..dc5e2ac 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -4065,6 +4065,28 @@ value:' [`if test $gcc_cv_as_ix86_tlsldm = yes; then echo 1; else echo 0; fi`], [Define to 1 if your assembler and linker support @tlsldm.])
+ AC_CACHE_CHECK([linker for indirect branch relocation], + [gcc_cv_ld_ix86_indirect_branch], + [gcc_cv_ld_ix86_indirect_branch=no + if test $in_tree_ld = yes ; then + if grep R_386_INDBR_GOT32 $srcdir/../include/elf/i386.h > /dev/null 2>&1; then + gcc_cv_ld_ix86_indirect_branch=yes + fi + elif test x$gcc_cv_as != x -a x$gcc_cv_readelf != x; then + cat > conftest.s <<EOF + jmp *foo@GOT +EOF + if $gcc_cv_as --32 -o conftest.o conftest.s > /dev/null 2>&1; then + if $gcc_cv_readelf --relocs --wide conftest.o 2>&1 \ + | grep R_386_INDBR_GOT32 > /dev/null 2>&1; then + gcc_cv_ld_ix86_indirect_branch=yes + fi + fi + fi + rm -f conftest.s conftest.o]) + AC_DEFINE_UNQUOTED(HAVE_LD_IX86_INDBR_RELOC, + [`if test x"$gcc_cv_ld_ix86_indirect_branch" = xyes; then echo 1; else echo [...] + [Define 0/1 if Define if your linker supports indirect branch relocation.]) ;;
ia64*-*-*)