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.
Hello
i want to rearrange the order of .obj file among .text section of map file,
ex:
.init_array
* 0 ab000000 00000000 UNINITIALIZED
.text 0 00800000 00061c20
00800000 00001ca0 a.obj
00801ca0 00001780 b.obj
00803420 000015a0 c.obj
008049c0 000015a0 d.obj
Assume , my .map file is generated in above way. I want to modify map .text section, so that i achieve .text in below mention way.
.init_array
* 0 ab000000 00000000 UNINITIALIZED
.text 0 00800000 00061c20
00800000 00001ca0 c.obj
00801ca0 00001780 b.obj
00803420 000015a0 a.obj
008049c0 000015a0 d.obj
would you please help me how to re-map .obj files among .text section
To understand the answer, you first need the background you get by reading the first part of the wiki article Linker Command File Primer.
This SECTIONS directive entry does what you request ...
.text { c.obj(.text) b.obj(.text) a.obj(.text) d.obj(.text) *(.text) } > MEMORY_RANGE_NAME_HERE
This creates an output section named .text. The first four .text input sections come from those named files, in that order. The remaining input sections named .text come next.
Thanks and regards,
-George