Open korran opened 1 year ago
My attempt to fix this issue (with test): https://reviews.llvm.org/D149432
@llvm/issue-subscribers-lld-elf
@korran It looks like LLVM has moved to using Github PRs for review. Do you want me to rebase your fix and send in a PR, or would you like to? My team is lucky to have not hit this issue yet but this could block uprev for us.
I've written an LLD test-case that fails at top-of-tree:
Because of this bug, the call to ld.ldd on line 9 will fail with this error:
If I increase the length of the ROM region, it succeeds, and the
.text
section in the output file is only 10 bytes; less than the original region size.I believe the first call to
LinkerScript::assignAddresses()
is the one that triggers the error, and it occurs before any relaxation passes have been done. Later passes that happen after relaxation don't trigger any errors, but it's too late.