Lines Matching refs:arhdr
495 Elf_Arhdr *arhdr = elf_getarhdr (subelf);
497 if (strcmp (arhdr->ar_name, "/") == 0)
500 index_size = arhdr->ar_size;
503 if (strcmp (arhdr->ar_name, "//") == 0)
508 arlib_add_symbols (elf, arfname, arhdr->ar_name, cur_off);
509 cur_off += (((arhdr->ar_size + 1) & ~((off_t) 1))
517 entry.key = arhdr->ar_name;
530 printf ("\n<%s>\n\n", arhdr->ar_name);
540 localtime (&arhdr->ar_date));
543 (arhdr->ar_mode & S_IRUSR) ? 'r' : '-',
544 (arhdr->ar_mode & S_IWUSR) ? 'w' : '-',
545 (arhdr->ar_mode & S_IXUSR)
546 ? ((arhdr->ar_mode & S_ISUID) ? 's' : 'x')
547 : ((arhdr->ar_mode & S_ISUID) ? 'S' : '-'),
548 (arhdr->ar_mode & S_IRGRP) ? 'r' : '-',
549 (arhdr->ar_mode & S_IWGRP) ? 'w' : '-',
550 (arhdr->ar_mode & S_IXGRP)
551 ? ((arhdr->ar_mode & S_ISGID) ? 's' : 'x')
552 : ((arhdr->ar_mode & S_ISGID) ? 'S' : '-'),
553 (arhdr->ar_mode & S_IROTH) ? 'r' : '-',
554 (arhdr->ar_mode & S_IWOTH) ? 'w' : '-',
555 (arhdr->ar_mode & S_IXOTH)
556 ? ((arhdr->ar_mode & S_ISVTX) ? 't' : 'x')
557 : ((arhdr->ar_mode & S_ISVTX) ? 'T' : '-'),
558 arhdr->ar_uid,
559 arhdr->ar_gid,
560 (uintmax_t) arhdr->ar_size,
562 arhdr->ar_name);
565 printf ("x - %s\n", arhdr->ar_name);
571 puts (arhdr->ar_name);
581 arhdr->ar_name, elf_errmsg (-1));
604 xfd = open (arhdr->ar_name, flags, 0600);
616 *((char *) mempcpy (truncfname, arhdr->ar_name,
625 (int) printlen, arhdr->ar_name);
646 error (0, errno, gettext ("failed to write %s"), arhdr->ar_name);
656 if (unlikely (fchmod (xfd, arhdr->ar_mode) != 0))
659 arhdr->ar_name);
666 tv[0].tv_sec = arhdr->ar_date;
668 tv[1].tv_sec = arhdr->ar_date;
675 arhdr->ar_name);
688 r = link (tempfname, arhdr->ar_name);
693 r = rename (tempfname, arhdr->ar_name);
706 *((char *) mempcpy (truncfname, arhdr->ar_name,
723 printlen, arhdr->ar_name);
839 struct ar_hdr arhdr;
840 char tmpbuf[sizeof (arhdr.ar_name) + 1];
847 memcpy (&arhdr, elf_rawfile (elf, NULL) + *startp, sizeof (arhdr));
850 (int) sizeof (arhdr.ar_name), memb->long_name_off);
851 changed_header = memcmp (arhdr.ar_name, tmpbuf,
852 sizeof (arhdr.ar_name)) != 0;
873 memcpy (arhdr.ar_name, tmpbuf, sizeof (arhdr.ar_name));
875 if (unlikely (write_retry (newfd, &arhdr, sizeof (arhdr))
876 != sizeof (arhdr)))
930 Elf_Arhdr *arhdr = elf_getarhdr (subelf);
933 if (strcmp (arhdr->ar_name, "/") == 0
934 || strcmp (arhdr->ar_name, "//") == 0)
941 entry.key = arhdr->ar_name;
951 printf ("d - %s\n", arhdr->ar_name);
959 cur_off += (((arhdr->ar_size + 1) & ~((off_t) 1))
972 arlib_add_symbols (subelf, arfname, arhdr->ar_name, newp->off);
975 remember_long_name (newp, arhdr->ar_name, strlen (arhdr->ar_name));
1132 Elf_Arhdr *arhdr = elf_getarhdr (subelf);
1135 if (strcmp (arhdr->ar_name, "/") == 0
1136 || strcmp (arhdr->ar_name, "//") == 0)
1141 newp->size = arhdr->ar_size;
1142 newp->sec = arhdr->ar_date;
1146 remember_long_name (newp, arhdr->ar_name, strlen (arhdr->ar_name));
1152 if (member != NULL && strcmp (arhdr->ar_name, member) == 0)
1163 entry.key = arhdr->ar_name;
1348 Elf_Arhdr *arhdr;
1349 /* Fake initializing arhdr and subelf to keep gcc calm. */
1350 asm ("" : "=m" (arhdr), "=m" (subelf));
1353 || (arhdr = elf_getarhdr (subelf)) == NULL)
1358 arlib_add_symbols (subelf, arfname, arhdr->ar_name, cur_off);
1439 struct ar_hdr arhdr;
1440 char tmpbuf[sizeof (arhdr.ar_name) + 1];
1444 char *p = mempcpy (arhdr.ar_name, all->name, namelen);
1446 memset (p, ' ', sizeof (arhdr.ar_name) - namelen - 1);
1450 snprintf (tmpbuf, sizeof (arhdr.ar_name) + 1, "/%-*ld",
1451 (int) sizeof (arhdr.ar_name), all->long_name_off);
1452 memcpy (arhdr.ar_name, tmpbuf, sizeof (arhdr.ar_name));
1455 no0print (false, arhdr.ar_date, sizeof (arhdr.ar_date),
1457 no0print (false, arhdr.ar_uid, sizeof (arhdr.ar_uid), all->uid);
1458 no0print (false, arhdr.ar_gid, sizeof (arhdr.ar_gid), all->gid);
1459 no0print (true, arhdr.ar_mode, sizeof (arhdr.ar_mode),
1461 no0print (false, arhdr.ar_size, sizeof (arhdr.ar_size),
1463 memcpy (arhdr.ar_fmag, ARFMAG, sizeof (arhdr.ar_fmag));
1465 if (unlikely (write_retry (newfd, &arhdr, sizeof (arhdr))
1466 != sizeof (arhdr)))