The remaining dubious symbols in libgcc-std.ver

Zack Weinberg zackw@Stanford.EDU
Tue Jun 12 19:01:00 GMT 2001


On Tue, Jun 12, 2001 at 06:39:11PM -0700, Mark Mitchell wrote:
> > I'll apply that change with the other libgcc.ver changes, which will
> > mean another bootstrap cycle, so all of those changes will go in very
> > late tonight.
> 
> Thank you.

The changes required to bump the soname were more invasive than I'd
expected (insert rant about code duplication in t-fragments here), so
if I could get another pair of eyes on this patch, please?

AIX 4.3 also uses a shared libgcc, but it doesn't seem to make use of
the concept of a soname.

I'm not sure what -Wl,-set_version,gcc.0 means as an alpha/osf4 link
option or whether it's appropriate to bump the 0 to 1 (I did bump it
in this patch).  That one doesn't seem to use map files.

zw

	* Makefile.in: Move _bb and __gcc_bcmp to LIB2FUNCS_ST.
	* libgcc-std.ver: Take out __bb* and __gcc_bcmp.

	* config/t-slibgcc-elf-ver, config/t-slibgcc-sld,
	config/alpha/t-osf4, config/mips/t-iris6: Extract all
	references to @shlib_map_file@, @shlib_objs@, or
	@shlib_base_name@ to Makefile variables.
	Bump soname version of libgcc to 1.

===================================================================
Index: Makefile.in
--- Makefile.in	2001/06/07 22:04:38	1.602.2.29
+++ Makefile.in	2001/06/13 01:55:34
@@ -808,13 +808,13 @@ LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udi
     _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
     _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
     _fixtfdi _fixunstfdi _floatditf \
-    __gcc_bcmp _bb _clear_cache _trampoline __main _exit \
+    _clear_cache _trampoline __main _exit \
     _absvsi2 _absvdi2 _addvsi3 _addvdi3 _subvsi3 _subvdi3 \
     _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 \
     _ctors
 
 # Defined in libgcc2.c, included only in the static library.
-LIB2FUNCS_ST = _eprintf
+LIB2FUNCS_ST = _eprintf _bb __gcc_bcmp 
 
 FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \
     _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \
===================================================================
Index: libgcc-std.ver
--- libgcc-std.ver	2001/05/26 00:07:51	1.4.4.7
+++ libgcc-std.ver	2001/06/13 01:55:34
@@ -141,19 +141,8 @@ GCC_3.0 {
   __floattixf
   __floattitf
 
-  # Basic block profile symbols.
-  # ??? Some of these are for `-a', which ought to die.
-  __bb
-  __bb_exit_func
-  __bb_fork_func
-  __bb_init_func
-  __bb_init_trace_func
-  __bb_trace_func
-  __bb_trace_ret
-
-  # ??? Symbols that perhaps unused should be nuked.
+  # Used to deal with trampoline initialization on some platforms
   __clear_cache
-  __gcc_bcmp
 
   # EH symbols
   _Unwind_DeleteException
===================================================================
Index: config/t-slibgcc-elf-ver
--- config/t-slibgcc-elf-ver	2001/05/26 00:36:13	1.1.2.1
+++ config/t-slibgcc-elf-ver	2001/06/13 01:55:34
@@ -2,16 +2,21 @@
 # with the GNU linker.
 
 SHLIB_EXT = .so
+SHLIB_NAME = @shlib_base_name@.so
+SHLIB_SONAME = @shlib_base_name@.so.1
+SHLIB_MAP = @shlib_map_file@
+SHLIB_OBJS = @shlib_objs@
+
 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-	-Wl,--soname=@shlib_base_name@.so.0 \
-	-Wl,--version-script=@shlib_map_file@ \
-	-o @shlib_base_name@.so @multilib_flags@ @shlib_objs@ -lc && \
-	rm -f @shlib_base_name@.so.0 && \
-	$(LN_S) @shlib_base_name@.so @shlib_base_name@.so.0
+	-Wl,--soname=$(SHLIB_SONAME) \
+	-Wl,--version-script=$(SHLIB_MAP) \
+	-o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) -lc && \
+	rm -f $(SHLIB_SONAME) && \
+	$(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
 # $(slibdir) double quoted to protect it from expansion while building
 # libgcc.mk.  We want this delayed until actual install time.
-SHLIB_INSTALL = $(INSTALL_DATA) @shlib_base_name@.so $$(slibdir)/@shlib_base_name@.so.0; \
-	rm -f $$(slibdir)/@shlib_base_name@.so; \
-	$(LN_S) @shlib_base_name@.so.0 $$(slibdir)/@shlib_base_name@.so
+SHLIB_INSTALL = $(INSTALL_DATA) $(SHLIB_NAME) $$(slibdir)/$(SHLIB_SONAME); \
+	rm -f $$(slibdir)/$(SHLIB_NAME); \
+	$(LN_S) $(SHLIB_SONAME) $$(slibdir)/$(SHLIB_NAME)
 SHLIB_MKMAP = $(srcdir)/mkmap-symver.awk
 SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
===================================================================
Index: config/t-slibgcc-sld
--- config/t-slibgcc-sld	2001/05/26 00:36:13	1.1.2.1
+++ config/t-slibgcc-sld	2001/06/13 01:55:34
@@ -1,16 +1,21 @@
 # Build a shared libgcc library with the Solaris linker.
 
 SHLIB_EXT = .so
+SHLIB_NAME = @shlib_base_name@.so
+SHLIB_SONAME = @shlib_base_name@.so.1
+SHLIB_MAP = @shlib_map_file@
+SHLIB_OBJS = @shlib_objs@
+
 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-	-Wl,-h,@shlib_base_name@.so.0 -Wl,-z,text -Wl,-z,defs \
-	-Wl,-M,@shlib_map_file@ -o @shlib_base_name@.so \
-	@multilib_flags@ @shlib_objs@ -lc && \
-	rm -f @shlib_base_name@.so.0 && \
-	$(LN_S) @shlib_base_name@.so @shlib_base_name@.so.0
+	-Wl,-h,$(SHLIB_SONAME) -Wl,-z,text -Wl,-z,defs \
+	-Wl,-M,$(SHLIB_MAP) -o $(SHLIB_NAME) \
+	@multilib_flags@ $(SHLIB_OBJS) -lc && \
+	rm -f $(SHLIB_SONAME) && \
+	$(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
 # $(slibdir) double quoted to protect it from expansion while building
 # libgcc.mk.  We want this delayed until actual install time.
-SHLIB_INSTALL = $(INSTALL_DATA) @shlib_base_name@.so $$(slibdir)/@shlib_base_name@.so.0; \
-	rm -f $$(slibdir)/@shlib_base_name@.so; \
-	$(LN_S) @shlib_base_name@.so.0 $$(slibdir)/@shlib_base_name@.so
+SHLIB_INSTALL = $(INSTALL_DATA) $(SHLIB_NAME) $$(slibdir)/$(SHLIB_SONAME); \
+	rm -f $$(slibdir)/$(SHLIB_NAME); \
+	$(LN_S) $(SHLIB_SONAME) $$(slibdir)/$(SHLIB_NAME)
 SHLIB_MKMAP = $(srcdir)/mkmap-symver.awk
 SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
===================================================================
Index: config/alpha/t-osf4
--- config/alpha/t-osf4	2001/01/07 21:55:10	1.4
+++ config/alpha/t-osf4	2001/06/13 01:55:34
@@ -6,13 +6,17 @@ TARGET_LIBGCC2_CFLAGS = -fPIC
 
 # Build a shared libgcc library.
 SHLIB_EXT = .so
+SHLIB_NAME = @shlib_base_name@.so
+SHLIB_SONAME = @shlib_base_name@.so.1
+SHLIB_OBJS = @shlib_objs@
+
 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-	-Wl,-msym -Wl,-set_version,gcc.0 -Wl,-soname,@shlib_base_name@.so.0 \
-	-o @shlib_base_name@.so @multilib_flags@ @shlib_objs@ -lc && \
-	rm -f @shlib_base_name@.so.0 && \
-	$(LN_S) @shlib_base_name@.so @shlib_base_name@.so.0
+	-Wl,-msym -Wl,-set_version,gcc.1 -Wl,-soname,$(SHLIB_SONAME) \
+	-o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) -lc && \
+	rm -f $(SHLIB_SONAME) && \
+	$(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
 # $(slibdir) double quoted to protect it from expansion while building
 # libgcc.mk.  We want this delayed until actual install time.
-SHLIB_INSTALL = $(INSTALL_DATA) @shlib_base_name@.so $$(slibdir)/@shlib_base_name@.so.0; \
-	rm -f $$(slibdir)/@shlib_base_name@.so; \
-	$(LN_S) @shlib_base_name@.so.0 $$(slibdir)/@shlib_base_name@.so
+SHLIB_INSTALL = $(INSTALL_DATA) $(SHLIB_NAME) $$(slibdir)/$(SHLIB_SONAME); \
+	rm -f $$(slibdir)/$(SHLIB_NAME); \
+	$(LN_S) $(SHLIB_SONAME) $$(slibdir)/$(SHLIB_NAME)
===================================================================
Index: config/mips/t-iris6
--- config/mips/t-iris6	2001/01/07 21:55:10	1.8
+++ config/mips/t-iris6	2001/06/13 01:55:35
@@ -21,21 +21,26 @@ CRTSTUFF_T_CFLAGS=-g1
 
 # Build a shared libgcc library.
 SHLIB_EXT = .so
+SHLIB_NAME = @shlib_base_name@.so
+SHLIB_SONAME = @shlib_base_name@.so.1
+SHLIB_MAP = @shlib_map_file@
+SHLIB_OBJS = @shlib_objs@
+
 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-        -Wl,-soname,@shlib_base_name@.so.0 \
-	-o @shlib_base_name@.so @multilib_flags@ @shlib_objs@ -lc && \
-	rm -f @shlib_base_name@.so.0 && \
-	$(LN_S) @shlib_base_name@.so @shlib_base_name@.so.0
+        -Wl,-soname,$(SHLIB_SONAME) \
+	-o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) -lc && \
+	rm -f $(SHLIB_SONAME) && \
+	$(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
 # ??? Irix 6.5 seems to eat the option fine (if we somehow remove the
 # -hidden_symbol option, which is documented to be ignored in conjunction
 # with -exports_file), but fails to actually hide any symbols.
-#	-Wl,-exports_file,@shlib_map_file@
+#	-Wl,-exports_file,$(SHLIB_MAP)
 
 # $(slibdir) double quoted to protect it from expansion while building
 # libgcc.mk.  We want this delayed until actual install time.
-SHLIB_INSTALL = $(INSTALL_DATA) @shlib_base_name@.so $$(slibdir)/@shlib_base_name@.so.0; \
-	rm -f $$(slibdir)/@shlib_base_name@.so; \
-	$(LN_S) @shlib_base_name@.so.0 $$(slibdir)/@shlib_base_name@.so
+SHLIB_INSTALL = $(INSTALL_DATA) $(SHLIB_NAME) $$(slibdir)/$(SHLIB_SONAME); \
+	rm -f $$(slibdir)/$(SHLIB_NAME); \
+	$(LN_S) $(SHLIB_SONAME) $$(slibdir)/$(SHLIB_NAME)
 SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
 SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver 
 



More information about the Gcc-patches mailing list