arch.5 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. .\" $Header$
  2. .TH ARCH 5
  3. .SH NAME
  4. arch \- archive (library) file format
  5. .SH SYNOPSIS
  6. .B #include "/usr/em/h/arch.h"
  7. .SH DESCRIPTION
  8. The archive command
  9. .I arch
  10. is used to combine several files into
  11. one.
  12. Archives are used mainly as libraries to be searched
  13. by the EM assembler/linker em_ass(VI) or the universal
  14. assembler/linker em_unias(VI).
  15. .PP
  16. A file produced by
  17. .I arch
  18. has a magic number at the start,
  19. followed by the constituent files, each preceded by a file header.
  20. The magic number and header layout as described in the
  21. include file are:
  22. .RS
  23. .PP
  24. .nf
  25. .ta \w'#define 'u +\w'ARMAG 'u
  26. .so ../h/arch.h
  27. .fi
  28. .RE
  29. .LP
  30. The name is a null-terminated string;
  31. The sizes of the other entries are determined as follows:
  32. long's are 4 bytes in PDP-11 order, int are 2 bytes, low order
  33. byte first, char's are 1 byte.
  34. The date is in the
  35. form of
  36. .IR time (2);
  37. the user ID and group ID are numbers; the mode is a bit pattern
  38. per
  39. .IR chmod (2);
  40. the size is counted in bytes.
  41. .PP
  42. Each file begins on a even offset;
  43. a null byte is inserted between files if necessary.
  44. Nevertheless the size given reflects the
  45. actual size of the file exclusive of padding.
  46. .PP
  47. Notice there is no provision for empty areas in an archive
  48. file.
  49. .SH "SEE ALSO"
  50. arch(I), em_ass(VI), em_unias(VI)
  51. .SH BUGS
  52. Coding user and group IDs as characters is a botch.