gcc.rst
changeset 194 c9a5f5dad40d
parent 193 635ce059b359
child 352 2f4c25b2b493
--- a/gcc.rst	Fri Sep 11 15:29:13 2009 +0300
+++ b/gcc.rst	Fri Sep 11 16:05:50 2009 +0300
@@ -1,31 +1,38 @@
--*- mode: outline; coding: utf-8 -*-
-
-* Remove dead code.
-
-  STRIP_DEAD_CODE = -Wl,-static -fvtable-gc -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-s
-
-  -Wl,-static
-                Link against static libraries. Required for dead-code
-                elimination.
-
-  -fvtable-gc
-                C++ virtual method table instrumented with garbage collection
-                information for the linker.
-
-  -fdata-sections
-                Keeps data in separate data sections, so they can be discarded
-                if unused.
-
-  -ffunction-sections
-                Keeps funcitons in separate data sections, so they can be
-                discarded if unused.
-
-  -Wl,--gc-sections
-                Tell the linker to garbage collect and discard unused
-                sections.
-
-  -s
-                Strip the debug information, so as to make the code as small
-                as possible. (I presume that you'd want to do this in a
-                dead-code removal build.)
-
+-*- mode: outline; coding: utf-8 -*-
+
+* Remove dead code.
+
+  STRIP_DEAD_CODE = -Wl,-static -fvtable-gc -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-s
+
+  -Wl,-static
+                Link against static libraries. Required for dead-code
+                elimination.
+
+  -fvtable-gc
+                C++ virtual method table instrumented with garbage collection
+                information for the linker.
+
+  -fdata-sections
+                Keeps data in separate data sections, so they can be discarded
+                if unused.
+
+  -ffunction-sections
+                Keeps funcitons in separate data sections, so they can be
+                discarded if unused.
+
+  -Wl,--gc-sections
+                Tell the linker to garbage collect and discard unused
+                sections.
+
+  -s
+                Strip the debug information, so as to make the code as small
+                as possible. (I presume that you'd want to do this in a
+                dead-code removal build.)
+
+* Map file.
+
+  $ ld -Map=file.map <opts> <files>
+
+or
+
+  $ gcc -Wl,-Map=file.map <opts> <files>