]> git.ipfire.org Git - people/ms/gcc.git/commitdiff
libcc1: Export all symbols gcc-12-hardened
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 21 Mar 2023 17:52:04 +0000 (17:52 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 24 Mar 2023 10:53:11 +0000 (10:53 +0000)
This patches removes the -export-symbols option when linking libcc1 and
its plugins as it is breaking our hardening check where we are looking
for a reference to __stack_chk_fail in the symbol table.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
libcc1/Makefile.am
libcc1/Makefile.in

index 6e3a34ff7e2fbc17d8199bbb425400c6f3d455ce..7eb8ec9178ccd005205c2701d3c7341cdcc6369d 100644 (file)
@@ -54,7 +54,7 @@ shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \
 marshall_c_source = marshall-c.hh
 marshall_cxx_source = marshall-cp.hh
 
-libcc1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1plugin.sym
+libcc1plugin_la_LDFLAGS = -module
 libcc1plugin_la_SOURCES = libcc1plugin.cc context.cc context.hh \
        $(shared_source) $(marshall_c_source)
 libcc1plugin.lo_CPPFLAGS = $(CPPFLAGS_FOR_C)
@@ -64,7 +64,7 @@ libcc1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
        $(CXXFLAGS) $(libcc1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
 
-libcp1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcp1plugin.sym
+libcp1plugin_la_LDFLAGS = -module
 libcp1plugin_la_SOURCES = libcp1plugin.cc context.cc context.hh \
        $(shared_source) $(marshall_cxx_source)
 libcp1plugin.lo_CPPFLAGS = $(CPPFLAGS_FOR_CXX)
@@ -75,7 +75,7 @@ libcp1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
        $(CXXFLAGS) $(libcp1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
 
 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
-libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym
+libcc1_la_LDFLAGS = -module
 libcc1_la_SOURCES = findcomp.cc libcc1.cc libcp1.cc \
                compiler.cc compiler.hh names.cc names.hh $(shared_source) \
                $(marshall_c_source) $(marshall_cxx_source)
index f8f590d71e9b6fd95a0f081daae58f31babdf0af..aa3d45bcef4754917fb6f0d57d85cf67a191b8cf 100644 (file)
@@ -405,7 +405,7 @@ shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \
 
 marshall_c_source = marshall-c.hh
 marshall_cxx_source = marshall-cp.hh
-libcc1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1plugin.sym
+libcc1plugin_la_LDFLAGS = -module
 libcc1plugin_la_SOURCES = libcc1plugin.cc context.cc context.hh \
        $(shared_source) $(marshall_c_source)
 
@@ -416,7 +416,7 @@ libcc1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
        $(CXXFLAGS) $(libcc1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
 
-libcp1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcp1plugin.sym
+libcp1plugin_la_LDFLAGS = -module
 libcp1plugin_la_SOURCES = libcp1plugin.cc context.cc context.hh \
        $(shared_source) $(marshall_cxx_source)
 
@@ -428,7 +428,7 @@ libcp1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
        $(CXXFLAGS) $(libcp1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
 
 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
-libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym
+libcc1_la_LDFLAGS = -module
 libcc1_la_SOURCES = findcomp.cc libcc1.cc libcp1.cc \
                compiler.cc compiler.hh names.cc names.hh $(shared_source) \
                $(marshall_c_source) $(marshall_cxx_source)