• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/llvm-project/llvm/tools/llvm-objcopy/ELF/

Lines Matching defs:Ehdr

1304   const auto &Ehdr = *HeadersFile.getHeader();
1312 PrHdr.OriginalOffset = PrHdr.Offset = PrHdr.VAddr = EhdrOffset + Ehdr.e_phoff;
1314 PrHdr.FileSize = PrHdr.MemSize = Ehdr.e_phentsize * Ehdr.e_phnum;
1624 auto &Ehdr = *HeadersFile.getHeader();
1625 Obj.OSABI = Ehdr.e_ident[EI_OSABI];
1626 Obj.ABIVersion = Ehdr.e_ident[EI_ABIVERSION];
1627 Obj.Type = Ehdr.e_type;
1628 Obj.Machine = Ehdr.e_machine;
1629 Obj.Version = Ehdr.e_version;
1630 Obj.Entry = Ehdr.e_entry;
1631 Obj.Flags = Ehdr.e_flags;
1699 Elf_Ehdr &Ehdr = *reinterpret_cast<Elf_Ehdr *>(Buf.getBufferStart());
1700 std::fill(Ehdr.e_ident, Ehdr.e_ident + 16, 0);
1701 Ehdr.e_ident[EI_MAG0] = 0x7f;
1702 Ehdr.e_ident[EI_MAG1] = 'E';
1703 Ehdr.e_ident[EI_MAG2] = 'L';
1704 Ehdr.e_ident[EI_MAG3] = 'F';
1705 Ehdr.e_ident[EI_CLASS] = ELFT::Is64Bits ? ELFCLASS64 : ELFCLASS32;
1706 Ehdr.e_ident[EI_DATA] =
1708 Ehdr.e_ident[EI_VERSION] = EV_CURRENT;
1709 Ehdr.e_ident[EI_OSABI] = Obj.OSABI;
1710 Ehdr.e_ident[EI_ABIVERSION] = Obj.ABIVersion;
1712 Ehdr.e_type = Obj.Type;
1713 Ehdr.e_machine = Obj.Machine;
1714 Ehdr.e_version = Obj.Version;
1715 Ehdr.e_entry = Obj.Entry;
1718 Ehdr.e_phnum = llvm::size(Obj.segments());
1719 Ehdr.e_phoff = (Ehdr.e_phnum != 0) ? Obj.ProgramHdrSegment.Offset : 0;
1720 Ehdr.e_phentsize = (Ehdr.e_phnum != 0) ? sizeof(Elf_Phdr) : 0;
1721 Ehdr.e_flags = Obj.Flags;
1722 Ehdr.e_ehsize = sizeof(Elf_Ehdr);
1724 Ehdr.e_shentsize = sizeof(Elf_Shdr);
1725 Ehdr.e_shoff = Obj.SHOff;
1734 Ehdr.e_shnum = 0;
1736 Ehdr.e_shnum = Shnum;
1744 Ehdr.e_shstrndx = SHN_XINDEX;
1746 Ehdr.e_shstrndx = Obj.SectionNames->Index;
1748 Ehdr.e_shentsize = 0;
1749 Ehdr.e_shoff = 0;
1750 Ehdr.e_shnum = 0;
1751 Ehdr.e_shstrndx = 0;