This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Output Sections

Hi all,

I am not sure about the meaning of output sections, I know they collect all input section to form an output section.

For example, all .const sections are collected into a big .const, right?

But to me, it is not that necessary, as the two .const input sections are totally independent, right?

For .bss, I can understand, as it is not initialized, thus an complete area is provided to the program as an output section .bss.

So my question is, is there any benefit that the linker use output sections to organize the input sections? Take the example of .const, .text, etc.

-da