This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


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

Re: Bug in gcc and egcs with .linkonce


scheidhr@dfki.de (Ralf Scheidhauer) writes:
> 
> Maybe the following is a known problem, but I could not find any
> reference to it so far.
> 

There were a few references here (I remember a few, eg., the one from 
Mark Salazar), but mostly directly to me via private email. I have about 
25 messages in my queue with various testcases that show this same bug.

> Looking at the assembler code, the reason seems to be the 
> ".linkonce discard" being used for the inline function. Unfortunately
> a ".text" gets in front of the jump table being generated for the
> switch statement. It then crashes if "bug" is not being inlined. 

You're right about the mysterious .text (which is really the output from
readonly_data_section, which for x86-win32 is .text, not .rdata yet), and
I just figure out why the C front end insists on doing this.

> Anyone know how to fix that? Otherwise I cannot debug my application
> at all! I puzzles me that no one else has had that problem before???
> 

If I knew how to fix it, it would be fixed by now ;-) I've been ignoring
this since there is a easy workaround (and easy to spot, since your
program simply crashes), but it's in the egcs-bugs list and will get
looked at eventually.

Regards,
Mumit
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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