mirror of
https://github.com/rui314/mold.git
synced 2024-09-17 16:09:43 +03:00
Merge pull request #1177 from ishitatsuyuki/icf-workaround
Ignore addrsig sections corrupted by strip
This commit is contained in:
commit
c36b83fdea
@ -356,7 +356,12 @@ void ObjectFile<E>::initialize_sections(Context<E> &ctx) {
|
||||
|
||||
// Save .llvm_addrsig for --icf=safe.
|
||||
if (shdr.sh_type == SHT_LLVM_ADDRSIG && !ctx.arg.relocatable) {
|
||||
llvm_addrsig = std::move(this->sections[i]);
|
||||
if (shdr.sh_link != 0) {
|
||||
llvm_addrsig = std::move(this->sections[i]);
|
||||
} else {
|
||||
Warn(ctx) << *this << ": Ignoring .llvm_addrsig section without SH_LINK; " <<
|
||||
"was the file processed by strip or objcopy -r?";
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user