llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Deduplication of merged input sections causes incorrect relocation

Open nga888 opened this issue 8 years ago • 3 comments

Bugzilla Link 36878
Resolution FIXED
Resolved on Mar 23, 2018 10:56
Version unspecified
OS Windows XP
Attachments Lit test reproducible
CC @the-edd

Extended Description

When merged input sections are deduplicated using --icf=all --ignore-data-address-equality, the relocation of the "removed" merged input section is incorrect.

Attached is a lit test that demonstrates this issue.

nga888 avatar Mar 23 '18 14:03 nga888

No, problem. I had a similar fix but I only modified the behaviour of MergeInputSection. I think your change is more general and thus should be better.

nga888 avatar Mar 23 '18 17:03 nga888

Gosh, I am terribly sorry. I just noticed you had assigned the bug to yourself.

llvmbot avatar Mar 23 '18 17:03 llvmbot

That is an awesome testcase. Thanks!

Fixed in r328332.

llvmbot avatar Mar 23 '18 17:03 llvmbot