Lines Matching refs:buf
698 unsigned char buf[sizeof (Elf64_External_Ehdr)]; in simple_object_elf_write_ehdr() local
719 memset (buf, 0, sizeof (Elf64_External_Ehdr)); in simple_object_elf_write_ehdr()
721 buf[EI_MAG0] = ELFMAG0; in simple_object_elf_write_ehdr()
722 buf[EI_MAG1] = ELFMAG1; in simple_object_elf_write_ehdr()
723 buf[EI_MAG2] = ELFMAG2; in simple_object_elf_write_ehdr()
724 buf[EI_MAG3] = ELFMAG3; in simple_object_elf_write_ehdr()
725 buf[EI_CLASS] = cl; in simple_object_elf_write_ehdr()
726 buf[EI_DATA] = attrs->ei_data; in simple_object_elf_write_ehdr()
727 buf[EI_VERSION] = EV_CURRENT; in simple_object_elf_write_ehdr()
728 buf[EI_OSABI] = attrs->ei_osabi; in simple_object_elf_write_ehdr()
730 ELF_SET_FIELD (fns, cl, Ehdr, buf, e_type, Elf_Half, ET_REL); in simple_object_elf_write_ehdr()
731 ELF_SET_FIELD (fns, cl, Ehdr, buf, e_machine, Elf_Half, attrs->machine); in simple_object_elf_write_ehdr()
732 ELF_SET_FIELD (fns, cl, Ehdr, buf, e_version, Elf_Word, EV_CURRENT); in simple_object_elf_write_ehdr()
735 ELF_SET_FIELD (fns, cl, Ehdr, buf, e_shoff, Elf_Addr, ehdr_size); in simple_object_elf_write_ehdr()
736 ELF_SET_FIELD (fns, cl, Ehdr, buf, e_flags, Elf_Word, attrs->flags); in simple_object_elf_write_ehdr()
737 ELF_SET_FIELD (fns, cl, Ehdr, buf, e_ehsize, Elf_Half, ehdr_size); in simple_object_elf_write_ehdr()
738 ELF_SET_FIELD (fns, cl, Ehdr, buf, e_phentsize, Elf_Half, in simple_object_elf_write_ehdr()
743 ELF_SET_FIELD (fns, cl, Ehdr, buf, e_shentsize, Elf_Half, in simple_object_elf_write_ehdr()
747 ELF_SET_FIELD (fns, cl, Ehdr, buf, e_shnum, Elf_Half, in simple_object_elf_write_ehdr()
757 ELF_SET_FIELD (fns, cl, Ehdr, buf, e_shstrndx, Elf_Half, shstrndx); in simple_object_elf_write_ehdr()
759 return simple_object_internal_write (descriptor, 0, buf, ehdr_size, in simple_object_elf_write_ehdr()
778 unsigned char buf[sizeof (Elf64_External_Shdr)]; in simple_object_elf_write_shdr() local
786 memset (buf, 0, sizeof (Elf64_External_Shdr)); in simple_object_elf_write_shdr()
788 ELF_SET_FIELD (fns, cl, Shdr, buf, sh_name, Elf_Word, sh_name); in simple_object_elf_write_shdr()
789 ELF_SET_FIELD (fns, cl, Shdr, buf, sh_type, Elf_Word, sh_type); in simple_object_elf_write_shdr()
790 ELF_SET_FIELD (fns, cl, Shdr, buf, sh_flags, Elf_Addr, sh_flags); in simple_object_elf_write_shdr()
791 ELF_SET_FIELD (fns, cl, Shdr, buf, sh_offset, Elf_Addr, sh_offset); in simple_object_elf_write_shdr()
792 ELF_SET_FIELD (fns, cl, Shdr, buf, sh_size, Elf_Addr, sh_size); in simple_object_elf_write_shdr()
793 ELF_SET_FIELD (fns, cl, Shdr, buf, sh_link, Elf_Word, sh_link); in simple_object_elf_write_shdr()
795 ELF_SET_FIELD (fns, cl, Shdr, buf, sh_addralign, Elf_Addr, sh_addralign); in simple_object_elf_write_shdr()
798 return simple_object_internal_write (descriptor, offset, buf, shdr_size, in simple_object_elf_write_shdr()