Lines Matching full:elfcpp
92 if (object->section_type(i) == elfcpp::SHT_SYMTAB_SHNDX
120 * elfcpp::Elf_sizes<size>::shdr_size));
121 typename elfcpp::Shdr<size, big_endian> shdr(p);
130 unsigned int shndx = elfcpp::Swap<32, big_endian>::readval(contents + i);
146 return elfcpp::SHN_UNDEF;
149 if (shndx < elfcpp::SHN_LORESERVE || shndx >= object->shnum())
153 return elfcpp::SHN_UNDEF;
161 // elfcpp::Elf_file interface, and also called by the Object code
189 Object::read_section_data(elfcpp::Elf_file<size, big_endian, Object>* elf_file,
192 const int shdr_size = elfcpp::Elf_sizes<size>::shdr_size;
203 typename elfcpp::Shdr<size, big_endian> shdrnames(pshdrnames);
205 if (shdrnames.get_sh_type() != elfcpp::SHT_STRTAB)
417 const elfcpp::Ehdr<size, big_endian>& ehdr)
480 if (shdr.get_sh_type() == elfcpp::SHT_SYMTAB)
498 if (shdr.get_sh_type() == elfcpp::SHT_SYMTAB_SHNDX)
526 const elfcpp::Shdr<size, big_endian>* shdr) const
528 elfcpp::Elf_Word sh_type = shdr->get_sh_type();
529 return ((sh_type == elfcpp::SHT_PROGBITS
530 || sh_type == elfcpp::SHT_X86_64_UNWIND)
531 && (shdr->get_sh_flags() & elfcpp::SHF_ALLOC) != 0);
545 const int shdr_size = elfcpp::Elf_sizes<size>::shdr_size;
555 typename elfcpp::Shdr<size, big_endian> shdr(hdr);
582 typename elfcpp::Shdr<size, big_endian> shdr(hdr);
681 const unsigned int shdr_size = elfcpp::Elf_sizes<size>::shdr_size;
686 typename elfcpp::Shdr<size, big_endian> shdr(p);
687 if (shdr.get_sh_type() == elfcpp::SHT_PROGBITS
688 && (shdr.get_sh_flags() & elfcpp::SHF_ALLOC) == 0)
799 gold_assert(symtabshdr.get_sh_type() == elfcpp::SHT_SYMTAB);
839 if (strtabshdr.get_sh_type() != elfcpp::SHT_STRTAB)
880 elfcpp::Sym<size, big_endian> elfsym(symbols + sym * This::sym_size);
908 const elfcpp::Elf_Word* pword =
909 reinterpret_cast<const elfcpp::Elf_Word*>(pcon);
914 elfcpp::Elf_Word flags = elfcpp::Swap<32, big_endian>::readval(pword);
938 elfcpp::Sym<size, big_endian> sym(psym);
960 if (signature[0] == '\0' && sym.get_st_type() == elfcpp::STT_SECTION)
983 if ((flags & elfcpp::GRP_COMDAT) == 0)
1003 size_t count = shdr.get_sh_size() / sizeof(elfcpp::Elf_Word);
1012 elfcpp::Elf_Word shndx =
1013 this->adjust_shndx(elfcpp::Swap<32, big_endian>::readval(pword + i));
1119 const elfcpp::Shdr<size, big_endian>& shdr)
1121 typename elfcpp::Elf_types<size>::Elf_WXword sh_size = shdr.get_sh_size();
1380 std::vector<unsigned int> reloc_type(shnum, elfcpp::SHT_NULL);
1388 if (should_defer_layout && (shdr.get_sh_flags() & elfcpp::SHF_ALLOC))
1392 if (sh_type == elfcpp::SHT_REL || sh_type == elfcpp::SHT_RELA)
1514 if (shdr.get_sh_type() == elfcpp::SHT_GROUP)
1522 else if ((shdr.get_sh_flags() & elfcpp::SHF_GROUP) == 0
1556 || shdr.get_sh_type() == elfcpp::SHT_INIT_ARRAY
1557 || shdr.get_sh_type() == elfcpp::SHT_FINI_ARRAY)
1578 && (shdr.get_sh_type() == elfcpp::SHT_REL
1579 || shdr.get_sh_type() == elfcpp::SHT_RELA))
1585 if (relocatable && shdr.get_sh_type() == elfcpp::SHT_GROUP)
1627 if (((shdr.get_sh_flags() & elfcpp::SHF_ALLOC) != 0)
1648 if (((shdr.get_sh_flags() & elfcpp::SHF_ALLOC) != 0)
1675 && (shdr.get_sh_flags() & elfcpp::SHF_ALLOC))
1714 && !(shdr.get_sh_flags() & elfcpp::SHF_ALLOC))
1784 Deferred_layout(i, name, pshdr, 0, elfcpp::SHT_NULL));
1991 const int sym_size = elfcpp::Elf_sizes<size>::sym_size;
1999 elfcpp::Sym<size, big_endian> sym(p);
2001 if (st_shndx == elfcpp::SHN_UNDEF)
2037 const int sym_size = elfcpp::Elf_sizes<size>::sym_size;
2044 elfcpp::Sym<size, big_endian> sym(p);
2045 if (sym.get_st_shndx() != elfcpp::SHN_UNDEF)
2109 gold_assert(symtabshdr.get_sh_type() == elfcpp::SHT_SYMTAB);
2141 elfcpp::Sym<size, big_endian> sym(psyms);
2150 if (sym.get_st_type() == elfcpp::STT_SECTION)
2152 else if (sym.get_st_type() == elfcpp::STT_TLS)
2154 else if (sym.get_st_type() == elfcpp::STT_GNU_IFUNC)
2170 if (sym.get_st_type() == elfcpp::STT_SECTION
2216 && sym.get_st_type() != elfcpp::STT_FILE
2266 if (shndx == elfcpp::SHN_ABS || Symbol::is_common_shndx(shndx))
2377 && (os->flags() & elfcpp::SHF_TLS)))
2564 gold_assert(symtabshdr.get_sh_type() == elfcpp::SHT_SYMTAB);
2606 elfcpp::Sym<size, big_endian> isym(psyms);
2619 if (st_shndx >= elfcpp::SHN_LORESERVE)
2625 st_shndx = elfcpp::SHN_XINDEX;
2632 elfcpp::Sym_write<size, big_endian> osym(ov);
2650 elfcpp::Sym_write<size, big_endian> osym(dyn_ov);
2713 elfcpp::Sym<size, big_endian> sym(p);
2715 if (sym.get_st_type() == elfcpp::STT_FILE)
3042 if (info.enclosing_symbol_type == elfcpp::STT_FUNC)
3069 off_t offset, const elfcpp::Ehdr<size, big_endian>& ehdr,
3074 ehdr.get_e_ident()[elfcpp::EI_OSABI],
3075 ehdr.get_e_ident()[elfcpp::EI_ABIVERSION]);
3107 int want = elfcpp::Elf_recognizer::max_header_size;
3116 return elfcpp::Elf_recognizer::is_elf_file(p, want);
3132 if (!elfcpp::Elf_recognizer::is_valid_header(p, bytes, &size,
3144 elfcpp
3160 elfcpp::Ehdr<32, false> ehdr(p);
3179 elfcpp::Ehdr<64, true> ehdr(p);
3195 elfcpp::Ehdr<64, false> ehdr(p);
3218 Object::read_section_data<32, false>(elfcpp::Elf_file<32, false, Object>*,
3229 Object::read_section_data<32, true>(elfcpp::Elf_file<32, true, Object>*,
3240 Object::read_section_data<64, false>(elfcpp::Elf_file<64, false, Object>*,
3251 Object::read_section_data<64, true>(elfcpp::Elf_file<64, true, Object>*,