Bug 18430 - internal error in relocate_tls, at ../../binutils-2.25/gold/aarch64.cc:3695
Summary: internal error in relocate_tls, at ../../binutils-2.25/gold/aarch64.cc:3695
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.25
: P2 normal
Target Milestone: ---
Assignee: Han Shen
Depends on:
Reported: 2015-05-19 11:50 UTC by Csaba Osztrogonác
Modified: 2015-08-22 15:19 UTC (History)
2 users (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2015-05-19 11:50:16 UTC
WebKit trunk isn't linkable with the gold linker on AArch64.
(got it on Juno board with Linaro Ubuntu, GCC 4.9.2 and
vanilla binutils 2.25 built from source)

[5042/5213] Linking CXX executable bin/TestWebKitAPI/WebCore/LayoutUnit
FAILED: : && /usr/bin/c++   -std=c++11 -O3 -DNDEBUG -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-rtti  -L/home/oszi/WebKit2/WebKitBuild/DependenciesEFL/Root/lib  -fuse-ld=gold -Wl,--disable-new-dtags @CMakeFiles/CSSParser.rsp  -o bin/TestWebKitAPI/WebCore/CSSParser  && :
/home/oszi/binutils-bin-gold/bin/ld.gold: internal error in relocate_tls, at ../../binutils-2.25/gold/aarch64.cc:3695

$ /home/oszi/binutils-bin-gold/bin/ld.gold --version
GNU gold (GNU Binutils 2.25) 1.11

If you need more details, please let me know what do you 
need and how can I produce the necessary debug information.
Comment 1 Csaba Osztrogonác 2015-05-19 14:50:41 UTC
I checked it is still valid on trunk: (git hash: 84204ed7)
internal error in relocate_tls, at ../../binutils-gdb/gold/aarch64.cc:6637
Comment 2 Cary Coutant 2015-06-04 19:23:39 UTC
A tarball containing all the inputs to the link, including the @-file would help. (You can add the -Wl,-t option to the c++ command to get a list of all the files that the linker reads.)

If you also add the -v option to the c++ command, it'll show the actual linker command (probably 'collect2'). That would also be helpful.

Are you using the --warn-unresolved-symbols option? It looks like this might be a reference to an unresolved TLS symbol. Alternatively, it could be a TLS relocation that refers to a non-TLS symbol, or a TLS symbol in a non-TLS section.

The assertion you hit indicates that gold saw a TLS relocation but hadn't created a TLS segment yet. Gold will create a TLS segment whenever it sees a TLS section in an input file (i.e., a section with SHF_TLS set), or when it has any TLS common symbols.
Comment 3 Cary Coutant 2015-08-22 15:19:32 UTC
Waiting for more data from the reporter.