summaryrefslogtreecommitdiffstats
path: root/lto-plugin
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2021-09-12 08:58:16 +0000
committerAndrew Pinski <apinski@marvell.com>2021-09-13 15:16:56 +0000
commit9e58de3ce00fc2385c9efb7faf321e0c601f0b0c (patch)
tree02c34b876dfd6c4259548ea704588fa6441b2029 /lto-plugin
parentaarch64: PR target/102252 Invalid addressing mode for SVE load predicate (diff)
downloadgcc-9e58de3ce00fc2385c9efb7faf321e0c601f0b0c.tar.gz
gcc-9e58de3ce00fc2385c9efb7faf321e0c601f0b0c.tar.bz2
gcc-9e58de3ce00fc2385c9efb7faf321e0c601f0b0c.tar.xz
Fix PR lto/49664: liblto_plugin.so exports too many symbols
So right now liblto_plugin.so exports many libiberty symbols and simple_object file symbols but really it just needs to export onload. This fixes the problem by using "-export-symbols-regex onload" on the libtool link line. lto-plugin/ChangeLog: PR lto/49664 * Makefile.am: Export only onload. * Makefile.in: Regenerate.
Diffstat (limited to 'lto-plugin')
-rw-r--r--lto-plugin/Makefile.am3
-rw-r--r--lto-plugin/Makefile.in7
2 files changed, 6 insertions, 4 deletions
diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
index 8b20e1d1d87..988d7a78294 100644
--- a/lto-plugin/Makefile.am
+++ b/lto-plugin/Makefile.am
@@ -21,7 +21,8 @@ in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
21liblto_plugin_la_SOURCES = lto-plugin.c 21liblto_plugin_la_SOURCES = lto-plugin.c
22# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS. 22# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS.
23liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \ 23liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
24 $(lt_host_flags) -module -avoid-version -bindir $(libexecsubdir) 24 $(lt_host_flags) -module -avoid-version -bindir $(libexecsubdir) \
25 -export-symbols-regex onload
25# Can be simplified when libiberty becomes a normal convenience library. 26# Can be simplified when libiberty becomes a normal convenience library.
26libiberty = $(with_libiberty)/libiberty.a 27libiberty = $(with_libiberty)/libiberty.a
27libiberty_noasan = $(with_libiberty)/noasan/libiberty.a 28libiberty_noasan = $(with_libiberty)/noasan/libiberty.a
diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in
index 20611c6b1e6..f8df31bb1e8 100644
--- a/lto-plugin/Makefile.in
+++ b/lto-plugin/Makefile.in
@@ -323,6 +323,7 @@ prefix = @prefix@
323program_transform_name = @program_transform_name@ 323program_transform_name = @program_transform_name@
324psdir = @psdir@ 324psdir = @psdir@
325real_target_noncanonical = @real_target_noncanonical@ 325real_target_noncanonical = @real_target_noncanonical@
326runstatedir = @runstatedir@
326sbindir = @sbindir@ 327sbindir = @sbindir@
327sharedstatedir = @sharedstatedir@ 328sharedstatedir = @sharedstatedir@
328srcdir = @srcdir@ 329srcdir = @srcdir@
@@ -350,9 +351,9 @@ libexecsub_LTLIBRARIES = liblto_plugin.la
350in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib)) 351in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
351liblto_plugin_la_SOURCES = lto-plugin.c 352liblto_plugin_la_SOURCES = lto-plugin.c
352# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS. 353# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS.
353liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(lt_host_flags) -module -avoid-version \ 354liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(lt_host_flags) -module \
354 -bindir $(libexecsubdir) $(if $(wildcard \ 355 -avoid-version -bindir $(libexecsubdir) -export-symbols-regex \
355 $(libiberty_noasan)),, $(if $(wildcard \ 356 onload $(if $(wildcard $(libiberty_noasan)),, $(if $(wildcard \
356 $(libiberty_pic)),,-Wc,$(libiberty))) 357 $(libiberty_pic)),,-Wc,$(libiberty)))
357# Can be simplified when libiberty becomes a normal convenience library. 358# Can be simplified when libiberty becomes a normal convenience library.
358libiberty = $(with_libiberty)/libiberty.a 359libiberty = $(with_libiberty)/libiberty.a