[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/13252] New: fails to link statically with '[symbol] referenced i
From: |
lkajan at rostlab dot org |
Subject: |
[Bug ld/13252] New: fails to link statically with '[symbol] referenced in section [...]: defined in discarded section [...]' with g++ (Debian 4.6.1-13) 4.6.1 - with test case attached |
Date: |
Tue, 04 Oct 2011 13:43:14 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=13252
Bug #: 13252
Summary: fails to link statically with '[symbol] referenced in
section [...]: defined in discarded section [...]'
with g++ (Debian 4.6.1-13) 4.6.1 - with test case
attached
Product: binutils
Version: 2.21
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: address@hidden
ReportedBy: address@hidden
Classification: Unclassified
Dear Maintainer,
I have got errors of the following type at linking using binutils
2.21.53.20110922-1 when doing -static linking:
`.text._ZN5boost16exception_detail19error_info_injectorINS_17bad_function_callEED2Ev'
referenced in section
`.text._ZN5boost16exception_detail19error_info_injectorINS_17bad_function_callEED1Ev[_ZThn16_N5boost16exception_detail19error_info_injectorINS_17bad_function_callEED1Ev]'
of
usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/libboost_program_options-mt.a(cmdline.o):
defined in discarded section
`.text._ZN5boost16exception_detail19error_info_injectorINS_17bad_function_callEED2Ev[_ZN5boost16exception_detail19error_info_injectorINS_17bad_function_callEED5Ev]'
of
usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/libboost_program_options-mt.a(cmdline.o)
Please find attached (hopefully) all libraries for recreating the bug in
'ld_testcase_for_defined_in_discarded_section_bug.tgz' (attached).
After untaring:
$ ld --build-id --no-add-needed -m elf_x86_64 --hash-style=both -static -o
pp_popcon_cnt.static x86_64-linux-gnu/crt1.o x86_64-linux-gnu/crti.o
usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbeginT.o
-Lusr/lib/gcc/x86_64-linux-gnu/4.6.1
-Lusr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu
-Lusr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib -Llib/x86_64-linux-gnu
-Llib/../lib -Lusr/lib/x86_64-linux-gnu -Lusr/lib/../lib
-Lusr/lib/gcc/x86_64-linux-gnu/4.6.1/../../.. -z defs pp_popcon_cnt.o
-lboost_program_options-mt -lstdc++ -lm --start-group -lgcc -lgcc_eh -lc
--end-group usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtend.o x86_64-linux-gnu/crtn.o
reproduces the error.
Linking on Debian testing with binutils version 2.21.52.20110606-2 succeeds
normally as well as on Debian stable with binutils 2.20.1-16.
Compiler: g++ (Debian 4.6.1-13) 4.6.1
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (990, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages binutils depends on:
ii libc6 2.13-21
ii libgcc1 1:4.6.1-13
ii libstdc++6 4.6.1-13
ii zlib1g 1:1.2.3.4.dfsg-3
binutils recommends no packages.
Versions of packages binutils suggests:
pn binutils-doc <none>
-- no debconf information
Best regards,
Laszlo Kajan
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
- [Bug ld/13252] New: fails to link statically with '[symbol] referenced in section [...]: defined in discarded section [...]' with g++ (Debian 4.6.1-13) 4.6.1 - with test case attached,
lkajan at rostlab dot org <=