berkus / mclinker

Automatically exported from code.google.com/p/mclinker
Other
0 stars 0 forks source link

Support --gc-section option #118

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
       --gc-sections
       --no-gc-sections
       --gc-fragments
           Enable garbage collection of unused input sections.  It is ignored on targets that do not support this option.  The default behaviour (of not performing this garbage collection) can be restored by
           specifying --no-gc-sections on the command line.

           --gc-sections decides which input sections are used by examining symbols and relocations.  The section containing the entry symbol and all sections containing symbols undefined on the command-line
           will be kept, as will sections containing symbols referenced by dynamic objects.  Note that when building shared libraries, the linker must assume that any visible symbol is referenced.  Once this
           initial set of sections has been determined, the linker recursively marks as used any section referenced by their relocations.  See --entry and --undefined.

           This option can be set when doing a partial link (enabled with option -r).  In this case the root of symbols kept must be explicitly specified either by an --entry or --undefined option or by a
           "ENTRY" command in the linker script.

Original issue reported on code.google.com by pete.c...@gmail.com on 7 Jan 2013 at 6:59

GoogleCodeExporter commented 9 years ago

Original comment by pete.c...@gmail.com on 10 Sep 2013 at 8:33

GoogleCodeExporter commented 9 years ago

Original comment by pete.c...@gmail.com on 2 Apr 2014 at 3:22