Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > wat is .bss segment in object file

Reply
Thread Tools

wat is .bss segment in object file

 
 
jesjak@gmail.com
Guest
Posts: n/a
 
      05-23-2007
hi all,
can any one give me some explanation of "wat is .bss segment in object
file" and what it will contain and difference between data segment
and .bss segment....

help me....

thanks,
jes

 
Reply With Quote
 
 
 
 
Kenny McCormack
Guest
Posts: n/a
 
      05-23-2007
In article < om>,
<> wrote:
>hi all,
>can any one give me some explanation of "wat is .bss segment in object
>file" and what it will contain and difference between data segment
>and .bss segment....
>
>help me....
>
>thanks,
>jes


Off topic. Not portable. Cant discuss it here. Blah, blah, blah.

Useful clc-related links:

http://en.wikipedia.org/wiki/Aspergers
http://en.wikipedia.org/wiki/Clique
http://en.wikipedia.org/wiki/C_programming_language

 
Reply With Quote
 
 
 
 
Lew Pitcher
Guest
Posts: n/a
 
      05-23-2007
wrote:
> hi all,
> can any one give me some explanation of "wat is .bss segment in object
> file" and what it will contain and difference between data segment
> and .bss segment....


Neither "bss segments" nor "data segments" have anything to do with C. They
are both terms relating to the mechanics of compiling and loading programs in
specific environments.

Typically, a "data segment" is the part of the object module that contains
initialized static data (in C, initialized static variables, string constants,
and other stuff like that), while the "bss segment" ("Block Started by
Symbol") defines the space for unitialized static data.

For example

int main(void)
{
static char abc[12], /* located in BSS segment */
def[] = "1"; /* located in DATA segment */
static int seven; /* located in BSS segment */
static float pi = 3.14159; /* located in DATA segment */
int two = 3; /* not in BSS nor DATA */


strcpy(abc /* as above */,
"Test" /* located in DATA segment */
);

return 0;
}

HTH

--
Lew Pitcher

Master Codewright & JOAT-in-training | Registered Linux User #112576
http://pitcher.digitalfreehold.ca/ | GPG public key available by request
---------- Slackware - Because I know what I'm doing. ------

 
Reply With Quote
 
Roland Pibinger
Guest
Posts: n/a
 
      05-23-2007
On 23 May 2007 07:50:49 -0700, jesjak@...com wrote:
>can any one give me some explanation of "wat is .bss segment in object
>file" and what it will contain and difference between data segment
>and .bss segment....


http://en.wikipedia.org/wiki/.bss


--
Roland Pibinger
"The best software is simple, elegant, and full of drama" - Grady Booch
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      05-23-2007
writes:
> can any one give me some explanation of "wat is .bss segment in object
> file" and what it will contain and difference between data segment
> and .bss segment....


I suggest you ask this in a newsgroup that deals with your operating
system. It's not a C language issue.

--
Keith Thompson (The_Other_Keith) kst- <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
failed to map segment from shared object: Operation not permitted Tristin Davis Ruby 4 07-04-2008 07:01 PM
Openning WAT does NOT reate aspnetdb.mbf =?Utf-8?B?dGUgZ29vZHk=?= ASP .Net 2 02-08-2006 09:36 PM
Wat is carrier transition....... sandi Cisco 2 01-18-2006 04:51 PM
Confused about whether I should use WAT? Steve ASP .Net 0 09-15-2005 10:37 AM
wat is hub and spoke? binary Cisco 2 02-29-2004 03:44 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57