Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 549276 - sys-devel/binutils-2.25: ld.gold mishandles COPY relocs (which breaks QT and triggers segfaults)
Summary: sys-devel/binutils-2.25: ld.gold mishandles COPY relocs (which breaks QT and ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://sourceware.org/git/gitweb.cgi...
Whiteboard:
Keywords: PATCH, UPSTREAM
: 549366 549622 549900 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-05-12 14:51 UTC by Marcin Mirosław
Modified: 2015-05-28 19:33 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Mirosław 2015-05-12 14:51:44 UTC
When I compiled qtcore (and/or qtgui, qtscript) using gold linker I noticed that binaries using corresponding libraries from mentioned packages are throwing segfault:
21736.215392] drkonqi[1250]: segfault at 9 ip 00007f12594d6afc sp 00007ffdd661ca50 error 4 in libQtCore.so.4.8.6[7f1259456000+2ee000]
Probably the same problem is with other qt packages. I tested it using alse safe CFLAGS (-OO -march=native -pipe) and the result was the same - ld.gold gives unusable qt libraries.
If it can't be fixed I think it could be good to give information to users about such problem.

Reproducible: Always




# emerge --info qtcore
Portage 2.2.18 (python 3.3.5-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.9.2, glibc-2.20-r2, 3.19.3-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.19.3-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.2
KiB Mem:     4554760 total,     51116 free
KiB Swap:    6291452 total,   6278680 free
Timestamp of repository gentoo: Tue, 12 May 2015 05:30:01 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.25 p1.0) 2.25
ccache version 3.2.2 [enabled]
app-shells/bash:          4.3_p33-r2::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2-r1::gentoo
dev-lang/python:          2.7.9-r2::gentoo, 3.3.5-r1::gentoo
dev-util/ccache:          3.2.2::gentoo
dev-util/cmake:           3.2.1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.16::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25::gentoo
sys-devel/gcc:            4.7.4::gentoo, 4.9.2::gentoo, 5.1.0::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.0::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://192.168.138.254/gentoo-portage
    priority: -1000


ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fpeel-loops -frename-registers -fno-unwind-tables -fno-asynchronous-unwind-tables           -fpredictive-commoning -fweb -ftree-vectorize -floop-interchange -fivopts -ftree-loop-distribution           -freorder-blocks-and-partition           -floop-block -floop-strip-mine -fira-loop-pressure -floop-interchange -ftree-loop-linear -Wdisabled-optimization   -fuse-linker-plugin"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /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="-O2 -march=native -pipe -fpeel-loops -frename-registers -fno-unwind-tables -fno-asynchronous-unwind-tables           -fpredictive-commoning -fweb -ftree-vectorize -floop-interchange -fivopts -ftree-loop-distribution           -freorder-blocks-and-partition           -floop-block -floop-strip-mine -fira-loop-pressure -floop-interchange -ftree-loop-linear -Wdisabled-optimization   -fuse-linker-plugin"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=native -pipe -fpeel-loops -frename-registers -fno-unwind-tables -fno-asynchronous-unwind-tables           -fpredictive-commoning -fweb -ftree-vectorize -floop-interchange -fivopts -ftree-loop-distribution           -freorder-blocks-and-partition           -floop-block -floop-strip-mine -fira-loop-pressure -floop-interchange -ftree-loop-linear -Wdisabled-optimization   -fuse-linker-plugin"
FEATURES="assume-digests binpkg-logs ccache cgroup collision-protect compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=native -pipe -fpeel-loops -frename-registers -fno-unwind-tables -fno-asynchronous-unwind-tables           -fpredictive-commoning -fweb -ftree-vectorize -floop-interchange -fivopts -ftree-loop-distribution           -freorder-blocks-and-partition           -floop-block -floop-strip-mine -fira-loop-pressure -floop-interchange -ftree-loop-linear -Wdisabled-optimization   -fuse-linker-plugin"
GENTOO_MIRRORS="http://gentoo.prz.rzeszow.pl"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4 -l5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-O"
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"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi aio alsa amd64 apm async bash-completion bittorrent branding bzip2 cairo caps cdda cdr chroot cli consolekit crypt cups cxx dbus declarative dmx dri dvd dvdr emboss encode exif fam firefox ftp gif glamor glibc-omitfp gpm graphite gstreamer iconv idn iproute2 ipv6 ithreads jpeg kde kipi laptop lcms libnotify lightning logrotate mad mmap mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses network-cron nls nptl nsplugin nspluginwrapper objc ogg opengl openmp openssl optimization optimized-qmake pam pango pcre pdf phonon plasma png policykit ppds python3 qt3support qt4 readline samba sdl semantic-desktop session sharedmem smp spell sse sse2 ssl startup-notification svg threads threadsafe tiff tools truetype udev udisks unicode unwind upower urandom usb vim vim-pager vim-syntax vorbis wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zip zlib" ABI_X86="32 64" 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="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 cgid dav dbd deflate dir env expires ext_filter filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id usertrack vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" DRACUT_MODULES="caps lvm mdraid" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl en es es_ES" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4 php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" USERLAND="GNU" VIDEO_CARDS="nvidia" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON

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

dev-qt/qtcore-4.8.6-r2::gentoo was built with the following:
USE="exceptions glib iconv qt3support ssl (-aqua) -debug -icu -pch" ABI_X86="32 64 -x32"



# gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.2/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.2/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.9.2/work/gcc-4.9.2/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.2 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.2 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.2/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.2/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include/g++-v4 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.9.2/python --enable-languages=c,c++,objc,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.9.2 p1.4, pie-0.6.2' --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --enable-lto --with-cloog --disable-isl-version-check --disable-libsanitizer
Thread model: posix
gcc version 4.9.2 (Gentoo 4.9.2 p1.4, pie-0.6.2)
Comment 1 Davide Pesavento (RETIRED) gentoo-dev 2015-05-12 15:15:05 UTC
Try without ccache instead.

How did you enable linking with gold? emerge --info shows "GNU ld", and I don't see -fuse-ld=gold in your cxxflags either...
Comment 2 Marcin Mirosław 2015-05-12 16:26:54 UTC
Hmm, I just did:
# binutils-config --linker ld.gold
rebuilded qtocore, in this configuration I had problem, when I did:
# binutils-config --linker ld.bfd
and recompiled qtcore it works.
Comment 3 Davide Pesavento (RETIRED) gentoo-dev 2015-05-12 16:39:45 UTC
Can you attach a backtrace of the crash please? see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
Comment 4 Marcin Mirosław 2015-05-12 18:09:33 UTC
Is this backtrace usefull or should I recompile other qt* packages? (To get this backtrace I recompiled qtcore and kde-base/drkonqi).

# gdb -q /usr/lib64/kde4/libexec/drkonqi 'core-1431453914-107-11-!usr!lib64!kde4!libexec!drkonqi-7812'
Reading symbols from /usr/lib64/kde4/libexec/drkonqi...Reading symbols from /usr/lib64/debug//usr/lib64/kde4/libexec/drkonqi.debug...done.
done.
[New LWP 7812]

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/lib64/kde4/libexec/drkonqi -display :0 --appname kdmgreet --signal 11 --pi'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f6fa570999a in length (this=0x7f6fa5942118 <QLinkedListData::shared_null+24>)
    at /var/tmp/portage/dev-qt/qtcore-4.8.6-r2/work/qt-everywhere-opensource-src-4.8.6/src/corelib/tools/qbytearray.h:356
356     /var/tmp/portage/dev-qt/qtcore-4.8.6-r2/work/qt-everywhere-opensource-src-4.8.6/src/corelib/tools/qbytearray.h: No such file or directory.
(gdb) thread apply all bt full

Thread 1 (Thread 0x7f6fa965c7c0 (LWP 7812)):
#0  0x00007f6fa570999a in length (this=0x7f6fa5942118 <QLinkedListData::shared_null+24>)
    at /var/tmp/portage/dev-qt/qtcore-4.8.6-r2/work/qt-everywhere-opensource-src-4.8.6/src/corelib/tools/qbytearray.h:356
No locals.
#1  qstrcmp (str1=..., str2=...) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r2/work/qt-everywhere-opensource-src-4.8.6/src/corelib/tools/qbytearray.cpp:347
        l1 = <optimized out>
        l2 = <optimized out>
        ret = <optimized out>
#2  0x00007f6fa59f9c19 in ?? () from /usr/lib64/libkdecore.so.5
No symbol table info available.
#3  0x0000000000000000 in ?? ()
No symbol table info available.
(gdb)

In dmesg I got:
[Tue May 12 20:05:13 2015] drkonqi[7812]: segfault at 9 ip 00007f6fa570999a sp 00007fffa2bb7600 error 4 in libQtCore.so.4.8.6[7f6fa568e000+2b3000]
Comment 5 Franz Trischberger 2015-05-12 18:16:30 UTC
WOHOO!!! Thx alot!
I had the same issue (on a friends computer) and nearly lost my mind (and a friend...) We already discussed migration away from kde4 to another DE and now I see this report.

After installing just qtcore with ld.bfd and all issues are gone.
Issues usually were crashes or inifinite loop (e.g. in meinproc4, which made it impossible to reinstall kdelibs) - all in qstrcmp.

Here is the bt for ark:

(gdb) bt
#0  qstrcmp (str1=..., str2=...) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r2/work/qt-everywhere-opensource-src-4.8.6/src/corelib/tools/qbytearray.cpp:347
#1  0x00007ffff6737fd5 in operator< (k2=..., k1=...) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/config/kconfigdata.h:126
#2  qMapLessThanKey<KEntryKey> (key2=..., key1=...) at /usr/include/qt4/QtCore/qmap.h:107
#3  findNode (akey=..., this=0x63fca0) at /usr/include/qt4/QtCore/qmap.h:487
#4  find (akey=..., this=0x63fca0) at /usr/include/qt4/QtCore/qmap.h:608
#5  KEntryMap::findEntry (this=this@entry=0x63fca0, group=..., key=..., flags=...) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/config/kconfigdata.cpp:79
#6  0x00007ffff6731bdb in getEntryOption (option=KEntryMap::EntryImmutable, flags=..., key=..., group=..., this=0x63fca0) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/config/kconfigdata.h:206
#7  KConfig::isGroupImmutableImpl (this=this@entry=0x6400c0, aGroup=...) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/config/kconfig.cpp:766
#8  0x00007ffff6737888 in KConfigBase::isGroupImmutable (this=this@entry=0x6400c0, aGroup=...) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/config/kconfigbase.cpp:96
#9  0x00007ffff673f623 in KConfigGroup::KConfigGroup (this=0x7fffffffaa30, master=0x6400c0, _group=...) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/config/kconfiggroup.cpp:468
#10 0x00007ffff67e165e in KStandardDirs::addCustomized (this=0x63f4c0, config=0x6400c0) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/kernel/kstandarddirs.cpp:1949
#11 0x00007ffff67d8147 in KComponentDataPrivate::lazyInit (this=0x63f520, component=...) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/kernel/kcomponentdata.cpp:142
#12 0x00007ffff67d83ce in KComponentData::KComponentData (this=0x63ee40, name=..., catalog=..., registerAsMain=KComponentData::SkipMainComponentRegistration)
    at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/kernel/kcomponentdata.cpp:82
#13 0x00007ffff67d6fde in initFakeComponent () at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/kernel/kglobal.cpp:118
#14 operator-> (this=<optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/kernel/kglobal.cpp:129
#15 KGlobal::config () at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/kernel/kglobal.cpp:142
#16 0x00007ffff76ba951 in KApplicationPrivate::preqapplicationhack () at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdeui/kernel/kapplication.cpp:411
#17 0x00007ffff76bd10c in KApplication::KApplication (this=0x7fffffffb6b0, GUIenabled=true) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdeui/kernel/kapplication.cpp:345
#18 0x000000000040a747 in main (argc=1, argv=0x7fffffffb7e8) at /var/tmp/portage/kde-base/ark-4.14.3-r1/work/ark-4.14.3/app/main.cpp:108
Comment 6 Davide Pesavento (RETIRED) gentoo-dev 2015-05-12 18:19:25 UTC
@Franz, attach the emerge --info for that machine please.
Comment 7 Franz Trischberger 2015-05-12 18:30:26 UTC
Portage 2.2.18 (python 3.3.5-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.2, glibc-2.20-r2, 3.19.7-gentoo x86_64)
=================================================================
System uname: Linux-3.19.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-2600K_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:     7884632 total,   1842644 free
KiB Swap:    8388604 total,   8388444 free
Timestamp of repository gentoo: Sun, 10 May 2015 05:00:01 +0000
sh bash 4.2_p53
ld GNU ld (Gentoo 2.25 p1.0) 2.25
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p53::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r2::gentoo, 3.3.5-r1::gentoo, 3.4.1::gentoo
dev-util/ccache:          3.1.9-r4::gentoo
dev-util/cmake:           3.2.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.15.1::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.13.4::gentoo
sys-devel/binutils:       2.25::gentoo
sys-devel/gcc:            4.9.2::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /var/repositories/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

dlang
    location: /var/repositories/dlang
    sync-type: git
    sync-uri: https://github.com/gentoo/dlang.git
    masters: gentoo

ff2000
    location: /var/repositories/ff2000
    sync-type: git
    sync-uri: git://github.com/ff2000/gentoo-overlay.git
    masters: gentoo

gnome
    location: /var/repositories/gnome
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/gnome.git
    masters: gentoo

kde
    location: /var/repositories/kde
    sync-type: git
    sync-uri: git://github.com/gentoo/kde.git
    masters: gentoo

local
    location: /var/repositories/local
    masters: gentoo

qt
    location: /var/repositories/qt
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/qt.git
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7-avx -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=corei7-avx -O2 -pipe -ggdb"
DISTDIR="/var/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j10"
PKGDIR="/usr/portage/packages"
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"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 apm berkdb bluray branding bzip2 cairo cdda cdr cli cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm iconv introspection ipv6 jpeg jpeg2k kde lcms mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl nvidia ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline sdl semantic-desktop session spell sse sse2 sse3 sse4 sse4_1 ssl ssse3 startup-notification svg systemd tcpd theora threads tiff truetype udev udisks unicode upower usb vaapi vorbis vpx wayland wxwidgets x264 xcb xcomposite xml xscreensaver xv xvid zlib zsh-completion" ABI_X86="64" 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="auth_digest authn_file dav dav_fs authz_groupfile" CALLIGRA_FEATURES="krita words sheets" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de de_DE" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="i915 i965 intel" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 8 Davide Pesavento (RETIRED) gentoo-dev 2015-05-12 18:46:07 UTC
What's the output of `objdump -CR /usr/lib64/qt4/libQtCore.so | grep COPY`?
Comment 9 Marcin Mirosław 2015-05-12 18:47:45 UTC
# objdump -CR /usr/lib64/qt4/libQtCore.so | grep COPY
#
Comment 10 Davide Pesavento (RETIRED) gentoo-dev 2015-05-12 18:54:39 UTC
(In reply to Marcin Mirosław from comment #9)
> # objdump -CR /usr/lib64/qt4/libQtCore.so | grep COPY
> #

On the *crashing* library, i.e. do it on a libQtCore.so build with gold.
Comment 11 Marcin Mirosław 2015-05-12 18:57:43 UTC
I did it on library builded with ld.gold. I'm using splitdebug with debugcompress, maybe this is problem?
Comment 12 Marcin Mirosław 2015-05-12 18:58:02 UTC
# objdump -CR /usr/lib64/debug/usr/lib64/qt4/libQtCore.so.4.8.6.debug | grep COPY
objdump: /usr/lib64/debug/usr/lib64/qt4/libQtCore.so.4.8.6.debug: Invalid operation
Comment 14 Davide Pesavento (RETIRED) gentoo-dev 2015-05-12 19:23:31 UTC
err sorry... my brain is turned off at the moment... run objdump -CR on the *application* that links against libQtCore...
Comment 15 Marcin Mirosław 2015-05-12 19:29:46 UTC
Does it means that I should giv up with using gold? https://sourceware.org/bugzilla/show_bug.cgi?id=17895#c1

I patched binutils, recompiled qtcore and drkonqi, I don't have segfault. Because I'm doing this on remote host I can't check I can login to KDE. But I can see X is working so everythong should be ok.
Comment 16 Marcin Mirosław 2015-05-12 19:38:28 UTC
With ld.gold and binutils patched:
# objdump -CR /usr/lib64/kde4/libexec/drkonqi |grep COPY
0000000000478700 R_X86_64_COPY     KAssistantDialog::staticMetaObject
0000000000478a80 R_X86_64_COPY     QHashData::shared_null
0000000000478ac0 R_X86_64_COPY     vtable for QSpacerItem
00000000004788a0 R_X86_64_COPY     typeinfo for QObject
0000000000478b80 R_X86_64_COPY     vtable for __cxxabiv1::__class_type_info
0000000000478880 R_X86_64_COPY     typeinfo for KDialog
0000000000478c60 R_X86_64_COPY     typeinfo for QDBusAbstractAdaptor
0000000000478c80 R_X86_64_COPY     typeinfo for QSyntaxHighlighter
0000000000478c00 R_X86_64_COPY     KProcess::staticMetaObject
0000000000478980 R_X86_64_COPY     typeinfo for KJob
0000000000478640 R_X86_64_COPY     QString::shared_null
0000000000478c40 R_X86_64_COPY     QDBusAbstractAdaptor::staticMetaObject
0000000000478b50 R_X86_64_COPY     QVariant::handler
00000000004789c0 R_X86_64_COPY     QListData::shared_null
00000000004789a0 R_X86_64_COPY     QByteArray::shared_null
00000000004786c0 R_X86_64_COPY     QWidget::staticMetaObject
0000000000478940 R_X86_64_COPY     typeinfo for QStackedWidget
0000000000478780 R_X86_64_COPY     QStackedWidget::staticMetaObject
0000000000478b60 R_X86_64_COPY     QString::codecForCStrings
0000000000478a00 R_X86_64_COPY     QMapData::shared_null
0000000000478660 R_X86_64_COPY     KDialog::staticMetaObject
0000000000478960 R_X86_64_COPY     typeinfo for QLabel
0000000000478820 R_X86_64_COPY     typeinfo for KAssistantDialog
0000000000478840 R_X86_64_COPY     typeinfo for QWidget
0000000000478740 R_X86_64_COPY     QLabel::staticMetaObject
0000000000478680 R_X86_64_COPY     QObject::staticMetaObject
00000000004787c0 R_X86_64_COPY     vtable for __cxxabiv1::__si_class_type_info
00000000004788c0 R_X86_64_COPY     vtable for __cxxabiv1::__vmi_class_type_info
00000000004786a0 R_X86_64_COPY     KJob::staticMetaObject

with ld.gold and unpatched binutils:
# objdump -CR /usr/lib64/kde4/libexec/drkonqi |grep COPY
0000000000478700 R_X86_64_COPY     KAssistantDialog::staticMetaObject
0000000000478a80 R_X86_64_COPY     QHashData::shared_null
0000000000478ac0 R_X86_64_COPY     vtable for QSpacerItem
00000000004788a0 R_X86_64_COPY     typeinfo for QObject
0000000000478b80 R_X86_64_COPY     vtable for __cxxabiv1::__class_type_info
0000000000478880 R_X86_64_COPY     typeinfo for KDialog
0000000000478c60 R_X86_64_COPY     typeinfo for QDBusAbstractAdaptor
0000000000478c80 R_X86_64_COPY     typeinfo for QSyntaxHighlighter
0000000000478c00 R_X86_64_COPY     KProcess::staticMetaObject
0000000000478980 R_X86_64_COPY     typeinfo for KJob
0000000000478640 R_X86_64_COPY     QString::shared_null
0000000000478c40 R_X86_64_COPY     QDBusAbstractAdaptor::staticMetaObject
0000000000478b50 R_X86_64_COPY     QVariant::handler
00000000004789c0 R_X86_64_COPY     QListData::shared_null
00000000004789a0 R_X86_64_COPY     QByteArray::shared_null
00000000004786c0 R_X86_64_COPY     QWidget::staticMetaObject
0000000000478940 R_X86_64_COPY     typeinfo for QStackedWidget
0000000000478780 R_X86_64_COPY     QStackedWidget::staticMetaObject
0000000000478b60 R_X86_64_COPY     QString::codecForCStrings
0000000000478a00 R_X86_64_COPY     QMapData::shared_null
0000000000478660 R_X86_64_COPY     KDialog::staticMetaObject
0000000000478960 R_X86_64_COPY     typeinfo for QLabel
0000000000478820 R_X86_64_COPY     typeinfo for KAssistantDialog
0000000000478840 R_X86_64_COPY     typeinfo for QWidget
0000000000478740 R_X86_64_COPY     QLabel::staticMetaObject
0000000000478680 R_X86_64_COPY     QObject::staticMetaObject
00000000004787c0 R_X86_64_COPY     vtable for __cxxabiv1::__si_class_type_info
00000000004788c0 R_X86_64_COPY     vtable for __cxxabiv1::__vmi_class_type_info
00000000004786a0 R_X86_64_COPY     KJob::staticMetaObject
Comment 17 Davide Pesavento (RETIRED) gentoo-dev 2015-05-12 20:28:30 UTC
(In reply to Marcin Mirosław from comment #15)
> I patched binutils, recompiled qtcore and drkonqi, I don't have segfault.
> Because I'm doing this on remote host I can't check I can login to KDE. But
> I can see X is working so everythong should be ok.

Excellent, thanks for testing.

@toolchain, can we backport the patch to binutils-2.25?
Comment 18 SpanKY gentoo-dev 2015-05-13 04:28:11 UTC
(In reply to Davide Pesavento from comment #17)

shouldn't be too hard to get this into binutils
Comment 19 Davide Pesavento (RETIRED) gentoo-dev 2015-05-13 13:23:10 UTC
*** Bug 549366 has been marked as a duplicate of this bug. ***
Comment 20 Davide Pesavento (RETIRED) gentoo-dev 2015-05-19 13:48:47 UTC
*** Bug 549900 has been marked as a duplicate of this bug. ***
Comment 21 Davide Pesavento (RETIRED) gentoo-dev 2015-05-19 14:02:58 UTC
Thanks Mike. We're getting several duplicates, do you have an ETA on pushing a revbump with the patch?
Comment 22 SpanKY gentoo-dev 2015-05-25 08:52:04 UTC
i had another patch i was working on for cross-compiling.  that's fixed now, so i've pulled this in for 2.25-r1:
http://sources.gentoo.org/gentoo/src/patchsets/binutils/2.25/88_all_gold-copy-relocs.patch?rev=1.1
Comment 23 Marcin Mirosław 2015-05-26 09:33:50 UTC
Works for me. Thank you.
Comment 24 Michael Palimaka (kensington) gentoo-dev 2015-05-28 19:33:45 UTC
*** Bug 549622 has been marked as a duplicate of this bug. ***