C++: Difference between revisions

33 bytes removed ,  9 years ago
no edit summary
[unchecked revision][unchecked revision]
No edit summary
No edit summary
Line 488:
*text, data, rodata and bss input sections should be declared with a wildcard at the end *(.section_name*), since GCC may just use those names as a prefix for the actual section names, the wildcard character takes care of that.
*Put the (.rodata*) input sections insde the .text output section
*(.gnu.linkonce.t.*) and *(.gnu.linkonce.r.*) should also be included in .text output section
*(.gnu.linkonce.dctor*) and (.dtor*) sections should be includedadded into .datatext for constructors outputand sectiondestructors
*(.gnu.linkonce.bd.*) should be included in .bss output sectiondata
*(.ctor*) and (gnu.linkonce.b.dtor*) sections should be addedincluded forin constructors and destructors.bss
 
Here is a sample link.ld file:
Anonymous user