Chinaunix首页 | 论坛 | 博客
  • 博客访问: 167074
  • 博文数量: 33
  • 博客积分: 2143
  • 博客等级: 大尉
  • 技术积分: 807
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-31 10:24
个人简介

Show me the money

文章分类

全部博文(33)

文章存档

2015年(1)

2013年(1)

2011年(12)

2010年(14)

2009年(2)

2008年(2)

2005年(1)

我的朋友

分类: LINUX

2010-10-20 09:57:05

1.       下载glibc

由于官方的glibc版本并不支持mips/arm等平台,因此还需要下载一个glibc-port源码包

2.       解压源码包。将GLIBC_PORT/sysdeps下的子目录拷贝到GLIBC/sysdeps目录下。

3.       sysdeps/mips/preconfigure的内容合并到GLIBC/configure文件中。

4.       elf/Makefile打补丁

-e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \

改成

-e 's/\. = .*0)\+ + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \

5.       运行configure

../glibc-2.8/configure --build=i686-pc-linux-gnu --host=mips-linux-gnu --prefix=/home/prc/glibc-2.8-install --without-fp --without-selinux --with-tls --enable-add-ons --without-_threads --without-nss \

    --enable-kernel=2.6.27 --with-headers=/home/admin/source/linux/include  \

    CC='mips-linux-gnu-gcc -EL -msoft-float -mips32r2'

6.    env TARGET_ARCH= CROSS_COMPILE= make。因为glibcMakefile用到了隐含变量COMPILE.c的默认定义为COMPILE.c = cc $(TARGET_ARCH) -c
阅读(4068) | 评论(1) | 转发(0) |
0

上一篇:理解ELF PLT

下一篇:选错版本真悲剧

给主人留下些什么吧!~~

chinaunix网友2010-10-20 16:35:05

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com