gcc/config
H.J. Lu 520a02b6fa Use dlsym to check if libdl is needed for plugin
config/plugins.m4 has

 if test "$plugins" = "yes"; then
    AC_SEARCH_LIBS([dlopen], [dl])
  fi

Plugin uses dlsym, but libasan.so only intercepts dlopen, not dlsym:

[hjl@gnu-tools-1 binutils-text]$ nm -D /lib64/libasan.so.4| grep " dl"
0000000000038580 W dlclose
                 U dl_iterate_phdr
000000000004dc50 W dlopen
                 U dlsym
                 U dlvsym
[hjl@gnu-tools-1 binutils-text]$

Testing dlopen for libdl leads to false negative when -fsanitize=address
is used.  It results in link failure:

../bfd/.libs/libbfd.a(plugin.o): undefined reference to symbol 'dlsym@@GLIBC_2.16'

dlsym should be used to check if libdl is needed for plugin.

	PR gas/22318
	* plugins.m4 (AC_PLUGINS): Use dlsym to check if libdl is needed.

From-SVN: r259140
2018-04-05 10:49:39 -07:00
..
acinclude.m4
acx.m4 re PR other/79046 (g++ -print-file-name=plugin uses full version number in path) 2017-01-17 10:38:48 +01:00
asmcfi.m4
ax_check_define.m4 re PR target/78478 (Compile Error for i386-rtems) 2017-01-19 22:00:53 +01:00
bitfields.m4 Improve the test in bitfields.m4 2015-05-05 03:41:53 +00:00
bootstrap-asan.mk Add support for ASan odr_indicator. 2016-12-02 09:39:27 +02:00
bootstrap-cet.mk Add bootstrap-cet.mk to bootstrap GCC with Intel CET 2017-10-24 05:50:03 -07:00
bootstrap-debug-big.mk
bootstrap-debug-ckovw.mk
bootstrap-debug-lean.mk Use compare-debug for bootstrap-debug-lean to ignore != DW_AT_producer 2017-11-15 03:11:37 +00:00
bootstrap-debug-lib.mk
bootstrap-debug.mk
bootstrap-lto-noplugin.mk Enable -flto in all PGO stages for bootstrap-lto-{,noplugin}.mk. 2017-06-19 13:20:20 +00:00
bootstrap-lto.mk Enable -flto in all PGO stages for bootstrap-lto-{,noplugin}.mk. 2017-06-19 13:20:20 +00:00
bootstrap-mpx.mk Add the missing file 2015-04-14 08:04:45 -07:00
bootstrap-O1.mk
bootstrap-O3.mk
bootstrap-time.mk
bootstrap-ubsan.mk bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Remove -lpthread -ldl. 2013-11-29 20:13:45 +00:00
cet.m4 CET shouldn't be enabled in 32-bit run-time libraries by defualt 2018-02-19 17:25:49 +01:00
ChangeLog Use dlsym to check if libdl is needed for plugin 2018-04-05 10:49:39 -07:00
codeset.m4
depstand.m4
dfp.m4 IA MCU psABI support: changes to libraries 2015-06-30 09:42:07 -07:00
elf.m4 sync config/* from binutils 2016-12-08 09:46:03 +10:30
enable.m4
extensions.m4
futex.m4
gc++filt.m4
gcc-plugin.m4 gcc-plugin.m4 (GCC_ENABLE_PLUGINS): Remove -q option passed to grep. 2018-02-06 08:30:53 +00:00
gettext-sister.m4
gettext.m4 re PR other/66259 (Combined gcc and binutils build from git-master fails, with gas/as-new not existing) 2015-07-24 12:20:44 -06:00
glibc21.m4
gthr.m4 gthr.m4: New. 2012-10-15 13:10:30 +00:00
gxx-include-dir.m4
hwcaps.m4 Build libgo with -Wa,-nH if possible (PR go/78978) [non-libgo parts] 2017-01-06 14:33:47 +00:00
iconv.m4 Missing parts of fixes for in-tree libiconv 2015-08-24 10:24:52 +00:00
intdiv0.m4
inttypes_h.m4
inttypes-pri.m4
inttypes.m4
isl.m4 isl.m4: Remove support for ISL 0.14. 2017-02-13 08:54:02 +00:00
largefile.m4
lcmessage.m4
ld-symbolic.m4
lead-dot.m4
lib-ld.m4
lib-link.m4
lib-prefix.m4
libstdc++-raw-cxx.m4 Remove "-I" from LIBSTDCXX_RAW_CXX_LDFLAGS 2013-01-07 10:23:42 -08:00
lthostflags.m4
math.m4
mh-alpha-linux Install back PR target/47230 fix (Revert the revert). 2015-03-27 18:08:44 +01:00
mh-cygwin
mh-darwin re PR target/65351 (libiberty's pic version contains non-pic code on m32 darwin; causes bootstrap fail building libcc1.) 2015-04-10 06:43:52 +00:00
mh-djgpp
mh-mingw
mh-pa
mh-pa-hpux10
mh-ppc-aix
mmap.m4
mt-alphaieee
mt-android configure.ac (*-*-linux-android*): Set target_makefile_frag. 2017-06-03 08:23:22 +00:00
mt-d30v
mt-gnu re PR target/43538 (config/mt-gnu CXXFLAGS_FOR_TARGET) 2014-04-25 08:03:08 +00:00
mt-mips16-compat
mt-mips-elfoabi
mt-mips-gnu
mt-nios2-elf configure.ac (target_makefile_frag): Set for nios2-*-elf*. 2014-05-14 19:20:59 -04:00
mt-ospace mt-ospace (CFLAGS_FOR_TARGET): Append -g -Os rather than overwriting. 2014-11-18 15:12:52 -07:00
mt-sde mt-sde: Change -mcode-xonly to -mcode-readable=pcrel. 2012-09-19 20:42:01 +00:00
mt-spu
multi.m4 config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
nls.m4
no-executables.m4
override.m4 sync config/* from binutils 2016-12-08 09:46:03 +10:30
picflag.m4 Update configure deps, remove stray \xA0 in picflag.m4, regenerate 2017-01-04 18:59:34 +10:30
plugins.m4 Use dlsym to check if libdl is needed for plugin 2018-04-05 10:49:39 -07:00
po.m4 re PR other/66259 (Combined gcc and binutils build from git-master fails, with gas/as-new not existing) 2015-07-24 12:20:44 -06:00
proginstall.m4
progtest.m4
sjlj.m4 sjlj.m4: New file. 2015-05-13 21:15:31 +00:00
stdint_h.m4
stdint.m4 re PR other/66259 (Combined gcc and binutils build from git-master fails, with gas/as-new not existing) 2015-07-24 12:20:44 -06:00
target-posix [PATCH 2/4] OpenMP 4.0 offloading to Intel MIC: liboffloadmic. 2014-11-13 14:03:17 +00:00
tcl.m4 re PR other/66259 (Combined gcc and binutils build from git-master fails, with gas/as-new not existing) 2015-07-24 12:20:44 -06:00
tls.m4
uintmax_t.m4
ulonglong.m4
unwind_ipinfo.m4
warnings.m4 * warnings.m4: Fix comment. 2015-05-27 16:40:38 -04:00
weakref.m4
zlib.m4 This patch syncs zlib.m4 with binutils-gdb and uses AM_ZLIB from zlib.m4 2015-07-14 07:25:35 -07:00