Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1082323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:16:54+00:00 2026-05-16T22:16:54+00:00

I have a .a file from which I want to get architecture information. Running

  • 0

I have a .a file from which I want to get architecture information. Running file myFile.a results in file.a: current ar archive. How can I get more information on what architecture the file contains?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:16:55+00:00Added an answer on May 16, 2026 at 10:16 pm

    You can also skip the ar command and use readelf, via something like:

    readelf -h <archive>.a | grep 'Class\|File\|Machine'

    [00:32:15] /usr/lib $ readelf -h libxslt.a | grep 'Class\|File\|Machine'
    File: libxslt.a(attrvt.o)
      Class:                             ELF32
      Machine:                           Intel 80386
    File: libxslt.a(xslt.o)
      Class:                             ELF32
      Machine:                           Intel 80386
    ... #Trimmed this, it goes on a bit
    File: libxslt.a(transform.o)
      Class:                             ELF32
      Machine:                           Intel 80386
    File: libxslt.a(security.o)
      Class:                             ELF32
      Machine:                           Intel 80386
    [00:32:24] /usr/lib $
    

    In case it’s relevant, here’s the other information that you can get from readelf -h. I just trimmed the above with grep, obviously:

    File: libxslt.a(security.o)
    ELF Header:
      Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
      Class:                             ELF32
      Data:                              2's complement, little endian
      Version:                           1 (current)
      OS/ABI:                            UNIX - System V
      ABI Version:                       0
      Type:                              REL (Relocatable file)
      Machine:                           Intel 80386
      Version:                           0x1
      Entry point address:               0x0
      Start of program headers:          0 (bytes into file)
      Start of section headers:          2548 (bytes into file)
      Flags:                             0x0
      Size of this header:               52 (bytes)
      Size of program headers:           0 (bytes)
      Number of program headers:         0
      Size of section headers:           40 (bytes)
      Number of section headers:         16
      Section header string table index: 13
    

    That output is for one of the object files in libxslt.a, but it gives the same information for each file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a file from which I've output several columns of information, 4 to
I have text file from which I need to get data by line by
I have a control containing some text which I want to get from a
I want to load an icon (from another file) which doesn't have multiple icons
I have: $page_file_temp = $_SERVER[PHP_SELF]; which will output: /templates/somename/index.php I want to extract from
I have a file from which i read line by line and i have
I have an XML file from which I am parsing some content to display
I have a cpp file from which I am generating a shared library (using
I have a csv file from which I have to populate different tables in
We have a binary file from which we have identified the following dates (as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.