-wl,option Pass option options to the connector. If option contains a comma, it is split into multiple options at the comma.
-M tells the preprocessor to output a rule that is appropriate for make to describe the dependencies of each target file. For each source file, the preprocessor outputs a make rule where the target entry (target) is the target file name for the source file, and the dependency (dependency) is any file #include referenced in the source file. The generated rule can be a single row, but if it is too long, it will be Fu Yi into multiple lines with ' \ ' line wrapping. The rules are displayed in standard output and do not produce pre-processed C programs. '-M ' implies the '-e ' option.
--cref Cross Reference, export the crosstab table (reference).
-E only runs C preprocessor. Preprocess all specified C source files, and the result is sent to the standard output or to the specified output file.
Test
Use the simplest HELLOWORLD.C
#include <stdio.h>int main () { printf ("hello world!\n") ; return 0 ;}
Compile
GCC helloworld.c-wl,-m=helloworld.map,--cref-o HelloWorld
View Helleworld.map File
Reference:
GCC Chinese Handbook
Gcc-wl,-m=helloworld.map,--cref