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
asmcfi.m4
ax_check_define.m4
bitfields.m4
bootstrap-asan.mk
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
bootstrap-lto.mk
bootstrap-mpx.mk
bootstrap-O1.mk
bootstrap-O3.mk
bootstrap-time.mk
bootstrap-ubsan.mk
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
elf.m4
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
glibc21.m4
gthr.m4
gxx-include-dir.m4
hwcaps.m4
iconv.m4
intdiv0.m4
inttypes_h.m4
inttypes-pri.m4
inttypes.m4
isl.m4
largefile.m4
lcmessage.m4
ld-symbolic.m4
lead-dot.m4
lib-ld.m4
lib-link.m4
lib-prefix.m4
libstdc++-raw-cxx.m4
lthostflags.m4
math.m4
mh-alpha-linux
mh-cygwin
mh-darwin
mh-djgpp
mh-mingw
mh-pa
mh-pa-hpux10
mh-ppc-aix
mmap.m4
mt-alphaieee
mt-android
mt-d30v
mt-gnu
mt-mips16-compat
mt-mips-elfoabi
mt-mips-gnu
mt-nios2-elf
mt-ospace
mt-sde
mt-spu
multi.m4
nls.m4
no-executables.m4
override.m4
picflag.m4
plugins.m4 Use dlsym to check if libdl is needed for plugin 2018-04-05 10:49:39 -07:00
po.m4
proginstall.m4
progtest.m4
sjlj.m4
stdint_h.m4
stdint.m4
target-posix
tcl.m4
tls.m4
uintmax_t.m4
ulonglong.m4
unwind_ipinfo.m4
warnings.m4
weakref.m4
zlib.m4