The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [pups] extract old archive format?
@ 2010-04-09  2:40 John Holden
       [not found] ` <n2m5904d5731004082137u5b054823wd4a9ce55113b1dee@mail.gmail.com>
  2010-04-09 10:21 ` Johnny Billquist
  0 siblings, 2 replies; 14+ messages in thread
From: John Holden @ 2010-04-09  2:40 UTC (permalink / raw)



> Well I found the ar specification (in ar.5 not ar.1).
>
>              struct ar_hdr {
>                      char      ar_name[14];
>                      long      ar_date;
>                      char      ar_uid;
>                      char      ar_gid;
>                      int       ar_mode;
>                      long      ar_size;
>              };

Endian should not be a problem on a Intel/AMD processor. More likely your C
compiler is padding out the array for alignment. Try a '-fpack-struct' or
more safely, read the elements individually rather than a structure.

PS

To check, see what 'sizeof (struct ar_hdr_)' returns.

John



^ permalink raw reply	[flat|nested] 14+ messages in thread
[parent not found: <337550.74945.qm@web82407.mail.mud.yahoo.com>]
* [pups] extract old archive format?
@ 2010-04-09  1:13 Norman Wilson
  2010-04-09  2:11 ` Jeremy C. Reed
  2010-04-09  5:49 ` Bob Eager
  0 siblings, 2 replies; 14+ messages in thread
From: Norman Wilson @ 2010-04-09  1:13 UTC (permalink / raw)


Bob Eager:

  The 'ar' format of that vintage is trivial, and documentation easily
  found. I wrote programs to read it back in 1976!

======

That's nothing.  Either Ken or Dennis wrote such a program
years before that!

Warren even has a binary somewhere to prove it!

Seriously, it's a binary format, so I don't know that
it would be easy to process in awk.  (At least not in
awk-classic; stuff that works only in ghootandwaveawk
is not all that interesting to me.)  But the format is
simple, and any language new or old that can handle
binary data without tears should do.

If I didn't have an overfull plate already (and a
visit to the Auto-Electrocution Consultant tomorrow,
and one to the Canal Rooting Clinic Monday--proving
that one should follow Father's advice and Stay Away
From The Canal, Neddie) it would be interesting to
collect the different specifications for ar headers
over the years, and write a small suite of programs
to read them.  Perhaps in Python, just to be difficult.
(Why isn't there a language called Goon, Warren?)

Norman Wilson
Toronto ON
(owwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww)



^ permalink raw reply	[flat|nested] 14+ messages in thread
* [pups] extract old archive format?
@ 2010-04-08 13:25 Jeremy C. Reed
  2010-04-08 14:49 ` Tim Bradshaw
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Jeremy C. Reed @ 2010-04-08 13:25 UTC (permalink / raw)


I want to look in some .a files identified by file(1) as "old PDP-11 
archive".

Anyone know what tool I can use on a modern *BSD or Linux system to 
extract the files from an "old PDP-11" ar archive?

GNU ar complains "File format not recognized". ar tells me:

 ar: supported targets: elf64-x86-64 elf32-i386 a.out-i386-netbsd 
 coff-i386 efi-app-ia32 elf64-little elf64-big elf32-little elf32-big 
 srec symbolsrec tekhex binary ihex netbsd-core

But I have no idea how to try different targets. The GNU ar manual page 
doesn't tell me much.

Or how can I use modern pcc or gcc to compile old pre-ansi ar.c?

Any suggestions?

Now I found a simtools.zip via http://simh.trailing-edge.com/ which is 
"a collection of tools for manipulating simulator file formats and for 
cross-assembling code for the PDP-1, PDP-7, PDP-8, and PDP-11." But I am 
not sure if this is related. On that note, any ideas how to extract 
files from a ".tap" file used by simh? (For now I use view or strings to 
look at it.)

Thanks,

  Jeremy C. Reed

echo 'EhZ[h ^jjf0%%h[[Zc[Z_W$d[j%Xeeai%ZW[ced#]dk#f[d]k_d%' | \
  tr            '#-~'            '\-.-{'




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-04-09 10:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-09  2:40 [pups] extract old archive format? John Holden
     [not found] ` <n2m5904d5731004082137u5b054823wd4a9ce55113b1dee@mail.gmail.com>
2010-04-09  4:39   ` Carl Lowenstein
2010-04-09 10:23     ` Johnny Billquist
2010-04-09 10:21 ` Johnny Billquist
     [not found] <337550.74945.qm@web82407.mail.mud.yahoo.com>
2010-04-09  5:35 ` Jeremy C. Reed
  -- strict thread matches above, loose matches on Subject: below --
2010-04-09  1:13 Norman Wilson
2010-04-09  2:11 ` Jeremy C. Reed
2010-04-09 10:15   ` Johnny Billquist
2010-04-09  5:49 ` Bob Eager
2010-04-08 13:25 Jeremy C. Reed
2010-04-08 14:49 ` Tim Bradshaw
2010-04-08 15:16 ` Brantley Coile
2010-04-08 17:09 ` Bob Eager
2010-04-09  5:11 ` Warren Toomey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).