mirror of
https://sourceware.org/git/glibc.git
synced 2026-10-24 01:33:52 +03:00
Filter out internal abort during ld.so build
clang might generate an abort call when cleanup functions (set by __attribute__ ((cleanup)) calls functions not marked as nothrow. The hurd already provides abort for the loader at sysdeps/mach/hurd/dl-sysdep.c, and adding it rtld-stubbed-symbols triggers duplicate symbols. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
This commit is contained in:
4
configure
vendored
4
configure
vendored
@@ -9027,6 +9027,7 @@ libc_cv_localstatedir=$localstatedir
|
||||
libc_cv_gcc_unwind_find_fde=no
|
||||
libc_cv_idn=no
|
||||
pthread_in_libc=yes
|
||||
abort_in_ld=no
|
||||
|
||||
# Iterate over all the sysdep directories we will use, running their
|
||||
# configure fragments.
|
||||
@@ -9609,6 +9610,9 @@ if test "$libc_cv_attr_after_func_decl" = yes; then
|
||||
|
||||
fi
|
||||
|
||||
config_vars="$config_vars
|
||||
abort-in-ld = $abort_in_ld";
|
||||
|
||||
ac_config_files="$ac_config_files config.make Makefile"
|
||||
|
||||
ac_config_commands="$ac_config_commands default"
|
||||
|
||||
@@ -1967,6 +1967,7 @@ libc_cv_localstatedir=$localstatedir
|
||||
libc_cv_gcc_unwind_find_fde=no
|
||||
libc_cv_idn=no
|
||||
pthread_in_libc=yes
|
||||
abort_in_ld=no
|
||||
|
||||
# Iterate over all the sysdep directories we will use, running their
|
||||
# configure fragments.
|
||||
@@ -2252,6 +2253,8 @@ if test "$libc_cv_attr_after_func_decl" = yes; then
|
||||
AC_DEFINE(ATTR_AFTER_FUNC_DECL)
|
||||
fi
|
||||
|
||||
LIBC_CONFIG_VAR([abort-in-ld],[$abort_in_ld]);
|
||||
|
||||
AC_CONFIG_FILES([config.make Makefile])
|
||||
AC_CONFIG_COMMANDS([default],[[
|
||||
case $CONFIG_FILES in *config.make*)
|
||||
|
||||
@@ -1487,6 +1487,13 @@ rtld-stubbed-symbols = \
|
||||
realloc \
|
||||
# rtld-stubbed-symbols
|
||||
|
||||
ifeq (no,$(abort-in-ld))
|
||||
# clang might generate an abort call for cleanup functions.
|
||||
rtld-stubbed-symbols += \
|
||||
__GI_abort \
|
||||
# rtld-stubbed-symbols
|
||||
endif
|
||||
|
||||
ifeq ($(have-ssp),yes)
|
||||
# rtld is not built with the stack protector, so these references will
|
||||
# go away in the rebuilds.
|
||||
|
||||
2
sysdeps/mach/hurd/configure
vendored
2
sysdeps/mach/hurd/configure
vendored
@@ -220,4 +220,6 @@ fi
|
||||
|
||||
# Hurd has libpthread as a separate library.
|
||||
pthread_in_libc=no
|
||||
# Hurd already provides abort implementation for the loader
|
||||
abort_in_ld=yes
|
||||
|
||||
|
||||
@@ -48,3 +48,5 @@ fi
|
||||
|
||||
# Hurd has libpthread as a separate library.
|
||||
pthread_in_libc=no
|
||||
# Hurd already provides abort implementation for the loader
|
||||
abort_in_ld=yes
|
||||
|
||||
Reference in New Issue
Block a user