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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:14:49+00:00 2026-05-30T13:14:49+00:00

I got the following information using the size command in linux, for a sample

  • 0

I got the following information using the size command in linux, for a sample c++ program.

text    data     bss     dec     hex   filename
1908     304     152    2364     93c   test
 346       4       1     351     15f   test.o

I have read that the output are the sizes; text is the actual code, bss contains the uninitialized global variables, and data as the addition of both initialized and uninitialized segments. My question is why are the sizes differing in the object file and the executable file, specially in text, since source code is common in memory? and if there are no global variables, why is there a size shown for bss?

The sample code file contains are as below:

#include <iostream>

using namespace std;

   int main()
   {
      cout << "Hello World!" << endl ;

      return 0;
   }

Thank You!

  • 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-30T13:14:51+00:00Added an answer on May 30, 2026 at 1:14 pm

    The sizes are different because your object file only includes your code. The linked file includes as well compiler C++ framework (i.e. the code needed to call main) and links to various standard libraries (the C and C++ standard libraries at least).

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

Sidebar

Related Questions

I got the following information using request.getHeader(User-Agent) method inside a Servlet: Mozilla/5.0 (Windows; U;
I tried installing TurboGears 1.0 on Windows 7 using tgsetup.py. and got following error
When I compiled the sample codes of C++, I got following info: c++ excxx_example_database_read.cpp
I tried using : sp_send_dbmail But I got the following error: Msg 15281, Level
I'm using the following code to turn user's IP into latitude/longitude information using the
I've got the following JSON string to deserialize: [{application_id:1,application_package:abc},{application_id:2,application_package:xyz}] I'm using DataContractJsonSerializer method. It
After installing mongodb using homebrew, and following the information that homebrew provided, I did
I got the following code to create a DLL : using System; using System.Collections.Generic;
I got following code in an XHTML-document and every browser saysit is malformed :(
I got following error... System.NullReferenceException: Object reference not set to an instance of an

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.