update to glibc-2.28-225.el8

Signed-off-by: anolis-bot <sam.zyc@alibaba-inc.com>
This commit is contained in:
anolis-bot 2023-06-06 16:06:45 +08:00
parent 644b7d9a41
commit 63c96efbaa
176 changed files with 35958 additions and 17585 deletions

View file

@ -17,6 +17,8 @@
set -evx
tar_tmp="$(mktemp)"
declare -A libc_dlink_tmp_list
ldso_annobin_sym_tmp_list=""
# Prefer a separately installed debugedit over the RPM-integrated one.
if command -v debugedit >/dev/null ; then
@ -26,7 +28,7 @@ else
fi
cleanup () {
rm -f "$tar_tmp"
rm -f "$tar_tmp" ${libc_dlink_tmp_list[@]} $ldso_annobin_sym_tmp_list
}
trap cleanup 0
@ -51,6 +53,15 @@ full_list="$ldso_list $libc_list $libdl_list $libpthread_list $librt_list"
# Run the debuginfo extraction.
"$script_path" "$@"
# libc.so.6: Extract the .gnu_debuglink section
for f in $libc_list
do
dlink_tmp="$(mktemp)"
libc_dlink_tmp_list["$f"]="$dlink_tmp"
objcopy -j.gnu_debuglink --set-section-flags .gnu_debuglink=alloc \
-O binary "$sysroot_path/$f" "$dlink_tmp"
done
# Restore the original files.
(cd "$sysroot_path"; tar xf "$tar_tmp")
(cd "$sysroot_path"; ls -l $full_list)
@ -61,6 +72,20 @@ do
objcopy --merge-notes "$sysroot_path/$p"
done
# libc.so.6: Restore the .gnu_debuglink section
for f in ${!libc_dlink_tmp_list[@]}
do
dlink_tmp="${libc_dlink_tmp_list[$f]}"
objcopy --add-section .gnu_debuglink="$dlink_tmp" "$sysroot_path/$f"
done
# ld.so does not have separated debuginfo and so the debuginfo file
# generated by find-debuginfo is redundant. Therefore, remove it.
for ldso_debug in `find "$sysroot_path" -name 'ld-*.so*.debug' -type f`
do
rm -f "$ldso_debug"
done
# libc.so.6 and other shared objects: Reduce to valuable symbols.
# Eliminate file symbols, annobin symbols, and symbols used by the
# glibc build to implement hidden aliases (__EI_*). We would also
@ -103,6 +128,14 @@ debug_base_name=${last_arg:-$RPM_BUILD_ROOT}
for p in $ldso_list
do
$debugedit -b "$debug_base_name" -d "$debug_dest_name" -n "$sysroot_path/$p"
# Remove the .annobin* symbols (and only them).
ldso_annobin_sym_tmp="$(mktemp)"
ldso_annobin_sym_tmp_list+=" $ldso_annobin_sym_tmp"
if nm --format=posix "$sysroot_path/$p" | cut -d' ' -f1 \
| grep '^\.annobin' > "$ldso_annobin_sym_tmp"; then
objcopy --strip-symbols="$ldso_annobin_sym_tmp" "$sysroot_path/$p"
fi
done
# Apply single-file DWARF optimization.