before this, confirm that you don't have 32bit libs notably 32bit libc, e.g. you have

/lib64/ld-linux-x86-64.so.2 but not /lib32/ld-linux.so.2

https://wiki.debian.org/Multiarch

run following on Debian 64bit to add basic support for 32bit programs (anyway you need ld-linux at least...)

dpkg --add-architecture i386;
aptitude install libc6-i386 libc6-dev-i386  (note that don't use libc6:i386 otherwise apt thinks you'd use libc-i386 as the main libc)

write a simple "hello world", and compile with different flags

gcc -m32 hello.c -o hello32
ldd hello32
linux-gate.so. (0xf7765000)
libc.so. => /lib32/libc.so. (0xf75a2000)
/lib/ld-linux.so. (0xf7766000) gcc -m64 hello.c -o hello64
ldd hello64
linux-vdso.so. (0x00007fff1cfa4000)
libc.so. => /lib/x86_64-linux-gnu/libc.so. (0x00007fe71d001000)
/lib64/ld-linux-x86-.so. (0x00007fe71d3c1000)

What is ld-linux.so.2?

This program is defined as part of the structure of the ELF file, in the INTERP section of the program header. For 32bit linux binaries, this is the typical name of the 32bit interpreter. For 64bit binaries, you'll find it is typically called ld-linux-x86_64.so.2 (for 64bit x86 platforms).

You can determine this information yourself using readelf -l, and the INTERP section:

INTERP         0x0000000000000238 0x0000000000400238 0x0000000000400238
0x000000000000001c 0x000000000000001c R 1
[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

What is linux-gate.so.1? very good article on this: http://www.trilithium.com/johan/2005/08/linux-gate/

there's not supposed to be a linux-gate.so.1 file present anywhere on the file system; it's a virtual DSO (dynamic shared object), a shared object exposed by the kernel at a fixed address in every process' memory:
http://en.wikipedia.org/wiki/VDSO

for example, run "cat /proc/self/maps" and it'll give the memory layout of cat process

cat /proc/self/maps
-0040b000 r-xp : /bin/cat
0060a000-0060b000 r--p 0000a000 : /bin/cat
0060b000-0060c000 rw-p 0000b000 : /bin/cat
- rw-p : [heap]
7fb1eabf3000-7fb1ead93000 r-xp : /lib/x86_64-linux-gnu/libc-2.18.so
7fb1ead93000-7fb1eaf92000 ---p 001a0000 : /lib/x86_64-linux-gnu/libc-2.18.so
7fb1eaf92000-7fb1eaf96000 r--p 0019f000 : /lib/x86_64-linux-gnu/libc-2.18.so
7fb1eaf96000-7fb1eaf98000 rw-p 001a3000 : /lib/x86_64-linux-gnu/libc-2.18.so
7fb1eaf98000-7fb1eaf9c000 rw-p :
7fb1eaf9c000-7fb1eafbc000 r-xp : /lib/x86_64-linux-gnu/ld-2.18.so
7fb1eb018000-7fb1eb1a1000 r--p : /usr/lib/locale/locale-archive
7fb1eb1a1000-7fb1eb1a4000 rw-p :
7fb1eb1b9000-7fb1eb1bb000 rw-p :
7fb1eb1bb000-7fb1eb1bc000 r--p 0001f000 : /lib/x86_64-linux-gnu/ld-2.18.so
7fb1eb1bc000-7fb1eb1bd000 rw-p : /lib/x86_64-linux-gnu/ld-2.18.so
7fb1eb1bd000-7fb1eb1be000 rw-p :
7fff48a06000-7fff48a27000 rw-p : [stack]
7fff48a49000-7fff48a4b000 r-xp : [vdso]
ffffffffff600000-ffffffffff601000 r-xp : [vsyscall]

最新文章

  1. canvas学习和面向对象(二)
  2. Js中强大的Promise异步机制
  3. Java c3p0连接池
  4. MapReduce实现二度好友关系
  5. 转:Order&Shipping Transactions Status Summary
  6. Python学习笔记--Python字符串连接方法总结
  7. c#中queue的用法
  8. BcdTool(系统启动菜单管理器) v1.0912 绿色版
  9. Solr6.6 Tomcat8部署
  10. 小白关于python 对象和内存的关系的一些感悟和疑惑,望大神指教
  11. 冲顶大会APP技术选型及架构设计
  12. windows系统下的特殊目录导致的FileNotFoundException
  13. uri&url
  14. 基于zookeeper(集群)+LevelDB的ActiveMq高可用集群安装、配置、测试
  15. PHP使用MySQL实现消息队列
  16. xcode工程编译错误:一般错误总结
  17. MyBatis(二)最简易的增、删、改、查
  18. PHP生成页面二维码解决办法?详解
  19. java BeanUtils.copyProperties
  20. 【SAPUI5】ODataとは

热门文章

  1. java.lang.NoSuchMethodError: org.jboss.logging.Logger.getMessageLogger(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;
  2. 关于 Delphi 中流的使用(7) 压缩与解压缩(TCompressionStream、TDecompressionStream)
  3. AWS:5.公有云编程
  4. python数据分析之:绘图和可视化
  5. JSDuck 安装---mac
  6. testng testcase失败重试
  7. IOS 十六进制字符串转换成UIColor
  8. Antler 工具使用(.g 转.java / .cs)
  9. springboot简单介绍
  10. linux 下 监控系统运行状况 命令 dstat