Lines Matching refs:ELF
136 return sizeof(llvm::ELF::Elf32_Ehdr) + in sectionStartOffset()
137 elfSegmentTable().size() * sizeof(llvm::ELF::Elf32_Phdr); in sectionStartOffset()
139 return sizeof(llvm::ELF::Elf64_Ehdr) + in sectionStartOffset()
140 elfSegmentTable().size() * sizeof(llvm::ELF::Elf64_Phdr); in sectionStartOffset()
564 elfSegmentTable().find(llvm::ELF::PT_LOAD, 0x0, 0x0); in finalizeStandardSymbols()
577 llvm::ELF::PT_LOAD, llvm::ELF::PF_X, llvm::ELF::PF_W); in finalizeStandardSymbols()
605 elfSegmentTable().find(llvm::ELF::PT_LOAD, llvm::ELF::PF_W, 0x0); in finalizeStandardSymbols()
654 elfSegmentTable().find(llvm::ELF::PT_TLS, llvm::ELF::PF_R, 0x0); in finalizeTLSSymbol()
800 sizeof(llvm::ELF::Elf32_Word); in sizeNamePools()
825 sizeof(llvm::ELF::Elf32_Sym)); in sizeNamePools()
828 sizeof(llvm::ELF::Elf64_Sym)); in sizeNamePools()
848 file_format->getSymTab().setSize(symtab * sizeof(llvm::ELF::Elf32_Sym)); in sizeNamePools()
850 file_format->getSymTab().setSize(symtab * sizeof(llvm::ELF::Elf64_Sym)); in sizeNamePools()
869 void GNULDBackend::emitSymbol32(llvm::ELF::Elf32_Sym& pSym, in emitSymbol32()
890 void GNULDBackend::emitSymbol64(llvm::ELF::Elf64_Sym& pSym, in emitSymbol64()
929 llvm::ELF::Elf32_Sym* symtab32 = NULL; in emitRegNamePools()
930 llvm::ELF::Elf64_Sym* symtab64 = NULL; in emitRegNamePools()
932 symtab32 = (llvm::ELF::Elf32_Sym*)symtab_region.begin(); in emitRegNamePools()
934 symtab64 = (llvm::ELF::Elf64_Sym*)symtab_region.begin(); in emitRegNamePools()
1002 llvm::ELF::Elf32_Sym* symtab32 = NULL; in emitDynNamePools()
1003 llvm::ELF::Elf64_Sym* symtab64 = NULL; in emitDynNamePools()
1005 symtab32 = (llvm::ELF::Elf32_Sym*)symtab_region.begin(); in emitDynNamePools()
1007 symtab64 = (llvm::ELF::Elf64_Sym*)symtab_region.begin(); in emitDynNamePools()
1059 (*dt_need)->setValue(llvm::ELF::DT_NEEDED, strtabsize); in emitDynNamePools()
1067 (*dt_need)->setValue(llvm::ELF::DT_RPATH, strtabsize); in emitDynNamePools()
1069 (*dt_need)->setValue(llvm::ELF::DT_RUNPATH, strtabsize); in emitDynNamePools()
1123 hash::StringHash<hash::ELF> hash_func; in emitELFHashTab()
1316 if (0 == (pSectHdr.flag() & llvm::ELF::SHF_ALLOC)) in getSectionOrder()
1319 bool is_write = (pSectHdr.flag() & llvm::ELF::SHF_WRITE) != 0; in getSectionOrder()
1320 bool is_exec = (pSectHdr.flag() & llvm::ELF::SHF_EXECINSTR) != 0; in getSectionOrder()
1353 if ((pSectHdr.flag() & llvm::ELF::SHF_TLS) != 0x0) { in getSectionOrder()
1360 if ((pSectHdr.flag() & llvm::ELF::SHF_TLS) != 0x0) in getSectionOrder()
1417 bind = llvm::ELF::STB_LOCAL; in getSymbolInfo()
1419 bind = llvm::ELF::STB_GLOBAL; in getSymbolInfo()
1421 bind = llvm::ELF::STB_WEAK; in getSymbolInfo()
1424 bind = llvm::ELF::STB_GLOBAL; in getSymbolInfo()
1428 (pSymbol.visibility() == llvm::ELF::STV_INTERNAL || in getSymbolInfo()
1429 pSymbol.visibility() == llvm::ELF::STV_HIDDEN)) in getSymbolInfo()
1430 bind = llvm::ELF::STB_LOCAL; in getSymbolInfo()
1451 return llvm::ELF::SHN_ABS; in getSymbolShndx()
1453 return llvm::ELF::SHN_COMMON; in getSymbolShndx()
1455 return llvm::ELF::SHN_UNDEF; in getSymbolShndx()
1458 return llvm::ELF::SHN_ABS; in getSymbolShndx()
1601 flags |= (pFrom.flag() & (llvm::ELF::SHF_WRITE | llvm::ELF::SHF_ALLOC | in updateSectionFlags()
1602 llvm::ELF::SHF_EXECINSTR)); in updateSectionFlags()
1605 if (0 == (pFrom.flag() & llvm::ELF::SHF_MERGE)) in updateSectionFlags()
1606 flags &= ~llvm::ELF::SHF_MERGE; in updateSectionFlags()
1609 if (0 == (pFrom.flag() & llvm::ELF::SHF_STRINGS)) in updateSectionFlags()
1610 flags &= ~llvm::ELF::SHF_STRINGS; in updateSectionFlags()
1617 bool GNULDBackend::readRelocation(const llvm::ELF::Elf32_Rel& pRel, in readRelocation()
1636 bool GNULDBackend::readRelocation(const llvm::ELF::Elf32_Rela& pRel, in readRelocation()
1658 bool GNULDBackend::readRelocation(const llvm::ELF::Elf64_Rel& pRel, in readRelocation()
1677 bool GNULDBackend::readRelocation(const llvm::ELF::Elf64_Rela& pRel, in readRelocation()
1699 void GNULDBackend::emitRelocation(llvm::ELF::Elf32_Rel& pRel, in emitRelocation()
1708 void GNULDBackend::emitRelocation(llvm::ELF::Elf32_Rela& pRel, in emitRelocation()
1719 void GNULDBackend::emitRelocation(llvm::ELF::Elf64_Rel& pRel, in emitRelocation()
1728 void GNULDBackend::emitRelocation(llvm::ELF::Elf64_Rela& pRel, in emitRelocation()
1745 elfSegmentTable().produce(llvm::ELF::PT_PHDR); in createProgramHdrs()
1747 ELFSegment* interp_seg = elfSegmentTable().produce(llvm::ELF::PT_INTERP); in createProgramHdrs()
1762 if (0 == (sect->flag() & llvm::ELF::SHF_ALLOC) && in createProgramHdrs()
1777 (prev_flag & llvm::ELF::PF_W) ^ (cur_flag & llvm::ELF::PF_W)) { in createProgramHdrs()
1799 load_seg = elfSegmentTable().produce(llvm::ELF::PT_LOAD, cur_flag); in createProgramHdrs()
1815 llvm::ELF::PT_DYNAMIC, llvm::ELF::PF_R | llvm::ELF::PF_W); in createProgramHdrs()
1821 ELFSegment* relro_seg = elfSegmentTable().produce(llvm::ELF::PT_GNU_RELRO); in createProgramHdrs()
1826 if (llvm::ELF::PT_LOAD != (*seg)->type()) in createProgramHdrs()
1843 ELFSegment* eh_seg = elfSegmentTable().produce(llvm::ELF::PT_GNU_EH_FRAME); in createProgramHdrs()
1849 ELFSegment* tls_seg = elfSegmentTable().produce(llvm::ELF::PT_TLS); in createProgramHdrs()
1859 elfSegmentTable().produce(llvm::ELF::PT_GNU_STACK, in createProgramHdrs()
1860 llvm::ELF::PF_R | llvm::ELF::PF_W | flag); in createProgramHdrs()
1870 if ((*sect)->type() != llvm::ELF::SHT_NOTE || in createProgramHdrs()
1871 ((*sect)->flag() & llvm::ELF::SHF_ALLOC) == 0) in createProgramHdrs()
1878 (cur_flag & llvm::ELF::PF_W) != (prev_flag & llvm::ELF::PF_W)) in createProgramHdrs()
1879 note_seg = elfSegmentTable().produce(llvm::ELF::PT_NOTE, cur_flag); in createProgramHdrs()
1901 if ((*seg)->type() == llvm::ELF::PT_LOAD && in setupProgramHdrs()
1906 if ((*seg)->type() == llvm::ELF::PT_LOAD && in setupProgramHdrs()
1934 elfSegmentTable().find(llvm::ELF::PT_LOAD, null_sect); in setupProgramHdrs()
1940 if ((*seg)->type() == llvm::ELF::PT_LOAD) in setupProgramHdrs()
1991 elfSegmentTable().find(llvm::ELF::PT_PHDR, llvm::ELF::PF_R, 0x0); in setupProgramHdrs()
1995 elfSegmentTable().find(llvm::ELF::PT_LOAD, null_sect); in setupProgramHdrs()
1999 offset = sizeof(llvm::ELF::Elf32_Ehdr); in setupProgramHdrs()
2000 phdr_size = sizeof(llvm::ELF::Elf32_Phdr); in setupProgramHdrs()
2002 offset = sizeof(llvm::ELF::Elf64_Ehdr); in setupProgramHdrs()
2003 phdr_size = sizeof(llvm::ELF::Elf64_Phdr); in setupProgramHdrs()
2021 if ((pSectionFlag & llvm::ELF::SHF_ALLOC) != 0x0) in getSegmentFlag()
2022 flag |= llvm::ELF::PF_R; in getSegmentFlag()
2023 if ((pSectionFlag & llvm::ELF::SHF_WRITE) != 0x0) in getSegmentFlag()
2024 flag |= llvm::ELF::PF_W; in getSegmentFlag()
2025 if ((pSectionFlag & llvm::ELF::SHF_EXECINSTR) != 0x0) in getSegmentFlag()
2026 flag |= llvm::ELF::PF_X; in getSegmentFlag()
2036 flag = llvm::ELF::SHF_EXECINSTR; in setupGNUStackInfo()
2050 if (0 != (llvm::ELF::SHF_EXECINSTR & sect->flag())) { in setupGNUStackInfo()
2051 flag = llvm::ELF::SHF_EXECINSTR; in setupGNUStackInfo()
2063 if (llvm::ELF::SHF_EXECINSTR != flag && object_count != stack_note_count) in setupGNUStackInfo()
2065 flag = llvm::ELF::SHF_EXECINSTR; in setupGNUStackInfo()
2134 seg = elfSegmentTable().find(llvm::ELF::PT_LOAD, cur); in setOutputSectionAddress()
2158 } else if ((cur->flag() & llvm::ELF::SHF_ALLOC) != 0) { in setOutputSectionAddress()
2239 if ((cur->flag() & llvm::ELF::SHF_ALLOC) != 0 && in setOutputSectionAddress()
2369 matched = ((*it)->flag() & llvm::ELF::SHF_WRITE) == 0; in placeOutputSections()
2372 matched = ((*it)->flag() & llvm::ELF::SHF_WRITE) != 0; in placeOutputSections()
2555 if (llvm::ELF::SHT_REL == output_sect->type()) in preLayout()
2557 else if (llvm::ELF::SHT_RELA == output_sect->type()) in preLayout()
2818 if (0 == (flag & llvm::ELF::SHF_WRITE)) in symbolNeedsCopyReloc()
2858 if (0 == (flag & llvm::ELF::SHF_WRITE) && (flag & llvm::ELF::SHF_ALLOC)) in checkAndSetHasTextRel()