diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-10-20 06:34:03 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-10-20 06:34:03 +0000 |
| commit | f2e78818e80ab48c949bbfd8c4867d2ec5832727 (patch) | |
| tree | 28411cef3f77fc2866869ee4f86bb156d88adeba /lld/ELF/InputFiles.cpp | |
| parent | 13146fce60e3fa7c37b5784b8ee7265dba2f2de7 (diff) | |
| download | bcm5719-llvm-f2e78818e80ab48c949bbfd8c4867d2ec5832727.tar.gz bcm5719-llvm-f2e78818e80ab48c949bbfd8c4867d2ec5832727.zip | |
Rename variables so that they are more in line with rest of the code.
llvm-svn: 284699
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
| -rw-r--r-- | lld/ELF/InputFiles.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index c70a850ed27..a2c1f71e6ec 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -782,8 +782,8 @@ static InputFile *createELFFile(MemoryBufferRef MB) { // so that we can link it as a regular ELF file. template <class ELFT> InputFile *BinaryFile::createELF() { // Fill the ELF file header. - ELFCreator<ELFT> ELF(ET_REL, Config->EMachine); - auto DataSec = ELF.addSection(".data"); + ELFCreator<ELFT> File(ET_REL, Config->EMachine); + auto DataSec = File.addSection(".data"); DataSec.Header->sh_flags = SHF_ALLOC; DataSec.Header->sh_size = MB.getBufferSize(); DataSec.Header->sh_type = SHT_PROGBITS; @@ -796,26 +796,26 @@ template <class ELFT> InputFile *BinaryFile::createELF() { // Add _start, _end and _size symbols. std::string StartSym = "_binary_" + Filepath + "_start"; - auto SSym = ELF.addSymbol(StartSym); + auto SSym = File.addSymbol(StartSym); SSym.Sym->setBindingAndType(STB_GLOBAL, STT_OBJECT); SSym.Sym->st_shndx = DataSec.Index; std::string EndSym = "_binary_" + Filepath + "_end"; - auto ESym = ELF.addSymbol(EndSym); + auto ESym = File.addSymbol(EndSym); ESym.Sym->setBindingAndType(STB_GLOBAL, STT_OBJECT); ESym.Sym->st_shndx = DataSec.Index; ESym.Sym->st_value = MB.getBufferSize(); std::string SizeSym = "_binary_" + Filepath + "_size"; - auto SZSym = ELF.addSymbol(SizeSym); + auto SZSym = File.addSymbol(SizeSym); SZSym.Sym->setBindingAndType(STB_GLOBAL, STT_OBJECT); SZSym.Sym->st_shndx = SHN_ABS; SZSym.Sym->st_value = MB.getBufferSize(); // Fix the ELF file layout and write it down to ELFData uint8_t vector. - size_t Size = ELF.layout(); + size_t Size = File.layout(); ELFData.resize(Size); - ELF.write(ELFData.data()); + File.writeTo(ELFData.data()); // Fill .data section with actual data. std::copy(MB.getBufferStart(), MB.getBufferEnd(), |

