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 8884989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:11:57+00:00 2026-06-14T21:11:57+00:00

readelf -l /bin/bash gives me this: Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz

  • 0

readelf -l /bin/bash gives me this:

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  PHDR           0x0000000000000040 0x0000000000400040 0x0000000000400040
                 0x00000000000001f8 0x00000000000001f8  R E    8
  INTERP         0x0000000000000238 0x0000000000400238 0x0000000000400238
                 0x000000000000001a 0x000000000000001a  R      1
      [Requesting program interpreter: /lib/ld-linux-x86-64.so.2]
  LOAD           0x0000000000000000 0x0000000000400000 0x0000000000400000
                 0x00000000000aeef4 0x00000000000aeef4  R E    200000
  LOAD           0x00000000000afde0 0x00000000006afde0 0x00000000006afde0
                 0x0000000000003cec 0x000000000000d3c8  RW     200000
  DYNAMIC        0x00000000000afdf8 0x00000000006afdf8 0x00000000006afdf8
                 0x0000000000000200 0x0000000000000200  RW     8
  NOTE           0x0000000000000254 0x0000000000400254 0x0000000000400254
                 0x0000000000000044 0x0000000000000044  R      4
  GNU_EH_FRAME   0x000000000009dbc0 0x000000000049dbc0 0x000000000049dbc0
                 0x0000000000002bb4 0x0000000000002bb4  R      4
  GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000  RW     8
  GNU_RELRO      0x00000000000afde0 0x00000000006afde0 0x00000000006afde0
                 0x0000000000000220 0x0000000000000220  R      1

Why is MemSiz not equal to FileSiz for some LOAD segments? What should be done with the memory region included by MemSiz but not FileSiz?

  • 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-06-14T21:11:58+00:00Added an answer on June 14, 2026 at 9:11 pm

    The loadable segment in question appears to be the program’s data segment.

    The data segment in an program contains space for both initialized and
    uninitialized program variables. Values for initialized variables are
    stored in the program’s executable. Uninitialized program variables do not
    need to stored anywhere; instead space is reserved for them in a
    special zero-sized section named “.bss”.

    The file size of an executable’s data segment can thus be less than
    its in-memory size.

    To illustrate:

    /*
     * Space for the intialized variable 'x' would be reserved the
     * executable's ".data" section, along with its initial value.
     */
    int x = 42;
    
    /*
     * Space for the uninitialized variable 'y' would be reserved in
     * the ".bss" section; no file space would be allocated in the
     * executable.
     */
    int y;
    

    On unix-like systems, the portion of the data segment mapped to the
    “.bss” section would be zero-filled at program load time.

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

Sidebar

Related Questions

I need to use the objdump and readelf commands in my application that runs
I get the entry point with readelf -h: Entry point address: 0x8048400 Debugging with
I want to write a utility to remove a program header from an ELF
I encountered this while trying to understand ELF (Executable and Linking Format). Steps I
In Bash , if I press the tab key twice, then I see: Display
Possible Duplicate: How does a compiled C++ class look like? Hi all, bash$cat struct.c
I am running bash scripts on windows using a msys and mingw environment. I
Are there tools available on Linux for read/dump/analyze MachO files? Somethings like readelf or
I have an application that traces program execution through memory. I tried to use
I'm trying to specify rpath in my binary. My makefile looks like this- CC=gcc

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.