gcc.rst
changeset 193 635ce059b359
child 194 c9a5f5dad40d
equal deleted inserted replaced
192:65ee0fe17231 193:635ce059b359
       
     1 -*- mode: outline; coding: utf-8 -*-
       
     2 
       
     3 * Remove dead code.
       
     4 
       
     5   STRIP_DEAD_CODE = -Wl,-static -fvtable-gc -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-s
       
     6 
       
     7   -Wl,-static
       
     8                 Link against static libraries. Required for dead-code
       
     9                 elimination.
       
    10 
       
    11   -fvtable-gc
       
    12                 C++ virtual method table instrumented with garbage collection
       
    13                 information for the linker.
       
    14 
       
    15   -fdata-sections
       
    16                 Keeps data in separate data sections, so they can be discarded
       
    17                 if unused.
       
    18 
       
    19   -ffunction-sections
       
    20                 Keeps funcitons in separate data sections, so they can be
       
    21                 discarded if unused.
       
    22 
       
    23   -Wl,--gc-sections
       
    24                 Tell the linker to garbage collect and discard unused
       
    25                 sections.
       
    26 
       
    27   -s
       
    28                 Strip the debug information, so as to make the code as small
       
    29                 as possible. (I presume that you'd want to do this in a
       
    30                 dead-code removal build.)
       
    31