Lines Matching refs:header_
191 ssize_t rc = TEMP_FAILURE_RETRY(pread64(fd_, &header_, sizeof(header_), file_offset_));
197 if (rc != sizeof(header_)) {
215 if (memcmp(header_.e_ident, ELFMAG, SELFMAG) != 0) {
222 int elf_class = header_.e_ident[EI_CLASS];
243 if (header_.e_ident[EI_DATA] != ELFDATA2LSB) {
244 DL_ERR("\"%s\" not little-endian: %d", name_.c_str(), header_.e_ident[EI_DATA]);
248 if (header_.e_type != ET_DYN) {
249 DL_ERR("\"%s\" has unexpected e_type: %d", name_.c_str(), header_.e_type);
253 if (header_.e_version != EV_CURRENT) {
254 DL_ERR("\"%s\" has unexpected e_version: %d", name_.c_str(), header_.e_version);
258 if (header_.e_machine != GetTargetElfMachine()) {
259 DL_ERR("\"%s\" has unexpected e_machine: %d (%s)", name_.c_str(), header_.e_machine,
260 EM_to_string(header_.e_machine));
264 if (header_.e_shentsize != sizeof(ElfW(Shdr))) {
268 name_.c_str(), header_.e_shentsize, sizeof(ElfW(Shdr)));
272 name_.c_str(), header_.e_shentsize, sizeof(ElfW(Shdr)));
276 if (header_.e_shstrndx == 0) {
309 phdr_num_ = header_.e_phnum;
320 if (!CheckFileRange(header_.e_phoff, size, alignof(ElfW(Phdr)))) {
323 static_cast<size_t>(header_.e_phoff),
328 if (!phdr_fragment_.Map(fd_, file_offset_, header_.e_phoff, size)) {
338 shdr_num_ = header_.e_shnum;
346 if (!CheckFileRange(header_.e_shoff, size, alignof(const ElfW(Shdr)))) {
349 static_cast<size_t>(header_.e_shoff),
354 if (!shdr_fragment_.Map(fd_, file_offset_, header_.e_shoff, size)) {