Lines Matching refs:ELF
119 return sizeof(llvm::ELF::Elf32_Ehdr) + in sectionStartOffset()
120 numOfSegments() * sizeof(llvm::ELF::Elf32_Phdr); in sectionStartOffset()
122 return sizeof(llvm::ELF::Elf64_Ehdr) + in sectionStartOffset()
123 numOfSegments() * sizeof(llvm::ELF::Elf64_Phdr); in sectionStartOffset()
575 ELFSegment* exec_start = m_ELFSegmentTable.find(llvm::ELF::PT_LOAD, 0x0, 0x0); in finalizeStandardSymbols()
587 ELFSegment* etext = m_ELFSegmentTable.find(llvm::ELF::PT_LOAD, in finalizeStandardSymbols()
588 llvm::ELF::PF_X, in finalizeStandardSymbols()
589 llvm::ELF::PF_W); in finalizeStandardSymbols()
619 ELFSegment* edata = m_ELFSegmentTable.find(llvm::ELF::PT_LOAD, in finalizeStandardSymbols()
620 llvm::ELF::PF_W, in finalizeStandardSymbols()
675 ELFSegment* tls_seg = m_ELFSegmentTable.find(llvm::ELF::PT_TLS, in finalizeTLSSymbol()
676 llvm::ELF::PF_R, 0x0); in finalizeTLSSymbol()
803 sizeof(llvm::ELF::Elf32_Word); in sizeNamePools()
828 sizeof(llvm::ELF::Elf32_Sym)); in sizeNamePools()
831 sizeof(llvm::ELF::Elf64_Sym)); in sizeNamePools()
851 file_format->getSymTab().setSize(symtab*sizeof(llvm::ELF::Elf32_Sym)); in sizeNamePools()
853 file_format->getSymTab().setSize(symtab*sizeof(llvm::ELF::Elf64_Sym)); in sizeNamePools()
901 void GNULDBackend::emitSymbol32(llvm::ELF::Elf32_Sym& pSym, in emitSymbol32()
924 void GNULDBackend::emitSymbol64(llvm::ELF::Elf64_Sym& pSym, in emitSymbol64()
964 llvm::ELF::Elf32_Sym* symtab32 = NULL; in emitRegNamePools()
965 llvm::ELF::Elf64_Sym* symtab64 = NULL; in emitRegNamePools()
967 symtab32 = (llvm::ELF::Elf32_Sym*)symtab_region->start(); in emitRegNamePools()
969 symtab64 = (llvm::ELF::Elf64_Sym*)symtab_region->start(); in emitRegNamePools()
1039 llvm::ELF::Elf32_Sym* symtab32 = NULL; in emitDynNamePools()
1040 llvm::ELF::Elf64_Sym* symtab64 = NULL; in emitDynNamePools()
1042 symtab32 = (llvm::ELF::Elf32_Sym*)symtab_region->start(); in emitDynNamePools()
1044 symtab64 = (llvm::ELF::Elf64_Sym*)symtab_region->start(); in emitDynNamePools()
1096 (*dt_need)->setValue(llvm::ELF::DT_NEEDED, strtabsize); in emitDynNamePools()
1104 (*dt_need)->setValue(llvm::ELF::DT_RPATH, strtabsize); in emitDynNamePools()
1106 (*dt_need)->setValue(llvm::ELF::DT_RUNPATH, strtabsize); in emitDynNamePools()
1159 hash::StringHash<hash::ELF> hash_func; in emitELFHashTab()
1358 if (0 == (pSectHdr.flag() & llvm::ELF::SHF_ALLOC)) in getSectionOrder()
1361 bool is_write = (pSectHdr.flag() & llvm::ELF::SHF_WRITE) != 0; in getSectionOrder()
1362 bool is_exec = (pSectHdr.flag() & llvm::ELF::SHF_EXECINSTR) != 0; in getSectionOrder()
1387 if ((pSectHdr.flag() & llvm::ELF::SHF_TLS) != 0x0) { in getSectionOrder()
1394 if ((pSectHdr.flag() & llvm::ELF::SHF_TLS) != 0x0) in getSectionOrder()
1453 bind = llvm::ELF::STB_LOCAL; in getSymbolInfo()
1455 bind = llvm::ELF::STB_GLOBAL; in getSymbolInfo()
1457 bind = llvm::ELF::STB_WEAK; in getSymbolInfo()
1460 bind = llvm::ELF::STB_GLOBAL; in getSymbolInfo()
1464 (pSymbol.visibility() == llvm::ELF::STV_INTERNAL || in getSymbolInfo()
1465 pSymbol.visibility() == llvm::ELF::STV_HIDDEN)) in getSymbolInfo()
1466 bind = llvm::ELF::STB_LOCAL; in getSymbolInfo()
1490 return llvm::ELF::SHN_ABS; in getSymbolShndx()
1492 return llvm::ELF::SHN_COMMON; in getSymbolShndx()
1494 return llvm::ELF::SHN_UNDEF; in getSymbolShndx()
1501 return llvm::ELF::SHN_ABS; in getSymbolShndx()
1506 return llvm::ELF::SHN_ABS; in getSymbolShndx()
1657 (llvm::ELF::SHF_WRITE | in updateSectionFlags()
1658 llvm::ELF::SHF_ALLOC | in updateSectionFlags()
1659 llvm::ELF::SHF_EXECINSTR)); in updateSectionFlags()
1662 if (0 == (pFrom.flag() & llvm::ELF::SHF_MERGE)) in updateSectionFlags()
1663 flags &= ~llvm::ELF::SHF_MERGE; in updateSectionFlags()
1666 if (0 == (pFrom.flag() & llvm::ELF::SHF_STRINGS)) in updateSectionFlags()
1667 flags &= ~llvm::ELF::SHF_STRINGS; in updateSectionFlags()
1679 m_ELFSegmentTable.produce(llvm::ELF::PT_PHDR); in createProgramHdrs()
1683 ELFSegment* interp_seg = m_ELFSegmentTable.produce(llvm::ELF::PT_INTERP); in createProgramHdrs()
1695 if (0 == ((*sect)->flag() & llvm::ELF::SHF_ALLOC) && in createProgramHdrs()
1706 (prev_flag & llvm::ELF::PF_W) ^ (cur_flag & llvm::ELF::PF_W)) { in createProgramHdrs()
1728 load_seg = m_ELFSegmentTable.produce(llvm::ELF::PT_LOAD, cur_flag); in createProgramHdrs()
1743 ELFSegment* dyn_seg = m_ELFSegmentTable.produce(llvm::ELF::PT_DYNAMIC, in createProgramHdrs()
1744 llvm::ELF::PF_R | in createProgramHdrs()
1745 llvm::ELF::PF_W); in createProgramHdrs()
1751 ELFSegment* relro_seg = m_ELFSegmentTable.produce(llvm::ELF::PT_GNU_RELRO); in createProgramHdrs()
1754 if (llvm::ELF::PT_LOAD != (*seg).type()) in createProgramHdrs()
1771 ELFSegment* eh_seg = m_ELFSegmentTable.produce(llvm::ELF::PT_GNU_EH_FRAME); in createProgramHdrs()
1777 ELFSegment* tls_seg = m_ELFSegmentTable.produce(llvm::ELF::PT_TLS); in createProgramHdrs()
1786 m_ELFSegmentTable.produce(llvm::ELF::PT_GNU_STACK, in createProgramHdrs()
1787 llvm::ELF::PF_R | in createProgramHdrs()
1788 llvm::ELF::PF_W | in createProgramHdrs()
1797 ((*sect)->flag() & llvm::ELF::SHF_ALLOC) == 0) in createProgramHdrs()
1804 (cur_flag & llvm::ELF::PF_W) != (prev_flag & llvm::ELF::PF_W)) in createProgramHdrs()
1805 note_seg = m_ELFSegmentTable.produce(llvm::ELF::PT_NOTE, cur_flag); in createProgramHdrs()
1825 if (llvm::ELF::PT_PHDR == segment.type()) { in setupProgramHdrs()
1828 offset = sizeof(llvm::ELF::Elf32_Ehdr); in setupProgramHdrs()
1829 phdr_size = sizeof(llvm::ELF::Elf32_Phdr); in setupProgramHdrs()
1832 offset = sizeof(llvm::ELF::Elf64_Ehdr); in setupProgramHdrs()
1833 phdr_size = sizeof(llvm::ELF::Elf64_Phdr); in setupProgramHdrs()
1849 if (llvm::ELF::PT_LOAD == segment.type() && in setupProgramHdrs()
1875 flag = llvm::ELF::SHF_EXECINSTR; in setupGNUStackInfo()
1890 if (0 != (llvm::ELF::SHF_EXECINSTR & sect->flag())) { in setupGNUStackInfo()
1891 flag = llvm::ELF::SHF_EXECINSTR; in setupGNUStackInfo()
1903 if (llvm::ELF::SHF_EXECINSTR != flag && object_count != stack_note_count) in setupGNUStackInfo()
1905 flag = llvm::ELF::SHF_EXECINSTR; in setupGNUStackInfo()
2010 if (llvm::ELF::PT_LOAD != (*seg).type()) in setOutputSectionAddress()
2232 if (llvm::ELF::SHT_REL == output_sect->type()) in preLayout()
2234 else if (llvm::ELF::SHT_RELA == output_sect->type()) in preLayout()
2526 if (0 == (flag & llvm::ELF::SHF_WRITE)) in symbolNeedsCopyReloc()
2564 if (0 == (flag & llvm::ELF::SHF_WRITE) && (flag & llvm::ELF::SHF_ALLOC)) in checkAndSetHasTextRel()