public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* bootstrap/3867: eh_frame optimization check in configure is broken
@ 2001-07-29 11:06 tim.van.holder
  0 siblings, 0 replies; only message in thread
From: tim.van.holder @ 2001-07-29 11:06 UTC (permalink / raw)
  To: gcc-gnats

>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:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-07-29 11:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-29 11:06 bootstrap/3867: eh_frame optimization check in configure is broken tim.van.holder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).