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

  • Home
  • SEARCH
  • 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 6538141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:42:05+00:00 2026-05-25T10:42:05+00:00

Consider standard hello world program in C compiled using GCC without any switches. As

  • 0

Consider standard hello world program in C compiled using GCC without any switches. As readelf -s says, it contains 64 symbols. It says also that .symtab section is 1024 bytes long. However each symbol table entry has 18 bytes, so how it is possible it contains 64 entries? It should be 56 entries. I’m constructing my own program which reads symbol table and it does not see those “missing” entries as it reads till section end. How readelf knows how long to read?

  • 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-25T10:42:05+00:00Added an answer on May 25, 2026 at 10:42 am

    As one can see in elf.h, symbol entry structure looks like that:

    typedef struct elf32_sym {
      Elf32_Word    st_name;
      Elf32_Addr    st_value;
      Elf32_Word    st_size;
      unsigned char st_info;
      unsigned char st_other;
      Elf32_Half    st_shndx;
    } Elf32_Sym;
    

    Elf32_Word and Elf32_Addr are 32 bit values, `Elf32_Half’ is 16 bit, chars are 8 bit. That means that size of structure is 16 not 18 bytes. Therefore 1024 bytes long section gives exactly 64 entries.

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

Sidebar

Related Questions

Why would you consider using ASP.Net MVC or standard ASP.Net with forms and controls
Consider the two following programs: program one int main() { printf( hello\n ); }
Consider a standard ASP.NET web application where the user types in some numeric data
Consider the following 3 standard statements $queryString = SOME SQL SELECT QUERY; $queryResult =
Consider this problem: I have a program which should fetch (let's say) 100 records
I'd consider myself a reasonable standard CSS/XHTML chap but I'm pretty baffled by this.
Consider the 0/1 knapsack problem . The standard Dynamic Programming algorithm applies only when
Consider a transaction-per-view model where with an IHttpModule i open a transaction using a
Consider a website build using python and django. In many cases it uses 3rd
Consider the following program: template <typename T> struct t { struct base { void

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.