Visible to Intel only — GUID: GUID-1A7D36E0-4A76-48A3-A8F3-C9ED3A66F2FF
Visible to Intel only — GUID: GUID-1A7D36E0-4A76-48A3-A8F3-C9ED3A66F2FF
ffunction-sections, Gy
Places each function in its own COMDAT section.
Linux: |
-ffunction-sections |
Windows: |
/Gy |
None
OFF |
The compiler does not separate functions into COMDATs. |
This option places each function in its own COMDAT section.
When using this compiler option, you can add the linker option -Wl,--gc-sections (LInux) or /link /OPT:REF (Windows), which will remove all unused code.
When you put each function in its own section, it enables the linker to reorder the sections for other possible optimization.
Visual Studio: Code Generation > Enable Function-Level Linking
Eclipse: None
None