도전2022

3월 5일 작업 본문

작업/openmoko

3월 5일 작업

hotdigi 2010. 3. 5. 19:33
Openmoko에서 i386-linux-user 모드로 동작시키자. <아직도 미해결>

1. /lib/i386-linux-user 폴더를 만든다.
(편의상 lib에 만들었지만, 추후에는 /usr/local/lib으로 갈 예정)
    mkdir /lib/i386-linux-user

2. 필요한 library를 복사한다. 
ld-2.10.1.so   libgcc_s.so.1    libnss_nis-2.10.1.so
libBrokenLocale-2.10.1.so  libm-2.10.1.so    libnss_nisplus-2.10.1.so
libSegFault.so   libmemusage.so    libpthread-2.10.1.so
libanl-2.10.1.so   libnsl-2.10.1.so    libresolv-2.10.1.so
libc-2.10.1.so   libnss_compat-2.10.1.so  librt-2.10.1.so
libcidn-2.10.1.so   libnss_dns-2.10.1.so     libthread_db-1.0.so
libcrypt-2.10.1.so   libnss_files-2.10.1.so
libdl-2.10.1.so   libnss_hesiod-2.10.1.so
등등...


cp /lib/libm* ./            
cp /lib/libBrokenLocale* ./ 
cp /lib/libSegFault.so ./   
cp /lib/libanl* ./          
cp /lib/libc* ./            
cp /lib/libdl* ./           
cp /lib/libgcc_s.so.1 ./    
cp /lib/libn ./             
cp /lib/libn* ./            
cp /lib/libpthread* ./      
cp /lib/libresolv* ./       
cp /lib/librt* ./           
cp /lib/libthread_db ./     
cp /lib/libutil ./          
cp /lib/libutil* ./         






3. 링크 파일 생성한다. 
ln /lib/i386-linux-user/ld-2.10.1.so /lib/ld-linux.so.2

4. 에러 발생
a.out: error while loading shared libraries: lle: cannot open shared object file: No such file or directory

- ld-linux.so.2를 실행시키는 것은 성공, 

# ./qemu-i386 -E LD_LIBRARY_PATH=/lib/i386-linux-user/ /lib/ld-linux.so.2
Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]
You have invoked `ld.so', the helper program for shared library executables.
This program usually lives in the file `/lib/ld.so', and special directives
in executable files using ELF shared libraries tell the system's program
loader to load the helper program from this file.  This helper program loads
the shared libraries needed by the program executable, prepares the program
to run, and runs it.  You may invoke this helper program directly from the
command line to load and run an ELF executable file; this is like executing
that file itself, but always uses this helper program from the file you
specified, instead of the helper program file specified in the executable
file you run.  This is mostly of use for maintainers to test new versions
of this helper program; chances are you did not intend to run this program.

  --list                list all dependencies and how they are resolved
  --verify              verify that given object really is a dynamically linked
                        object we can handle
  --library-path PATH   use given PATH instead of content of the environment
                        variable LD_LIBRARY_PATH
  --inhibit-rpath LIST  ignore RUNPATH and RPATH information in object names
                        in LIST
  --audit LIST          use objects named in LIST as auditors

- 왜 실행에 에러가 발생하는 것일까?


5. glibc를 학습해봐야 하나..ㅠㅠ
eglibc (2.10.1-0ubuntu15)
glibc-2.10.1 installation

The GNU C Library Reference Manual

- 에러 메시지 내용은 찾았다. 
(lle는 아직 몿찾음.)
po 파일에 있기는 있는데. 
po 파일에 대한 간단한 설명 




0. 학습이
필요하다
필요하다. 
Program Library HOWTO, David A. Wheeler, version 1.20, 11 April 2003
Dynamic linker
Linux From Scratch Version 6.5

man readelf
Note on mysterious NEEDED linux-gate.so: http://www.technovelty.org/linux/linux-gate.html
linux.com: Shared Libraries: 
 (Also provides an explanation of “linker name” symbolic links not being created by ldconfig.)
Linux doc project: Shared Libraries: 
ELF: 
When should I set LD_LIBRARY_PATH? http://linuxmafia.com/faq/Admin/ld-lib-path.html
Re: shooting oneself in the foot with “ldconfig -v”: 
GNU C Library (including explanation of glibc vs libc, the fork and the merge, and version number progression): http://en.wikipedia.org/wiki/GNU_C_Library
Fear of Forking: Not very related, but interesting:  
Portable Dynamic Loader (PDL)



'작업 > openmoko' 카테고리의 다른 글

cat /proc/self/maps  (0) 2010.02.19
openmoco 사용법  (0) 2009.12.22
qemu-0.12.0-rc1 test --target-list=arm-softmmu  (0) 2009.12.14
cross compile error  (0) 2009.12.14
out-of-date error  (0) 2009.12.14