This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Do not forget to expand the memory region.
ClosedPublic

Authored by grimar on Mar 21 2018, 4:45 AM.

Details

Summary

This is PR36799.

Currently, we might have a bug with scripts like below:

.foo : ALIGN(8) 
{
  *(.foo)
} > ram

because do not expand the memory region when doing ALIGN.
This might result in file range overlaps. The patch fixes the issue.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar created this revision.Mar 21 2018, 4:45 AM
grimar updated this revision to Diff 139277.Mar 21 2018, 4:48 AM
  • Minor change.
espindola accepted this revision.Mar 23 2018, 7:29 PM

LGTM with nits.

test/ELF/linkerscript/memory-region-alignment.test
12 ↗(On Diff #139277)

Can you avoid orphan sections?

19 ↗(On Diff #139277)

Can you use CHECK-NEXT?

This revision is now accepted and ready to land.Mar 23 2018, 7:29 PM
This revision was automatically updated to reflect the committed changes.