diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2013-08-29 20:59:25 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2013-08-29 20:59:25 +0000 |
commit | 0d983ceeeee6bd20ae296d224ca2fd4bf27a47af (patch) | |
tree | d1c44612aad8977a145b58f209e5cc7f8c5e1566 | |
parent | a4dcdbcd5b2fc886a934227de81a12419879d3c9 (diff) |
* Makerules, elf/Makefile, elf/do-rel.h, extra-lib.mk,
include/libc-symbols.h, include/shlib-compat.h, nptl/Makefile,
nptl/pthread_kill_other_threads.c, resolv/res_libc.c,
scripts/versions.awk, sysdeps/ieee754/ldbl-128ibm/s_finitel.c,
sysdeps/ieee754/ldbl-128ibm/s_isinfl.c,
sysdeps/ieee754/ldbl-128ibm/s_isnanl.c,
sysdeps/ieee754/ldbl-128ibm/strtold_l.c,
sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h,
sysdeps/powerpc/longjmp.c, sysdeps/powerpc/powerpc32/dl-machine.c,
sysdeps/wordsize-32/divdi3.c: Revert --disable-versioning support
changes.
* Makerules: Change $(versioning) conditional in local code to
$(build-shared).
git-svn-id: svn://svn.eglibc.org/trunk@23871 7b3dc134-2b1b-0410-93df-9e9f96275f8d
-rw-r--r-- | libc/ChangeLog.eglibc | 16 | ||||
-rw-r--r-- | libc/Makerules | 29 | ||||
-rw-r--r-- | libc/elf/Makefile | 4 | ||||
-rw-r--r-- | libc/elf/do-rel.h | 4 | ||||
-rw-r--r-- | libc/extra-lib.mk | 4 | ||||
-rw-r--r-- | libc/include/libc-symbols.h | 29 | ||||
-rw-r--r-- | libc/include/shlib-compat.h | 66 | ||||
-rw-r--r-- | libc/nptl/Makefile | 7 | ||||
-rw-r--r-- | libc/nptl/pthread_kill_other_threads.c | 2 | ||||
-rw-r--r-- | libc/resolv/res_libc.c | 4 | ||||
-rw-r--r-- | libc/scripts/versions.awk | 13 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-128ibm/s_finitel.c | 4 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-128ibm/s_isinfl.c | 2 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-128ibm/s_isnanl.c | 2 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-128ibm/strtold_l.c | 4 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h | 7 | ||||
-rw-r--r-- | libc/sysdeps/powerpc/longjmp.c | 6 | ||||
-rw-r--r-- | libc/sysdeps/powerpc/powerpc32/dl-machine.c | 3 | ||||
-rw-r--r-- | libc/sysdeps/wordsize-32/divdi3.c | 10 |
19 files changed, 83 insertions, 133 deletions
diff --git a/libc/ChangeLog.eglibc b/libc/ChangeLog.eglibc index 442ffd4ef..436650bf8 100644 --- a/libc/ChangeLog.eglibc +++ b/libc/ChangeLog.eglibc @@ -1,3 +1,19 @@ +2013-08-29 Joseph Myers <joseph@codesourcery.com> + + * Makerules, elf/Makefile, elf/do-rel.h, extra-lib.mk, + include/libc-symbols.h, include/shlib-compat.h, nptl/Makefile, + nptl/pthread_kill_other_threads.c, resolv/res_libc.c, + scripts/versions.awk, sysdeps/ieee754/ldbl-128ibm/s_finitel.c, + sysdeps/ieee754/ldbl-128ibm/s_isinfl.c, + sysdeps/ieee754/ldbl-128ibm/s_isnanl.c, + sysdeps/ieee754/ldbl-128ibm/strtold_l.c, + sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h, + sysdeps/powerpc/longjmp.c, sysdeps/powerpc/powerpc32/dl-machine.c, + sysdeps/wordsize-32/divdi3.c: Revert --disable-versioning support + changes. + * Makerules: Change $(versioning) conditional in local code to + $(build-shared). + 2013-08-20 Joseph Myers <joseph@codesourcery.com> * debug/tst-backtrace6.c: Remove. diff --git a/libc/Makerules b/libc/Makerules index 4bd6c139c..7d6b14a33 100644 --- a/libc/Makerules +++ b/libc/Makerules @@ -105,7 +105,6 @@ $(common-objpfx)%.latest: $(common-objpfx)abi-versions.h sed -n '/ VERSION_$*_/{s/^.*_\([A-Z0-9_]*\).*$$/\1/;h;};$${g;p;}' \ $(common-objpfx)abi-versions.h > $@T mv -f $@T $@ -abi_versions_file := $(common-objpfx)abi-versions.h endif # avoid-generated endif # $(versioning) = yes @@ -284,9 +283,7 @@ endif # Generate version maps, but wait until sysdep-subdirs is known ifeq ($(sysd-sorted-done),t) -# eglibc: Even when not using symbol versioning we still need to generate -# eglibc: version maps to make all the necessary symbols global. -# eglibc: ifeq ($(versioning),yes) +ifeq ($(versioning),yes) -include $(common-objpfx)sysd-versions $(addprefix $(common-objpfx),$(version-maps)): $(common-objpfx)sysd-versions common-generated += $(version-maps) @@ -314,7 +311,7 @@ $(common-objpfx)Versions.all: $(..)scripts/firstversions.awk \ # See %.v/%.v.i implicit rules in Makeconfig. $(common-objpfx)Versions.v.i: $(wildcard $(subdirs:%=$(..)%/Versions)) \ $(wildcard $(sysdirs:%=%/Versions)) \ - $(abi_versions_file) \ + $(common-objpfx)abi-versions.h \ $(sysd-versions-force) $(common-objpfx)sysd-versions: $(common-objpfx)Versions.all \ $(common-objpfx)Versions.v \ @@ -323,12 +320,11 @@ $(common-objpfx)sysd-versions: $(common-objpfx)Versions.all \ cat $(word 2,$^) \ | LC_ALL=C $(AWK) -v buildroot=$(common-objpfx) -v defsfile=$< \ -v move_if_change='$(move-if-change)' \ - -v versioning=$(versioning) \ -f $(word 3,$^); \ ) > $@T mv -f $@T $@ endif # avoid-generated -# eglibc: endif # $(versioning) = yes +endif # $(versioning) = yes endif # sysd-sorted-done # Generate .dT files as we compile. @@ -425,12 +421,12 @@ ifeq (yes,$(build-shared)) # Reference map file only when versioning is selected and a map file name # is given. -# eglibc: ifeq ($(versioning),yes) +ifeq ($(versioning),yes) map-file = $(firstword $($(@F:.so=-map)) \ $(addprefix $(common-objpfx), \ $(filter $(@F:.so=.map),$(version-maps)))) load-map-file = $(map-file:%=-Wl,--version-script=%) -# eglibc: endif +endif # Compiler arguments to use to link a shared object with libc and # ld.so. This is intended to be as similar as possible to a default @@ -588,13 +584,6 @@ generated += libc_pic.opts libc_pic.os.clean libc_pic_clean := .clean endif -ifneq ($(versioning),yes) -# When EGLIBC is built without symbol versioning, local copy of -# unwind-dw2-fde-glibc.c is not compiled, so we need to link against -# libgcc_eh to get _Unwind_Find_FDE. -libc_gcclibs := -lgcc_eh -endif - # Do not filter ld.so out of libc.so link. $(common-objpfx)libc.so: link-libc-deps = # empty @@ -604,10 +593,10 @@ $(common-objpfx)libc.so: $(elfobjdir)/soinit.os \ $(elfobjdir)/sofini.os \ $(elfobjdir)/interp.os $(elfobjdir)/ld.so \ $(shlib-lds) - $(build-shlib) $(libc_gcclibs) -# eglibc: ifeq ($(versioning),yes) + $(build-shlib) +ifeq ($(versioning),yes) $(common-objpfx)libc.so: $(common-objpfx)libc.map -# eglibc: endif +endif common-generated += libc.so libc_pic.os ifndef subdir install-extras := soinit.o sofini.o @@ -870,7 +859,7 @@ install-lib := $(install-lib) $(install-lib.so-versioned:%.so=%_pic.a) install-lib := $(filter-out libpthread_pic.a,$(install-lib)) # Despite having a soname libhurduser and libmachuser do not use symbol # versioning, so don't install the corresponding .map files. -ifeq ($(versioning),yes) +ifeq ($(build-shared),yes) install-map := $(patsubst %.so,%.map,\ $(foreach L,$(install-lib.so-versioned),$(notdir $L))) install-map := $(filter-out libhurduser.map libmachuser.map libpthread.map,$(install-map)) diff --git a/libc/elf/Makefile b/libc/elf/Makefile index 0b7afbf38..3b58649de 100644 --- a/libc/elf/Makefile +++ b/libc/elf/Makefile @@ -59,9 +59,9 @@ before-compile = $(objpfx)trusted-dirs.h generated := trusted-dirs.h trusted-dirs.st for-renamed/renamed.so generated-dirs := for-renamed -# eglibc: ifeq ($(versioning),yes) +ifeq ($(versioning),yes) ld-map = $(common-objpfx)ld.map -# eglibc: endif +endif ifeq (yes,$(build-shared)) extra-objs = $(all-rtld-routines:%=%.os) soinit.os sofini.os interp.os diff --git a/libc/elf/do-rel.h b/libc/elf/do-rel.h index 408ea7a8a..52cc54839 100644 --- a/libc/elf/do-rel.h +++ b/libc/elf/do-rel.h @@ -111,7 +111,7 @@ elf_dynamic_do_Rel (struct link_map *map, for (; relative < r; ++relative) DO_ELF_MACHINE_REL_RELATIVE (map, l_addr, relative); -#if defined RTLD_BOOTSTRAP && defined DO_VERSIONING +#ifdef RTLD_BOOTSTRAP /* The dynamic linker always uses versioning. */ assert (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL); #else @@ -154,7 +154,7 @@ elf_dynamic_do_Rel (struct link_map *map, } #endif } -#if !defined RTLD_BOOTSTRAP || !defined DO_VERSIONING +#ifndef RTLD_BOOTSTRAP else { for (; r < end; ++r) diff --git a/libc/extra-lib.mk b/libc/extra-lib.mk index 6df4688ea..c61c7632c 100644 --- a/libc/extra-lib.mk +++ b/libc/extra-lib.mk @@ -92,13 +92,13 @@ $(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \ $(build-extra-lib) endif -# eglibc: ifeq ($(versioning),yes) +ifeq ($(versioning),yes) # Add the version script to the dependencies of the shared library. $(objpfx)$(lib).so: $(firstword $($(lib)-map) \ $(addprefix $(common-objpfx), \ $(filter $(lib).map, \ $(version-maps)))) -# eglibc: endif +endif endif diff --git a/libc/include/libc-symbols.h b/libc/include/libc-symbols.h index 425281e95..a3b6274ba 100644 --- a/libc/include/libc-symbols.h +++ b/libc/include/libc-symbols.h @@ -356,31 +356,10 @@ for linking") __asm__ (".symver " #real "," #name "@@" #version) # endif # endif -# define versioned_weak /* nothing */ -#else /* !DO_VERSIONING */ - +#else # define symbol_version(real, name, version) -# ifdef __ASSEMBLER__ -# define default_symbol_version(real, name, version) \ - strong_alias (real, name) -# else -/* We can't use simple strong_alias in C here due to - symbols defined with hidden_def and company. - As you see above, symbol versions are output in plain assembly, - so, to archieve the same effect, we use __asm__ (#name). - - Define an alias to REAL with C name __FI_##NAME and - asm name NAME. We use __FI_* namespace to fill a gap - between __EI_* and __GI_* namespaces. */ -# define default_symbol_version(real, name, version) \ - extern __typeof (real) __FI_##name __asm__ (#name); \ - extern __typeof (real) __FI_##name __attribute__((alias (#real))) -# endif -/* When not using symbol versioning we use an equivalent of - strong_alias to define a symbol; hence add __attribute__((weak)) - to make it weak instead. When using .symver, this is not necessary - as .symver handles weakness properly. */ -# define versioned_weak __attribute__((weak)) +# define default_symbol_version(real, name, version) \ + strong_alias(real, name) #endif #if defined SHARED || defined LIBC_NONSHARED @@ -487,7 +466,7 @@ for linking") versioned_symbol (libc, __real_foo, foo, GLIBC_2_1); libc_hidden_ver (__real_foo, foo) */ -#if defined SHARED && !defined NO_HIDDEN +#if defined SHARED && defined DO_VERSIONING && !defined NO_HIDDEN # ifndef __ASSEMBLER__ # define __hidden_proto_hiddenattr(attrs...) \ __attribute__ ((visibility ("hidden"), ##attrs)) diff --git a/libc/include/shlib-compat.h b/libc/include/shlib-compat.h index 2ec854434..979b5929e 100644 --- a/libc/include/shlib-compat.h +++ b/libc/include/shlib-compat.h @@ -25,36 +25,6 @@ #include <abi-versions.h> /* header generated by abi-versions.awk */ #endif -#if defined SHARED - -# ifndef NOT_IN_libc -# define IS_IN_libc 1 -# endif - -/* That header also defines symbols like `VERSION_libm_GLIBC_2_1' to - the version set name to use for e.g. symbols first introduced into - libm in the GLIBC_2.1 version. Definitions of symbols with explicit - versions should look like: - versioned_symbol (libm, new_foo, foo, GLIBC_2_1); - This will define the symbol `foo' with the appropriate default version, - i.e. either GLIBC_2.1 or the "earliest version" specified in - shlib-versions if that is newer. */ - -# define versioned_symbol(lib, local, symbol, version) \ - versioned_symbol_1 (lib, local, symbol, version) -# define versioned_symbol_1(lib, local, symbol, version) \ - versioned_symbol_2 (local, symbol, VERSION_##lib##_##version) -# define versioned_symbol_2(local, symbol, name) \ - default_symbol_version (local, symbol, name) - -#else - -/* No versions to worry about, just make this the global definition. */ -# define versioned_symbol(lib, local, symbol, version) \ - weak_alias (local, symbol) - -#endif - #if defined SHARED && defined DO_VERSIONING /* The file abi-versions.h (generated by scripts/abi-versions.awk) defines @@ -79,6 +49,26 @@ && (!(ABI_##lib##_##obsoleted - 0) \ || ((ABI_##lib##_##introduced - 0) < (ABI_##lib##_##obsoleted - 0)))) +# ifndef NOT_IN_libc +# define IS_IN_libc 1 +# endif + +/* That header also defines symbols like `VERSION_libm_GLIBC_2_1' to + the version set name to use for e.g. symbols first introduced into + libm in the GLIBC_2.1 version. Definitions of symbols with explicit + versions should look like: + versioned_symbol (libm, new_foo, foo, GLIBC_2_1); + This will define the symbol `foo' with the appropriate default version, + i.e. either GLIBC_2.1 or the "earliest version" specified in + shlib-versions if that is newer. */ + +# define versioned_symbol(lib, local, symbol, version) \ + versioned_symbol_1 (lib, local, symbol, version) +# define versioned_symbol_1(lib, local, symbol, version) \ + versioned_symbol_2 (local, symbol, VERSION_##lib##_##version) +# define versioned_symbol_2(local, symbol, name) \ + default_symbol_version (local, symbol, name) + # define compat_symbol(lib, local, symbol, version) \ compat_symbol_1 (lib, local, symbol, version) # define compat_symbol_1(lib, local, symbol, version) \ @@ -86,26 +76,18 @@ # define compat_symbol_2(local, symbol, name) \ symbol_version (local, symbol, name) -/* This macro is used to provide a versioned-only only symbol - which is otherwise invisible at link time. */ -# define invisible_compat_symbol(lib, symbol, version) \ - compat_symbol (lib, symbol, symbol, version) - #else /* Not compiling ELF shared libraries at all, so never any old versions. */ # define SHLIB_COMPAT(lib, introduced, obsoleted) 0 +/* No versions to worry about, just make this the global definition. */ +# define versioned_symbol(lib, local, symbol, version) \ + weak_alias (local, symbol) + /* This should not appear outside `#if SHLIB_COMPAT (...)'. */ # define compat_symbol(lib, local, symbol, version) ... -# if defined SHARED -/* When not using symbol versioning, invisible_compat_symbol - is merely a hidden one. */ -# define invisible_compat_symbol(lib, symbol, version) \ - extern __typeof (symbol) symbol attribute_hidden; -# endif - #endif diff --git a/libc/nptl/Makefile b/libc/nptl/Makefile index 140e3ed90..50c1d52dc 100644 --- a/libc/nptl/Makefile +++ b/libc/nptl/Makefile @@ -303,13 +303,8 @@ tests += tst-cancelx2 tst-cancelx3 tst-cancelx4 tst-cancelx5 \ tst-oncex3 tst-oncex4 endif ifeq ($(build-shared),yes) -tests += tst-atfork2 tst-tls3 tst-tls4 tst-tls5 tst-fini1 \ +tests += tst-atfork2 tst-tls3 tst-tls4 tst-tls5 tst-_res1 tst-fini1 \ tst-stackguard1 -ifeq ($(versioning),yes) -# struct __res_state _res is only available with -# symbol versioning after GLIBC_2.2. -tests += tst-_res1 -endif tests-nolibpthread += tst-fini1 ifeq ($(have-z-execstack),yes) tests += tst-execstack diff --git a/libc/nptl/pthread_kill_other_threads.c b/libc/nptl/pthread_kill_other_threads.c index 9ecef801b..3a3fd35db 100644 --- a/libc/nptl/pthread_kill_other_threads.c +++ b/libc/nptl/pthread_kill_other_threads.c @@ -31,8 +31,6 @@ void __pthread_kill_other_threads_np (void) { } -# ifdef DO_VERSIONING compat_symbol (libpthread, __pthread_kill_other_threads_np, pthread_kill_other_threads_np, GLIBC_2_0); -# endif #endif diff --git a/libc/resolv/res_libc.c b/libc/resolv/res_libc.c index b3b0c4e67..42c5ff907 100644 --- a/libc/resolv/res_libc.c +++ b/libc/resolv/res_libc.c @@ -144,9 +144,9 @@ extern __thread struct __res_state *__libc_resp /* We declare this with compat_symbol so that it's not visible at link time. Programs must use the accessor functions. */ -#if defined SHARED +#if defined SHARED && defined DO_VERSIONING # include <shlib-compat.h> -invisible_compat_symbol (libc, _res, GLIBC_2_0); +compat_symbol (libc, _res, _res, GLIBC_2_0); #endif #include <shlib-compat.h> diff --git a/libc/scripts/versions.awk b/libc/scripts/versions.awk index 458415443..315278d8f 100644 --- a/libc/scripts/versions.awk +++ b/libc/scripts/versions.awk @@ -6,7 +6,6 @@ # defsfile name of Versions.def file # buildroot name of build directory with trailing slash # move_if_change move-if-change command -# versioning "yes", if symbol versioning is being used # Read definitions for the versions. BEGIN { @@ -68,10 +67,7 @@ BEGIN { sortver=actver # Ensure GLIBC_ versions come always first sub(/^GLIBC_/," GLIBC_",sortver) - if (versioning == "yes") printf("%s %s %s\n", actlib, sortver, $0) | sort; - # When not using symbol versioning, assign all symbols non-existent GLIBC - # version 1.1; this will allow us to make all necessary symbols global. - else printf("%s GLIBC_1.1 %s\n", actlib, $0) | sort; + printf("%s %s %s\n", actlib, sortver, $0) | sort; } @@ -85,7 +81,7 @@ function closeversion(name, oldname) { # or FOO_x and FOO_y but not GLIBC_x and FOO_y. pfx = oldname; sub(/[0-9.]+/,".+",pfx); - if (oldname == "" || name !~ pfx || versioning != "yes") print "};" > outfile; + if (oldname == "" || name !~ pfx) print "};" > outfile; else printf("} %s;\n", oldname) > outfile; } @@ -125,10 +121,7 @@ END { closeversion(oldver, veryoldver); veryoldver = oldver; } - if (versioning == "yes") printf("%s {\n global:\n", $2) > outfile; - # When not using symbol versioning, just output which symbols should be - # made global. - else print "{\n global:\n" > outfile; + printf("%s {\n global:\n", $2) > outfile; oldver = $2; } printf(" ") > outfile; diff --git a/libc/sysdeps/ieee754/ldbl-128ibm/s_finitel.c b/libc/sysdeps/ieee754/ldbl-128ibm/s_finitel.c index 33b92b86a..8edb34154 100644 --- a/libc/sysdeps/ieee754/ldbl-128ibm/s_finitel.c +++ b/libc/sysdeps/ieee754/ldbl-128ibm/s_finitel.c @@ -37,9 +37,9 @@ ___finitel (long double x) hidden_ver (___finitel, __finitel) weak_alias (___finitel, ____finitel) #ifdef IS_IN_libm -long_double_symbol (libm, ____finitel, finitel) versioned_weak; +long_double_symbol (libm, ____finitel, finitel); long_double_symbol (libm, ___finitel, __finitel); #else -long_double_symbol (libc, ____finitel, finitel) versioned_weak; +long_double_symbol (libc, ____finitel, finitel); long_double_symbol (libc, ___finitel, __finitel); #endif diff --git a/libc/sysdeps/ieee754/ldbl-128ibm/s_isinfl.c b/libc/sysdeps/ieee754/ldbl-128ibm/s_isinfl.c index dfaf5ee38..5f5b0144b 100644 --- a/libc/sysdeps/ieee754/ldbl-128ibm/s_isinfl.c +++ b/libc/sysdeps/ieee754/ldbl-128ibm/s_isinfl.c @@ -31,5 +31,5 @@ hidden_ver (___isinfl, __isinfl) #ifndef IS_IN_libm weak_alias (___isinfl, ____isinfl) long_double_symbol (libc, ___isinfl, isinfl); -long_double_symbol (libc, ____isinfl, __isinfl) versioned_weak; +long_double_symbol (libc, ____isinfl, __isinfl); #endif diff --git a/libc/sysdeps/ieee754/ldbl-128ibm/s_isnanl.c b/libc/sysdeps/ieee754/ldbl-128ibm/s_isnanl.c index aa4eb7132..264dec745 100644 --- a/libc/sysdeps/ieee754/ldbl-128ibm/s_isnanl.c +++ b/libc/sysdeps/ieee754/ldbl-128ibm/s_isnanl.c @@ -40,5 +40,5 @@ hidden_ver (___isnanl, __isnanl) #ifndef IS_IN_libm weak_alias (___isnanl, ____isnanl) long_double_symbol (libc, ___isnanl, isnanl); -long_double_symbol (libc, ____isnanl, __isnanl) versioned_weak; +long_double_symbol (libc, ____isnanl, __isnanl); #endif diff --git a/libc/sysdeps/ieee754/ldbl-128ibm/strtold_l.c b/libc/sysdeps/ieee754/ldbl-128ibm/strtold_l.c index 0947814f7..93415f0f0 100644 --- a/libc/sysdeps/ieee754/ldbl-128ibm/strtold_l.c +++ b/libc/sysdeps/ieee754/ldbl-128ibm/strtold_l.c @@ -57,11 +57,11 @@ libc_hidden_proto (STRTOF) # include <math_ldbl_opt.h> # ifdef USE_WIDE_CHAR weak_alias (____new_wcstold_l, ___new_wcstold_l); -long_double_symbol (libc, ___new_wcstold_l, wcstold_l) versioned_weak; +long_double_symbol (libc, ___new_wcstold_l, wcstold_l); long_double_symbol (libc, ____new_wcstold_l, __wcstold_l); # else weak_alias (____new_strtold_l, ___new_strtold_l); -long_double_symbol (libc, ___new_strtold_l, strtold_l) versioned_weak; +long_double_symbol (libc, ___new_strtold_l, strtold_l); long_double_symbol (libc, ____new_strtold_l, __strtold_l); # endif #endif diff --git a/libc/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h b/libc/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h index 961fa6c5f..b0b863cba 100644 --- a/libc/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h +++ b/libc/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h @@ -10,15 +10,14 @@ SHLIB_COMPAT(lib, introduced, LONG_DOUBLE_COMPAT_VERSION) #define long_double_symbol(lib, local, symbol) \ long_double_symbol_1 (lib, local, symbol, LONG_DOUBLE_COMPAT_VERSION) -#if defined SHARED +#if defined SHARED && defined DO_VERSIONING # define ldbl_hidden_def(local, name) libc_hidden_ver (local, name) # define ldbl_strong_alias(name, aliasname) \ strong_alias (name, __GL_##name##_##aliasname) \ long_double_symbol (libc, __GL_##name##_##aliasname, aliasname); # define ldbl_weak_alias(name, aliasname) \ - weak_alias (name, __GL_##name##_##aliasname) \ - long_double_symbol (libc, __GL_##name##_##aliasname, aliasname) \ - versioned_weak; + weak_alias (name, __GL_##name##_##aliasname) \ + long_double_symbol (libc, __GL_##name##_##aliasname, aliasname); # define long_double_symbol_1(lib, local, symbol, version) \ versioned_symbol (lib, local, symbol, version) #else diff --git a/libc/sysdeps/powerpc/longjmp.c b/libc/sysdeps/powerpc/longjmp.c index 1bcc91432..198c89420 100644 --- a/libc/sysdeps/powerpc/longjmp.c +++ b/libc/sysdeps/powerpc/longjmp.c @@ -55,6 +55,6 @@ weak_alias (__vmx__libc_siglongjmp, __vmxsiglongjmp) default_symbol_version (__vmx__libc_longjmp, __libc_longjmp, GLIBC_PRIVATE); default_symbol_version (__vmx__libc_siglongjmp, __libc_siglongjmp, GLIBC_PRIVATE); -default_symbol_version (__vmx_longjmp, _longjmp, GLIBC_2.3.4) versioned_weak; -default_symbol_version (__vmxlongjmp, longjmp, GLIBC_2.3.4) versioned_weak; -default_symbol_version (__vmxsiglongjmp, siglongjmp, GLIBC_2.3.4) versioned_weak; +default_symbol_version (__vmx_longjmp, _longjmp, GLIBC_2.3.4); +default_symbol_version (__vmxlongjmp, longjmp, GLIBC_2.3.4); +default_symbol_version (__vmxsiglongjmp, siglongjmp, GLIBC_2.3.4); diff --git a/libc/sysdeps/powerpc/powerpc32/dl-machine.c b/libc/sysdeps/powerpc/powerpc32/dl-machine.c index 170764ff7..188f72cdb 100644 --- a/libc/sysdeps/powerpc/powerpc32/dl-machine.c +++ b/libc/sysdeps/powerpc/powerpc32/dl-machine.c @@ -32,10 +32,9 @@ extern int __cache_line_size attribute_hidden; /* Because ld.so is now versioned, these functions can be in their own file; no relocations need to be done to call them. Of course, if ld.so is not versioned... */ -/* eglibc: This does work without symbol versioning. #if defined SHARED && !(DO_VERSIONING - 0) #error This will not work with versioning turned off, sorry. -#endif */ +#endif /* Stuff for the PLT. */ diff --git a/libc/sysdeps/wordsize-32/divdi3.c b/libc/sysdeps/wordsize-32/divdi3.c index df081cbb6..7898541eb 100644 --- a/libc/sysdeps/wordsize-32/divdi3.c +++ b/libc/sysdeps/wordsize-32/divdi3.c @@ -333,10 +333,10 @@ strong_alias (__umoddi3, __umoddi3_internal) /* We declare these with compat_symbol so that they are not visible at link time. Programs must use the functions from libgcc. */ -#if defined SHARED +#if defined SHARED && defined DO_VERSIONING # include <shlib-compat.h> -invisible_compat_symbol (libc, __divdi3, GLIBC_2_0); -invisible_compat_symbol (libc, __moddi3, GLIBC_2_0); -invisible_compat_symbol (libc, __udivdi3, GLIBC_2_0); -invisible_compat_symbol (libc, __umoddi3, GLIBC_2_0); +compat_symbol (libc, __divdi3, __divdi3, GLIBC_2_0); +compat_symbol (libc, __moddi3, __moddi3, GLIBC_2_0); +compat_symbol (libc, __udivdi3, __udivdi3, GLIBC_2_0); +compat_symbol (libc, __umoddi3, __umoddi3, GLIBC_2_0); #endif |