在64位linux上编译32位程序
[编辑中]
-m32
# ld -V
GNU ld version 2.15.92.0.2 20040927
Supported emulations:
elf_x86_64
elf_i386
i386linux
#ld -m elf_i386
Along with the -m32 flag in gcc, you may need to include the -melf_i386 flag for ld to properly link the 32bit object files to the 32bit libraries if you have both the 32bit and 64bit libraries.
make libdir=/usr/lib64
make libdir=/usr/lib
的系统上编译时需要链接64位的库文件,而/usr/lib/libexpat.so是32位的ELF格式,所以格式不对。在configure的时候添加LDFLAGS="-L/usr/lib64 -L/lib64" 选项即可
./configure CFLAGS=-m32 CXXFLAGS=-m32 FFLAGS=-m32 FCFLAGS=-m32 LDFLAGS=-melf_i386 --prefix=/root/j131/testhttpd/apache-32bit
./configure CFLAGS=-m32 CXXFLAGS=-m32 FFLAGS=-m32 FCFLAGS=-m32 LDFLAGS="-L/usr/lib" --prefix=/root/j131/testhttpd/apache-32bit
修改apr-config
vi /usr/local/apache2/bin/apr-config
修改LDFLAGS=" " 为 LDFLAGS="-lz"
相关文档:
驱动程序编程是系统软件设置的精髓之一,通过驱动程序的编程训练,可以更加深入的理解相关操作系统的架构,并对硬件有更加直接深入的理解。linux开源,稳定,学习资源丰富,极适合入手驱动程序的开发学习。通过linux驱动开发学习,达到以下目标:
1. linux驱动开发方法
2. linux驱动模型
3. 常用硬件的linux驱动设计实现 ......
So you want to root a linux system? But, you don't know shit about it?
Well, this guide is for you.
Tools covered by this guide
-----------------------
netcat [utility for creating a backdoor shell, but can be used for a plethora of other things]
gcc [c program compiler, the h ......
Linux系统的每个分区在被创建时都会生成一个唯一识别的UUID,方便管理。
获取方法:
1) # ll -l /dev/disk/by-uuid/
2) # blkid /dev/sda1
注:需要root权限
注:使用libblkid.so和/usr/include/blkid/blkid.h可以实现该命令。
3) # vol_id /dev/sda1
注:某些Linux版本不支持
......