PowerPC objdump bug report

joel@OARcorp.com joel@OARcorp.com
Thu Mar 11 11:26:00 GMT 1999


Jennifer and I have seen this bug for a while now in a variety of
combinations of gcc and egcs and various binutils versions.

The following results in an undesirable object dump.

Tools: egcs 1.1b
       binutils 2.9.1.0.22b
       newlib 1.8.0
Host:  RedHat 5.2

Commands: powerpc-rtems-gcc        -c test.c
          powerpc-rtems-objectdump -d test.o

Where test.c is 

int main(int ignored)
{
  switch ( ignored ) {
    case 0:
      return 1;
    case 5:
      return 3;
    case 6:
      return 2;
    case 7:
      return 23;
    case 9:
      return 10;
    default:
      return -1;
  }
}

Produces the following obect dump around the switch.  It looks like if the
switch is smaller, the problem goes away.  

  3c:	7d 49 03 a6 	mtctr	r10
  40:	4e 80 04 20 	bctr
00000044 <.L3>:
  44:	38 60 00 01 48 00 00 28                             8`..H..(
0000004c <.L4>:
  4c:	38 60 00 03 48 00 00 20                             8`..H.. 
00000054 <.L5>:
  54:	38 60 00 02 48 00 00 18                             8`..H...
0000005c <.L6>:
  5c:	38 60 00 17 48 00 00 10                             8`..H...
00000064 <.L7>:
  64:	38 60 00 0a 48 00 00 08                             8`..H...
0000006c <.L8>:
  6c:	38 60 ff ff 80 01 00 14 7c 08 03 a6 38 21 00 10     8`......|...8!..
  7c:	4e 80 00 20                                         N.. 

--joel
Joel Sherrill                    Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985






More information about the Gas2 mailing list