This is an archive of the discontinued LLVM Phabricator instance.

ELF: Simplify getFdeEncoding.
ClosedPublic

Authored by ruiu on Feb 5 2016, 4:49 PM.

Details

Reviewers
grimar
Summary

I found that the handling of 'L' character in an augmentation string is
wrong because 'L' means that the next byte is the length field. I could
have fixed that by just skipping the next byte, but I decided to take
different approach.

Teaching the linker about all the types of CIE internal records just to
skip them is silly. And the code doing that is not actually executed now
(that's why the bug did not cause any issue.) It is because the 'R' field,
which we want to read, is always at beginning of the CIE. So I reduced
the code dramatically by assuming that that's always the case. I want to
see how it works in the wild. If it doesn't work, we can roll this back
(with a fix for 'L').

Diff Detail

Event Timeline

ruiu updated this revision to Diff 47066.Feb 5 2016, 4:49 PM
ruiu retitled this revision from to ELF: Simplify getFdeEncoding..
ruiu updated this object.
ruiu added a reviewer: grimar.
ruiu added a subscriber: llvm-commits.
ruiu updated this revision to Diff 47067.Feb 5 2016, 5:00 PM
  • Remove dead code.
grimar accepted this revision.Feb 6 2016, 1:30 PM
grimar edited edge metadata.

LGTM. That is nice idea, I like it (assuming that handling "zR" should be enough for all, lets try and see).

This revision is now accepted and ready to land.Feb 6 2016, 1:30 PM

Committed as r260073.

Hi Rui,
could you please write "Differential revision: <URL>" in commit message next times ? This will close revisions automatically on commit event. Thanks !

grimar closed this revision.Feb 8 2016, 11:58 PM