diff options
| author | George Rimar <grimar@accesssoftek.com> | 2018-02-16 10:42:58 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2018-02-16 10:42:58 +0000 |
| commit | 1c08e9f5cee04c0164a5f8408e6854ce64fe3d29 (patch) | |
| tree | 92492c4afc3c9945c9e461febe70f3200239787b /lld/ELF/LinkerScript.cpp | |
| parent | 53270d0fa61eb95a3f948dbcf5d65373abc86648 (diff) | |
| download | bcm5719-llvm-1c08e9f5cee04c0164a5f8408e6854ce64fe3d29.tar.gz bcm5719-llvm-1c08e9f5cee04c0164a5f8408e6854ce64fe3d29.zip | |
[ELF] - Support COPY, INFO, OVERLAY output sections attributes.
This is PR36298.
(COPY), (INFO), (OVERLAY) all have the same effect:
section should be marked as non-allocatable.
(https://www.eecs.umich.edu/courses/eecs373/readings/Linker.pdf,
3.6.8.1 Output Section Type)
Differential revision: https://reviews.llvm.org/D43071
llvm-svn: 325331
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
| -rw-r--r-- | lld/ELF/LinkerScript.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 309755e6197..d7fbd62c983 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -436,6 +436,8 @@ void LinkerScript::processSectionCommands() { Sec->SectionIndex = I++; if (Sec->Noload) Sec->Type = SHT_NOBITS; + if (Sec->NonAlloc) + Sec->Flags &= ~(uint64_t)SHF_ALLOC; } } Ctx = nullptr; |

