llvm-project/lld/ELF
Fangrui Song 3deff86657 [ELF] Respect NonAlloc when copying flags from the previous sections
Summary:
If the output section contains only symbol assignments, we copy flags
from the previous sections. Don't set SHF_ALLOC if NonAlloc is true.

We also have to change the type from SHT_NOBITS to SHT_PROGBITS.
In ld.bfd, bfd_elf_get_default_section_type maps non-alloctable sections to SHT_PROGBITS.
Non-alloctable SHT_NOBITS sections do not make sense.

Fixes PR38626

Differential Revision: https://reviews.llvm.org/D59986

llvm-svn: 358650
2019-04-18 09:22:05 +00:00
..
Arch [RISCV] Fix range check for HI20/LO12/RVC_LUI relocations 2019-04-09 11:39:23 +00:00
AArch64ErrataFix.cpp [ELF][MachO][wasm] Simplify range-style std::find{,_if} with STLExtras.h utilities. NFC 2019-03-29 16:21:16 +00:00
AArch64ErrataFix.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt Fail early if an output file is not writable 2019-03-11 16:30:55 +00:00
CallGraphSort.cpp Replace `typedef A B` with `using B = A`. NFC. 2019-04-01 00:11:24 +00:00
CallGraphSort.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Config.h [ELF] Dump symbols ordered by profiled guided section layout to file. 2019-03-27 23:52:22 +00:00
DWARF.cpp [ELF] Use llvm::bsearch. NFC 2019-04-17 08:00:46 +00:00
DWARF.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Driver.cpp Discard debuginfo for object files empty after GC 2019-04-10 10:37:10 +00:00
Driver.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DriverUtils.cpp Remove a function from header and move the implementation to a .cpp file. NFC. 2019-02-22 23:59:43 +00:00
EhFrame.cpp [ELF][MachO][wasm] Simplify range-style std::find{,_if} with STLExtras.h utilities. NFC 2019-03-29 16:21:16 +00:00
EhFrame.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ICF.cpp COFF, ELF: ICF: Perform 2 rounds of relocation hash propagation. 2019-01-22 23:54:49 +00:00
ICF.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InputFiles.cpp Rename a variable and add a comment. 2019-04-10 06:32:05 +00:00
InputFiles.h [ELF] Fix typo: .symtab_shndxr -> .symtab_shndx 2019-04-12 02:20:52 +00:00
InputSection.cpp [ELF] Use llvm::bsearch. NFC 2019-04-17 08:00:46 +00:00
InputSection.h [ELF] Place SectionPiece::{Live,Hash} bit fields together 2019-04-18 07:46:09 +00:00
LTO.cpp Reland "[Remarks] Add -foptimization-record-passes to filter remark emission" 2019-03-12 21:22:27 +00:00
LTO.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LinkerScript.cpp [ELF] Respect NonAlloc when copying flags from the previous sections 2019-04-18 09:22:05 +00:00
LinkerScript.h Replace `typedef A B` with `using B = A`. NFC. 2019-04-01 00:11:24 +00:00
MapFile.cpp Replace `typedef A B` with `using B = A`. NFC. 2019-04-01 00:11:24 +00:00
MapFile.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MarkLive.cpp Discard debuginfo for object files empty after GC 2019-04-10 10:37:10 +00:00
MarkLive.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Options.td [ELF] Dump symbols ordered by profiled guided section layout to file. 2019-03-27 23:52:22 +00:00
OutputSections.cpp Replace `typedef A B` with `using B = A`. NFC. 2019-04-01 00:11:24 +00:00
OutputSections.h [ELF] Delete unused forward declarations and unused DynamicReloc::getInputSec(). NFC 2019-03-15 07:16:39 +00:00
README.md Update the documents of the new LLD. 2016-03-12 06:06:40 +00:00
Relocations.cpp ELF: De-template SharedFile. NFCI. 2019-04-08 17:35:55 +00:00
Relocations.h Replace `typedef A B` with `using B = A`. NFC. 2019-04-01 00:11:24 +00:00
ScriptLexer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ScriptLexer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ScriptParser.cpp [ELF] Respect NonAlloc when copying flags from the previous sections 2019-04-18 09:22:05 +00:00
ScriptParser.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SymbolTable.cpp De-template SymbolTable::addShared. 2019-04-09 08:52:00 +00:00
SymbolTable.h De-template SymbolTable::addShared. 2019-04-09 08:52:00 +00:00
Symbols.cpp [ELF] Emit weak-undef symbols in .dynsym of a PIE binary only if linked against shared libs. 2019-03-18 15:32:57 +00:00
Symbols.h ELF: De-template SharedFile. NFCI. 2019-04-08 17:35:55 +00:00
SyntheticSections.cpp [ELF] Place SectionPiece::{Live,Hash} bit fields together 2019-04-18 07:46:09 +00:00
SyntheticSections.h [ELF] Place SectionPiece::{Live,Hash} bit fields together 2019-04-18 07:46:09 +00:00
Target.cpp De-template X86_64TargetInfo. NFC. 2019-03-28 17:31:12 +00:00
Target.h Create an instance of Target after reading all input files. NFC. 2019-03-28 17:38:53 +00:00
Thunks.cpp [mips] Remove redundant setup of less-significant bit. NFC 2019-03-13 16:00:35 +00:00
Thunks.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Writer.cpp [LLD][ELF] - Fix the different behavior of the linker script symbols on different platforms. 2019-04-18 08:15:54 +00:00
Writer.h [ELF] Delete unused forward declarations and unused DynamicReloc::getInputSec(). NFC 2019-03-15 07:16:39 +00:00

README.md

See docs/NewLLD.rst