How do I compile code for a setup with older linux

2019-07-17 23:30发布

I am running Fedora 12 that runs on 2.6.31 linux kernel. and have to compile some code run the binary on 2.6.11 kernel(supported by FC4). Is there a way to do the same, without having to install FC4 or have a virtual machine running FC4?

Also, When you print file info of an elf image using file command, why does the part 'for GNU/Linux ', show an older kernel version? For example, for me, on 2.6.31 kernel, it says compiled for 2.6.18, on 2.6.11 it says compiled for 2.2.5. This is the kernel version its talking about I suppose.

Thanks

标签: compilation
0条回答
登录 后发表回答