2012-02-04から1日間の記事一覧

dd とか bvi elfデータ構造解析

hexdump elfデータ構造解析からのつづきセクションヘッダと.shstrtabセクションをけずっちまえwで最終的にできたのがhello5 [hirasawa@ubunt1004-32-2 gcc-Programming-Kobo]$ hexdump -C hello5 00000000 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 …

hexdump elfデータ構造解析

stripからのつづきhello4はいまのところ440byte readelf,stripにできるところまでシェイプアップしました。 つぎはhexdumpでバイナリ的に解析して、さらにシェイプアップしてみます。 [hirasawa@ubunt1004-32-2 gcc-Programming-Kobo]$ hexdump -C hello4 00…

[binutils] strip

gnu

stripは gnu binutilsの中の一つだよぉ http://d.hatena.ne.jp/toshi_hirasawa/20120202/1328189742 システムコールexitにてつくったhello4(1038byte)の調理つづき readelfで解析してみると [hirasawa@ubunt1004-32-2 gcc-Programming-Kobo]$ readelf -h hel…

システムコールexit

まずは man 2 exitの調査からいってみます NAME _exit, _Exit - terminate the calling process SYNOPSIS #include <unistd.h> void _exit(int status); #include <stdlib.h> void _Exit(int status); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): </stdlib.h></unistd.h>…

拡張アッセンブラ

gccからのつづきです。 拡張アッセンブラにてhello3.cを書いてみる [hirasawa@ubunt1004-32-2 gcc-Programming-Kobo]$ [hirasawa@ubunt1004-32-2 gcc-Programming-Kobo]$ cat hello3.c #include <unistd.h> #define MSG "hello\n" int mywrite( const char * buf , int</unistd.h>…