Answered step by step
Verified Expert Solution
Question
1 Approved Answer
cc -m32 t.c Case a.out | TEXT| DATA | BSS I (1) 7236 | 1507 304 8 I (2) 7240 | 1507 308 4 I
cc -m32 t.c Case a.out | TEXT| DATA | BSS I (1) 7236 | 1507 304 8 I (2) 7240 | 1507 308 4 I (3) 7236 | 1507 304 40032 | (4) 47260 | 150740328 | 4 (5) 7248| 1507 304 40044 | (6) 7248| 1507 304 40064 | cc -m32 -static t.c Case a.out | TEXT DATA BSS I (1) 657628) 5818661 11264| 3344 | (2) 657628| 5818661 11264 3344 | (3) 657628| 5818661 11264 | 43344 | (4) 6976601 5818661 51296 | 3344 | (5) 657676| 581866 11264 |43408 | (6) 6576761 5818661 11264 143376 1. Var iables in C may be class ified as globals-UNINITIALIZED globals NI TIALIZED globals; locals -AUTOMAT IC locals STATIC locals In terms of the above classificati on and the var iables g, a, b, c, d Which var iables are in DA TA? Which var iables are in BSS? 2. In terms of the TEXT, DATA and BSS sect ions Which sections are in a.out, which sect ion is NOT in a. out? (B). For each case, use cc -m32 -stat ic t.c to generate a.out Record the sizes again and compare them with the sizes in (A) WHAT DO YOU SEE? WHY? cc -m32 t.c Case a.out | TEXT| DATA | BSS I (1) 7236 | 1507 304 8 I (2) 7240 | 1507 308 4 I (3) 7236 | 1507 304 40032 | (4) 47260 | 150740328 | 4 (5) 7248| 1507 304 40044 | (6) 7248| 1507 304 40064 | cc -m32 -static t.c Case a.out | TEXT DATA BSS I (1) 657628) 5818661 11264| 3344 | (2) 657628| 5818661 11264 3344 | (3) 657628| 5818661 11264 | 43344 | (4) 6976601 5818661 51296 | 3344 | (5) 657676| 581866 11264 |43408 | (6) 6576761 5818661 11264 143376 1. Var iables in C may be class ified as globals-UNINITIALIZED globals NI TIALIZED globals; locals -AUTOMAT IC locals STATIC locals In terms of the above classificati on and the var iables g, a, b, c, d Which var iables are in DA TA? Which var iables are in BSS? 2. In terms of the TEXT, DATA and BSS sect ions Which sections are in a.out, which sect ion is NOT in a. out? (B). For each case, use cc -m32 -stat ic t.c to generate a.out Record the sizes again and compare them with the sizes in (A) WHAT DO YOU SEE? WHY
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started