How do I use
-Wa,option
in GCC? What are all the options I can pass to the assembler? Is there a list of all GCC options?
For example, I found -Wa,-a,-ad here. What does it mean?
How do I use
-Wa,option
in GCC? What are all the options I can pass to the assembler? Is there a list of all GCC options?
For example, I found -Wa,-a,-ad here. What does it mean?
In order to see a list of options of any command in bash, you can run the following command:
In this case
will reveal that
-Wa,option
means the following:Since these options are passed to the assembler, you need to check the man page for
as
, notgcc
.-a
turns on assembly output listings (which is written to standard output), while-ad
omits any debugging directive from the output listing.Always check the Documentation
So in your case
-a
and-ad
were passed to the assembler, what those do depend on your assembler. Gcc doesn't know what to do with system-specific assembler options so giving it the-Wa
flag lets it know to just pass whatever follows through.You can also find the documentation locally via man pages. To open the documentation on GNU's assembler, perform:
It will open: