タグ

ブックマーク / tyfkda.github.io (1)

  • ELFのオブジェクトファイル形式を生成する

    をgccを使ってオブジェクトファイルにコンパイルして内容を見てみる。 セクションヘッダセクションヘッダを見るには readelf -S で、 $ gcc -c const.c $ readelf -S const.o There are 11 section headers, starting at offset 0x208: Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0000000000000000 00000000 0000000000000000 0000000000000000 0 0 0 [ 1] .text PROGBITS 0000000000000000 00000040 000000000000000b 00000000000000

  • 1