Subject: gcc options for amd64
To: None <tech-toolchain@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-toolchain
Date: 11/26/2005 20:20:39
I've just discovered that all our amd64 binaries have a large eh_frame
section. This is data that is used by debuggers for processing exxeptions
(I'd guess C++). There is no corresponding code....
If all comes about because of the following code in
src/gnu/dist/gcc/gcc/config/i386/i386.c near line 1019
/* Set the default values for switches whose default depends on TARGET_64BIT
in case they weren't overwriten by command line options. */
if (TARGET_64BIT)
{
if (flag_omit_frame_pointer == 2)
flag_omit_frame_pointer = 1;
if (flag_asynchronous_unwind_tables == 2)
flag_asynchronous_unwind_tables = 1;
if (flag_pcc_struct_return == 2)
flag_pcc_struct_return = 0;
}
else
{
if (flag_omit_frame_pointer == 2)
flag_omit_frame_pointer = 0;
if (flag_asynchronous_unwind_tables == 2)
flag_asynchronous_unwind_tables = 0;
if (flag_pcc_struct_return == 2)
flag_pcc_struct_return = DEFAULT_PCC_STRUCT_RETURN;
}
Which enables asynchronous_unwind_tables by default for amd64.
The general comments on these options seem to imply that they would
normally get set implicitly by -gxxxx (and similar) rather being
explicitly set on the command line.
In any case compiling the INSTALL kernel and ramdiskbin with
-fno-asynchronous-unwind-tables saves about 220kB after compression.
David
--
David Laight: david@l8s.co.uk