English 中文(简体)
Compiling sstrip from ELFkickers for Ubuntu10.04 : asm/elf.h problems
原标题:

I m playing around with creating tiny executables under linux. My attention has come to a formerly used tool from Muppetlabs.com named sstrip from the ELFkickers collection (http://www.muppetlabs.com/~breadbox/software/elfkickers.html) It strips even more bytes from an ELF executable than strip alone. And it seems that it was in the Ubuntu feeds until HardyHeron but now its gone without a trace. So I tried compiling myself, but the asm/elf.h header seems to be on a new position and gcc bails out with:

gcc -ggdb -Wall -W -o sstrip sstrip.c
sstrip.c:12:21: error: asm/elf.h: No such file or directory
sstrip.c: In function  readelfheader :
sstrip.c:70: error:  ELF_DATA  undeclared (first use in this function)
sstrip.c:70: error: (Each undeclared identifier is reported only once
sstrip.c:70: error: for each function it appears in.)
sstrip.c:72: error:  ELF_CLASS  undeclared (first use in this function)
sstrip.c:77: error:  ELF_ARCH  undeclared (first use in this function)
sstrip.c: In function  getmemorysize :
sstrip.c:138: warning: assignment from incompatible pointer type
sstrip.c: In function  modifyheaders :
sstrip.c:205: warning: assignment from incompatible pointer type
make: *** [sstrip] Error 1

Any suggestions on how to fix this?

Or does anyone know where to find sstrip in a PPA? Maybe an alternative?

最佳回答

Try this:

$ wget http://www.muppetlabs.com/~breadbox/pub/software/ELFkickers-3.0.tar.gz
$ tar xf ELFkickers-3.0.tar.gz
$ cd ELFkickers-3.0/
$ make

Then you can find the sstrip binary in the sstrip/ directory. If you get errors, please post the output of the make command so we can help you.

问题回答

暂无回答




相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

热门标签