[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/11138] New: ld: internal error when using -lstdc++ and version s
From: |
doko at debian dot org |
Subject: |
[Bug ld/11138] New: ld: internal error when using -lstdc++ and version script before object files |
Date: |
5 Jan 2010 15:06:55 -0000 |
[forwarded from http://bugs.debian.org/562822]
I (mistakenly) tried to link a file using -lstdc++ before the object file:
$ ld --version-script=ExportMap.map -lstdc++ foo.o
However ld has crashed, and told me to file a bugreport:
ld: BFD (GNU Binutils for Debian) 2.20 internal error, aborting at
../../bfd/elflink.c line 8450 in elf_link_check_versioned_symbol
ld: Please report this bug.
Attached is a reduced testcase, to reproduce:
$ cat >ExportMap.map <<EOF
{
global: main;
local: *;
};
EOF
$ g++ -c x.ii -o foo.o
$ ld --version-script=ExportMap.map -lstdc++ foo.o
ld: warning: cannot find entry symbol _start; defaulting to 0000000000400610
foo.o: In function `__static_initialization_and_destruction_0(int, int)':
x.ii:(.text+0x5e): undefined reference to `__dso_handle'
ld: BFD (GNU Binutils for Debian) 2.20 internal error, aborting at
../../bfd/elflink.c line 8450 in elf_link_check_versioned_symbol
ld: Please report this bug.
If I put -lstdc++ after the object file then ld doesn't crash:
$ ld --version-script=ExportMap.map foo.o -lstdc++
ld: warning: cannot find entry symbol _start; defaulting to 0000000000400610
foo.o: In function `__static_initialization_and_destruction_0(int, int)':
x.ii:(.text+0x5e): undefined reference to `__dso_handle'
Also if I don't use the export map it doesn't crash:
$ ld -lstdc++ foo.o
ld: warning: cannot find entry symbol _start; defaulting to 0000000000400640
foo.o: In function `__static_initialization_and_destruction_0(int, int)':
x.ii:(.text+0x5e): undefined reference to `__dso_handle'
$ ld -v
GNU ld (GNU Binutils for Debian) 2.20
--
Summary: ld: internal error when using -lstdc++ and version
script before object files
Product: binutils
Version: 2.20
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: doko at debian dot org
CC: bug-binutils at gnu dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=11138
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug ld/11138] New: ld: internal error when using -lstdc++ and version script before object files,
doko at debian dot org <=
- [Bug ld/11138] ld: internal error when using -lstdc++ and version script before object files, doko at debian dot org, 2010/01/05
- [Bug ld/11138] ld: internal error when using -lstdc++ and version script before object files, doko at debian dot org, 2010/01/05
- [Bug ld/11138] ld: internal error when using -lstdc++ and version script before object files, hjl dot tools at gmail dot com, 2010/01/07
- [Bug ld/11138] ld: internal error when using -lstdc++ and version script before object files, hjl dot tools at gmail dot com, 2010/01/07
- [Bug ld/11138] ld: internal error when using -lstdc++ and version script before object files, hjl dot tools at gmail dot com, 2010/01/07
- [Bug ld/11138] ld: internal error when DSO is before object files, hjl dot tools at gmail dot com, 2010/01/07
- [Bug ld/11138] ld: internal error when DSO is before object files, cvs-commit at gcc dot gnu dot org, 2010/01/07
- [Bug ld/11138] ld: internal error when DSO is before object files, hjl dot tools at gmail dot com, 2010/01/07