<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57545>57545</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
bolt: fails to build with `/usr/bin/ld.gold: internal error in do_layout, at ../../gold/object.cc:1939`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
build-problem,
BOLT
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
sylvestre
</td>
</tr>
</table>
<pre>
Trying to build bolt in 15 rc3:
```
: && "/home/sylvestre/dev/debian/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-15-15.0.0~+rc3/build-llvm/./bin/clang++" -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -ffile-prefix-map=/home/sylvestre/dev/debian/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-15-15.0.0~+rc3/build-llvm/tools/clang/stage2-bins=build-llvm/tools/clang/stage2-bins -ffile-prefix-map=/home/sylvestre/dev/debian/pkg-llvm/llvm-toolchain/branches/llvm-toolchain-15-15.0.0~+rc3/= -no-canonical-prefixes -O3 -DNDEBUG -Wl,-z,relro -Wl,--build-id -fuse-ld=gold -Wl,--gc-sections -Xlinker --emit-relocs tools/bolt/tools/merge-fdata/CMakeFiles/merge-fdata.dir/merge-fdata.cpp.o -o bin/merge-fdata -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVM-15.so.1 && :
/usr/bin/ld.gold: internal error in do_layout, at ../../gold/object.cc:1939
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNVUtv4zYQ_jXyRaBgU34efEiceBEguym22T5OAUVSEhuKVEnKiffX9yPlOG7aQy9FKwiUyBnOfPOurDhuH91RmSYPNq8GpUVeWR1yZfLZIne8zMqrbHqTTa-y5fT0jtvyKs_oEi8-NKP71nYSH3_UB-mDi_9CHtJaKWbw0z83ROtDh9_4IcFazVumIq1yzPBW-r_QyGyBt5gW02x1m9HrCAnsEembsCIeJClcM9OAKb00J7UPjD-T3tkgebCOAJiFreTn2rqOBfxI56zLypvxgHjJB6fCERRjyWAGLwXhtuuYgT5lJGGuGTpp4l3BgiRBdTInN0_7h6-Pd_tfn358-PZ1dwuJUf8PdzuskOQlJATFiTJBut56FZQ1oB2UV5XSUAlSVOBJq4SQ5gLbhZ7z2WCagTkBdOzAlGYnGUa-gIlpHVlfg2N_MqRnjnUSAHD6AjNldAiC77HnzAfy-8DizU55j2NSKwk3KwOwTKvv0oGxlyJZMgrWcGdaooTR85t1dFgPZyYA0XQFqup6rbgKpAa60Do7NG28ZA_SAZp_UYG3RMiaDTqMwo2Vr1z2gYRjL9ORIQflAkASgXDGEEgNe8jfUPzQNEhEEuU7Jcb7KZRj8EbLcWDA4FMwot1aMhHPlUEMAjtFSSjWGOthtscNHRXU9WB4JMeciV8f-Vhgl_taaYn0k7V6JR3rEbf_tFIir3-vkz3Ko5GUoHg8oP1T1v-FXVCZkxhQhtgrjriPcCTgPZQoyC83t9ffPiGoOqM78h2Lk9rZtwMyWqsErEFtEC0gsbHof3jeeBr-Hsyc_ILyfI61Q5DRgUCc5T5_c1Rsmxd-66Rr5JgQ2O0-s2e5h9M-kAqh3IcT3vcFUKIbJ7dckM64HIqrxU9svAus84evd5_uvsRWGHuhVlXsfnn6xt39_U-fowu9LWbnpn3u63Q_eHduoVoU0QuxvadWZ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