Mail Archives: djgpp-workers/2001/03/27/02:04:18
On 26 Mar 2001, at 19:16, Hans-Bernhard Broeker wrote:
> On Mon, 26 Mar 2001 pavenis AT lanet DOT lv wrote:
>
> > On 26 Mar 2001, at 13:46, Hans-Bernhard Broeker wrote:
>
> > For example I compiled some source with gcc-2.95.3 using options
> > '-gcoff -O2 -c' and run objdump -debug on .o file. Below is fragment
> > of output related to main ()
>
> That objdump output looks rather strange to me. Is this a new format
> introduced with binutils 2.10, perhaps?
I used binutils-2.11rc1 (binutils-2.9.1 doesn't fix the problem)
It seems that origin of problem is that the end line of previous
procedure is used and it's undefined at the start of the first one
in each source file. gcc-3.0 20010314 (prerelease) uses line number at
start of procedure and seems to be Ok. So only the first procedure
per source file is affected.
>
> I'm especially puzzled since none of the code lines you show in those
> objdumps contains any executable code at all (only un-initialized strictly
> local variables).
>
> > It seems clearly to be GCC problem.
> >
> > A test for simple "Hello World" style program:
> >
> > #include <iostream>
> >
> > int main (void)
> > {
> > std::cout << "Hello\n";
> > return 0;
> > }
> >
> > I'm getting following diffs between assembler outputs
> >
> > --- hello.s.2.95.2 Mon Mar 26 15:00:36 2001
> > +++ hello.s.2.95.3 Mon Mar 26 14:59:56 2001
> > @@ -207,25 +207,25 @@
> > .globl _main
> > _main:
> > LFB1:
> > - .def .bf; .val .; .scl 101; .line 4; .endef
> > - .ln 2
> > + .def .bf; .val .; .scl 101; .line 0; .endef
> > pushl %ebp
> > LCFI0:
> > movl %esp,%ebp
> > LCFI1:
> > subl $8,%esp
> > LCFI2:
> > + .ln 1
>
> Up to here, this looks exactly like the error that exists since 2.95 or
> so, and which can be avoid by -mno-schedule-prologue.
>
> > So it really would be nice to compare on some other system. Linux is
> > not usable for this test (doesn't support -gcoff) and I cannot use
> > MINGW port of GCC (I only have gcc-2.95.2)
>
> OK, I'll try to build a gcc-2.95.3 on that Alpha box, then. But not
> before tomorrow.
It would be Ok.
Andris
- Raw text -