[uClibc]Compiling a simple application with uc-libc 0.9.9
Visakan Pirabusikamani
visakan at mediasolv.com
Tue Mar 26 04:18:31 UTC 2002
Hi Eric and all,
I have been using uClibc(old) with the uClinux-2.0.38 environment..
Now planned to switched to new uc-libc 0.9.9(the latest gave some problems
with pthreads..) my platform is ATMEL EB63 board. with arm 7tdmi core
The Config file that I used here is:
NATIVE_CC = gcc
CROSS = arm-uclinux-
CC = $(CROSS)gcc
AR = $(CROSS)ar
LD = $(CROSS)ld
NM = $(CROSS)nm
STRIPTOOL = /bin/true
DODEBUG = false
WARNINGS=-Wall
KERNEL_SOURCE=../../../../kernel
HAS_MMU = false
HAS_FLOATING_POINT = false
DO_C99_MATH = false
HAS_LONG_LONG = false
HAS_SHADOW = false
HAS_LOCALE = false
LOCALE_DIR = "/usr/share/uClibc-locale/"
MALLOC = malloc-simple
EXCLUDE_BRK=false
UNIFIED_SYSCALL = false
DOLFS = false
INCLUDE_REGEX=true
INCLUDE_RPC = false
INCLUDE_IPV6 = false
UNIX98PTY_ONLY = false
ASSUME_DEVPTS = trueDOPIC = false
HAVE_SHARED = false
BUILD_UCLIBC_LDSO=false
#SYSTEM_LDSO=/lib/ld-linux.so.2
#SHARED_LIB_LOADER_PATH=$(DEVEL_PREFIX)/lib
DEVEL_PREFIX = /opt/uClinux/$(TARGET_ARCH)-elf
and the object dumps that I got from old uClibc is as follows:
-- my.elf: file format elf32-little
DYNAMIC SYMBOL TABLE:
00000094 l d .hash 00000000
00000230 l d .dynsym 00000000
00000630 l d .dynstr 00000000
00000834 l d .rel.text 00000000
000008cc l d .rel.data 00000000
00000964 l d .text 00000000
00002788 l d .data 00000000
0000284c l d .got 00000000
00002858 l d .dynamic 00000000
000028b0 l d .bss 00000000
00000000 l d .comment 00000000
000014c8 g DF .text 0000001c ioctl
000009e8 g DF .text 00000030 printf
00002838 g DO .data 00000004 stdout
00002858 g DO *ABS* 00000000 _DYNAMIC
00001440 w DF .text 00000044 __write
00002cb0 g DO *ABS* 00000000 _bss_end__
000027d0 g DO .data 00000004 errno
00001788 g DO *ABS* 00000000 _etext
00002848 g DO .data 00000001 _free_buffer_index
00001638 g DF .text 00000098 __udivsi3
000013ac g DF .text 00000024 isatty
000010c0 g DF .text 00000040 __ltostr
00000a18 g DF .text 000005c0 vfnprintf
000028a8 g DO *ABS* 00000000 __bss_start__
00001210 g DF .text 0000019c _uClibc_fwrite
000015d0 g DF .text 00000024 mempcpy
00001138 g DF .text 000000a0 fflush
000015f4 g DF .text 00000044 lseek
000027cc g DO .data 00000004 __environ
000027d4 g DO .data 00000060 _stdio_streams
00002844 g DO .data 00000004 _free_file_list
000028b0 g DO .bss 00000400 _fixed_buffers
00001440 g DF .text 00000044 write
000027cc w DO .data 00000004 environ
000016d0 g DF .text 000000b4 __umodsi3
000014e4 g DF .text 000000c8 fseek
00002cb0 g DO *ABS* 00000000 __bss_end__
00002834 g DO .data 00000004 stdin
00000964 g DF .text 00000000 _start
0000112c g DF .text 0000000c ferror
00001108 g DF .text 00000024 __init_stdio
00000990 g DF .text 00000058 __uClibc_main
000028a8 g DO *ABS* 00000000 __bss_start
000015ac g DF .text 00000024 memset
00000978 g DF .text 00000018 main
00001784 g DF .text 00000004 __div0
000013d0 g DF .text 00000070 tcgetattr
000015d0 w DF .text 00000024 __mempcpy
0000283c g DO .data 00000004 stderr
000011d8 g DF .text 00000038 fputc
00001100 g DF .text 00000008 __stdio_close_all
000028a8 g DO *ABS* 00000000 _edata
0000284c g DO *ABS* 00000000 _GLOBAL_OFFSET_TABLE_
00002cb0 g DO *ABS* 00000000 _end
00001008 w DF .text 0000000c __errno_location
00000fd8 g DF .text 00000030 exit
00001484 g DF .text 00000044 _ioctl
00002840 g DO .data 00000004 __IO_list
00001014 g DF .text 0000002c _exit
00001040 g DF .text 00000080 __ultostr
000027c8 g DO .data 00000004 __uClibc_cleanup
00002788 g DO .data 00000000 __data_start
When execute this code after doing strip, elf2flat and fltzip, it just hangs
and no output from the screen..(We used minicom and JTAG for the debugg)
and with the old library for tha same program is:
my.elf: file format elf32-little
DYNAMIC SYMBOL TABLE:
00000094 l d .hash 00000000
00000230 l d .dynsym 00000000
00000630 l d .dynstr 00000000
00000834 l d .rel.text 00000000
000008cc l d .rel.data 00000000
00000964 l d .text 00000000
00002788 l d .data 00000000
0000284c l d .got 00000000
00002858 l d .dynamic 00000000
000028b0 l d .bss 00000000
00000000 l d .comment 00000000
000014c8 g DF .text 0000001c ioctl
000009e8 g DF .text 00000030 printf
00002838 g DO .data 00000004 stdout
00002858 g DO *ABS* 00000000 _DYNAMIC
00001440 w DF .text 00000044 __write
00002cb0 g DO *ABS* 00000000 _bss_end__
000027d0 g DO .data 00000004 errno
00001788 g DO *ABS* 00000000 _etext
00002848 g DO .data 00000001 _free_buffer_index
00001638 g DF .text 00000098 __udivsi3
000013ac g DF .text 00000024 isatty
000010c0 g DF .text 00000040 __ltostr
00000a18 g DF .text 000005c0 vfnprintf
000028a8 g DO *ABS* 00000000 __bss_start__
00001210 g DF .text 0000019c _uClibc_fwrite
000015d0 g DF .text 00000024 mempcpy
00001138 g DF .text 000000a0 fflush
000015f4 g DF .text 00000044 lseek
000027cc g DO .data 00000004 __environ
000027d4 g DO .data 00000060 _stdio_streams
00002844 g DO .data 00000004 _free_file_list
000028b0 g DO .bss 00000400 _fixed_buffers
00001440 g DF .text 00000044 write
000027cc w DO .data 00000004 environ
000016d0 g DF .text 000000b4 __umodsi3
000014e4 g DF .text 000000c8 fseek
00002cb0 g DO *ABS* 00000000 __bss_end__
00002834 g DO .data 00000004 stdin
00000964 g DF .text 00000000 _start
0000112c g DF .text 0000000c ferror
00001108 g DF .text 00000024 __init_stdio
00000990 g DF .text 00000058 __uClibc_main
000028a8 g DO *ABS* 00000000 __bss_start
000015ac g DF .text 00000024 memset
00000978 g DF .text 00000018 main
00001784 g DF .text 00000004 __div0
000013d0 g DF .text 00000070 tcgetattr
000015d0 w DF .text 00000024 __mempcpy
0000283c g DO .data 00000004 stderr
000011d8 g DF .text 00000038 fputc
00001100 g DF .text 00000008 __stdio_close_all
000028a8 g DO *ABS* 00000000 _edata
0000284c g DO *ABS* 00000000 _GLOBAL_OFFSET_TABLE_
00002cb0 g DO *ABS* 00000000 _end
00001008 w DF .text 0000000c __errno_location
00000fd8 g DF .text 00000030 exit
00001484 g DF .text 00000044 _ioctl
00002840 g DO .data 00000004 __IO_list
00001014 g DF .text 0000002c _exit
00001040 g DF .text 00000080 __ultostr
000027c8 g DO .data 00000004 __uClibc_cleanup
00002788 g DO .data 00000000 __data_start
Could you please give some inputs to solve this problem.
The compilation option for the old uC-libc includes -mdisable-got and some
other macros -D_UCLINUX_, etc...
Cheers
VisakanP
Pirabusikamani Visakan,
Jr System Administrator,
MediaSolv.Inc,
10, Alfred house Garden,
Colombo 4,
Sri Lanka.
More information about the uClibc
mailing list