.\" $OpenBSD: elf.5,v 1.12 2003/10/27 20:23:58 jmc Exp $ .\"Copyright (c) 1999 Jeroen Ruigrok van der Werven .\"All rights reserved. .\" .\"Redistribution and use in source and binary forms, with or without .\"modification, are permitted provided that the following conditions .\"are met: .\"1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\"2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\"THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\"ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\"ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\"FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\"OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\"HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\"LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\"SUCH DAMAGE. .\" .\" $FreeBSD: src/share/man/man5/elf.5,v 1.21 2001/10/01 16:09:23 ru Exp $ .\" .\" Slightly adapted - aeb, 2004-01-01 .\" 2005-07-15, Mike Frysinger , various fixes .\" 2007-10-11, Mike Frysinger , various fixes .\" 2007-12-08, mtk, Converted from mdoc to man macros .\" .\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO .\" all rights reserved. .\" Translated Thu Dec 16 02:17:58 JST 2004 .\" by Yuichi SATO .\" Updated & Modified Sat Sep 10 02:29:40 JST 2005 by Yuichi SATO .\" Updated 2008-02-12, Akihiro MOTOKI , LDP v2.77 .\" .TH ELF 5 2007-12-28 "Linux" "Linux Programmer's Manual" .\"O .SH NAME .\"O elf \- format of Executable and Linking Format (ELF) files .SH 名前 elf \- 実行可能リンクフォーマット (ELF) ファイルのフォーマット .\"O .SH SYNOPSIS .SH 書式 .nf .\" .B #include .B #include .fi .\"O .SH DESCRIPTION .SH 説明 .\"O The header file .\"O .I .\"O defines the format of ELF executable binary files. ヘッダファイル .I は ELF 実行可能バイナリファイルのフォーマットを定義する。 .\"O Amongst these files are .\"O normal executable files, relocatable object files, core files and shared .\"O libraries. これらのファイルとしては、通常の実行可能ファイル・ 再配置可能オブジェクトファイル・コアファイル・共有ライブラリがある。 .PP .\"O An executable file using the ELF file format consists of an ELF header, .\"O followed by a program header table or a section header table, or both. ELF ファイルフォーマットを使う実行可能ファイルは、 ELF ヘッダの後にプログラムヘッダテーブルまたは セクションヘッダテーブル (またはその両方) が続く構成である。 .\"O The ELF header is always at offset zero of the file. ELF ヘッダは常にファイルのオフセット 0 にある。 .\"O The program header .\"O table and the section header table's offset in the file are defined in the .\"O ELF header. プログラムヘッダテーブルとセクションヘッダテーブルの ファイル内でのオフセットは、ELF ヘッダに定義されている。 .\"O The two tables describe the rest of the particularities of .\"O the file. この 2 つのテーブルはファイルの残りの部分の詳細を記述する。 .PP .\"O .\" Applications which wish to process ELF binary files for their native .\"O .\" architecture only should include .\"O .\" .I .\"O .\" in their source code. .\" ネイティブなアーキテクチャの ELF バイナリファイルを処理したい .\" アプリケーションは、ソースコードに .\" .I .\" を含めるだけでよい。 .\"O .\" These applications should need to refer to .\"O .\" all the types and structures by their generic names .\"O .\" "Elf_xxx" .\"O .\" and to the macros by .\"O .\" "ELF_xxx". .\" これらのアプリケーションは、ジェネリック名 .\" all the types and structures by their generic names .\" "Elf_xxx" .\" によって全ての型と構造体を参照したり、 .\" "ELF_xxx" .\" によってマクロを参照したりするすべきである。 .\"O .\" Applications written this way can be compiled on any architecture, .\"O .\" regardless of whether the host is 32-bit or 64-bit. .\" このようにして書かれたアプリケーションは、 .\" ホストが 32 ビットか 64 ビットかに関わらず、 .\" どのアーキテクチャ上でもコンパイルできる。 .\" .PP .\"O .\" Should an application need to process ELF files of an unknown .\"O .\" architecture, then the application needs to explicitly use either .\"O .\" "Elf32_xxx" .\"O .\" or .\"O .\" "Elf64_xxx" .\"O .\" type and structure names. .\" アプリケーションが未知のアーキテクチャの ELF ファイルを .\" 処理する必要がある場合、そのアプリケーションは明示的に .\" "Elf32_xxx" .\" または .\" "Elf64_xxx" .\" という型名と構造体名を使う必要がある。 .\"O .\" Likewise, the macros need to be identified by .\"O .\" "ELF32_xxx" .\"O .\" or .\"O .\" "ELF64_xxx". .\" 同様に、マクロは .\" "ELF32_xxx" .\" または .\" "ELF64_xxx" .\" で識別される必要がある。 .\" .PP .\"O This header file describes the above mentioned headers as C structures .\"O and also includes structures for dynamic sections, relocation sections and .\"O symbol tables. このヘッダファイルは上記のヘッダを C 言語の構造体で記述し、 また動的セクション・再配置可能セクション・シンボルテーブルの構造体も 含んでいる。 .PP .\"O The following types are used for N-bit architectures (N=32,64, .\"O .I ElfN .\"O stands for .\"O .I Elf32 .\"O or .\"O .IR Elf64 , .\"O .I uintN_t .\"O stands for .\"O .I uint32_t .\"O or .\"O .IR uint64_t ): 以下の型は N ビットアーキテクチャで使われる (N=32,64 であり .I ElfN は .I Elf32 または .I Elf64 を表し、 .I uintN_t は .I uint32_t または .I uint64_t を表す): .in +4n .nf .\"O ElfN_Addr Unsigned program address, uintN_t ElfN_Addr 符号なしのプログラムアドレス, uintN_t .\"O ElfN_Off Unsigned file offset, uintN_t ElfN_Off 符号なしのファイルオフセット, uintN_t .\"O ElfN_Section Unsigned section index, uint16_t ElfN_Section 符号なしのセクションインデックス, uint16_t .\"O ElfN_Versym Unsigned version symbol information, uint16_t ElfN_Versym 符号なしのバージョンシンボル情報, uint16_t Elf_Byte unsigned char ElfN_Half uint16_t ElfN_Sword int32_t ElfN_Word uint32_t ElfN_Sxword int64_t ElfN_Xword uint64_t .\"O .\" Elf32_Size Unsigned object size .\" Elf32_Size 符号なしのオブジェクトサイズ .fi .in .PP .\"O (Note: The *BSD terminology is a bit different. .\"O There .\"O .I Elf64_Half .\"O is .\"O twice as large as .\"O .IR Elf32_Half , .\"O and .\"O .I Elf64Quarter .\"O is used for .\"O .IR uint16_t . .\"O In order to avoid confusion these types are replaced by explicit ones .\"O in the below.) (注意: *BSD での用語は少し異なる。 .I Elf64_Half は .I Elf32_Half の 2 倍であり、 .I Elf64Quarter が .I uint16_t に用いられる。 混乱を避けるため、以下では、これらの型はサイズが自明な型に置き換えてある。) .PP .\"O All data structures that the file format defines follow the .\"O "natural" .\"O size and alignment guidelines for the relevant class. このファイルフォーマットが定義する全てのデータ構造体は、 関連するクラスの "自然な" サイズと配置の指針に従う。 .\"O If necessary, .\"O data structures contain explicit padding to ensure 4-byte alignment .\"O for 4-byte objects, to force structure sizes to a multiple of 4, etc. 必要な場合、データ構造体では明示的なパディング (padding, 詰め込み) が行なわれる。これは 4 バイトオブジェクトに対する 4 バイト配置を保証するためや、 構造体のサイズを 4 の倍数にするためなどである。 .PP .\"O The ELF header is described by the type .\"O .I Elf32_Ehdr .\"O or .\"O .IR Elf64_Ehdr : ELF ヘッダは型 .I Elf32_Ehdr または .I Elf64_Ehdr で記述される: .in +4n .nf #define EI_NIDENT 16 typedef struct { unsigned char e_ident[EI_NIDENT]; uint16_t e_type; uint16_t e_machine; uint32_t e_version; ElfN_Addr e_entry; ElfN_Off e_phoff; ElfN_Off e_shoff; uint32_t e_flags; uint16_t e_ehsize; uint16_t e_phentsize; uint16_t e_phnum; uint16_t e_shentsize; uint16_t e_shnum; uint16_t e_shstrndx; } ElfN_Ehdr; .fi .in .PP .\"O The fields have the following meanings: フィールドは以下の意味を持つ: .\" .Bl -tag -width "e_phentsize" .TP 12 .IR e_ident .\"O This array of bytes specifies to interpret the file, .\"O independent of the processor or the file's remaining contents. このバイト配列は、プロセッサやファイルの他の部分には依存せずに、 ファイルを解釈 (interpret) するために指定される。 .\"O Within this array everything is named by macros, which start with .\"O the prefix .\"O .BR EI_ .\"O and may contain values which start with the prefix .\"O .BR ELF . この配列内のすべてのものは、接頭辞 .BR EI_ で始まるマクロの名前が付き、接頭辞 .BR ELF で始まる値を持つ。 .\"O The following macros are defined: 以下のマクロが定義されている: .RS 12 .\" .Bl -tag -width "EI_VERSION" \" EI_ABIVERSION .TP 12 .BR EI_MAG0 .\"O The first byte of the magic number. .\"O It must be filled with .\"O .BR ELFMAG0 . マジックナンバーの第 1 バイト。 .BR ELFMAG0 で埋めなければならない。 (0: 0x7f) .TP .BR EI_MAG1 .\"O The second byte of the magic number. .\"O It must be filled with .\"O .BR ELFMAG1 . マジックナンバーの第 2 バイト。 .BR ELFMAG1 で埋めなければならない。 (1: \(aqE\(aq) .TP .BR EI_MAG2 .\"O The third byte of the magic number. .\"O It must be filled with .\"O .BR ELFMAG2 . マジックナンバーの第 3 バイト。 .BR ELFMAG2 で埋めなければならない。 (2: \(aqL\(aq) .TP .BR EI_MAG3 .\"O The fourth byte of the magic number. .\"O It must be filled with .\"O .BR ELFMAG3 . マジックナンバーの第 4 バイト。 .BR ELFMAG3 で埋めなければならない。 (3: \(aqF\(aq) .TP .BR EI_CLASS .\"O The fifth byte identifies the architecture for this binary: 第 5 バイトは、このバイナリのアーキテクチャを示す: .RS 12 .\" .Bl -tag -width "ELFCLASSNONE" -compact .TP 14 .PD 0 .BR ELFCLASSNONE .\"O This class is invalid. このクラスは不正である。 .TP .BR ELFCLASS32 .\"O This defines the 32-bit architecture. 32 ビットアーキテクチャを定義する。 .\"O It supports machines with files .\"O and virtual address spaces up to 4 Gigabytes. ファイルと仮想アドレス空間が 4 ギガバイトまでのマシンをサポートする。 .TP .BR ELFCLASS64 .\"O This defines the 64-bit architecture. 64 ビットアーキテクチャを定義する。 .PD .RE .\" .El .TP .BR EI_DATA .\"O The sixth byte specifies the data encoding of the processor-specific .\"O data in the file. .\"O Currently these encodings are supported: 第 6 バイトはファイル内のプロセッサ固有データの データエンコーディングを指定する。 現在のところ以下のエンコーディングがサポートされている: .\" .Bl -tag -width "ELFDATA2LSB" -compact .RS 12 .TP 14 .PD 0 .BR ELFDATANONE .\"O Unknown data format. 不明なデータフォーマット。 .TP .BR ELFDATA2LSB .\"O Two's complement, little-endian. 2 の補数、リトルエンディアン。 .TP .BR ELFDATA2MSB .\"O Two's complement, big-endian. 2 の補数、ビッグエンディアン。 .PD .RE .\" .El .TP .PD 0 .BR EI_VERSION .\"O The version number of the ELF specification: ELF 仕様のバージョン番号: .\" .Bl -tag -width "EV_CURRENT" -compact .RS 12 .TP 14 .BR EV_NONE .\"O Invalid version. 不正なバージョン。 .TP .BR EV_CURRENT .\"O Current version. 現在のバージョン。 .PD .RE .\".El .TP .BR EI_OSABI .\"O This byte identifies the operating system .\"O and ABI to which the object is targeted. このバイトはオブジェクトのターゲットとなる オペレーティングシステムと ABI を示す。 .\"O Some fields in other ELF structures have flags .\"O and values that have platform-specific meanings; 他の ELF 構造体のフィールドには、 プラットフォーム固有の意味を持つフラグや値を持つものもある; .\"O the interpretation of those fields is determined by the value of this byte. .\"O E.g.: これらのフィールドの解釈は、このバイトの値によって決定される。 例えば: .\" .Bl -tag -width "ELFOSABI_STANDALONE" -compact .RS 12 .TP 20 .PD 0 .BR ELFOSABI_NONE .\"O Same as ELFOSABI_SYSV ELFOSABI_SYSV と同じ。 .\" 0 .TP .BR ELFOSABI_SYSV UNIX System V ABI. .\" 0 .\" synonym: ELFOSABI_NONE .TP .BR ELFOSABI_HPUX HP-UX ABI. .\" 1 .TP .BR ELFOSABI_NETBSD NetBSD ABI. .\" 2 .TP .BR ELFOSABI_LINUX Linux ABI. .\" 3 .\" .TP .\" .BR ELFOSABI_HURD .\" Hurd ABI. .\" 4 .\" .TP .\" .BR ELFOSABI_86OPEN .\" 86Open Common IA32 ABI. .\" 5 .TP .BR ELFOSABI_SOLARIS Solaris ABI. .\" 6 .\" .It Dv ELFOSABI_MONTEREY .\" Monterey project ABI. .\"O Now replaced by .\" ELFOSABI_AIX .\" 7 .TP .BR ELFOSABI_IRIX IRIX ABI. .\" 8 .TP .BR ELFOSABI_FREEBSD FreeBSD ABI. .\" 9 .TP .BR ELFOSABI_TRU64 TRU64 UNIX ABI. .\" 10 .\" ELFOSABI_MODESTO .\" 11 .\" ELFOSABI_OPENBSD .\" 12 .TP .BR ELFOSABI_ARM .\"O ARM architecture ABI. ARM アーキテクチャ ABI. .\" 97 .TP .BR ELFOSABI_STANDALONE .\"O Stand-alone (embedded) ABI. スタンドアロン (組み込み) ABI. .\" 255 .\" .El .PD .RE .TP .BR EI_ABIVERSION .\"O This byte identifies the version of the ABI .\"O to which the object is targeted. このバイトはオブジェクトがターゲットとしている ABI のバージョンを示す。 .\"O This field is used to distinguish among incompatible versions of an ABI. このフィールドは互換性のない ABI のバージョンを区別するために使われる。 .\"O The interpretation of this version number .\"O is dependent on the ABI identified by the .\"O .B EI_OSABI .\"O field. このバージョン番号の解釈は、 .B EI_OSABI フィールドで識別される ABI に依存する。 .\"O Applications conforming to this specification use the value 0. この仕様に準拠するアプリケーションは、値 0 を使う。 .TP .BR EI_PAD .\"O Start of padding. .\"O These bytes are reserved and set to zero. .\"O Programs .\"O which read them should ignore them. .\"O The value for .\"O .B EI_PAD .\"O will change in .\"O the future if currently unused bytes are given meanings. パディングの開始。 これらのバイトは予約されており、0 に設定されている。 これらを読み込むプログラムは、これらのバイトを無視すべきである。 現在使われていないバイトに意味が与えられる場合、 .B EI_PAD の値は将来変更されるかもしれない。 .TP .BR EI_BRAND .\"O Start of architecture identification. アーキテクチャ ID の開始。 .TP .BR EI_NIDENT .\"O The size of the .\"O .I e_ident .\"O array. .I e_ident 配列のサイズ。 .\" .El .RE .TP .IR e_type .\"O This member of the structure identifies the object file type: この構造体のメンバはオブジェクトファイルタイプを示す: .RS 12 .\" .Bl -tag -width "ET_NONE" -compact .TP 12 .PD 0 .BR ET_NONE .\"O An unknown type. 不明なタイプ。 .TP .BR ET_REL .\"O A relocatable file. 再配置可能ファイル。 .TP .BR ET_EXEC .\"O An executable file. 実行可能ファイル。 .TP .BR ET_DYN .\"O A shared object. 共有オブジェクト。 .TP .BR ET_CORE .\"O A core file. コアファイル。 .PD .RE .\" .El .TP .IR e_machine .\"O This member specifies the required architecture for an individual file. .\"O E.g.: このメンバは個々のファイルに必要とされるアーキテクチャを指定する。 例: .RS 12 .\" .Bl -tag -width "EM_MIPS_RS4_BE" -compact .TP 12 .PD 0 .BR EM_NONE .\"O An unknown machine. 不明なマシン。 .\" 0 .TP .BR EM_M32 AT&T WE 32100. .\" 1 .TP .BR EM_SPARC Sun Microsystems SPARC. .\" 2 .TP .BR EM_386 Intel 80386. .\" 3 .TP .BR EM_68K Motorola 68000. .\" 4 .TP .BR EM_88K Motorola 88000. .\" 5 .\" .It Dv EM_486 .\" Intel 80486. .\" 6 .TP .BR EM_860 Intel 80860. .\" 7 .TP .BR EM_MIPS .\"O MIPS RS3000 (big-endian only). MIPS RS3000 (ビッグエンディアンのみ)。 .\" 8 .\" EM_S370 .\" 9 .\" .It Dv EM_MIPS_RS4_BE .\"O .\" MIPS RS4000 (big-endian only). Deprecated. .\" MIPS RS4000 (ビッグエンディアンのみ)。非推奨。 .\" 10 .\"O .\" EM_MIPS_RS3_LE (MIPS R3000 little-endian) .\" EM_MIPS_RS3_LE (MIPS R3000 リトルエンディアン)。 .\" 10 .TP .BR EM_PARISC HP/PA. .\" 15 .TP .BR EM_SPARC32PLUS .\"O SPARC with enhanced instruction set. 拡張命令セット付き SPARC。 .\" 18 .TP .BR EM_PPC PowerPC. .\" 20 .TP .BR EM_PPC64 PowerPC 64-bit. .\" 21 .TP .BR EM_S390 IBM S/390 .\" 22 .TP .BR EM_ARM Advanced RISC Machines .\" 40 .TP .BR EM_SH Renesas SuperH .\" 42 .TP .BR EM_SPARCV9 SPARC v9 64-bit. .\" 43 .TP .BR EM_IA_64 Intel Itanium .\" 50 .TP .BR EM_X86_64 AMD x86-64 .\" 62 .TP .BR EM_VAX DEC Vax. .\" 75 .\" EM_CRIS .\" 76 .\" .It Dv EM_ALPHA .\" Compaq [DEC] Alpha. .\" .It Dv EM_ALPHA_EXP .\"O .\" Compaq [DEC] Alpha with enhanced instruction set. .\" 拡張命令セット付き Compaq [DEC] Alpha。 .PD .RE .\" .El .TP .IR e_version .\"O This member identifies the file version: このメンバはファイルバージョンを示す: .\" .Bl -tag -width "EV_CURRENT" -compact .RS 12 .TP 12 .PD 0 .BR EV_NONE .\"O Invalid version. 不正なバージョン。 .TP .BR EV_CURRENT .\"O Current version. 現在のバージョン。 .\" .El .PD .RE .TP .IR e_entry .\"O This member gives the virtual address to which the system first transfers .\"O control, thus starting the process. このメンバは、システムが最初に制御を渡す、 つまりプロセスを開始する仮想アドレスを指定する。 .\"O If the file has no associated entry .\"O point, this member holds zero. ファイルにエントリポイントが関連付けられていない場合、 このメンバには 0 が入る。 .TP .IR e_phoff .\"O This member holds the program header table's file offset in bytes. .\"O If .\"O the file has no program header table, this member holds zero. このメンバはプログラムヘッダテーブルの ファイルオフセット (バイト単位) を保持する。 ファイルにプログラムヘッダテーブルがない場合、 このメンバには 0 が入る。 .TP .IR e_shoff .\"O This member holds the section header table's file offset in bytes. .\"O If the .\"O file has no section header table this member holds zero. このメンバはセクションヘッダテーブルの ファイルオフセット (バイト単位) を保持する。 ファイルにセクションヘッダテーブルがない場合、 このメンバには 0 が入る。 .TP .IR e_flags .\"O This member holds processor-specific flags associated with the file. .\"O Flag names take the form EF_`machine_flag'. .\"O Currently no flags have been defined. このメンバはファイルに関連付けられたプロセッサ固有のフラグを保持する。 フラグの名前は EF_`machine_flag' という形式である。 現在のところフラグは定義されていない。 .TP .IR e_ehsize .\"O This member holds the ELF header's size in bytes. このメンバは ELF ヘッダサイズ (バイト単位) を保持する。 .TP .IR e_phentsize .\"O This member holds the size in bytes of one entry in the file's program header .\"O table; all entries are the same size. このメンバはこのファイルのプログラムヘッダテーブルの 1 エントリあたりのサイズ (バイト単位) を保持する; 全てのエントリは同じサイズである。 .TP .IR e_phnum .\"O This member holds the number of entries in the program header .\"O table. このメンバはプログラムヘッダテーブルにあるエントリの数を保持する。 .\"O Thus the product of .\"O .IR e_phentsize .\"O and .\"O .IR e_phnum .\"O gives the table's size .\"O in bytes. よって .IR e_phentsize と .IR e_phnum の積がテーブルサイズ (バイト単位) になる。 .\"O If a file has no program header, .\"O .IR e_phnum .\"O holds the value zero. ファイルにプログラムヘッダがない場合、 .IR e_phnum は値 0 を保持する。 .TP .IR e_shentsize .\"O This member holds a sections header's size in bytes. .\"O A section header is one .\"O entry in the section header table; all entries are the same size. このメンバはセクションヘッダのサイズ (バイト単位) を保持する。 セクションヘッダはセクションヘッダテーブルの 1 つのエントリである; 全てのエントリは同じサイズである。 .TP .IR e_shnum .\"O This member holds the number of entries in the section header table. このメンバはセクションヘッダテーブルにあるエントリの数を保持する。 .\"O Thus .\"O the product of .\"O .IR e_shentsize .\"O and .\"O .IR e_shnum .\"O gives the section header table's size in bytes. よって .IR e_shentsize と .IR e_shnum の積はセクションヘッダテーブルのサイズ (バイト単位) になる。 .\"O If a file has no section .\"O header table, .\"O .IR e_shnum .\"O holds the value of zero. ファイルにセクションヘッダテーブルがない場合、 .IR e_shnum は値 0 を保持する。 .TP .IR e_shstrndx .\"O This member holds the section header table index of the entry associated .\"O with the section name string table. このメンバはセクション名文字列テーブルに関連付けられたエントリの セクションヘッダテーブルインデックスを保持する。 .\"O If the file has no section name string .\"O table, this member holds the value .\"O .BR SHN_UNDEF . ファイルにセクション名文字列テーブルがない場合、 このメンバは値 .BR SHN_UNDEF を保持する。 .BR SHN_UNDEF . .RS 12 .\" .Bl -tag -width "SHN_LORESERVE" .TP 14 .BR SHN_UNDEF .\"O This value marks an undefined, missing, irrelevant, or otherwise meaningless .\"O section reference. この値は未定義・存在しない・無関係その他、 意味のないセクションの参照であることを表す。 .\"O For example, a symbol .\"O "defined" .\"O relative to section number .\"O .BR SHN_UNDEF .\"O is an undefined symbol. 例えば、セクション番号 .BR SHN_UNDEF に関連づけて「定義」されたシンボルは、「未定義」なシンボルである。 .\"nakano ここの "defined" は通常の文の一部では? .TP .BR SHN_LORESERVE .\"O This value specifies the lower bound of the range of reserved indices. この値は予約済みのインデックス範囲の下限を指定する。 .TP .BR SHN_LOPROC .\"O Values greater than or equal to .\"O .BR SHN_HIPROC .\"O are reserved for processor-specific semantics. この値以上で .BR SHN_HIPROC 以下の値は、プロセッサ固有の意味に予約されている。 .TP .BR SHN_HIPROC .\"O Values less than or equal to .\"O .BR SHN_LOPROC .\"O are reserved for processor-specific semantics. この値以下で .BR SHN_LOPROC 以上の値は、プロセッサ固有の意味に予約されている。 .\"sato: SHN_{HI,LO}PROC の説明は、原文の間違いらしい。 .TP .BR SHN_ABS .\"O This value specifies absolute values for the corresponding reference. .\"O For .\"O example, symbols defined relative to section number .\"O .BR SHN_ABS .\"O have absolute values and are not affected by relocation. この値は対応する参照の絶対値を指定する。 例えば、セクション番号 .BR SHN_ABS に関連づけられたシンボルは絶対値を保持し、再配置に影響されない。 .TP .BR SHN_COMMON .\"O Symbols defined relative to this section are common symbols, such as Fortran .\"O COMMON or unallocated C external variables. このセクションに関連して定義されたシンボルは、 Fortran の COMMON や C の未割り当て external 変数のような、 共通シンボルである。 .TP .BR SHN_HIRESERVE .\"O This value specifies the upper bound of the range of reserved .\"O indices between .\"O .BR SHN_LORESERVE .\"O and .\"O .BR SHN_HIRESERVE , .\"O inclusive; the values do .\"O not reference the section header table. この値は予約されたインデックスの範囲の上限を指定する。 .BR SHN_LORESERVE と .BR SHN_HIRESERVE は含まれる。 この値はセクションヘッダテーブルを参照しない。 .\"O That is, the section header table .\"O does .\"O .I not .\"O contain entries for the reserved indices. つまり、セクションヘッダテーブルは 予約されたインデックスのエントリを .I 含まない 。 .RE .\" .El .\" .El .PP .\"O An executable or shared object file's program header table is an array of .\"O structures, each describing a segment or other information the system needs .\"O to prepare the program for execution. 実行可能ファイルまたは共有オブジェクトファイルのプログラムヘッダテーブルは、 システムによるプログラム実行準備に必要な、 セグメント等の情報を記述する構造体の配列である。 .\"O An object file .\"O .IR segment .\"O contains one or more .\"O .IR sections . オブジェクトファイルの .IR セグメント には 1 つ以上の .IR セクション が含まれる。 .\"O Program headers are meaningful only for executable and shared object files. プログラムヘッダは実行可能ファイルと共有オブジェクトファイルでのみ意味を持つ。 .\"O A file specifies its own program header size with the ELF header's .\"O .IR e_phentsize .\"O and .\"O .IR e_phnum .\"O members. ファイルは自身のプログラムヘッダサイズを ELF ヘッダの .IR e_phentsize メンバと .IR e_phnum メンバで指定する。 .\"O The ELF program header is described by the type .\"O .I Elf32_Phdr .\"O or .\"O .I Elf64_Phdr .\"O depending on the architecture: ELF プログラムヘッダは .I Elf32_Phdr 型または .I Elf64_Phdr 型で記述される (どちらになるかはアーキテクチャ依存): .in +4n .nf typedef struct { uint32_t p_type; Elf32_Off p_offset; Elf32_Addr p_vaddr; Elf32_Addr p_paddr; uint32_t p_filesz; uint32_t p_memsz; uint32_t p_flags; uint32_t p_align; } Elf32_Phdr; .fi .in .in +4n .nf typedef struct { uint32_t p_type; uint32_t p_flags; Elf64_Off p_offset; Elf64_Addr p_vaddr; Elf64_Addr p_paddr; uint64_t p_filesz; uint64_t p_memsz; uint64_t p_align; } Elf64_Phdr; .fi .in .PP .\"O The main difference between the 32-bit and the 64-bit program header lies .\"O in the location of the .\"O .IR p_flags .\"O member in the total struct. 32 ビットと 64 ビットのプログラムヘッダの主な違いは、構造体における .IR p_flags メンバの位置にある。 .\" .Bl -tag -width "p_offset" .TP 12 .IR p_type .\"O This member of the Phdr struct tells what kind of segment this array .\"O element describes or how to interpret the array element's information. Phdr 構造体のこのメンバは、 この配列要素がどのような種類のセグメントを記述しているか、 またはこの配列要素の情報をどのように解釈するか、を表す。 .\" .Bl -tag -width "PT_DYNAMIC" .RS 12 .TP 12 .BR PT_NULL .\"O The array element is unused and the other members' values are undefined. .\"O This lets the program header have ignored entries. この配列要素は使用されておらず、その他のメンバの値は未定義である。 これにより、このプログラムヘッダのエントリは無視される。 .TP .BR PT_LOAD .\"O The array element specifies a loadable segment, described by .\"O .IR p_filesz .\"O and .\"O .IR p_memsz . この配列要素は .IR p_filesz と .IR p_memsz で記述されるロード可能セグメントを指定する。 .\"O The bytes from the file are mapped to the beginning of the memory .\"O segment. このファイルからのバイトデータが、このメモリセグメントの先頭からマップされる。 .\"Osato: .\"Osato: この訳は自身なし。少し意訳気味かもしれない。 .\"Osato: .\"O If the segment's memory size .\"O .IR Sy p_memsz .\"O is larger than the file size .\"O .IR Sy p_filesz , .\"O the .\"O "extra" .\"O bytes are defined to hold the value 0 and to follow the segment's .\"O initialized area. セグメントのメモリサイズ .IR Sy p_memsz がファイルサイズ .IR Sy p_filesz より大きい場合、 「余った」バイトは値 0 となり、 そのセグメント初期化データの後ろに置かれると定められている。 .\"O The file size may not be larger than the memory size. ファイルサイズはメモリサイズより大きくてはいけない。 .\"O Loadable segment entries in the program header table appear in ascending .\"O order, sorted on the .\"O .IR p_vaddr .\"O member. プログラムヘッダテーブルのロード可能セグメントエントリは、 .IR p_vaddr メンバの昇順にソートされて出現する。 .TP .BR PT_DYNAMIC .\"O The array element specifies dynamic linking information. この配列要素は動的リンク情報を指定する。 .TP .BR PT_INTERP .\"O The array element specifies the location and size of a null-terminated .\"O pathname to invoke as an interpreter. この配列要素は、インタプリタとして起動されるパス名 (NULL 文字終端) の位置とサイズを指定する。 .\"O This segment type is meaningful .\"O only for executable files (though it may occur for shared objects). このセグメント型は (共有オブジェクトにもあるかも知れないが) 実行可能ファイルでのみ意味を持つ。 .\"O However it may not occur more than once in a file. ただし、このセグメント型は 1 つのファイルに 2 回以上出現してはならない。 .\"O If it is present, it must precede any loadable segment entry. もし存在する場合、このセグメント型は 全てのロード可能セグメントエントリより前になければならない。 .TP .BR PT_NOTE .\"O The array element specifies the location and size for auxiliary information. この配列要素は補足情報 (auxiliary information) の位置とサイズを指定する。 .TP .BR PT_SHLIB .\"O This segment type is reserved but has unspecified semantics. .\"O Programs that .\"O contain an array element of this type do not conform to the ABI. このセグメント型は予約されているが、意味は指定されていない。 この型の配列要素を保持するプログラムは ABI に準拠しない。 .TP .BR PT_PHDR .\"O The array element, if present, specifies the location and size of the program .\"O header table itself, both in the file and in the memory image of the program. この配列要素は、もし存在しているならば、 ファイルおよびプログラムのメモリイメージ双方における プログラムヘッダテーブル自身の位置とサイズを指定する。 .\"O This segment type may not occur more than once in a file. このセグメント型は 1 つのファイルに 2 回以上出現してはならない。 .\"O Moreover, it may .\"O only occur if the program header table is part of the memory image of the .\"O program. さらに、このセグメント型が存在してもよいのは、プログラムヘッダテーブルが プログラムのメモリイメージの一部である場合のみである。 .\"O If it is present, it must precede any loadable segment entry. もし存在する場合、これは全てのロード可能セグメントエントリより 前になければならない。 .TP .BR PT_LOPROC .\"O Values greater than or equal to .\"O .BR PT_HIPROC .\"O are reserved for processor-specific semantics. この値以上で .BR PT_HIPROC 以下の値はプロセッサ固有の意味に予約されている。 .TP .BR PT_HIPROC .\"O Values less than or equal to .\"O .BR PT_LOPROC .\"O are reserved for processor-specific semantics. この値以下で .BR PT_LOPROC 以上の値はプロセッサ固有の意味に予約されている。 .\"sato: PT_{HI,LO}PROC の説明は、原文の間違いらしい。 .TP .BR PT_GNU_STACK .\"O GNU extension which is used by the Linux kernel to control the state of the .\"O stack via the flags set in the .\"O .IR p_flags .\"O member. GNU 拡張であり、Linux カーネルが .I p_flags のメンバーにセットされたフラグ経由でスタックの状態を制御するために使用する。 .\" .El .RE .TP .IR p_offset .\"O This member holds the offset from the beginning of the file at which .\"O the first byte of the segment resides. このメンバは、セグメントの先頭バイトがある (ファイル先頭からの) オフセットを保持する。 .TP .IR p_vaddr .\"O This member holds the virtual address at which the first byte of the .\"O segment resides in memory. このメンバは、セグメントの先頭バイトがある メモリの仮想アドレスを保持する。 .TP .IR p_paddr .\"O On systems for which physical addressing is relevant, this member is .\"O reserved for the segment's physical address. 物理アドレスが意味をもつシステムでは、 このメンバはセグメントの物理アドレスとして予約されている。 .\"O Under .\"O BSD .\"O this member is .\"O not used and must be zero. BSD ではこのメンバは使用されない。0 でなければならない。 .TP .IR p_filesz .\"O This member holds the number of bytes in the file image of the segment. .\"O It may be zero. このメンバはセグメントのファイルイメージのバイト数を保持する。 これは 0 でもよい。 .TP .IR p_memsz .\"O This member holds the number of bytes in the memory image of the segment. .\"O It may be zero. このメンバはセグメントのメモリイメージのバイト数を保持する。 これは 0 でもよい。 .TP .IR p_flags .\"O This member holds a bitmask of flags relevant to the segment: このメンバはセグメントに関連するフラグのビットマップを保持する: .\" .Bl -tag -width "PF_X" -compact .RS 12 .TP .PD 0 .BR PF_X .\"O An executable segment. 実行可能セグメント。 .TP .BR PF_W .\"O A writable segment. 書き込み可能セグメント. .TP .BR PF_R .\"O A readable segment. 読み込み可能セグメント。 .PD .RE .\" .El .IP .\"O A text segment commonly has the flags .\"O .BR PF_X .\"O and .\"O .BR PF_R . テキストセグメントは一般にフラグ .BR PF_X と .BR PF_R を持つ。 .\"O A data segment commonly has .\"O .BR PF_X , .\"O .BR PF_W .\"O and .\"O .BR PF_R . データセグメントは一般に .BR PF_X , .BR PF_W , .BR PF_R を持つ。 .TP .IR p_align .\"O This member holds the value to which the segments are aligned in memory .\"O and in the file. このメンバは、セグメントがメモリおよびファイルにおいて配置 (align) される値を保持する。 .\"nakano align の定訳はありましたっけ? .\"O Loadable process segments must have congruent values for .\"O .IR p_vaddr .\"O and .\"O .IR p_offset , .\"O modulo the page size. ロード可能プロセスセグメントは、ページサイズを法として .IR p_vaddr と .IR p_offset と合同でなければならない (訳注:「p_vaddr mod ページサイズ = p_offset mod ページサイズ」 でなければならない)。。 .\"nakano こういう場合は普通 congruent "with" だけど… .\"O Values of zero and one mean no alignment is required. 0 と 1 という値は配置が必要ないことを意味する。 .\"O Otherwise, .\"O .IR p_align .\"O should be a positive, integral power of two, and .\"O .IR p_vaddr .\"O should equal .\"O .IR p_offset , .\"O modulo .\"O .IR p_align . それ以外の場合、 .IR p_align は正で 2 の整数乗でなければならず、 .IR p_vaddr は .IR p_align を法として .IR p_offset と合同でなければならない (訳注:「p_vaddr mod p_align = p_offset mod p_align」でなければならない)。 .\" .El .PP .\"O A file's section header table lets one locate all the file's sections. ファイルのセクションヘッダテーブルには、 全てのファイルセクションの場所が記述されている。 .\"Osato: .\"Osato: let が訳しづらいので意訳気味にする。 .\"Osato: .\"O The .\"O section header table is an array of .\"O .I Elf32_Shdr .\"O or .\"O .I Elf64_Shdr .\"O structures. セクションヘッダテーブルは .I Elf32_Shdr 構造体または .I Elf64_Shdr 構造体の配列である。 .\"O The .\"O ELF header's .\"O .IR e_shoff .\"O member gives the byte offset from the beginning of the file to the section .\"O header table. ELF ヘッダの .IR e_shoff メンバはファイルの先頭から セクションヘッダテーブルへのバイトオフセットである。 .\"O .IR e_shnum .\"O holds the number of entries the section header table contains. .\"O .IR e_shentsize .\"O holds the size in bytes of each entry. .IR e_shnum はセクションヘッダテーブルに含まれるエントリの数を保持する。 .IR e_shentsize は各エントリのサイズ (バイト単位) を保持する。 .PP .\"O A section header table index is a subscript into this array. .\"O Some section .\"O header table indices are reserved. .\"O An object file does not have sections for .\"O these special indices: セクションヘッダテーブルインデックスは、この配列の要素を指定する。 いくつかのセクションヘッダテーブルインデックスは予約されている。 オブジェクトファイルは、これらの特別なインデックスに対応する セクションを持たない: .\" .Bl -tag -width "SHN_LORESERVE" .TP 14 .BR SHN_UNDEF .\"O This value marks an undefined, missing, irrelevant or otherwise meaningless .\"O section reference. この値は未定義・不明・無関係・無意味なセクション参照の印となる。 .TP .BR SHN_LORESERVE .\"O This value specifies the lower bound of the range of reserved indices. この値は予約済みのインデックス領域の下限を指定する。 .TP .BR SHN_LOPROC .\"O Values greater than or equal to .\"O .BR SHN_HIPROC .\"O are reserved for processor-specific semantics. この値以上で .BR SHN_HIPROC 以下の値はプロセッサ固有の意味に予約されている。 .TP .BR SHN_HIPROC .\"O Values less than or equal to .\"O .BR SHN_LOPROC .\"O are reserved for processor-specific semantics. この値以下で .BR SHN_HIPROC 以上の値はプロセッサ固有の意味に予約されている。 .\"sato: SHN_{HI,LO}PROC の説明は、原文の間違いらしい。 .TP .BR SHN_ABS .\"O This value specifies the absolute value for the corresponding reference. この値は対応する参照の絶対値を指定する。 .\"O For .\"O example, a symbol defined relative to section number .\"O .BR SHN_ABS .\"O has an absolute value and is not affected by relocation. 例えば、セクション番号 .BR SHN_ABS に関連して定義されているシンボルは、 絶対値を保持しているので、再配置に影響されない。 .\"nakano "relative to" がちょっと訳しにくい。 .\"nakano 要するに SHN_ABS のセクションには絶対値が store される、 .\"nakano 後述の SHN_COMMON には global 変数が store される、 .\"nakano ということなのでしょうが。 .TP .BR SHN_COMMON .\"O Symbols defined relative to this section are common symbols, such as FORTRAN .\"O COMMON or unallocated C external variables. このセクションに関連して定義されているシンボルは、 FORTRAN の COMMON や C の未割り当て外部変数のような共通シンボルである。 .TP .BR SHN_HIRESERVE .\"O This value specifies the upper bound of the range of reserved indices. この値は予約済みのインデックス領域の上限を指定する。 .\"O The .\"O system reserves indices between .\"O .BR SHN_LORESERVE .\"O and .\"O .BR SHN_HIRESERVE , .\"O inclusive. システムは .BR SHN_LORESERVE と .BR SHN_HIRESERVE を含む範囲を予約する。 .\"O The section header table does not contain entries for the .\"O reserved indices. セクションヘッダテーブルは予約されたインデックスに対応するエントリを持たない。 .\" .El .PP .\"O The section header has the following structure: セクションヘッダは以下の構造体を持つ: .in +4n .nf typedef struct { uint32_t sh_name; uint32_t sh_type; uint32_t sh_flags; Elf32_Addr sh_addr; Elf32_Off sh_offset; uint32_t sh_size; uint32_t sh_link; uint32_t sh_info; uint32_t sh_addralign; uint32_t sh_entsize; } Elf32_Shdr; .fi .in .in +4n .nf typedef struct { uint32_t sh_name; uint32_t sh_type; uint64_t sh_flags; Elf64_Addr sh_addr; Elf64_Off sh_offset; uint64_t sh_size; uint32_t sh_link; uint32_t sh_info; uint64_t sh_addralign; uint64_t sh_entsize; } Elf64_Shdr; .fi .in .PP .\"O No real differences exist between the 32-bit and 64-bit section headers. 32 ビットと 64 ビットのセクションヘッダには実際の違いはない。 .\" .Bl -tag -width "sh_addralign" .TP 10 .IR sh_name .\"O This member specifies the name of the section. このメンバはセクション名を定める。 .\"O Its value is an index .\"O into the section header string table section, giving the location of .\"O a null-terminated string. この値はセクションヘッダ文字列テーブルセクションのインデックスであり、 NULL 文字で終端された文字列の場所を示す。 .TP .IR sh_type .\"O This member categorizes the section's contents and semantics. このメンバはセクションの内容と意味が含まれるカテゴリを示す。 .\" .Bl -tag -width "SHT_PROGBITS" .RS 10 .TP 15 .BR SHT_NULL .\"O This value marks the section header as inactive. この値はセクションヘッダが不活性であることを示す。 .\"O It does not .\"O have an associated section. これは関連するセクションを持たない。 .\"O Other members of the section header .\"O have undefined values. このセクションヘッダの他のメンバは、未定義の値を持つ。 .TP .BR SHT_PROGBITS .\"O This section holds information defined by the program, whose .\"O format and meaning are determined solely by the program. このセクションはプログラムにより定義される情報を保持する。 この情報の形式と意味は、ひとえにプログラムによって決定される。 .TP .BR SHT_SYMTAB .\"O This section holds a symbol table. このセクションはシンボルテーブルを保持する。 .\"O Typically, .\"O .BR SHT_SYMTAB .\"O provides symbols for link editing, though it may also be used .\"O for dynamic linking. 一般には .BR SHT_SYMTAB はリンク編集のためのシンボルを提供するが、 動的リンクにも使われる。 .\"O As a complete symbol table, it may contain .\"O many symbols unnecessary for dynamic linking. 完全なシンボルテーブルとして、動的リンクには不要な 多くのシンボルを保持できる。 .\"O An object file can .\"O also contain a .\"O .BR SHT_DYNSYM .\"O section. オブジェクトファイルも .BR SHT_DYNSYM セクションを持つことができる。 .TP .BR SHT_STRTAB .\"O This section holds a string table. .\"O An object file may have multiple .\"O string table sections. このセクションは文字列テーブルを保持する。 オブジェクトファイルは複数の文字列テーブルセクションを持つことができる。 .TP .BR SHT_RELA .\"O This section holds relocation entries with explicit addends, such .\"O as type .\"O .IR Elf32_Rela .\"O for the 32-bit class of object files. このセクションは明示的な加数 (addend) を持つ再配置エントリを保持する。 再配置エントリの型は、オブジェクトファイルの 32 ビットクラスでは .IR Elf32_Rela である。 .\"O An object may have multiple .\"O relocation sections. オブジェクトファイルは複数の再配置セクションを持つことができる。 .TP .BR SHT_HASH .\"O This section holds a symbol hash table. このセクションはシンボルハッシュテーブルを保持する。 .\"O An object participating in .\"O dynamic linking must contain a symbol hash table. 動的リンクされるオブジェクトは、 シンボルハッシュテーブルを含んでいなければならない。 .\"O An object file may .\"O have only one hash table. オブジェクトファイルは 1 つのハッシュテーブルのみを持つことができる。 .TP .BR SHT_DYNAMIC .\"O This section holds information for dynamic linking. このセクションは動的リンクの情報を保持する。 .\"O An object file may .\"O have only one dynamic section. オブジェクトファイルは 1 つの動的セクションのみを持つことができる。 .TP .BR SHT_NOTE .\"O This section holds information that marks the file in some way. このセクションはファイルに何らかの印を付ける情報を保持する。 .TP .BR SHT_NOBITS .\"O A section of this type occupies no space in the file but otherwise .\"O resembles .\"O .BR SHT_PROGBITS . このタイプのセクションはファイルの領域を使わないという以外は、 .BR SHT_PROGBITS と似ている。 .\"O Although this section contains no bytes, the .\"O .IR sh_offset .\"O member contains the conceptual file offset. このセクションは 1 バイトも含まないが、 .IR sh_offset メンバは概念的なファイルオフセットを持つ。 .TP .BR SHT_REL .\"O This section holds relocation offsets without explicit addends, such .\"O as type .\"O .IR Elf32_Rel .\"O for the 32-bit class of object files. このセクションは明示的な加数を持たない再配置オフセットを保持する。 再配置オフセットの型は、オブジェクトファイルの 32 ビットクラスでは .IR Elf32_Rel である。 .\"O An object file may have multiple .\"O relocation sections. オブジェクトファイルは複数の再配置セクションを持つことができる。 .TP .BR SHT_SHLIB .\"O This section is reserved but has unspecified semantics. このセクションは予約されているが、意味は指定されていない。 .TP .BR SHT_DYNSYM .\"O This section holds a minimal set of dynamic linking symbols. このセクションは動的リンクシンボルの最小セットを保持する。 .\"O An .\"O object file can also contain a .\"O .BR SHT_SYMTAB .\"O section. オブジェクトファイルは .BR SHT_SYMTAB セクションも含むことができる。 .TP .BR SHT_LOPROC .\"O This value up to and including .\"O .BR SHT_HIPROC .\"O is reserved for processor-specific semantics. この値以上で .BR SHT_HIPROC 以下の範囲はプロセッサ固有の意味に予約されている。 .TP .BR SHT_HIPROC .\"O This value down to and including .\"O .BR SHT_LOPROC .\"O is reserved for processor-specific semantics. この値以下で .BR SHT_LOPROC 以上の範囲はプロセッサ固有の意味に予約されている。 .TP .BR SHT_LOUSER .\"O This value specifies the lower bound of the range of indices reserved for .\"O application programs. この値はアプリケーションプログラムのために予約される インデックス範囲の下限を指定する。 .TP .BR SHT_HIUSER .\"O This value specifies the upper bound of the range of indices reserved for .\"O application programs. この値はアプリケーションプログラムのために予約される インデックス範囲の上限を指定する。 .\"O Section types between .\"O .BR SHT_LOUSER .\"O and .\"O .BR SHT_HIUSER .\"O may be used by the application, without conflicting with current or future .\"O system-defined section types. .BR SHT_LOUSER から .BR SHT_HIUSER の間のセクションタイプは、 現在または将来のシステム定義セクションタイプと衝突することなく、 アプリケーションで使用することができる。 .\" .El .RE .TP .IR sh_flags .\"O Sections support one-bit flags that describe miscellaneous attributes. 様々な属性を記述するための 1 ビットのフラグをサポートするセクション。 .\"O If a flag bit is set in .\"O .IR sh_flags , .\"O the attribute is .\"O "on" .\"O for the section. フラグビットが .IR sh_flags に設定された場合、そのセクションについての属性は "オン" になる。 .\"O Otherwise, the attribute is .\"O "off" .\"O or does not apply. それ以外の場合、属性が "オフ" であるか属性が適用されない。 .\"O Undefined attributes are set to zero. 未定義の属性は 0 に設定される。 .\" .Bl -tag -width "SHF_EXECINSTR" -compact .RS 10 .TP 15 .BR SHF_WRITE .\"O This section contains data that should be writable during process .\"O execution. このセクションはプロセス実行中に書き込み可能なデータを含む。 .TP .BR SHF_ALLOC .\"O This section occupies memory during process execution. このセクションはプロセス実行中にメモリを使用する。 .\"O Some control .\"O sections do not reside in the memory image of an object file. 制御セクションの中には、オブジェクトファイルのメモリイメージには 存在しないものもある。 .\"O This .\"O attribute is off for those sections. そうしたセクションの場合、この属性はオフである。 .TP .BR SHF_EXECINSTR .\"O This section contains executable machine instructions. このセクションは実行可能なマシン命令を含む。 .TP .BR SHF_MASKPROC .\"O All bits included in this mask are reserved for processor-specific .\"O semantics. このマスクに含まれる全てのビットはプロセッサ固有の意味に予約されている。 .RE .\" .El .TP .IR sh_addr .\"O If this section appears in the memory image of a process, this member .\"O holds the address at which the section's first byte should reside. .\"O Otherwise, the member contains zero. このセクションがプロセスのメモリイメージにある場合、 このメンバはセクションの最初のバイトが存在するアドレスを保持する。 それ以外の場合、このメンバは 0 である。 .TP .IR sh_offset .\"O This member's value holds the byte offset from the beginning of the file .\"O to the first byte in the section. このメンバの値は、ファイルの先頭からセクションの最初のバイトへの バイトオフセットを保持する。 .\"O One section type, .\"O .BR SHT_NOBITS , .\"O occupies no space in the file, and its .\"O .BR sh_offset .\"O member locates the conceptual placement in the file. セクションタイプ .BR SHT_NOBITS はファイルの領域を全く使用せず、このタイプの .IR sh_offset メンバはファイルの概念的な位置を示す。 .\"nakano conceptual placement とは? .TP .IR sh_size .\"O This member holds the section's size in bytes. このメンバはセクションのサイズ (バイト単位) を保持する。 .\"O Unless the section type .\"O is .\"O .BR SHT_NOBITS , .\"O the section occupies .\"O .IR sh_size .\"O bytes in the file. セクションタイプが .BR SHT_NOBITS でない限り、そのセクションはファイル中の .IR sh_size バイトを使用する。 .\"O A section of type .\"O .BR SHT_NOBITS .\"O may have a nonzero size, but it occupies no space in the file. タイプが .BR SHT_NOBITS のセクションはサイズが 0 でないが、ファイルの領域を使用しない。 .TP .IR sh_link .\"O This member holds a section header table index link, whose interpretation .\"O depends on the section type. このメンバは、セクションヘッダテーブルインデックスリンクを保持する。 この解釈はセクションタイプに依存する。 .TP .IR sh_info .\"O This member holds extra information, whose interpretation depends on the .\"O section type. このメンバは追加情報を保持する。 この解釈はセクションタイプに依存する。 .TP .IR sh_addralign .\"O Some sections have address alignment constraints. アドレス配置に制約があるセクションもある。 .\"O If a section holds a .\"O doubleword, the system must ensure doubleword alignment for the entire .\"O section. セクションが倍長語 (doubleword) を保持する場合、 システムは全てのセクションについて倍長語の配置を保証しなければならない。 .\"O That is, the value of .\"O .IR sh_addr .\"O must be congruent to zero, modulo the value of .\"O .BR sh_addralign . つまり、 .IR sh_addr の値は .IR sh_addralign の値を法として 0 と合同でなければならない (訳注:「sh_addr mod sh_addralign = 0 でなければならない)。 .\"O Only zero and positive integral powers of two are allowed. 2 の 0 乗と正の整数乗のみが許可される。 .\"O Values of zero .\"O or one mean the section has no alignment constraints. 0 または 1 はセクションの配置に制約がないことを意味する。 .TP .IR sh_entsize .\"O Some sections hold a table of fixed-sized entries, such as a symbol table. シンボルテーブルのような固定サイズエントリのテーブルを保持する セクションもある。 .\"O For such a section, this member gives the size in bytes for each entry. このようなセクションでは、 このメンバは各エントリのサイズ (バイト単位) を表す。 .\"O This member contains zero if the section does not hold a table of .\"O fixed-size entries. このメンバが 0 の場合、 そのセクションは固定サイズエントリのテーブルを保持しない。 .\" .El .PP .\"O Various sections hold program and control information: さまざまなセクションにプログラム情報・制御情報が保持される: .\" .Bl -tag -width ".shstrtab" .TP 10 .IR .bss .\"O This section holds uninitialized data that contributes to the program's .\"O memory image. .\"Osato: .\"Osato: contribute がうまく訳せない。 .\"Osato: このセクションはプログラムのメモリイメージに配置される 非初期化データを保持する。 .\"O By definition, the system initializes the data with zeros .\"O when the program begins to run. 定義上、システムはプログラムの実行開始時に、データを 0 で初期化する。 .\"O This section is of type .\"O .BR SHT_NOBITS . このセクションのタイプは .BR SHT_NOBITS である。 .\"O The attribute types are .\"O .BR SHF_ALLOC .\"O and .\"O .BR SHF_WRITE . 属性タイプは .BR SHF_ALLOC と .BR SHF_WRITE である。 .TP .IR .comment .\"O This section holds version control information. このセクションはバージョン制御情報を保持する。 .\"O This section is of type .\"O .BR SHT_PROGBITS . このセクションのタイプは .BR SHT_PROGBITS である。 .\"O No attribute types are used. 属性タイプは使用されない。 .TP .IR .ctors .\"O This section holds initialized pointers to the C++ constructor functions. このセクションは C++ コンストラクタ関数への初期化されたポインタを保持する。 .\"O This section is of type .\"O .BR SHT_PROGBITS . このセクションのタイプは .BR SHT_PROGBITS である。 .\"O The attribute types are .\"O .BR SHF_ALLOC .\"O and .\"O .BR SHF_WRITE . 属性タイプは .BR SHF_ALLOC と .BR SHF_WRITE である。 .TP .IR .data .\"O This section holds initialized data that contribute to the program's .\"O memory image. このセクションはプログラムのメモリイメージに配置される 初期化済みデータを保持する。 .\"O This section is of type .\"O .BR SHT_PROGBITS . このセクションのタイプは .BR SHT_PROGBITS である。 .\"O The attribute types are .\"O .BR SHF_ALLOC .\"O and .\"O .BR SHF_WRITE . 属性タイプは .BR SHF_ALLOC と .BR SHF_WRITE である。 .TP .IR .data1 .\"O This section holds initialized data that contribute to the program's .\"O memory image. このセクションはプログラムのメモリイメージに配置される 初期化済みデータを保持する。 .\"O This section is of type .\"O .BR SHT_PROGBITS . このセクションのタイプは .BR SHT_PROGBITS である。 .\"O The attribute types are .\"O .BR SHF_ALLOC .\"O and .\"O .BR SHF_WRITE . 属性タイプは .BR SHF_ALLOC と .BR SHF_WRITE である。 .TP .IR .debug .\"O This section holds information for symbolic debugging. このセクションはシンボリックデバッグ用の情報を保持する。 .\"O The contents .\"O are unspecified. その内容は指定されていない。 .\"O This section is of type .\"O .BR SHT_PROGBITS . このセクションのタイプは .BR SHT_PROGBITS である。 .\"O No attribute types are used. 属性タイプは使用されない。 .TP .IR .dtors .\"O This section holds initialized pointers to the C++ destructor functions. このセクションは C++ デストラクタ関数への初期化されたポインタを保持する。 .\"O This section is of type .\"O .BR SHT_PROGBITS . このセクションのタイプは .BR SHT_PROGBITS である。 .\"O The attribute types are .\"O .BR SHF_ALLOC .\"O and .\"O .BR SHF_WRITE . 属性タイプは .BR SHF_ALLOC と .BR SHF_WRITE である。 .TP .IR .dynamic .\"O This section holds dynamic linking information. このセクションは動的リンク情報を保持する。 .\"O The section's attributes .\"O will include the .\"O .BR SHF_ALLOC .\"O bit. このセクションの属性は .BR SHF_ALLOC ビットを含む。 .\"O Whether the .\"O .BR SHF_WRITE .\"O bit is set is processor-specific. .BR SHF_WRITE ビットが設定されるか否かはプロセッサによる。 .\"O This section is of type .\"O .BR SHT_DYNAMIC . このセクションのタイプは .BR SHT_DYNAMIC である。 .\"O See the attributes above. 上記の属性を参照すること。 .TP .IR .dynstr .\"O This section holds strings needed for dynamic linking, most commonly .\"O the strings that represent the names associated with symbol table entries. このセクションは動的リンクに必要な文字列を保持する。 最も一般的には、この文字列はシンボルテーブルエントリと 関連づけられた名前を表す。 .\"O This section is of type .\"O .BR SHT_STRTAB . このセクションのタイプは .BR SHT_STRTAB である。 .\"O The attribute type used is .\"O .BR SHF_ALLOC . 使用される属性タイプは .BR SHF_ALLOC である。 .TP .IR .dynsym .\"O This section holds the dynamic linking symbol table. このセクションは動的リンクシンボルテーブルを保持する。 .\"O This section is of type .\"O .BR SHT_DYNSYM . このセクションのタイプは .BR SHT_DYNSYM である。 .\"O The attribute used is .\"O .BR SHF_ALLOC . 使用される属性タイプは .BR SHF_ALLOC である。 .TP .IR .fini .\"O This section holds executable instructions that contribute to the process .\"O termination code. このセクションはプロセス終了コードに置かれる実行可能命令を保持する。 .\"O When a program exits normally the system arranges to .\"O execute the code in this section. プロセスが正常に終了した場合、システムはこのセクションにある コードを配置して実行する。 .\"O This section is of type .\"O .BR SHT_PROGBITS . このセクションのタイプは .BR SHT_PROGBITS である。 .\"O The attributes used are .\"O .BR SHF_ALLOC .\"O and .\"O .BR SHF_EXECINSTR . 使用される属性タイプは .BR SHF_ALLOC と .BR SHF_EXECINSTR である。 .TP .IR .gnu.version .\"O This section holds the version symbol table, an array of .\"O .I ElfN_Half .\"O elements. .\"O This section is of type .\"O .BR SHT_GNU_versym . .\"O The attribute type used is .\"O .BR SHF_ALLOC . このセクションはバージョン・シンボル・テーブルを保持する。 その内容は .I ElfN_Half 要素の配列である。 このセクションのタイプは .B SHT_GNU_versym である。 使用される属性タイプは .B SHF_ALLOC である。 .TP .IR .gnu.version_d .\"O This section holds the version symbol definitions, a table of .\"O .I ElfN_Verdef .\"O structures. .\"O This section is of type .\"O .BR SHT_GNU_verdef . .\"O The attribute type used is .\"O .BR SHF_ALLOC . このセクションはバージョンシンボルの定義を保持する。 その内容は .I ElfN_Verdef 構造体のテーブルである。 このセクションのタイプは .B SHT_GNU_verdef である。 使用される属性タイプは .B SHF_ALLOC である。 .TP .IR .gnu.version_r .\"O This section holds the version symbol needed elements, a table of .\"O .I ElfN_Verneed .\"O structures. .\"O This section is of .\"O type .\"O .BR SHT_GNU_versym . .\"O The attribute type used is .\"O .BR SHF_ALLOC . このセクションはバージョンシンボルが必要とする要素を保持する。 その内容は .I ElfN_Verneed 構造体のテーブルである。 このセクションのタイプは .B SHT_GNU_versym である。 使用される属性タイプは .B shf_alloc である。 .TP .IR .got .\"O This section holds the global offset table. .\"O This section is of type .\"O .BR SHT_PROGBITS . .\"O The attributes are processor-specific. このセクションはグローバルオフセットテーブルを保持する。 このセクションのタイプは .BR SHT_PROGBITS である。 属性はプロセッサ毎に異なる。 .TP .IR .hash .\"O This section holds a symbol hash table. .\"O This section is of type .\"O .BR SHT_HASH . .\"O The attribute used is .\"O .BR SHF_ALLOC . このセクションはシンボルハッシュテーブルを保持する。 セクションのタイプは .BR SHT_HASH である。 使用される属性は .BR SHF_ALLOC である。 .TP .IR .init .\"O This section holds executable instructions that contribute to the process .\"O initialization code. このセクションはプロセス初期化コードに配置される実行可能命令を保持する。 .\"O When a program starts to run the system arranges to .\"O execute the code in this section before calling the main program entry point. プログラムが実行を開始すると、 システムはメインプログラムエントリポイントを呼び出す前に、 このセクションにあるコードを配置して実行する。 .\"O This section is of type .\"O .BR SHT_PROGBITS . このセクションはのタイプは .BR SHT_PROGBITS である。 .\"O The attributes used are .\"O .BR SHF_ALLOC .\"O and .\"O .BR SHF_EXECINSTR . 使用される属性は .BR SHF_ALLOC と .BR SHF_EXECINSTR である。 .TP .IR .interp .\"O This section holds the pathname of a program interpreter. このセクションはプログラムインタプリタのパス名を保持する。 .\"O If the file has .\"O a loadable segment that includes the section, the section's attributes will .\"O include the .\"O .BR SHF_ALLOC .\"O bit. ファイルにこのセクションを含むロード可能セグメントがある場合、 そのセクションの属性には .BR SHF_ALLOC ビットが含まれる。 .\"O Otherwise, that bit will be off. それ以外の場合このビットはオフになる。 .\"O This section is of type .\"O .BR SHT_PROGBITS . このセクションのタイプは .BR SHT_PROGBITS である。 .TP .IR .line .\"O This section holds line number information for symbolic debugging, which .\"O describes the correspondence between the program source and the machine code. このセクションはシンボリックデバッグのための行番号情報を保持する。 ここにはプログラムソースコードとマシンコードの対応関係が記述される。 .\"O The contents are unspecified. 内容は指定されていない。 .\"O This section is of type .\"O .BR SHT_PROGBITS . このセクションのタイプは .BR SHT_PROGBITS である。 .\"O No attribute types are used. 属性タイプは使用されない。 .TP .IR .note .\"O This section holds information in the .\"O "Note Section" .\"O format described below. このセクションは以下に記述されている "Note Section" 形式で情報を保持する。 .\"O This section is of type .\"O .BR SHT_NOTE . このセクションのタイプは .BR SHT_NOTE である。 .\"O No attribute types are used. 属性タイプは使用されない。 .\"O OpenBSD .\"O native executables usually contain a .\"O .IR .note.openbsd.ident .\"O section to identify themselves, for the kernel to bypass any compatibility .\"O ELF binary emulation tests when loading the file. 通常 OpenBSD ネイティブ実行可能ファイルは自身を識別するために .IR .note.openbsd.ident セクションを持つ。 これによりカーネルは、ファイルをロードする際に 互換 ELF バイナリエミュレーションテストを回避できる。 .TP .IR .note.GNU-stack .\"O This section is used in Linux object files for declaring stack attributes. .\"O This section is of type .\"O .BR SHT_PROGBITS . .\"O The only attribute used is .\"O .BR SHF_EXECINSTR . .\"O This indicates to the GNU linker that the object file requires an .\"O executable stack. このセクションは Linux のオブジェクトファイルで スタック属性を宣言するのに使用される。 セクションのタイプは .B SHT_PROGBITS である。使用される属性は .B SHF_EXECINSTR だけである。この属性は GNU リンカに対して オブジェクトファイルが実行可能なスタック (executable stack) を必要とする 示すものである。 .TP .IR .plt .\"O This section holds the procedure linkage table. このセクションは手続き (procedure) リンクテーブルを保持する。 .\"O This section is of type .\"O .BR SHT_PROGBITS . このセクションのタイプは .BR SHT_PROGBITS である。 .\"O The attributes are processor-specific. 属性はプロセッサ毎に異なる。 .TP .IR .relNAME .\"O This section holds relocation information as described below. このセクションは以下に記述される再配置情報を保持する。 .\"O If the file .\"O has a loadable segment that includes relocation, the section's attributes .\"O will include the .\"O .BR SHF_ALLOC .\"O bit. ファイルが再配置を含むロード可能セグメントを持っている場合、 このセクションの属性は .BR SHF_ALLOC ビットを含む。 .\"O Otherwise the bit will be off. それ以外の場合、そのビットはオフである。 .\"O By convention, .\"O "NAME" .\"O is supplied by the section to which the relocations apply. 慣例として、 "NAME" は再配置が適用されるセクションが指定される。 .\"O Thus a relocation .\"O section for .\"O .BR .text .\"O normally would have the name .\"O .BR .rel.text . よって .BR .text についての再配置セクションは、通常は .BR .rel.text という名前を持つ。 .\"O This section is of type .\"O .BR SHT_REL . このセクションのタイプは .BR SHT_REL である。 .TP .IR .relaNAME .\"O This section holds relocation information as described below. このセクションは以下に記述される再配置情報を保持する。 .\"O If the file .\"O has a loadable segment that includes relocation, the section's attributes .\"O will include the .\"O .BR SHF_ALLOC .\"O bit. ファイルが再配置を含むロード可能セグメントを持っている場合、 このセクションの属性は .BR SHF_ALLOC ビットを含む。 .\"O Otherwise the bit will be off. それ以外の場合、そのビットはオフである。 .\"O By convention, .\"O "NAME" .\"O is supplied by the section to which the relocations apply. 慣例として、 "NAME" は再配置が適用されるセクションが指定される。 .\"O Thus a relocation .\"O section for .\"O .BR .text .\"O normally would have the name .\"O .BR .rela.text . よって .BR .text についての再配置セクションは、通常は .BR .rela.text という名前を持つ。 .\"O This section is of type .\"O .BR SHT_RELA . このセクションのタイプは .BR SHT_RELA である。 .TP .IR .rodata .\"O This section holds read-only data that typically contributes to a .\"O nonwritable segment in the process image. このセクションはリードオンリーのデータを保持する。 このデータはプロセスイメージにおける書き込み不可能なセグメントに置かれる。 .\"O This section is of type .\"O .BR SHT_PROGBITS . このセクションのタイプは .BR SHT_PROGBITS である。 .\"O The attribute used is .\"O .BR SHF_ALLOC . 使用される属性は .BR SHF_ALLOC である。 .TP .IR .rodata1 .\"O This section holds read-only data that typically contributes to a .\"O nonwritable segment in the process image. このセクションはリードオンリーのデータを保持する。 このデータはプロセスイメージにおける書き込み不可能なセグメントに置かれる。 .\"O This section is of type .\"O .BR SHT_PROGBITS . このセクションのタイプは .BR SHT_PROGBITS である。 .\"O The attribute used is .\"O .BR SHF_ALLOC . 使用される属性は .BR SHF_ALLOC である。 .TP .IR .shstrtab .\"O This section holds section names. このセクションはセクション名を保持する。 .\"O This section is of type .\"O .BR SHT_STRTAB . このセクションのタイプは .BR SHT_STRTAB である。 .\"O No attribute types are used. 属性タイプは使用されない。 .TP .IR .strtab .\"O This section holds strings, most commonly the strings that represent the .\"O names associated with symbol table entries. このセクションは文字列を保持する。 最も一般的なのは、シンボルテーブルエントリに関連づけられた 名前を表す文字列である。 .\"O If the file has a loadable .\"O segment that includes the symbol string table, the section's attributes .\"O will include the .\"O .BR SHF_ALLOC .\"O bit. ファイルがシンボル文字列テーブルを含むロード可能セグメントを持つ場合、 セクションの属性は .BR SHF_ALLOC ビットを含む。 .\"O Otherwise the bit will be off. それ以外の場合、そのビットはオフである。 .\"O This section is of type .\"O .BR SHT_STRTAB . このセクションのタイプは .BR SHT_STRTAB である。 .TP .IR .symtab .\"O This section holds a symbol table. このセクションはシンボルテーブルを保持する。 .\"O If the file has a loadable segment .\"O that includes the symbol table, the section's attributes will include .\"O the .\"O .BR SHF_ALLOC .\"O bit. ファイルがシンボルテーブルを含むロード可能セグメントを持つ場合、 セクションの属性は .BR SHF_ALLOC ビットを含む。 .\"O Otherwise the bit will be off. それ以外の場合、ビットはオフである。 .\"O This section is of type .\"O .BR SHT_SYMTAB . このセクションのタイプは .BR SHT_SYMTAB である。 .TP .IR .text .\"O This section holds the .\"O "text", .\"O or executable instructions, of a program. このセクションはプログラムの "テキスト" または実行可能命令を保持する。 .\"O This section is of type .\"O .BR SHT_PROGBITS . セクションのタイプは .BR SHT_PROGBITS である。 .\"O The attributes used are .\"O .BR SHF_ALLOC .\"O and .\"O .BR SHF_EXECINSTR . 使用される属性は .BR SHF_ALLOC と .BR SHF_EXECINSTR である。 .\" .El .PP .\"O String table sections hold null-terminated character sequences, commonly .\"O called strings. 文字列テーブルセクションは NULL 文字で終端されたキャラクタ配列 (通常文字列と呼ばれるもの) を保持する。 .\"O The object file uses these strings to represent symbol .\"O and section names. オブジェクトファイルはこれらの文字列を シンボル名とセクション名を表すために使う。 .\"O One references a string as an index into the string .\"O table section. 文字列は、文字列テーブルセクションへのインデックスとして参照される。 .\"O The first byte, which is index zero, is defined to hold .\"O a null byte (\(aq\\0\(aq). インデックス 0 の最初のバイトは、NULL バイト (\(aq\\0\(aq) を 保持すると定義されている。 .\"O Similarly, a string table's last byte is defined to .\"O hold a null byte, ensuring null termination for all strings. 同様に文字列テーブルの最後のバイトも NULL 文字を保持すると定義されている。 これは全ての文字列が NULL バイトで終端されていることを保証するためである。 .PP .\"O An object file's symbol table holds information needed to locate and .\"O relocate a program's symbolic definitions and references. .\"O A symbol table .\"O index is a subscript into this array. オブジェクトファイルのシンボルテーブルは、 プログラムのシンボル定義と参照を配置または再配置するのに 必要な情報を保持する。 .in +4n .nf typedef struct { uint32_t st_name; Elf32_Addr st_value; uint32_t st_size; unsigned char st_info; unsigned char st_other; uint16_t st_shndx; } Elf32_Sym; .fi .in .in +4n .nf typedef struct { uint32_t st_name; unsigned char st_info; unsigned char st_other; uint16_t st_shndx; Elf64_Addr st_value; uint64_t st_size; } Elf64_Sym; .fi .in .PP .\"O The 32-bit and 64-bit versions have the same members, just in a different .\"O order. 32 ビット版と 64 ビット版は同じメンバを持ち、単に順番が異なるだけである。 .\" .Bl -tag -width "st_value" .TP 10 .IR st_name .\"O This member holds an index into the object file's symbol string table, .\"O which holds character representations of the symbol names. このメンバはオブジェクトファイルのシンボル文字列テーブルの インデックスを保持する。 シンボル文字列テーブルはシンボル名の文字表現を保持する。 .\"O If the value .\"O is nonzero, it represents a string table index that gives the symbol .\"O name. この値が 0 でない場合、シンボル名を得るための文字テーブルインデックスを表す。 .\"O Otherwise, the symbol table has no name. それ以外の場合、シンボルテーブルは名前を持たない。 .TP .IR st_value .\"O This member gives the value of the associated symbol. このメンバは関連づけられたシンボルの値を表す。 .TP .IR st_size .\"O Many symbols have associated sizes. .\"O This member holds zero if the symbol .\"O has no size or an unknown size. 多くのシンボルにはそれに関連づけられたサイズがある。 シンボルがサイズを持たない場合、またはサイズが不明な場合、 このメンバは 0 である。 .TP .IR st_info .\"O This member specifies the symbol's type and binding attributes: このメンバはシンボルのタイプとバインディング (binding) 属性を指定する: .RS 10 .TP 12 .BR STT_NOTYPE .\"O The symbol's type is not defined. シンボルのタイプが定義されていない。 .TP .BR STT_OBJECT .\"O The symbol is associated with a data object. シンボルはデータオブジェクトに関連づけられている。 .TP .BR STT_FUNC .\"O The symbol is associated with a function or other executable code. シンボルは関数またはその他の実行コードに関連づけられている。 .TP .BR STT_SECTION .\"O The symbol is associated with a section. シンボルはセクションに関連づけられている。 .\"O Symbol table entries of .\"O this type exist primarily for relocation and normally have .\"O .BR STB_LOCAL .\"O bindings. このタイプのシンボルテーブルエントリは、 主として再配置のために存在し、通常は .BR STB_LOCAL バインディングを持つ。 .TP .BR STT_FILE .\"O By convention, the symbol's name gives the name of the source file .\"O associated with the object file. 慣例として、シンボルの名前は オブジェクトファイルに関連づけられたソースファイルの名前を指定する。 .\"O A file symbol has .\"O .BR STB_LOCAL .\"O bindings, its section index is .\"O .BR SHN_ABS , .\"O and it precedes the other .\"O .BR STB_LOCAL .\"O symbols of the file, if it is present. ファイルシンボルは .BR STB_LOCAL バインディングを持ち、そのセクションインデックスは .BR SHN_ABS である。 ファイルシンボルは、ファイルに他の .BR STB_LOCAL シンボルがある場合は、それよりも先に来る。 .TP .BR STT_LOPROC .\"O This value up to and including .\"O .BR STT_HIPROC .\"O is reserved for processor-specific semantics. この値以上で .BR STT_HIPROC 以下の範囲はプロセッサ固有の意味に予約されている。 .TP .BR STT_HIPROC .\"O This value down to and including .\"O .BR STT_LOPROC .\"O is reserved for processor-specific semantics. この値以下で .BR STT_LOPROC 以上の範囲はプロセッサ固有の意味に予約されている。 .\" .El .\" .Bl -tag -width "STB_GLOBAL" .TP .BR STB_LOCAL .\"O Local symbols are not visible outside the object file containing their .\"O definition. 局所的シンボルはその定義を含むオブジェクトファイルの外からは見えない。 .\"O Local symbols of the same name may exist in multiple files .\"O without interfering with each other. 同じ名前の局所的シンボルは、お互いに影響を受けることなく、 複数のファイルに存在できる。 .TP .BR STB_GLOBAL .\"O Global symbols are visible to all object files being combined. .\"O One file's .\"O definition of a global symbol will satisfy another file's undefined .\"O reference to the same symbol. 大域的シンボルは結びつけられている全てのオブジェクトファイルから見える。 1 つのファイルで大域的シンボルが定義されていたら、 他のファイルでは同じシンボルへの参照は未定義でなければならない。 .TP .BR STB_WEAK .\"O Weak symbols resemble global symbols, but their definitions have lower .\"O precedence. 弱シンボルは大域的シンボルに似ているが、その定義は優先度が低い。 .TP .BR STB_LOPROC .\"O This value up to and including .\"O .BR STB_HIPROC .\"O is reserved for processor-specific semantics. この値以上で .BR STB_HIPROC 以下の範囲はプロセッサ固有の意味に予約されている。 .TP .BR STB_HIPROC .\"O This value down to and including .\"O .BR STB_LOPROC .\"O is reserved for processor-specific semantics. この値以下で .BR STB_LOPROC 以上の範囲はプロセッサ固有の意味に予約されている。 .IP .\"O There are macros for packing and unpacking the binding and type fields: バインディングとタイプフィールドを パックしたりアンパックしたりするマクロがある: .IP .BR ELF32_ST_BIND (info) .\"O or または .BR ELF64_ST_BIND (info) .\"O extract a binding from an .\"O .I st_info .\"O value. .I st_info の値からバインディングを取り出す。 .IP .BR ELF32_ST_TYPE (info) .\"O or または .BR ELF64_ST_TYPE (info) .br .\"O extract a type from an .\"O .I st_info .\"O value. .I st_info の値からタイプを取り出す。 .IP .BR ELF32_ST_INFO "(bind, type)" .\"O or または .BR ELF64_ST_INFO "(bind, type)" .br .\"O convert a binding and a type into an .\"O .I st_info .\"O value. バインディングとタイプを .I st_info の値に変換する。 .RE .\" .El .TP .IR st_other .\"O This member defines the symbol visibility. このメンバはシンボルの visibility (見える範囲) を規定する。 .\" .Bl -tag -width "STV_PROTECTED" .RS 10 .TP 16 .PD 0 .BR STV_DEFAULT .\"O Default symbol visibility rules. デフォルトのシンボル visibility ルール。 .TP .BR STV_INTERNAL .\"O Processor-specific hidden class. プロセッサ固有の隠しクラス。 .TP .BR STV_HIDDEN .\"O Symbol is unavailable in other modules. シンボルは他のモジュールからは利用できない。 .TP .BR STV_PROTECTED .\"O Not preemptible, not exported. 横取りできず (not preemptible)、公開されない。 .PD .PP .\"O There are macros for extracting the visibility type: visibility 種別を抽出するためのマクロがある。 .PP .\"O .BR ELF32_ST_VISIBILITY (other) .\"O or .\"O .BR ELF64_ST_VISIBILITY (other) .BR ELF32_ST_VISIBILITY (other) または .BR ELF64_ST_VISIBILITY (other) .RE .\" .El .TP .IR st_shndx .\"O Every symbol table entry is .\"O "defined" .\"O in relation to some section. 各シンボルテーブルエントリは、いくつかのセクションに関連して "定義されている"。 .\"O This member holds the relevant section .\"O header table index. このメンバは関連するセクションヘッダテーブルインデックスを保持する。 .\" .El .PP .\"O Relocation is the process of connecting symbolic references with .\"O symbolic definitions. 再配置はシンボル参照とシンボル定義を結合するプロセスである。 .\"O Relocatable files must have information that .\"O describes how to modify their section contents, thus allowing executable .\"O and shared object files to hold the right information for a process's .\"O program image. 再配置可能ファイルはセクションの内容をどのように修正するかに関する 情報を持たなければならない。 これにより、実行可能ファイルと共有オブジェクトファイルは プロセスのプログラムイメージについての正しい情報を持つことができる。 .\"O Relocation entries are these data. 再配置エントリは以下のようなデータである。 .PP .\"O Relocation structures that do not need an addend: 加数を必要としない再配置構造体。 .in +4n .nf typedef struct { Elf32_Addr r_offset; uint32_t r_info; } Elf32_Rel; .fi .in .in +4n .nf typedef struct { Elf64_Addr r_offset; uint64_t r_info; } Elf64_Rel; .fi .in .PP .\"O Relocation structures that need an addend: 加数を必要とする再配置構造体。 .in +4n .nf typedef struct { Elf32_Addr r_offset; uint32_t r_info; int32_t r_addend; } Elf32_Rela; .fi .in .in +4n .nf typedef struct { Elf64_Addr r_offset; uint64_t r_info; int64_t r_addend; } Elf64_Rela; .fi .in .\" .Bl -tag -width "r_offset" .TP 12 .IR r_offset .\"O This member gives the location at which to apply the relocation action. このメンバは再配置動作が適用される位置を与える。 .\"O For a relocatable file, the value is the byte offset from the beginning .\"O of the section to the storage unit affected by the relocation. 再配置可能ファイルの場合、この値はセクションの先頭から 再配置で影響を受ける格納単位 (storage unit) までのバイトオフセットである。 .\"O For an .\"O executable file or shared object, the value is the virtual address of .\"O the storage unit affected by the relocation. 実行可能ファイルまたは共有オブジェクトの場合、 この値は再配置で影響を受ける格納単位の仮想アドレスである。 .TP .IR r_info .\"O This member gives both the symbol table index with respect to which the .\"O relocation must be made and the type of relocation to apply. このメンバは、再配置が行われなければならないシンボルテーブルインデックスと、 適用される再配置のタイプの両方を与える。 .\"O Relocation .\"O types are processor specific. 再配置タイプはプロセッサ毎に異なる。 .\"O When the text refers to a relocation .\"O entry's relocation type or symbol table index, it means the result of .\"O applying .\"O .BR ELF_[32|64]_R_TYPE .\"O or .\"O .BR ELF[32|64]_R_SYM , .\"O respectively, to the entry's .\"O .IR r_info .\"O member. テキストが再配置エントリの再配置タイプ またはシンボルテーブルインデックスを参照している場合、 それぞれエントリの .IR r_info メンバに対して、それぞれ .BR ELF_[32|64]_R_TYPE と .BR ELF[32|64]_R_SYM を適用した結果を意味する。 .TP .IR r_addend .\"O This member specifies a constant addend used to compute the value to be .\"O stored into the relocatable field. このメンバは定数の加数を指定する。 この加数は再配置可能フィールドに格納される値を計算するために使われる。 .\" .El .PP .\"O The .dynamic section contains a series of structures that hold relevant .\"O dynamic linking information. .\"O The d_tag member controls the interpretation .\"O of d_un. \&.dynamic セクションは、関連する動的リンク情報を保持している 一連の構造体を保持する。 d_tag メンバは d_un の解釈を制御する。 .in +4n .nf typedef struct { Elf32_Sword d_tag; union { Elf32_Word d_val; Elf32_Addr d_ptr; } d_un; } Elf32_Dyn; extern Elf32_Dyn _DYNAMIC[]; .fi .in .in +4n .nf typedef struct { Elf64_Sxword d_tag; union { Elf64_Xword d_val; Elf64_Addr d_ptr; } d_un; } Elf64_Dyn; extern Elf64_Dyn _DYNAMIC[]; .fi .in .\" .Bl -tag -width "d_tag" .TP 10 .IR d_tag .\"O This member may have any of the following values: このメンバは以下の値を持つことができる: .\" .Bl -tag -width "DT_SYMBOLIC" .RS 10 .TP 12 .BR DT_NULL .\"O Marks end of dynamic section 動的セクションの終りのマーク .TP .BR DT_NEEDED .\"O String table offset to name of a needed library 必要なライブラリの名前への文字列テーブルオフセット .TP .BR DT_PLTRELSZ .\"O Size in bytes of PLT relocs PLT 再配置 (reloc) テーブルのサイズ (バイト単位) .TP .BR DT_PLTGOT .\"O Address of PLT and/or GOT PLT と GOT (または何れか一方) のアドレス .TP .BR DT_HASH .\"O Address of symbol hash table シンボルハッシュテーブルのアドレス .TP .BR DT_STRTAB .\"O Address of string table 文字列テーブルのアドレス .TP .BR DT_SYMTAB .\"O Address of symbol table シンボルテーブルのアドレス .TP .BR DT_RELA .\"O Address of Rela relocs table Rela 再配置テーブルのアドレス .TP .BR DT_RELASZ .\"O Size in bytes of Rela table Rela テーブルのサイズ (バイト単位) .TP .BR DT_RELAENT .\"O Size in bytes of a Rela table entry Rela テーブルエントリのサイズ (バイト単位) .TP .BR DT_STRSZ .\"O Size in bytes of string table 文字列テーブルのサイズ (バイト単位) .TP .BR DT_SYMENT .\"O Size in bytes of a symbol table entry シンボルテーブルエントリのサイズ (バイト単位) .TP .BR DT_INIT .\"O Address of the initialization function 初期化関数のアドレス .TP .BR DT_FINI .\"O Address of the termination function 終了関数のアドレス .TP .BR DT_SONAME .\"O String table offset to name of shared object 共有オブジェクトの名前への文字列テーブルオフセット .TP .BR DT_RPATH .\"O String table offset to library search path (deprecated) ライブラリ検索パスへの文字列テーブルオフセット (推奨されない) .TP .BR DT_SYMBOLIC .\"O Alert linker to search this shared object before the executable for symbols リンカがシンボルの実行可能ファイルより前に この共有オブジェクトを検索した場合は、警告を出す。 .TP .BR DT_REL .\"O Address of Rel relocs table Rel 再配置テーブルのアドレス .TP .BR DT_RELSZ .\"O Size in bytes of Rel table Rel テーブルのサイズ (バイト単位) .TP .BR DT_RELENT .\"O Size in bytes of a Rel table entry Rel テーブルエントリのサイズ (バイト単位) .TP .BR DT_PLTREL .\"O Type of reloc the PLT refers (Rela or Rel) PLT が参照する再配置テーブルのタイプ (Rela または Rel) .TP .BR DT_DEBUG .\"O Undefined use for debugging デバッグのために使用されている。内容は定義されていない。 .TP .BR DT_TEXTREL .\"O Absence of this indicates no relocs should apply to a nonwritable segment これが指定されていない場合、 書き込み不可のセグメントには再配置は適用されない。 .TP .BR DT_JMPREL .\"O Address of reloc entries solely for the PLT PLT 専用の再配置エントリのアドレス .TP .BR DT_BIND_NOW .\"O Instruct dynamic linker to process all relocs before transferring control to .\"O the executable 実行可能ファイルに制御を譲る前に、 全ての再配置を処理するように動的リンカに指示する。 .TP .BR DT_RUNPATH .\"O String table offset to library search path ライブラリ検索パスへの文字列テーブルオフセット .TP .BR DT_LOPROC .\"O Start of processor-specific semantics プロセッサ固有の意味の開始 .TP .BR DT_HIPROC .\"O End of processor-specific semantics プロセッサ固有の意味の終了 .RE .\" .El .TP .IR d_val .\"O This member represents integer values with various interpretations. このメンバは様々な意味に解釈される整数値である。 .TP .IR d_ptr .\"O This member represents program virtual addresses. .\"O When interpreting .\"O these addresses, the actual address should be computed based on the .\"O original file value and memory base address. .\"O Files do not contain .\"O relocation entries to fixup these addresses. このメンバはプログラムの仮想アドレスを表す。 これらのアドレスを解釈する際に、 実際のアドレスは元々のファイルの値と メモリの基底アドレスから計算される。 ファイルにはこれらのアドレスを修正するための 再配置エントリを含めてはならない。 .TP .IR _DYNAMIC .\"O Array containing all the dynamic structures in the .dynamic section. .\"O This is automatically populated by the linker. \&.dynamic セクションにある全ての動的構造体を含む配列。 これは自動的にリンカに渡される。 .\" .El .\"O .SH NOTES .SH 備考 .\"O .\" OpenBSD .\"O .\" ELF support first appeared in .\"O .\" OpenBSD 1.2 , .\"O .\" although not all supported platforms use it as the native .\"O .\" binary file format. .\" OpenBSD .\" ELF のサポートは .\" OpenBSD 1.2 .\" で初めて登場した。 .\" しかし、これをサポートするプラットフォームの全てが .\" ネイティブバイナリファイルフォーマットとして使っていた訳ではない。 .\"O ELF first appeared in .\"O System V. ELF は System V で初めて登場した。 .\"O ELF in itself first appeared in .\"O System V. ELF 自体は System V で初めて登場した。 .\"O The ELF format is an adopted standard. ELF フォーマットは採択された標準である。 .\"O .\" .SH AUTHORS .\" .SH 著者 .\"O .\" The original version of this manual page was written by .\"O .\" .An Jeroen Ruigrok van der Werven .\"O .\" .Aq asmodai@FreeBSD.org .\"O .\" with inspiration from BSDi's .\"O .\" .Bsx .\"O .\" .Nm elf .\"O .\" man page. .\" この man ページの元々のバージョンは、BSDi の .\" .Bsx .\" .Nm elf .\" man ページに刺激を受けて .\" .An Jeroen Ruigrok van der Werven .\" .Aq asmodai@FreeBSD.org .\" が書いた。 .\"O .SH SEE ALSO .SH 関連項目 .BR as (1), .BR gdb (1), .BR ld (1), .BR objdump (1), .BR execve (2), .BR core (5) .PP Hewlett-Packard, .IR "Elf-64 Object File Format" . .PP Santa Cruz Operation, .IR "System V Application Binary Interface" . .PP Unix System Laboratories, "Object Files", .IR "Executable and Linking Format (ELF)" .