Home | History | Annotate | Download | only in perf

Lines Matching defs:ehdr

19215     Elf32_Ehdr ehdr;
19407 memset(&ehdr, 0, sizeof(ehdr));
19676 ehdr.e_phentsize = sizeof(Elf32_Phdr);
19677 ehdr.e_phnum = phnum;
19678 ehdr.e_phoff = sizeof(Elf32_Ehdr);
19726 ehdr.e_entry = (unsigned long)tcc_get_symbol_err(s1, "_start");
19728 ehdr.e_entry = text_section->sh_addr; /* XXX: is it correct ? */
19755 ehdr.e_ident[0] = ELFMAG0;
19756 ehdr.e_ident[1] = ELFMAG1;
19757 ehdr.e_ident[2] = ELFMAG2;
19758 ehdr.e_ident[3] = ELFMAG3;
19759 ehdr.e_ident[4] = ELFCLASS32;
19760 ehdr.e_ident[5] = ELFDATA2LSB;
19761 ehdr.e_ident[6] = EV_CURRENT;
19763 ehdr.e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
19766 ehdr.e_ident[EI_OSABI] = ELFOSABI_ARM;
19771 ehdr.e_type = ET_EXEC;
19774 ehdr.e_type = ET_DYN;
19777 ehdr.e_type = ET_REL;
19780 ehdr.e_machine = EM_TCC_TARGET;
19781 ehdr.e_version = EV_CURRENT;
19782 ehdr.e_shoff = file_offset;
19783 ehdr.e_ehsize = sizeof(Elf32_Ehdr);
19784 ehdr.e_shentsize = sizeof(Elf32_Shdr);
19785 ehdr.e_shnum = shnum;
19786 ehdr.e_shstrndx = shnum - 1;
19788 dummy_size_t = fwrite(&ehdr, 1, sizeof(Elf32_Ehdr), f);
19806 while (offset < ehdr.e_shoff) {
19866 Elf32_Ehdr ehdr;
19877 if (read(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr))
19879 if (ehdr.e_ident[0] != ELFMAG0 ||
19880 ehdr.e_ident[1] != ELFMAG1 ||
19881 ehdr.e_ident[2] != ELFMAG2 ||
19882 ehdr.e_ident[3] != ELFMAG3)
19885 if (ehdr.e_type != ET_REL)
19888 if (ehdr.e_ident[5] != ELFDATA2LSB ||
19889 ehdr.e_machine != EM_TCC_TARGET) {
19895 shdr = load_data(fd, file_offset + ehdr.e_shoff,
19896 sizeof(Elf32_Shdr) * ehdr.e_shnum);
19897 sm_table = tcc_mallocz(sizeof(SectionMergeInfo) * ehdr.e_shnum);
19900 sh = &shdr[ehdr.e_shstrndx];
19908 for(i = 1; i < ehdr.e_shnum; i++) {
19929 for(i = 1; i < ehdr.e_shnum; i++) {
19931 if (i == ehdr.e_shstrndx)
19997 for(i = 1; i < ehdr.e_shnum; i++) {
20048 for(i = 1; i < ehdr.e_shnum; i++) {
20215 Elf32_Ehdr ehdr;
20224 dummy_size_t = read(fd, &ehdr, sizeof(ehdr));
20227 if (ehdr.e_ident[5] != ELFDATA2LSB ||
20228 ehdr.e_machine != EM_TCC_TARGET) {
20234 shdr = load_data(fd, ehdr.e_shoff, sizeof(Elf32_Shdr) * ehdr.e_shnum);
20242 for(i = 0, sh = shdr; i < ehdr.e_shnum; i++, sh++) {
20942 Elf32_Ehdr ehdr;
20988 ret = read(fd, &ehdr, sizeof(ehdr));
20993 } else if (ret != sizeof(ehdr)) {
20997 if (ehdr.e_ident[0] == ELFMAG0 &&
20998 ehdr.e_ident[1] == ELFMAG1 &&
20999 ehdr.e_ident[2] == ELFMAG2 &&
21000 ehdr.e_ident[3] == ELFMAG3) {
21002 if (ehdr.e_type == ET_REL) {
21004 } else if (ehdr.e_type == ET_DYN) {
21027 } else if (memcmp((char *)&ehdr, ARMAG, 8) == 0) {
21032 if (*(uint16_t *)(&ehdr) == COFF_C67_MAGIC) {