No subject


Sat Dec 1 07:52:20 UTC 2007


information.
Command line used to build your application. Source code if available.
Further I suggest you to build with debug synmbol (both your application
and uclibc) and start using gdb to debug.
The info you provide are not enough to figure out what is going wrong 

---------------------------------------------------------------------- 
 kannappan - 02-22-08 00:06  
---------------------------------------------------------------------- 
The problem happens when -lpthread is used along with -lc.

for example:

# arm-linux-gcc -lc -lpthread sample.c 

The strace for this attached.

The same program works when i compile with
# arm-linux-gcc -lpthread sample.c 

---------------------------------------------------------------------- 
 carmelo73 - 02-22-08 00:13  
---------------------------------------------------------------------- 
As a general suggestion, you don't need to link explicitly against libc
(-lc)...
it is done by default by the compiler (append -v at your build command and
you will see what it is doing silently)
Further are you sure arm-linux-gcc is properly configured for uClibc ?
Could you post the output of the command readelf -l <executable> ? 

---------------------------------------------------------------------- 
 vapier - 02-22-08 17:25  
---------------------------------------------------------------------- 
straces are not terribly useful when talking about a threading crash

please post a source code test case which we can compile/debug 

---------------------------------------------------------------------- 
 kannappan - 02-28-08 02:32  
---------------------------------------------------------------------- 
Following is the output of readelf

[kans at localhost test]$ arm-linux-readelf -l a.out 

Elf file type is EXEC (Executable file)
Entry point 0x83ac
There are 5 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  PHDR           0x000034 0x00008034 0x00008034 0x000a0 0x000a0 R E 0x4
  INTERP         0x0000d4 0x000080d4 0x000080d4 0x00014 0x00014 R   0x1
      [Requesting program interpreter: /lib/ld-uClibc.so.0]
  LOAD           0x000000 0x00008000 0x00008000 0x0050c 0x0050c R E
0x8000
  LOAD           0x00050c 0x0001050c 0x0001050c 0x000ec 0x00108 RW 
0x8000
  DYNAMIC        0x000518 0x00010518 0x00010518 0x000c0 0x000c0 RW  0x4

 Section to Segment mapping:
  Segment Sections...
   00     
   01     .interp 
   02     .interp .hash .dynsym .dynstr .rel.plt .init .plt .text .fini
.rodata .eh_frame 
   03     .init_array .fini_array .jcr .dynamic .got .data .bss 
   04     .dynamic 

Following are the output when compiled with -v option

Using built-in specs.
Target: arm-linux-uclibcgnueabi
Configured with:
/data/buildroot/buildroot/toolchain_build_arm/gcc-4.1.2/configure
--prefix=/data/buildroot/buildroot/build_arm/staging_dir
--build=i386-pc-linux-gnu --host=i386-pc-linux-gnu
--target=arm-linux-uclibcgnueabi --enable-languages=c,c++
--disable-__cxa_atexit --enable-target-optspace --with-gnu-ld
--enable-shared --disable-nls --enable-threads --disable-multilib
--with-float=soft
Thread model: posix
gcc version 4.1.2

/data/buildroot/buildroot/build_arm/staging_dir/libexec/gcc/arm-linux-uclibcgnueabi/4.1.2/cc1
-quiet -v sample.c -quiet -dumpbase sample.c -mfloat-abi=soft -auxbase
sample -version -o /tmp/ccESRQ7x.s
ignoring nonexistent directory
"/data/buildroot/buildroot/build_arm/staging_dir/lib/gcc/arm-linux-uclibcgnueabi/4.1.2/../../../../arm-linux-uclibcgnueabi/include"
#include "..." search starts here:
#include <...> search starts here:

/data/buildroot/buildroot/build_arm/staging_dir/lib/gcc/arm-linux-uclibcgnueabi/4.1.2/include

/data/buildroot/buildroot/build_arm/staging_dir/lib/gcc/arm-linux-uclibcgnueabi/4.1.2/../../../../arm-linux-uclibcgnueabi/sys-include
End of search list.
GNU C version 4.1.2 (arm-linux-uclibcgnueabi)
        compiled by GNU C version 3.4.6 20060404 (Red Hat 3.4.6-8).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64298
Compiler executable checksum: 38e7075577afcde72725d9029281c4bb

/data/buildroot/buildroot/build_arm/staging_dir/usr/bin/arm-linux-uclibcgnueabi-as
-mfloat-abi=soft -meabi=4 -o /tmp/ccW0JqfY.o /tmp/ccESRQ7x.s

/data/buildroot/buildroot/build_arm/staging_dir/libexec/gcc/arm-linux-uclibcgnueabi/4.1.2/collect2
--eh-frame-hdr -dynamic-linker /lib/ld-uClibc.so.0 -X -m armelf_linux_eabi
/data/buildroot/buildroot/build_arm/staging_dir/lib/gcc/arm-linux-uclibcgnueabi/4.1.2/../../../../arm-linux-uclibcgnueabi/lib/crt1.o
/data/buildroot/buildroot/build_arm/staging_dir/lib/gcc/arm-linux-uclibcgnueabi/4.1.2/../../../../arm-linux-uclibcgnueabi/lib/crti.o
/data/buildroot/buildroot/build_arm/staging_dir/lib/gcc/arm-linux-uclibcgnueabi/4.1.2/crtbegin.o
-L/data/buildroot/buildroot/build_arm/staging_dir/lib/gcc/arm-linux-uclibcgnueabi/4.1.2
-L/data/buildroot/buildroot/build_arm/staging_dir/lib/gcc/arm-linux-uclibcgnueabi/4.1.2/../../../../arm-linux-uclibcgnueabi/lib
/tmp/ccW0JqfY.o -lpthread -lgcc --as-needed -lgcc_s --no-as-needed -lc
-lgcc --as-needed -lgcc_s --no-as-needed
/data/buildroot/buildroot/build_arm/staging_dir/lib/gcc/arm-linux-uclibcgnueabi/4.1.2/crtend.o
/data/buildroot/buildroot/build_arm/staging_dir/lib/gcc/arm-linux-uclibcgnueabi/4.1.2/../../../../arm-linux-uclibcgnueabi/lib/crtn.o


Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
02-20-08 03:29  kannappan      New Issue                                    
02-20-08 03:29  kannappan      Status                   new => assigned     
02-20-08 03:29  kannappan      Assigned To               => uClibc          
02-20-08 04:40  carmelo73      Note Added: 0005174                          
02-20-08 04:40  carmelo73      Status                   assigned => feedback
02-22-08 00:03  kannappan      File Added: a                                
02-22-08 00:06  kannappan      Note Added: 0005224                          
02-22-08 00:13  carmelo73      Note Added: 0005234                          
02-22-08 17:25  vapier         Note Added: 0005254                          
02-28-08 02:32  kannappan      Note Added: 0005494                          
======================================================================



More information about the uClibc-cvs mailing list