This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug debug/40521] [4.4/4.5 Regression] -g causes GCC to generate .eh_frame



------- Comment #9 from mikpe at it dot uu dot se  2009-10-09 18:28 -------
I've been testing a backport of Jakub's patch to gcc-4.4, but it breaks
bootstrap on i686-linux with binutils-2.18.50.0.6 (Fedora 9) because stage1 gcc
outputs .cfi_sections directives even though the assembler doesn't support
them.
Current gcc-4.5 bootstraps Ok on the same machine.

The configure test correctly detects that cfi sections don't work with this as,
and records that with "#define HAVE_GAS_CFI_SECTIONS_DIRECTIVE 0".

In gcc-4.5 dwarf2out_do_cfi_asm() returns true. The code in dwarf2out_init()
inside #ifdef HAVE_GAS_CFI_SECTIONS_DIRECTIVE finds that USING_SJLJ_EXCEPTIONS
is false and !flag_exceptions is also false, so the call to emit a
.cfi_sections directive is not made. (!flag_unwind_tables varies, but it does
not matter since it's && with !flag_exceptions which always is false.)

In gcc-4.4 dwarf2out_do_cfi_asm() also returns true. The code in
dwarf2out_init() finds that USING_SJLJ_EXCEPTIONS is false but both
!flag_unwind_tables and !flag_exceptions are true, so a .cfi_sections directive
is emitted, causing the assembler to signal an error.

One thing that I find strange is that dwarf2out_do_cfi_asm() unconditionally
tests HAVE_GAS_CFI_SECTIONS_DIRECTIVE in an "if (!...)", which works since that
symbol is #defined as 0 or 1, while dwarf2out_init() instead has an #ifdef
HAVE_GAS_CFI_SECTIONS_DIRECTIVE around the conditional output of the directive.
Shouldn't that #ifdef be an #if?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40521


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]