bootstrap/3867: eh_frame optimization check in configure is broken

tim.van.holder@pandora.be tim.van.holder@pandora.be
Sun Jul 29 11:06:00 GMT 2001


>Number:         3867
>Category:       bootstrap
>Synopsis:       eh_frame optimization check in configure is broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 29 11:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     tim.van.holder@pandora.be
>Release:        gcc cvs (gcc-3_0-branch)
>Organization:
>Environment:
Platform: i386-pc-msdosdjgpp
>Description:
The test for bad eh_frame optimization emits an assembler file intended as input for gas.  Unfortunately, this uses directives that are not supported by all targets of gas.
In particular, it uses .4byte, and .section 'foo',blah which are supported by ELF targets, but not by i386 coff targets (such as DJGPP's coff-go32).
Replacing the .4byte with .long and dropping the excess parameters from .section allows gas to process the file.
objdump -s -j .eh_frame on the result yields:

x.o:     file format coff-go32

Contents of section .eh_frame:
 0010 10000000 00000000 017a0001 781a0004  .........z..x...
 0020 01000000 12000000 18000000 00000000  ................
 0030 08000000 04080000 00440000           .........D..

Which is identical to the conftest.lit used in the test, aside from the two extra zero bytes at the end (which I assume to be an alignment issue - which is also not taken into account by the test).  This leads to a (presumably) false negatice on this platform.

>How-To-Repeat:
configure gcc for a DJGPP target (presumably many other non-ELF targets are affected)
>Fix:
Change the assembler source to use more portable directives, test for specific error messages from gas, or use the output from a trivial C++ compile instead:

echo 'int main(void) { return 0; }' >foo.cc
gcc -S foo.cc
as foo.s -o foo.o
objdump -s -j .eh_frame foo.o
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list