Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 726062 - >=sys-devel/gcc-9.2: prelinking with sys-devel/prelink causes segfaults with recent versions of GCC
Summary: >=sys-devel/gcc-9.2: prelinking with sys-devel/prelink causes segfaults with ...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-29 10:01 UTC by Pavel
Modified: 2020-06-06 13:21 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gcc-blacklist.conf (toolchain.conf,78 bytes, text/plain)
2020-06-01 11:14 UTC, Pavel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel 2020-05-29 10:01:30 UTC
> (gdb) run
> Starting program: /usr/bin/gcc 
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x000000311e83dcc6 in ____strtoll_l_internal () from /lib64/libc.so.6



Reproducible: Always




I recommend to add gcc, and all toolchain packages to prelink.conf.d blacklist despite the performance impact.

Gcc itself employs a lot of hackery to reduce the impact of repeated invocations. I double Gentoo will have enough resources to provide patches for every breakage that can come out from that.

Please see also https://bugs.gentoo.org/579374
Comment 1 Jonas Stein gentoo-dev 2020-05-31 20:56:53 UTC
I have read your report several times, but I do not understand it.

Please join IRC #gentoo and ask here, how to collect all information for a bug ticket. Then open a new ticket.
Write the name of the broken package in the summary. Add logs.
Comment 2 Pavel 2020-06-01 07:18:10 UTC
(In reply to Jonas Stein from comment #1)
> I have read your report several times, but I do not understand it.
> 
> Please join IRC #gentoo and ask here, how to collect all information for a
> bug ticket. Then open a new ticket.
> Write the name of the broken package in the summary. Add logs.

Hello Jonas, when are you going to be at #gentoo?
Comment 3 Pavel 2020-06-01 11:08:09 UTC
emerge --info 
Portage 2.3.99 (python 3.7.7-final-0, default/linux/amd64/17.1/no-multilib, gcc-9.3.0, glibc-2.30-r8, 5.6.7-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-5.6.7-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i5-8250U_CPU_@_1.60GHz-with-gentoo-2.6
KiB Mem:     7744096 total,   2761552 free
KiB Swap:   16777212 total,  16493024 free
Timestamp of repository gentoo: Wed, 20 May 2020 11:00:01 +0000
Head commit of repository gentoo: 0db03d45297ba0881a5a0ecd7dd97e08e3f8ecf6
sh bash 5.0_p17
ld GNU ld (Gentoo 2.33.1 p2) 2.33.1
distcc 3.3.3 x86_64-pc-linux-gnu [disabled]
ccache version 3.7.7 [enabled]
app-shells/bash:          5.0_p17::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.18::gentoo, 3.6.10-r2::gentoo, 3.7.7-r2::gentoo, 3.8.2-r2::gentoo
dev-util/ccache:          3.7.7-r1::gentoo
dev-util/cmake:           3.16.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.33.1-r1::gentoo
sys-devel/gcc:            9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r8::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 

bombo82
    location: /var/lib/layman/bombo82
    sync-type: laymansync
    sync-uri: https://github.com/bombo82/bombo82-overlay.git
    masters: gentoo
    priority: 50

jorgicio
    location: /var/lib/layman/jorgicio
    sync-type: laymansync
    sync-uri: https://github.com/jorgicio/jorgicio-gentoo.git
    masters: gentoo
    priority: 50

nest
    location: /var/lib/layman/nest
    sync-type: laymansync
    sync-uri: https://github.com/SpiderX/portage-overlay.git
    masters: gentoo
    priority: 50

tlp
    location: /var/lib/layman/tlp
    sync-type: laymansync
    sync-uri: git://github.com/dywisor/tlp-portage.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -pipe -march=skylake -mabm -msgx -mavx256-split-unaligned-load -mavx256-split-unaligned-store -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O3 -pipe -march=skylake -mabm -msgx -mavx256-split-unaligned-load -mavx256-split-unaligned-store -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--load-average 7.5"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs ccache cgroup config-protect-if-modified distlocks ebuild-locks fixlafiles installsources ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.ps.kz/gentoo/pub"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-fuse-ld=gold"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_BINHOST="http://packages.gentooexperimental.org/packages/amd64-stable/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="10bit X aac acl alsa amd64 appindicator archive bash-completion berkdb bluetooth bluez branding brotli bzip2 caps cjk cli colord cron crypt cups dbus dell dhcpcd dri dri3 drm dundee egl elogind eselect-ldso evdev fbcondecor ffmpeg fftw fontconfig fortran fuse gbm gdbm github gnome-keyring gpm gtk gtk-doc gtk3 harfbuzz hostonly http2 iconv icu idn infinality initramfs ipv6 iwd jimtcl jpeg keybinder layers lcms leaps_timezone libass libcanberra libdrm libmpv libnotify libproxy libsecret libtirpc lm-sensors lm_sensors metric modemmanager mp3 mtp ncurses nls nptl ocl-icd ocl20 ofono openal opencl opengl openmp openssl opus p2p pam pcre png policykit pulseaudio quesoglc readline rule-generator seccomp snapshot spell split-usr ssl startup-notification sync-plugin-portage system-icu tcpd tdb theora threads truetype udev udisks uefi unicode upnp upower uxa v4l vaapi vector-icons vorbis vulkan webp wired wireguard wispr wnck wps x264 x265 xa xattr xcb xfce xfconf xinerama xv xvmc zeroconf zlib zsh-completion" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput evdev wacom" KERNEL="linux" L10N="en-GB en zh-CN zh-HK zh-TW zh-SG" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="BPF X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11 postgres12" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="intel i915 i965 iris v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Pavel 2020-06-01 11:13:39 UTC
Recent version of GCC segfault when prelinked.

I noticed the regression starting with GCC 9.2.

Steps to reproduce:
1. emerge sys-devel/gcc:9.2
2. emerge sys-devel/prelink
3. run cron script with default settings /etc/cron.daily/prelink
4. gcc will segfault on start

I can confirm that this can be fixed by a simple workaround, by placing a blacklist rule with GCC executables into /etc/prelink.conf.d/. Prelink rule attached.

I recommend including this rule into future GCC ebuilds, like dev-libs/nss or sys-apps/portage does.
Comment 5 Pavel 2020-06-01 11:14:30 UTC
Created attachment 643010 [details]
gcc-blacklist.conf

Blacklist rule
Comment 6 Sergei Trofimovich gentoo-dev 2020-06-01 18:05:31 UTC
I would prefer not to blacklist gcc as it's a reasonable simple program to prelink. If it does not work then prelink is of little use on your system.

Can you also post package-specific use flags reported by 'emerge --info sys-devel/gcc'? I'll try to reproduce locally and check why it crashes.
Comment 7 Sergei Trofimovich gentoo-dev 2020-06-01 18:19:02 UTC
Also, while at it you are using sys-devel/prelink-20151030, right?
Comment 8 Pavel 2020-06-03 10:02:01 UTC
Yes, the only prelink ebuild currently on portage

----

emerge --info sys-devel/gcc
Portage 2.3.99 (python 3.7.7-final-0, default/linux/amd64/17.1/no-multilib, gcc-9.3.0, glibc-2.30-r8, 5.6.7-gentoo-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.6.7-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i5-8250U_CPU_@_1.60GHz-with-gentoo-2.6
KiB Mem:     7744096 total,    969136 free
KiB Swap:   16777212 total,  16078104 free
Timestamp of repository gentoo: Wed, 20 May 2020 11:00:01 +0000
Head commit of repository gentoo: 0db03d45297ba0881a5a0ecd7dd97e08e3f8ecf6
sh bash 5.0_p17
ld GNU ld (Gentoo 2.33.1 p2) 2.33.1
distcc 3.3.3 x86_64-pc-linux-gnu [disabled]
ccache version 3.7.7 [enabled]
app-shells/bash:          5.0_p17::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.18::gentoo, 3.6.10-r2::gentoo, 3.7.7-r2::gentoo, 3.8.2-r2::gentoo
dev-util/ccache:          3.7.7-r1::gentoo
dev-util/cmake:           3.16.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.33.1-r1::gentoo
sys-devel/gcc:            9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r8::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

bombo82
    location: /var/lib/layman/bombo82
    sync-type: laymansync
    sync-uri: https://github.com/bombo82/bombo82-overlay.git
    masters: gentoo
    priority: 50

jorgicio
    location: /var/lib/layman/jorgicio
    sync-type: laymansync
    sync-uri: https://github.com/jorgicio/jorgicio-gentoo.git
    masters: gentoo
    priority: 50

nest
    location: /var/lib/layman/nest
    sync-type: laymansync
    sync-uri: https://github.com/SpiderX/portage-overlay.git
    masters: gentoo
    priority: 50

tlp
    location: /var/lib/layman/tlp
    sync-type: laymansync
    sync-uri: git://github.com/dywisor/tlp-portage.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -pipe -march=skylake -mabm -msgx -mavx256-split-unaligned-load -mavx256-split-unaligned-store -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O3 -pipe -march=skylake -mabm -msgx -mavx256-split-unaligned-load -mavx256-split-unaligned-store -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--load-average 7.5"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs ccache cgroup config-protect-if-modified distlocks ebuild-locks fixlafiles installsources ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.ps.kz/gentoo/pub"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-fuse-ld=gold"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_BINHOST="http://packages.gentooexperimental.org/packages/amd64-stable/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="10bit X aac acl alsa amd64 appindicator archive bash-completion berkdb bluetooth bluez branding brotli bzip2 caps cjk cli colord cron crypt cups dbus dell dhcpcd dri dri3 drm dundee egl elogind eselect-ldso evdev fbcondecor ffmpeg fftw fontconfig fortran fuse gbm gdbm github gnome-keyring gpm gtk gtk-doc gtk3 harfbuzz hostonly http2 iconv icu idn infinality initramfs ipv6 iwd jimtcl jpeg keybinder layers lcms leaps_timezone libass libcanberra libdrm libmpv libnotify libproxy libsecret libtirpc lm-sensors lm_sensors metric modemmanager mp3 mtp ncurses nls nptl ocl-icd ocl20 ofono openal opencl opengl openmp openssl opus p2p pam pcre png policykit pulseaudio quesoglc readline rule-generator seccomp snapshot spell split-usr ssl startup-notification sync-plugin-portage system-icu tcpd tdb theora threads truetype udev udisks uefi unicode upnp upower uxa v4l vaapi vector-icons vorbis vulkan webp wired wireguard wispr wnck wps x264 x265 xa xattr xcb xfce xfconf xinerama xv xvmc zeroconf zlib zsh-completion" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput evdev wacom" KERNEL="linux" L10N="en-GB en zh-CN zh-HK zh-TW zh-SG" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="BPF X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11 postgres12" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="intel i915 i965 iris v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-devel/gcc-9.3.0::gentoo was built with the following:
USE="(cxx) fortran (multilib) nls nptl openmp pch (pie) sanitize ssp vtv (-ada) (-altivec) -d -debug -doc (-fixed-point) -go -graphite (-hardened) (-jit) (-libssp) -lto -objc -objc++ -objc-gc -pgo -systemtap -test -vanilla"
CFLAGS="-pipe -O2"
CXXFLAGS="-pipe -O2"
FEATURES="xattr pid-sandbox ipc-sandbox protect-owned merge-sync distlocks multilib-strict unmerge-logs fixlafiles assume-digests sfperms unmerge-orphans network-sandbox qa-unresolved-soname-deps strict binpkg-logs userpriv preserve-libs ebuild-locks parallel-fetch binpkg-dostrip sandbox userfetch usersandbox usersync buildpkg config-protect-if-modified binpkg-docompress unknown-features-warn"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
Comment 9 Sergei Trofimovich gentoo-dev 2020-06-03 22:42:29 UTC
Reproduced locally:

"""
# prelink -uamR
# LANG=C gcc gt.c -o glibc-test
sf ~ # cat gt.c
int main(){}
# LANG=C gcc gt.c -o glibc-test

# prelink -amR
# LANG=C gcc gt.c -o glibc-test
gcc: internal compiler error: Segmentation fault signal terminated program collect2
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
"""
Comment 10 Sergei Trofimovich gentoo-dev 2020-06-06 13:21:04 UTC
My crash is slightly diffferent:

"""
# gdb --quiet /usr/libexec/gcc/x86_64-pc-linux-gnu/9.3.0/collect2 core.687273
Reading symbols from /usr/libexec/gcc/x86_64-pc-linux-gnu/9.3.0/collect2...
Reading symbols from /usr/lib/debug//usr/libexec/gcc/x86_64-pc-linux-gnu/9.3.0/collect2.debug...
[New LWP 687273]
Core was generated by `/usr/libexec/gcc/x86_64-pc-linux-gnu/9.3.0/collect2 -plugin /usr/libexec/gcc/x8'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000032e6a32002 in _nl_postload_ctype () at lc-ctype.c:103
103	  __ctype_b = current (uint16_t, CLASS, 128);
(gdb) bt
#0  0x00000032e6a32002 in _nl_postload_ctype () at lc-ctype.c:103
#1  0x00000032e6a2fbc8 in setdata (data=0x32e6bb34e0 <_nl_C_LC_CTYPE>, category=0) at setlocale.c:214
#2  __GI_setlocale (locale=0x46e217 "", category=0) at setlocale.c:453
#3  __GI_setlocale (category=category@entry=0, locale=locale@entry=0x46e217 "") at setlocale.c:219
#4  0x0000000000416f7d in gcc_init_libintl () at /usr/src/debug/sys-devel/gcc-9.3.0/gcc-9.3.0/gcc/intl.c:52
#5  0x00000000004047b8 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/sys-devel/gcc-9.3.0/gcc-9.3.0/gcc/collect2.c:978
"""

On a related note prelink-99999999 behaves even worse as it's not reversible.