public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/49664] New: liblto_plugin.so exports too many symbols
@ 2011-07-06 22:22 jsm28 at gcc dot gnu.org
2011-07-07 9:23 ` [Bug lto/49664] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2011-07-06 22:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49664
Summary: liblto_plugin.so exports too many symbols
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jsm28@gcc.gnu.org
The dynamic symbol table of liblto_plugin.so contains lots of libiberty symbols
that should not be part of the plugin's interface. I think the "onload" symbol
is the only one that actually needs to be exported; the rest should be hidden
by an appropriate version script when the plugin is built, if this is supported
on the host.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug lto/49664] liblto_plugin.so exports too many symbols
2011-07-06 22:22 [Bug lto/49664] New: liblto_plugin.so exports too many symbols jsm28 at gcc dot gnu.org
@ 2011-07-07 9:23 ` rguenth at gcc dot gnu.org
2021-09-12 8:57 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-07-07 9:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49664
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.07.07 09:23:07
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-07 09:23:07 UTC ---
Confirmed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug lto/49664] liblto_plugin.so exports too many symbols
2011-07-06 22:22 [Bug lto/49664] New: liblto_plugin.so exports too many symbols jsm28 at gcc dot gnu.org
2011-07-07 9:23 ` [Bug lto/49664] " rguenth at gcc dot gnu.org
@ 2021-09-12 8:57 ` pinskia at gcc dot gnu.org
2021-09-12 9:17 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-12 8:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49664
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I am going to test this change:
diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
index 8b20e1d1d87..704b0c35b70 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))
liblto_plugin_la_SOURCES = lto-plugin.c
# Note that we intentionally override the bindir supplied by
ACX_LT_HOST_FLAGS.
liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
- $(lt_host_flags) -module -avoid-version -bindir $(libexecsubdir)
+ $(lt_host_flags) -module -avoid-version -bindir $(libexecsubdir) \
+ -export-symbols-regex oncall
# Can be simplified when libiberty becomes a normal convenience library.
libiberty = $(with_libiberty)/libiberty.a
libiberty_noasan = $(with_libiberty)/noasan/libiberty.a
diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in
index 20611c6b1e6..f59d7ffcea9 100644
--- a/lto-plugin/Makefile.in
+++ b/lto-plugin/Makefile.in
@@ -323,6 +323,7 @@ prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
real_target_noncanonical = @real_target_noncanonical@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -350,9 +351,9 @@ libexecsub_LTLIBRARIES = liblto_plugin.la
in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES),
$(gcc_build_dir)/$(lib))
liblto_plugin_la_SOURCES = lto-plugin.c
# Note that we intentionally override the bindir supplied by
ACX_LT_HOST_FLAGS.
-liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(lt_host_flags) -module
-avoid-version \
- -bindir $(libexecsubdir) $(if $(wildcard \
- $(libiberty_noasan)),, $(if $(wildcard \
+liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(lt_host_flags) -module \
+ -avoid-version -bindir $(libexecsubdir) -export-symbols-regex \
+ oncall $(if $(wildcard $(libiberty_noasan)),, $(if $(wildcard \
$(libiberty_pic)),,-Wc,$(libiberty)))
# Can be simplified when libiberty becomes a normal convenience library.
libiberty = $(with_libiberty)/libiberty.a
----- CUT ------
-export-symbols-regex is documented here
https://www.gnu.org/software/libtool/manual/html_node/Link-mode.html
Since we only need to export oncall and we already use libtool there is not
much to be done.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug lto/49664] liblto_plugin.so exports too many symbols
2011-07-06 22:22 [Bug lto/49664] New: liblto_plugin.so exports too many symbols jsm28 at gcc dot gnu.org
2011-07-07 9:23 ` [Bug lto/49664] " rguenth at gcc dot gnu.org
2021-09-12 8:57 ` pinskia at gcc dot gnu.org
@ 2021-09-12 9:17 ` pinskia at gcc dot gnu.org
2021-09-13 15:17 ` cvs-commit at gcc dot gnu.org
2021-09-13 15:18 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-12 9:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49664
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 51440
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51440&action=edit
Patch which at least builds correctly in lto-plugin
The previous patch I had a typo where I had put oncall instead of the correct
onload.
Anyways this fixes the issue and libtool does the rest.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug lto/49664] liblto_plugin.so exports too many symbols
2011-07-06 22:22 [Bug lto/49664] New: liblto_plugin.so exports too many symbols jsm28 at gcc dot gnu.org
` (2 preceding siblings ...)
2021-09-12 9:17 ` pinskia at gcc dot gnu.org
@ 2021-09-13 15:17 ` cvs-commit at gcc dot gnu.org
2021-09-13 15:18 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-09-13 15:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49664
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:
https://gcc.gnu.org/g:9e58de3ce00fc2385c9efb7faf321e0c601f0b0c
commit r12-3491-g9e58de3ce00fc2385c9efb7faf321e0c601f0b0c
Author: Andrew Pinski <apinski@marvell.com>
Date: Sun Sep 12 08:58:16 2021 +0000
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug lto/49664] liblto_plugin.so exports too many symbols
2011-07-06 22:22 [Bug lto/49664] New: liblto_plugin.so exports too many symbols jsm28 at gcc dot gnu.org
` (3 preceding siblings ...)
2021-09-13 15:17 ` cvs-commit at gcc dot gnu.org
@ 2021-09-13 15:18 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-13 15:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49664
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |12.0
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed on the trunk.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-09-13 15:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-06 22:22 [Bug lto/49664] New: liblto_plugin.so exports too many symbols jsm28 at gcc dot gnu.org
2011-07-07 9:23 ` [Bug lto/49664] " rguenth at gcc dot gnu.org
2021-09-12 8:57 ` pinskia at gcc dot gnu.org
2021-09-12 9:17 ` pinskia at gcc dot gnu.org
2021-09-13 15:17 ` cvs-commit at gcc dot gnu.org
2021-09-13 15:18 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).