Author Topic: variant lib-pa-risc.trid.xml for PA-RISC relocatable library (*.a)  (Read 4137 times)

jenderek

  • Sr. Member
  • ****
  • Posts: 361
Hello trid users,

some days ago i run TrID on hundreds of ar-archives described in
general by ark-ar-archiver.trid.xml as "ar archive". Furthermore the
inspected examples are described by lib-coff.trid.xml as "Common
Object File Format (COFF) Library" ( see appended output/trid-old.txt)

On the other hand the file command {See
https://en.wikipedia.org/wiki/File_(command)} describes inspected examples
also like "archive file - PA-RISC2.0 relocatable library" ( see appended
output/file-5.35.txt).

On Wikipedia site about "Ar (Unix)" a document with title "The 32-bit
PA-RISC Run-time Architecture Document" is mentioned. Unfortunately
this document is not find any more on HP servers. So on Wikipedia only
a link on Wayback is mentioned. But finally i see this document also on
parisc kernel web site. This is expressed by line:

   <RefURL>
   https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf
   </RefURL>
      
After running tridscan i modified the new definition file according to
information in PDF document ( Chapter 4: Relocatable Libraries, pages
97-11). According to that document a_magic=0619h means relocatable
library and version_id=05124000h=85082112 means YYMMDDHH time stamp.
This is described by XML construct:

   <Pattern>
      <Bytes>061905124000</Bytes>
      <ASCII> . . . . @ .</ASCII>
      <Pos>70</Pos>
   </Pattern>

I also found characteristic strings, which seem to describe code, text
segments and so on. This is described by additional lines in global
string section:

   <String>$PRIVATE$</String>
   <String>$CODE$</String>
   <String>$TEXT$</String>

With the tool ar, the libraries content can be unpacked. This is now
described by line:

   <Mime>application/x-archive</Mime>

The unpacking gives object files (*.o) described by other trid
definitions like pa-risc-20.trid.xml as "PA-RISC 2.0 object code
(generic)" or pa-risc-11.trid.xml as "PA-RISC 1.1 object code
(generic)". So i name new trid definition file lib-pa-risc.trid.xml and i
choose as description text "PA-RISC relocatable library".

With new trid definition all inspected HP-UX ar libraries are now
described ( see appended output/trid-new.txt) more precisely . TrID
definition, some examples and output are stored in archive hp-new.zip.
I hope that the XML file can be used in future version of triddefs.

There exist more variants of ar libraries (BSD, 64-bit, etc. ). I am
working on these items and will generate more trid definitions.

With best wishes
J?rg Jenderek