This is an archive of the discontinued LLVM Phabricator instance.

Improve LMARegion handling
ClosedPublic

Authored by espindola on Jan 25 2018, 8:34 AM.

Details

Reviewers
grimar
ruiu
Summary

This fixes the crash reported at PR36083.

The issue is that we were trying to put all the sections in the same PT_LOAD and crashing trying to write past the end of the file.

This also adds accounting for used space in LMARegion, without it all 3 PT_LOADs would have the same physical address.

Diff Detail

Event Timeline

espindola created this revision.Jan 25 2018, 8:34 AM
grimar accepted this revision.Jan 25 2018, 9:13 AM

Looks good to me. Minor cosmetic comments/suggestions below.

test/ELF/linkerscript/at3.s
17

Excessive empty line.

25

I would add header:

Type           Offset   VirtAddr           PhysAddr

To make it clear where is Offset and VirtAddr and where is PhysAddr.

27

Looks you want to use CHECK-NEXT here ?

This revision is now accepted and ready to land.Jan 25 2018, 9:13 AM