Lines Matching refs:ar_hdr

712   struct ar_hdr hdrm;  in read_long_names()
713 struct ar_hdr *hdr; in read_long_names()
722 || elf->maximum_size - offset < sizeof (struct ar_hdr)) in read_long_names()
726 hdr = (struct ar_hdr *) (elf->map_address + offset); in read_long_names()
754 offset += sizeof (struct ar_hdr) + ((len + 1) & ~1l); in read_long_names()
760 if (len > elf->maximum_size - offset - sizeof (struct ar_hdr)) in read_long_names()
777 + sizeof (struct ar_hdr), in read_long_names()
784 + sizeof (struct ar_hdr)) in read_long_names()
829 struct ar_hdr *ar_hdr; in __libelf_next_arhdr_wrlock() local
838 - elf->state.ar.offset) < sizeof (struct ar_hdr))) in __libelf_next_arhdr_wrlock()
844 ar_hdr = (struct ar_hdr *) (elf->map_address + elf->state.ar.offset); in __libelf_next_arhdr_wrlock()
848 ar_hdr = &elf->state.ar.ar_hdr; in __libelf_next_arhdr_wrlock()
850 if (unlikely (pread_retry (elf->fildes, ar_hdr, sizeof (struct ar_hdr), in __libelf_next_arhdr_wrlock()
852 != sizeof (struct ar_hdr))) in __libelf_next_arhdr_wrlock()
861 if (unlikely (memcmp (ar_hdr->ar_fmag, ARFMAG, 2) != 0)) in __libelf_next_arhdr_wrlock()
869 *((char *) mempcpy (elf->state.ar.raw_name, ar_hdr->ar_name, 16)) = '\0'; in __libelf_next_arhdr_wrlock()
875 if (ar_hdr->ar_name[0] == '/') in __libelf_next_arhdr_wrlock()
877 if (ar_hdr->ar_name[1] == ' ' in __libelf_next_arhdr_wrlock()
878 && memcmp (ar_hdr->ar_name, "/ ", 16) == 0) in __libelf_next_arhdr_wrlock()
881 else if (ar_hdr->ar_name[1] == 'S' in __libelf_next_arhdr_wrlock()
882 && memcmp (ar_hdr->ar_name, "/SYM64/ ", 16) == 0) in __libelf_next_arhdr_wrlock()
885 else if (ar_hdr->ar_name[1] == '/' in __libelf_next_arhdr_wrlock()
886 && memcmp (ar_hdr->ar_name, "// ", 16) == 0) in __libelf_next_arhdr_wrlock()
889 else if (likely (isdigit (ar_hdr->ar_name[1]))) in __libelf_next_arhdr_wrlock()
904 offset = atol (ar_hdr->ar_name + 1); in __libelf_next_arhdr_wrlock()
925 endp = (char *) memccpy (elf->state.ar.ar_name, ar_hdr->ar_name, in __libelf_next_arhdr_wrlock()
942 if (unlikely (ar_hdr->ar_size[0] == ' ')) in __libelf_next_arhdr_wrlock()
961 char buf[sizeof (ar_hdr->FIELD) + 1]; \ in __libelf_next_arhdr_wrlock()
962 const char *string = ar_hdr->FIELD; \ in __libelf_next_arhdr_wrlock()
963 if (ar_hdr->FIELD[sizeof (ar_hdr->FIELD) - 1] != ' ') \ in __libelf_next_arhdr_wrlock()
965 *((char *) mempcpy (buf, ar_hdr->FIELD, sizeof (ar_hdr->FIELD))) \ in __libelf_next_arhdr_wrlock()
991 - elf->state.ar.offset - sizeof (struct ar_hdr)); in __libelf_next_arhdr_wrlock()
1050 result = read_file (fildes, ref->state.ar.offset + sizeof (struct ar_hdr), in dup_elf()