Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which of the following is/are type of data supported/added by/in typical object file formats in code generation phase of a compiler ?

(i) Data segment
(ii) Block started by symbol
(iii) Text segment

  • A.(i) only
  • B.(ii) and (iii) only
  • C.(i), (ii) and (iii) only
  • D.(i) and (iii) only

Answer: C

All three are supported, so the answer is (i), (ii) and (iii) only.

Typical object file formats (such as ELF or COFF) produced by a compiler's code generation phase contain a text segment holding the machine code, a data segment holding initialised global and static data, and a BSS segment ('block started by symbol') recording the size of uninitialised data, which takes no space in the file and is zeroed at load time.

Each narrower option leaves out one of these standard sections.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.