diff options
-rwxr-xr-x | configure | 10 | ||||
-rw-r--r-- | dynamic.list | 35 |
2 files changed, 41 insertions, 4 deletions
@@ -590,10 +590,12 @@ tryldflag LDFLAGS_AUTO -Wl,--no-undefined # versions built without shared library support and pcc are broken. tryldflag LDFLAGS_AUTO -Wl,--exclude-libs=ALL -# Linking with -Bsymbolic-functions is no longer mandatory for -# the dynamic linker to work, but enable it if it works as -# a linking optimization. -tryldflag LDFLAGS_AUTO -Wl,-Bsymbolic-functions +# Public data symbols must be interposable to allow for copy +# relocations, but otherwise we want to bind symbols at libc link +# time to eliminate startup relocations and PLT overhead. Use +# --dynamic-list rather than -Bsymbolic-functions for greater +# control over what symbols are left unbound. +tryldflag LDFLAGS_AUTO -Wl,--dynamic-list="$srcdir/dynamic.list" # Find compiler runtime library test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh diff --git a/dynamic.list b/dynamic.list new file mode 100644 index 0000000..8b4f236 --- /dev/null +++ b/dynamic.list @@ -0,0 +1,35 @@ +{ +environ; +__environ; + +stdin; +stdout; +stderr; + +timezone; +daylight; +tzname; +__timezone; +__daylight; +__tzname; + +signgam; +__signgam; + +optarg; +optind; +opterr; +optreset; +__optreset; + +getdate_err; + +h_errno; + +program_invocation_name; +program_invocation_short_name; +__progname; +__progname_full; + +__stack_chk_guard; +}; |