[uClibc]Re: simple printf does not work........

Visakan Pirabusikamani visakan at mediasolv.com
Wed Jul 17 03:48:24 UTC 2002


Fine,

Please enlighten me on the following points
1. arm-uclinux-gcc is used by the uclinux people to compile the appilacation,
and the kernel is compiled with arm-elf-gcc. What is the different bet   
those two? ( there was a discussion in the mailing list but, How it affects 
the final binaries.)

2. Some of the development platforms uses FLAT binaries. uClinux2.0x also 
support this binaries, When we create flat binaries the stripped elf is 
converted into flat and zipped. Does arm-elf-gcc has the ability to elf2flt 
conversion?

3. When we linked the object with the library  the kernel linker scrtipt 
arrange the binaries so that it Can execute it. my linker script is 
(basically from home.at/uclinux) supporting XIP and the kernel also.
When I was using uC-libc(old one) I did not get rel.data but with the 
new ulibc I got it . does this cause the problem(hanging when I open)
/+++ WITH  NEW UCLIBC +++/
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
 0 .hash         000000d4  00000094  00000094  00000094  2**2
 1 .dynsym       00000220  00000168  00000168  00000168  2**2
 2 .dynstr       000000ef  00000388  00000388  00000388  2**0
 3 .rel.text     00000030  00000478  00000478  00000478  2**2
 4 .rel.data     00000008  000004a8  000004a8  000004a8  2**2
 5 .text         000000e8  000004b0  000004b0  000004b0  2**2
 6 .data         0000000c  00001598  00001598  00001598  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  7 .got          0000000c  000015a4  000015a4  000015a4  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  8 .dynamic      00000050  000015b0  000015b0  000015b0  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  9 .bss          00000000  00001600  00001600  00001600  2**0
                  ALLOC
 10 .comment      0000002c  00000000  00000000  00001600  2**0
                  CONTENTS, READONLY

The .rel.data is missing in the working binaries.
Why?

The rom.ld is as follows.
/++++++++++++++++++++++++++++++++++++++++++/
    .text :
                {
                        _stext = . ;
                        *(.text)
                        *(.rodata)
                        *(.rodata)
                        *(.glue_7)
                        *(.glue_7t)
                        _etext = . ;
                        etext = . ;
                } > flash

/* dummy section, marks start of data image source */
...      
  .dummy ALIGN(4) :
                {
                        _img_src = . ;
                } > flash

        .data :
                {
                        _sdata = . ;
                        _img_dest = . ;
                        *(.data)
                        _edata = . ;
                        edata = . ;
                } > dram

        .bss :
                {
                        _sbss = . ;
                        _img_dest_end = . ;
                        *(.bss)
                        *(COMMON)
                        _end = . ;
                        end = . ;
                } > dram
...

/************************************************************/

Cheers
VisakanP


On Wednesday 03 April 2002 05:19 pm, Erik Andersen wrote:
> On Tue Apr 02, 2002 at 05:15:44PM +0600, Visakan Pirabusikamani wrote:
> > Hello every body..
> >
> > I am currently in the migration to new uClibc with uClinux-2.0.38 (pre
> > 7). The uClibc is compiled and installed without any problem..
> > but a small prgram just to print A would hang the system..
>
> [-------snip-------------]
>
> > 00000000 <main>:
> >    0:   e59f0010        ldr     r0, [pc, #10]   ; 18 <main+0x18>
> >    4:   e0890000        add     r0, r9, r0
>
> If I recall, r9 is being used as the PIC register.
> Tried compiling with DOPIC=true?
>
>  -Erik



More information about the uClibc mailing list