C++: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content added Content deleted
No edit summary |
No edit summary |
||
Line 488: | 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. |
*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 |
*Put the (.rodata*) input sections insde the .text output section |
||
*(.gnu.linkonce.t.*) and *(.gnu.linkonce.r.*) should also be included .text |
*(.gnu.linkonce.t.*) and *(.gnu.linkonce.r.*) should also be included in .text |
||
*(. |
*(.ctor*) and (.dtor*) sections should be added to .text for constructors and destructors |
||
*(.gnu.linkonce. |
*(.gnu.linkonce.d.*) should be included in .data |
||
*(. |
*(.gnu.linkonce.b.*) should be included in .bss |
||
Here is a sample link.ld file: |
Here is a sample link.ld file: |