This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
-fasynchronous-unwind-tables bug
- From: Jakub Jelinek <jakub at redhat dot com>
- To: rth at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 21 Nov 2002 10:44:50 -0500
- Subject: -fasynchronous-unwind-tables bug
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
-fasynchronous-unwind-tables causes improper .eh_frame section to be created
(and as a result .eh_frame_hdr doesn't contain lookup table on x86-64).
The problem is that the terminating 0 which is supposed to come from
crtend.o's
STATIC int __FRAME_END__[]
__attribute__ ((unused, mode(SI), section(EH_FRAME_SECTION_NAME),
aligned(4)))
= { 0 };
is actually not terminating, because crtend*.o has further .eh_frame bits
generated for __do_global_ctors_aux in crtend.o.
The solutions I can see for this are:
a) build crtend.o always with -fno-asynchronous-unwind-tables
(ATM that FDE is never seen by frame unwinders anyway, since it is
past the terminating 0).
b) write the terminating 0 in asm magic, which every
-fasynchronous-unwind-tables defaulting target would have to write
(using .subsection)
c) move __FRAME_END__ out of crtend*.o on -fasynchronous-unwind-tables
defaulting targets into some special crtehframeend.o and add it
to the link line after crtend*.o
What do you prefer?
Jakub