Hi Lennart,

Lennart Sorensen wrote:
On Tue, Mar 03, 2009 at 11:59:41AM +1000, Greg Ungerer wrote:
Couple of things I notice off-hand.

The _start code looks completely different for the 2 cases.
How did you configure uClibc for the gcc-4.3.2 case?
What .config file did you use?


Compare the disassembly of <puts> in both cases. Something is
screwy with the one generated by gcc-4.3.2:

000000d8 <puts>:
      d8:       4e56 fff0       linkw %fp,#-16
      dc:       48e7            044347
      de:       2030 2679       movel %a0@(0000000000000079,%d2:w:8),%d0
      e2:       0000            00
      e4:       165c            013134
      e6:       242b 0024       movel %a3@(36),%d2
      ...

Why the undecoded words?
The disassemble in the gcc-4.1.1 case looks fine.

So here is some more info.  This is the disassembly of the puts function
from uclibc 0.9.27 compiled with gcc 4.1.1 (puts.27.x), from uclibc
0.9.30.1 compiled with gcc 4.3.3 (puts.30.x) and the same two functions
as present in my helloworld program (helloworld.puts.411.asm and
helloworld.puts.433.asm).

It appears that the version done by gcc 4.1.1 has been integrated without
damage, while the 4.3.3 version is been mangled and no longer disassembles
correctly (probably because it is no longer correct).

So is this likely to be a compiler issue, an assembler issues, a linker
issue or perhaps an elf2flt issue?  Given the files I disassembled where
the .gdb elf files, I guess elf2flt might not have been involved, but
I don't quite understand all of what it does yet so I am not sure.

Given that the initial compile of put.o seems correct it is hard
to see how this is an assembler of compiler issues.
You are disassembly the final .gdb file, and that would pretty much
rule out elf2flt - since its input is the ELF object.

Are you sure that the uClibc objects you compiled are the ones
that are actually being linked into your final .gdb file?

Run your app build with verbose gcc output. Check that it is actually
using the library objects that you think it is.

Regards
Greg



------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     g...@snapgear.com
SnapGear, a McAfee Company                  PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to