This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Do not try to assign a memory region to a non-allocatable section
ClosedPublic

Authored by ikudrin on Nov 12 2021, 6:46 AM.

Details

Summary

Non-allocatable sections are not part of the memory image of the program, so there is no need to find memory regions for them either matching properties or handling explicit assignments. The early test and return help to simplify LinkerScript::findMemoryRegion() a bit.

Diff Detail

Event Timeline

ikudrin created this revision.Nov 12 2021, 6:46 AM
ikudrin requested review of this revision.Nov 12 2021, 6:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 12 2021, 6:46 AM
MaskRay accepted this revision.Nov 12 2021, 8:08 PM
MaskRay added inline comments.
lld/test/ELF/linkerscript/memory-nonalloc.test
11

-o /dev/null --fatal-warnings

This revision is now accepted and ready to land.Nov 12 2021, 8:08 PM