X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=draft%2Fman5%2Felf.5;h=b32034d0f202d18d3395d5c8006bf33ef3b6c876;hb=40274b7d79d419993de4a745e3ae86ca6d0f417f;hp=c99472bd6c3ea5ca923b7b567c9aaa88cf366264;hpb=633a2252e0be3c867dce264a180a89ce8181d36f;p=linuxjm%2FLDP_man-pages.git diff --git a/draft/man5/elf.5 b/draft/man5/elf.5 index c99472bd..b32034d0 100644 --- a/draft/man5/elf.5 +++ b/draft/man5/elf.5 @@ -2,6 +2,7 @@ .\"Copyright (c) 1999 Jeroen Ruigrok van der Werven .\"All rights reserved. .\" +.\" %%%LICENSE_START(PERMISSIVE_MISC) .\"Redistribution and use in source and binary forms, with or without .\"modification, are permitted provided that the following conditions .\"are met: @@ -22,6 +23,7 @@ .\"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. +.\" %%%LICENSE_END .\" .\" $FreeBSD: src/share/man/man5/elf.5,v 1.21 2001/10/01 16:09:23 ru Exp $ .\" @@ -30,201 +32,90 @@ .\" 2007-10-11, Mike Frysinger , various fixes .\" 2007-12-08, mtk, Converted from mdoc to man macros .\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" .\" 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 +.\" Updated 2012-04-30, Akihiro MOTOKI +.\" Updated 2013-03-26, Akihiro MOTOKI +.\" Updated 2013-05-06, Akihiro MOTOKI .\" -.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 ½ñ¼° +.TH ELF 5 2013\-04\-17 Linux "Linux Programmer's Manual" +.SH 名前 +elf \- 実行可能リンクフォーマット (ELF) ファイルのフォーマット +.SH 書式 .nf .\" .B #include -.B #include +\fB#include \fP .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. -¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤È¤·¤Æ¤Ï¡¢Ä̾ï¤Î¼Â¹Ô²Äǽ¥Õ¥¡¥¤¥ë¡¦ -ºÆÇÛÃÖ²Äǽ¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¡¦¥³¥¢¥Õ¥¡¥¤¥ë¡¦¶¦Í­¥é¥¤¥Ö¥é¥ê¤¬¤¢¤ë¡£ +.SH 説明 +ヘッダファイル \fI\fP は ELF 実行可能バイナリファイルのフォーマットを定義する。 +これらのファイルとしては、通常の実行可能ファイル・ 再配置可能オブジェクトファイル・コアファイル・共有ライブラリがある。 .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 ¤Ä¤Î¥Æ¡¼¥Ö¥ë¤Ï¥Õ¥¡¥¤¥ë¤Î»Ä¤ê¤ÎÉôʬ¤Î¾ÜºÙ¤òµ­½Ò¤¹¤ë¡£ +ELF ファイルフォーマットを使う実行可能ファイルは、 ELF ヘッダの後にプログラムヘッダテーブルまたは セクションヘッダテーブル (またはその両方) +が続く構成である。 ELF ヘッダは常にファイルのオフセット 0 にある。 プログラムヘッダテーブルとセクションヘッダテーブルの +ファイル内でのオフセットは、ELF ヘッダに定義されている。 この 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 ¥Ð¥¤¥Ê¥ê¥Õ¥¡¥¤¥ë¤ò½èÍý¤·¤¿¤¤ -.\" ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¢¥½¡¼¥¹¥³¡¼¥É¤Ë +.\" Applications which wish to process ELF binary files for their native +.\" architecture only should include .\" .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". -.\" ¤³¤ì¤é¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¢¥¸¥§¥Í¥ê¥Ã¥¯Ì¾ +.\" in their source code. +.\" These applications should need to refer to .\" 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 ¥Ó¥Ã¥È¤«¤Ë´Ø¤ï¤é¤º¡¢ -.\" ¤É¤Î¥¢¡¼¥­¥Æ¥¯¥Á¥ã¾å¤Ç¤â¥³¥ó¥Ñ¥¤¥ë¤Ç¤­¤ë¡£ +.\" and to the macros by +.\" ELF_xxx". +.\" Applications written this way can be compiled on any architecture, +.\" regardless of whether the host is 32-bit or 64-bit. .\" .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 ¥Õ¥¡¥¤¥ë¤ò -.\" ½èÍý¤¹¤ëɬÍפ¬¤¢¤ë¾ì¹ç¡¢¤½¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ÏÌÀ¼¨Åª¤Ë +.\" Should an application need to process ELF files of an unknown +.\" architecture, then the application needs to explicitly use either .\" "Elf32_xxx" -.\" ¤Þ¤¿¤Ï +.\" or .\" "Elf64_xxx" -.\" ¤È¤¤¤¦·¿Ì¾¤È¹½Â¤ÂÎ̾¤ò»È¤¦É¬Íפ¬¤¢¤ë¡£ -.\"O .\" Likewise, the macros need to be identified by -.\"O .\" "ELF32_xxx" -.\"O .\" or -.\"O .\" "ELF64_xxx". -.\" ƱÍͤˡ¢¥Þ¥¯¥í¤Ï +.\" type and structure names. +.\" Likewise, the macros need to be identified by .\" "ELF32_xxx" -.\" ¤Þ¤¿¤Ï -.\" "ELF64_xxx" -.\" ¤Ç¼±Ê̤µ¤ì¤ëɬÍפ¬¤¢¤ë¡£ +.\" or +.\" "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 ¸À¸ì¤Î¹½Â¤ÂΤǵ­½Ò¤·¡¢ -¤Þ¤¿Æ°Åª¥»¥¯¥·¥ç¥ó¡¦ºÆÇÛÃÖ²Äǽ¥»¥¯¥·¥ç¥ó¡¦¥·¥ó¥Ü¥ë¥Æ¡¼¥Ö¥ë¤Î¹½Â¤ÂΤâ -´Þ¤ó¤Ç¤¤¤ë¡£ +このヘッダファイルは上記のヘッダを 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 -¤òɽ¤¹): +以下の型は N ビットアーキテクチャで使われる (N=32,64 であり \fIElfN\fP は \fIElf32\fP または \fIElf64\fP を表し、 +\fIuintN_t\fP は \fIuint32_t\fP または \fIuint64_t\fP を表す): .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 +.\" Elf32_Size Unsigned object size +ElfN_Addr 符号なしのプログラムアドレス, uintN_t +ElfN_Off 符号なしのファイルオフセット, uintN_t +ElfN_Section 符号なしのセクションインデックス, 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 -¤ËÍѤ¤¤é¤ì¤ë¡£ -º®Íð¤òÈò¤±¤ë¤¿¤á¡¢°Ê²¼¤Ç¤Ï¡¢¤³¤ì¤é¤Î·¿¤Ï¥µ¥¤¥º¤¬¼«ÌÀ¤Ê·¿¤ËÃÖ¤­´¹¤¨¤Æ¤¢¤ë¡£) +(注意: *BSD での用語は少し異なる。 \fIElf64_Half\fP は \fIElf32_Half\fP の 2 倍であり、 +\fIElf64Quarter\fP が \fIuint16_t\fP に用いられる。 混乱を避けるため、以下では、これらの型はサイズが自明な型に置き換えてある。) .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 ¤ÎÇÜ¿ô¤Ë¤¹¤ë¤¿¤á¤Ê¤É¤Ç¤¢¤ë¡£ +このファイルフォーマットが定義する全てのデータ構造体は、 関連するクラスの "自然な" サイズと配置の指針に従う。 +必要な場合、データ構造体では明示的なパディング (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 -¤Çµ­½Ò¤µ¤ì¤ë: +ELF ヘッダは型 \fIElf32_Ehdr\fP または \fIElf64_Ehdr\fP で記述される: .in +4n .nf @@ -249,172 +140,103 @@ typedef struct { .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: -°Ê²¼¤Î¥Þ¥¯¥í¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë: +フィールドは以下の意味を持つ: +.TP 12 +\fIe_ident\fP +このバイト配列は、プロセッサやファイルの他の部分には依存せずに、 ファイルを解釈 (interpret) するために指定される。 +この配列内のすべてのものは、接頭辞 \fBEI_\fP で始まるマクロの名前が付き、接頭辞 \fBELF\fP で始まる値を持つ。 以下のマクロが定義されている: .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 ¥Ð¥¤¥È¤Ï¡¢¤³¤Î¥Ð¥¤¥Ê¥ê¤Î¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤ò¼¨¤¹: +.TP 12 +\fBEI_MAG0\fP +マジックナンバーの第 1 バイト。 \fBELFMAG0\fP で埋めなければならない。 (0: 0x7f) +.TP +\fBEI_MAG1\fP +マジックナンバーの第 2 バイト。 \fBELFMAG1\fP で埋めなければならない。 (1: \(aqE\(aq) +.TP +\fBEI_MAG2\fP +マジックナンバーの第 3 バイト。 \fBELFMAG2\fP で埋めなければならない。 (2: \(aqL\(aq) +.TP +\fBEI_MAG3\fP +マジックナンバーの第 4 バイト。 \fBELFMAG3\fP で埋めなければならない。 (3: \(aqF\(aq) +.TP +\fBEI_CLASS\fP +第 5 バイトは、このバイナリのアーキテクチャを示す: .RS 12 .\" .Bl -tag -width "ELFCLASSNONE" -compact -.TP 14 +.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 ¥Ó¥Ã¥È¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤òÄêµÁ¤¹¤ë¡£ +\fBELFCLASSNONE\fP +このクラスは不正である。 +.TP +\fBELFCLASS32\fP +32 ビットアーキテクチャを定義する。 ファイルと仮想アドレス空間が 4 ギガバイトまでのマシンをサポートする。 +.TP +\fBELFCLASS64\fP +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 ¥Ð¥¤¥È¤Ï¥Õ¥¡¥¤¥ëÆâ¤Î¥×¥í¥»¥Ã¥µ¸ÇÍ­¥Ç¡¼¥¿¤Î -¥Ç¡¼¥¿¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ò»ØÄꤹ¤ë¡£ -¸½ºß¤Î¤È¤³¤í°Ê²¼¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë: +.TP +\fBEI_DATA\fP .\" .Bl -tag -width "ELFDATA2LSB" -compact +第 6 バイトはファイル内のプロセッサ固有データの データエンコーディングを指定する。 現在のところ以下のエンコーディングがサポートされている: .RS 12 -.TP 14 +.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 ¤ÎÊä¿ô¡¢¥Ó¥Ã¥°¥¨¥ó¥Ç¥£¥¢¥ó¡£ +\fBELFDATANONE\fP +不明なデータフォーマット。 +.TP +\fBELFDATA2LSB\fP +2 の補数、リトルエンディアン。 +.TP +\fBELFDATA2MSB\fP +2 の補数、ビッグエンディアン。 .PD .RE .\" .El -.TP +.TP .PD 0 -.BR EI_VERSION -.\"O The version number of the ELF specification: -ELF »ÅÍͤΥС¼¥¸¥ç¥óÈÖ¹æ: +\fBEI_VERSION\fP .\" .Bl -tag -width "EV_CURRENT" -compact +第 7 バイトは ELF 仕様のバージョン番号である: .RS 12 -.TP 14 -.BR EV_NONE -.\"O Invalid version. -ÉÔÀµ¤Ê¥Ð¡¼¥¸¥ç¥ó¡£ -.TP -.BR EV_CURRENT -.\"O Current version. -¸½ºß¤Î¥Ð¡¼¥¸¥ç¥ó¡£ +.TP 14 +\fBEV_NONE\fP +不正なバージョン。 +.TP +\fBEV_CURRENT\fP +現在のバージョン。 .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.: -¤³¤ì¤é¤Î¥Õ¥£¡¼¥ë¥É¤Î²ò¼á¤Ï¡¢¤³¤Î¥Ð¥¤¥È¤ÎÃͤˤè¤Ã¤Æ·èÄꤵ¤ì¤ë¡£ -Î㤨¤Ð: +.TP +\fBEI_OSABI\fP .\" .Bl -tag -width "ELFOSABI_STANDALONE" -compact +第 8 バイトはオブジェクトのターゲットとなるオペレーティングシステムと ABI を示す。他の ELF +構造体のフィールドには、プラットフォーム固有の意味を持つフラグや値を持つものもある。これらのフィールドの解釈は、このバイトの値によって決定される。以下に例を挙げる。 .RS 12 -.TP 20 +.TP 20 .PD 0 -.BR ELFOSABI_NONE -.\"O Same as ELFOSABI_SYSV -ELFOSABI_SYSV ¤ÈƱ¤¸¡£ +\fBELFOSABI_NONE\fP .\" 0 -.TP -.BR ELFOSABI_SYSV -UNIX System V ABI. +ELFOSABI_SYSV と同じ。 +.TP +\fBELFOSABI_SYSV\fP .\" 0 .\" synonym: ELFOSABI_NONE -.TP -.BR ELFOSABI_HPUX -HP-UX ABI. +UNIX System V ABI. +.TP +\fBELFOSABI_HPUX\fP .\" 1 -.TP -.BR ELFOSABI_NETBSD -NetBSD ABI. +HP\-UX ABI. +.TP +\fBELFOSABI_NETBSD\fP .\" 2 -.TP -.BR ELFOSABI_LINUX -Linux ABI. +NetBSD ABI. +.TP +\fBELFOSABI_LINUX\fP .\" 3 .\" .TP .\" .BR ELFOSABI_HURD @@ -424,480 +246,311 @@ Linux ABI. .\" .BR ELFOSABI_86OPEN .\" 86Open Common IA32 ABI. .\" 5 -.TP -.BR ELFOSABI_SOLARIS -Solaris ABI. +Linux ABI. +.TP +\fBELFOSABI_SOLARIS\fP .\" 6 -.\" .It Dv ELFOSABI_MONTEREY +.\" .TP +.\" .BR ELFOSABI_MONTEREY .\" Monterey project ABI. -.\"O Now replaced by +.\" Now replaced by .\" ELFOSABI_AIX .\" 7 -.TP -.BR ELFOSABI_IRIX -IRIX ABI. +Solaris ABI. +.TP +\fBELFOSABI_IRIX\fP .\" 8 -.TP -.BR ELFOSABI_FREEBSD -FreeBSD ABI. +IRIX ABI. +.TP +\fBELFOSABI_FREEBSD\fP .\" 9 -.TP -.BR ELFOSABI_TRU64 -TRU64 UNIX ABI. +FreeBSD ABI. +.TP +\fBELFOSABI_TRU64\fP .\" 10 .\" ELFOSABI_MODESTO .\" 11 .\" ELFOSABI_OPENBSD .\" 12 -.TP -.BR ELFOSABI_ARM -.\"O ARM architecture ABI. -ARM ¥¢¡¼¥­¥Æ¥¯¥Á¥ã ABI. +TRU64 UNIX ABI. +.TP +\fBELFOSABI_ARM\fP .\" 97 -.TP -.BR ELFOSABI_STANDALONE -.\"O Stand-alone (embedded) ABI. -¥¹¥¿¥ó¥É¥¢¥í¥ó (ÁȤ߹þ¤ß) ABI. +ARM アーキテクチャ ABI. +.TP +\fBELFOSABI_STANDALONE\fP .\" 255 .\" .El +スタンドアロン (組み込み) ABI. .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 -ÇÛÎó¤Î¥µ¥¤¥º¡£ +.TP +\fBEI_ABIVERSION\fP +第 9 バイトはオブジェクトがターゲットとしている ABI のバージョンを示す。 このフィールドは互換性のない ABI +のバージョンを区別するために使われる。 このバージョン番号の解釈は、 \fBEI_OSABI\fP フィールドで識別される ABI に依存する。 +この仕様に準拠するアプリケーションでは、値 0 を使う。 +.TP +\fBEI_PAD\fP +.\" As reported by Yuri Kozlov and confirmed by Mike Frysinger, EI_BRAND is +.\" not in GABI (http://www.sco.com/developers/gabi/latest/ch4.eheader.html) +.\" It looks to be a BSDism +.\" .TP +.\" .BR EI_BRAND +.\" Start of architecture identification. +パディングの開始。 これらのバイトは予約されており、0 に設定されている。 これらを読み込むプログラムは、これらのバイトを無視すべきである。 +現在使われていないバイトに意味が与えられる場合、 \fBEI_PAD\fP の値は将来変更されるかもしれない。 +.TP +\fBEI_NIDENT\fP .\" .El +\fIe_ident\fP 配列のサイズ。 .RE -.TP -.IR e_type -.\"O This member of the structure identifies the object file type: -¤³¤Î¹½Â¤ÂΤΥá¥ó¥Ð¤Ï¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¥¿¥¤¥×¤ò¼¨¤¹: +.TP +\fIe_type\fP +この構造体のメンバはオブジェクトファイルタイプを示す: .RS 12 .\" .Bl -tag -width "ET_NONE" -compact -.TP 12 +.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. -¥³¥¢¥Õ¥¡¥¤¥ë¡£ +\fBET_NONE\fP +不明なタイプ。 +.TP +\fBET_REL\fP +再配置可能ファイル。 +.TP +\fBET_EXEC\fP +実行可能ファイル。 +.TP +\fBET_DYN\fP +共有オブジェクト。 +.TP +\fBET_CORE\fP +コアファイル。 .PD .RE .\" .El -.TP -.IR e_machine -.\"O This member specifies the required architecture for an individual file. -.\"O E.g.: -¤³¤Î¥á¥ó¥Ð¤Ï¸Ä¡¹¤Î¥Õ¥¡¥¤¥ë¤ËɬÍפȤµ¤ì¤ë¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤ò»ØÄꤹ¤ë¡£ -Îã: +.TP +\fIe_machine\fP +このメンバは個々のファイルに必要とされるアーキテクチャを指定する。 例: .RS 12 .\" .Bl -tag -width "EM_MIPS_RS4_BE" -compact -.TP 12 +.TP 12 .PD 0 -.BR EM_NONE -.\"O An unknown machine. -ÉÔÌÀ¤Ê¥Þ¥·¥ó¡£ +\fBEM_NONE\fP .\" 0 -.TP -.BR EM_M32 -AT&T WE 32100. +不明なマシン。 +.TP +\fBEM_M32\fP .\" 1 -.TP -.BR EM_SPARC -Sun Microsystems SPARC. +AT&T WE 32100. +.TP +\fBEM_SPARC\fP .\" 2 -.TP -.BR EM_386 -Intel 80386. +Sun Microsystems SPARC. +.TP +\fBEM_386\fP .\" 3 -.TP -.BR EM_68K -Motorola 68000. +Intel 80386. +.TP +\fBEM_68K\fP .\" 4 -.TP -.BR EM_88K -Motorola 88000. +Motorola 68000. +.TP +\fBEM_88K\fP .\" 5 -.\" .It Dv EM_486 +.\" .TP +.\" .BR EM_486 .\" Intel 80486. .\" 6 -.TP -.BR EM_860 -Intel 80860. +Motorola 88000. +.TP +\fBEM_860\fP .\" 7 -.TP -.BR EM_MIPS -.\"O MIPS RS3000 (big-endian only). -MIPS RS3000 (¥Ó¥Ã¥°¥¨¥ó¥Ç¥£¥¢¥ó¤Î¤ß)¡£ +Intel 80860. +.TP +\fBEM_MIPS\fP .\" 8 .\" EM_S370 .\" 9 -.\" .It Dv EM_MIPS_RS4_BE -.\"O .\" MIPS RS4000 (big-endian only). Deprecated. -.\" MIPS RS4000 (¥Ó¥Ã¥°¥¨¥ó¥Ç¥£¥¢¥ó¤Î¤ß)¡£Èó¿ä¾©¡£ +.\" .TP +.\" .BR EM_MIPS_RS4_BE +.\" MIPS RS4000 (big-endian only). Deprecated. .\" 10 -.\"O .\" EM_MIPS_RS3_LE (MIPS R3000 little-endian) -.\" EM_MIPS_RS3_LE (MIPS R3000 ¥ê¥È¥ë¥¨¥ó¥Ç¥£¥¢¥ó)¡£ +.\" EM_MIPS_RS3_LE (MIPS R3000 little-endian) .\" 10 -.TP -.BR EM_PARISC -HP/PA. +MIPS RS3000 (ビッグエンディアンのみ)。 +.TP +\fBEM_PARISC\fP .\" 15 -.TP -.BR EM_SPARC32PLUS -.\"O SPARC with enhanced instruction set. -³Èĥ̿Î᥻¥Ã¥ÈÉÕ¤­ SPARC¡£ +HP/PA. +.TP +\fBEM_SPARC32PLUS\fP .\" 18 -.TP -.BR EM_PPC -PowerPC. +拡張命令セット付き SPARC。 +.TP +\fBEM_PPC\fP .\" 20 -.TP -.BR EM_PPC64 -PowerPC 64-bit. +PowerPC. +.TP +\fBEM_PPC64\fP .\" 21 -.TP -.BR EM_S390 -IBM S/390 +PowerPC 64\-bit. +.TP +\fBEM_S390\fP .\" 22 -.TP -.BR EM_ARM -Advanced RISC Machines +IBM S/390 +.TP +\fBEM_ARM\fP .\" 40 -.TP -.BR EM_SH -Renesas SuperH +Advanced RISC Machines +.TP +\fBEM_SH\fP .\" 42 -.TP -.BR EM_SPARCV9 -SPARC v9 64-bit. +Renesas SuperH +.TP +\fBEM_SPARCV9\fP .\" 43 -.TP -.BR EM_IA_64 -Intel Itanium +SPARC v9 64\-bit. +.TP +\fBEM_IA_64\fP .\" 50 -.TP -.BR EM_X86_64 -AMD x86-64 +Intel Itanium +.TP +\fBEM_X86_64\fP .\" 62 -.TP -.BR EM_VAX -DEC Vax. +AMD x86\-64 +.TP +\fBEM_VAX\fP .\" 75 .\" EM_CRIS .\" 76 -.\" .It Dv EM_ALPHA +.\" .TP +.\" .BR EM_ALPHA .\" Compaq [DEC] Alpha. -.\" .It Dv EM_ALPHA_EXP -.\"O .\" Compaq [DEC] Alpha with enhanced instruction set. -.\" ³Èĥ̿Î᥻¥Ã¥ÈÉÕ¤­ Compaq [DEC] Alpha¡£ +.\" .TP +.\" .BR EM_ALPHA_EXP +.\" Compaq [DEC] Alpha with enhanced instruction set. +DEC Vax. .PD .RE .\" .El -.TP -.IR e_version -.\"O This member identifies the file version: -¤³¤Î¥á¥ó¥Ð¤Ï¥Õ¥¡¥¤¥ë¥Ð¡¼¥¸¥ç¥ó¤ò¼¨¤¹: +.TP +\fIe_version\fP .\" .Bl -tag -width "EV_CURRENT" -compact +このメンバはファイルバージョンを示す: .RS 12 -.TP 12 +.TP 12 .PD 0 -.BR EV_NONE -.\"O Invalid version. -ÉÔÀµ¤Ê¥Ð¡¼¥¸¥ç¥ó¡£ -.TP -.BR EV_CURRENT -.\"O Current version. -¸½ºß¤Î¥Ð¡¼¥¸¥ç¥ó¡£ +\fBEV_NONE\fP +不正なバージョン。 +.TP +\fBEV_CURRENT\fP .\" .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 . +.TP +\fIe_entry\fP +このメンバは、システムが最初に制御を渡す、 つまりプロセスを開始する仮想アドレスを指定する。 ファイルにエントリポイントが関連付けられていない場合、 +このメンバには 0 が入る。 +.TP +\fIe_phoff\fP +このメンバはプログラムヘッダテーブルの ファイルオフセット (バイト単位) を保持する。 ファイルにプログラムヘッダテーブルがない場合、 このメンバには +0 が入る。 +.TP +\fIe_shoff\fP +このメンバはセクションヘッダテーブルの ファイルオフセット (バイト単位) を保持する。 ファイルにセクションヘッダテーブルがない場合、 このメンバには +0 が入る。 +.TP +\fIe_flags\fP +このメンバはファイルに関連付けられたプロセッサ固有のフラグを保持する。 フラグの名前は EF_`machine_flag' という形式である。 +現在のところフラグは定義されていない。 +.TP +\fIe_ehsize\fP +このメンバは ELF ヘッダサイズ (バイト単位) を保持する。 +.TP +\fIe_phentsize\fP +このメンバはこのファイルのプログラムヘッダテーブルの 1 エントリあたりのサイズ (バイト単位) を保持する; 全てのエントリは同じサイズである。 +.TP +\fIe_phnum\fP +このメンバはプログラムヘッダテーブルにあるエントリの数を保持する。 よって \fIe_phentsize\fP と \fIe_phnum\fP の積がテーブルサイズ +(バイト単位) になる。 ファイルにプログラムヘッダがない場合、 \fIe_phnum\fP は値 0 を保持する。 +.IP +.\" This is a Linux extension, added in Linux 2.6.34. +.\" .Bl -tag -width "PN_XNUM" +プログラムヘッダテーブルのエントリー数が \fBPN_XNUM\fP (0xffff) 以上の場合、 +このメンバは \fBPN_XNUM\fP (0xffff) になり、プログラムヘッダテーブルの +エントリーの実際の数は、セクションヘッダテーブルの最初のエントリーの +\fIsh_info\fP メンバに格納される。それ以外の場合、セクションヘッダテーブルの +最初のエントリーの \fIsh_info\fP メンバには値 0 が格納される。 +.RS 12 +.TP 9 +\fBPN_XNUM\fP +\fIe_phnum\fP が保持できる最大値を表し、 0xffff に定義されている。 \fIe_phnum\fP +はプログラムヘッダの実際の数がどこに割り当てられているかを示す。 +.PD +.RE +.\" .El +.IP +.TP +\fIe_shentsize\fP +このメンバはセクションヘッダのサイズ (バイト単位) を保持する。 セクションヘッダはセクションヘッダテーブルの 1 つのエントリである; +全てのエントリは同じサイズである。 +.TP +\fIe_shnum\fP +このメンバはセクションヘッダテーブルにあるエントリの数を保持する。 よって \fIe_shentsize\fP と \fIe_shnum\fP +の積はセクションヘッダテーブルのサイズ (バイト単位) になる。 ファイルにセクションヘッダテーブルがない場合、 \fIe_shnum\fP は値 0 +を保持する。 +.IP +セクションヘッダテーブルのエントリー数が \fBSHN_LORESERVE\fP (0xff00) 以上の場合、 +\fIe_shnum\fP には値 0 が入り、セクションヘッダテーブルのエントリーの実際の数は +セクションヘッダテーブルの最初のエントリーの \fIsh_size\fP メンバに格納される。 +それ以外の場合、セクションヘッダテーブルの最初のエントリーの \fIsh_info\fP メンバ +には値 0 が格納される。 +.TP +\fIe_shstrndx\fP +このメンバはセクション名文字列テーブルに関連付けられたエントリの セクションヘッダテーブルインデックスを保持する。 +ファイルにセクション名文字列テーブルがない場合、 このメンバは値 \fBSHN_UNDEF\fP を保持する。 \fBSHN_UNDEF\fP. +.IP +セクション名前文字列テーブルのインデックスが \fBSHN_LORESERVE\fP (0xff00) 以上の +場合、このメンバには \fBSHN_XINDEX\fP (0xffff) が入り、セクション名前文字列 +テーブルの実際のインデックスはセクションヘッダテーブルの最初のエントリーの +\fIsh_link\fP メンバに格納される。それ以外の場合、セクションヘッダテーブルの +最初のエントリーの \fIsh_link\fP メンバには値 0 が格納される。 .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 ´Þ¤Þ¤Ê¤¤ ¡£ +.TP 14 +\fBSHN_UNDEF\fP +この値は未定義・存在しない・無関係その他、 意味のないセクションの参照であることを表す。 例えば、セクション番号 \fBSHN_UNDEF\fP +に関連づけて「定義」されたシンボルは、「未定義」なシンボルである。 +.TP +\fBSHN_LORESERVE\fP +この値は予約済みのインデックス領域の下限を指定する。 +.TP +\fBSHN_LOPROC\fP +この値以上で \fBSHN_HIPROC\fP 以下の値はプロセッサ固有の意味に予約されている。 +.TP +\fBSHN_HIPROC\fP +この値以下で \fBSHN_HIPROC\fP 以上の値はプロセッサ固有の意味に予約されている。 +.TP +\fBSHN_ABS\fP +この値は対応する参照の絶対値を指定する。 例えば、セクション番号 \fBSHN_ABS\fP に関連づけられたシンボルは絶対値を保持し、再配置に影響されない。 +.TP +\fBSHN_COMMON\fP +このセクションに関連して定義されたシンボルは、 Fortran の COMMON や C の未割り当て external 変数のような、 +共通シンボルである。 +.TP +\fBSHN_HIRESERVE\fP +この値は予約されたインデックスの範囲の上限を指定する。 \fBSHN_LORESERVE\fP と \fBSHN_HIRESERVE\fP は含まれる。 +この値はセクションヘッダテーブルを参照しない。 つまり、セクションヘッダテーブルは 予約されたインデックスのエントリを \fI含まない 。\fP .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 -·¿¤Çµ­½Ò¤µ¤ì¤ë -(¤É¤Á¤é¤Ë¤Ê¤ë¤«¤Ï¥¢¡¼¥­¥Æ¥¯¥Á¥ã°Í¸): +実行可能ファイルまたは共有オブジェクトファイルのプログラムヘッダテーブルは、 システムによるプログラム実行準備に必要な、 +セグメント等の情報を記述する構造体の配列である。 オブジェクトファイルの \fIセグメント\fP には 1 つ以上の \fIセクション\fP が含まれる。 +プログラムヘッダは実行可能ファイルと共有オブジェクトファイルでのみ意味を持つ。 ファイルは自身のプログラムヘッダサイズを ELF ヘッダの +\fIe_phentsize\fP メンバと \fIe_phnum\fP メンバで指定する。 ELF プログラムヘッダは \fIElf32_Phdr\fP 型または +\fIElf64_Phdr\fP 型で記述される (どちらになるかはアーキテクチャ依存): .in +4n .nf @@ -929,379 +582,141 @@ typedef struct { .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 ¹½Â¤ÂΤΤ³¤Î¥á¥ó¥Ð¤Ï¡¢ -¤³¤ÎÇÛÎóÍ×ÁǤ¬¤É¤Î¤è¤¦¤Ê¼ïÎà¤Î¥»¥°¥á¥ó¥È¤òµ­½Ò¤·¤Æ¤¤¤ë¤«¡¢ -¤Þ¤¿¤Ï¤³¤ÎÇÛÎóÍ×ÁǤξðÊó¤ò¤É¤Î¤è¤¦¤Ë²ò¼á¤¹¤ë¤«¡¢¤òɽ¤¹¡£ +32 ビットと 64 ビットのプログラムヘッダの主な違いは、構造体における \fIp_flags\fP メンバの位置にある。 +.TP 12 +\fIp_type\fP .\" .Bl -tag -width "PT_DYNAMIC" +Phdr 構造体のこのメンバは、 この配列要素がどのような種類のセグメントを記述しているか、 またはこの配列要素の情報をどのように解釈するか、を表す。 .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 -¤Î¥á¥ó¥Ð¡¼¤Ë¥»¥Ã¥È¤µ¤ì¤¿¥Õ¥é¥°·Ðͳ¤Ç¥¹¥¿¥Ã¥¯¤Î¾õÂÖ¤òÀ©¸æ¤¹¤ë¤¿¤á¤Ë»ÈÍѤ¹¤ë¡£ +.TP 12 +\fBPT_NULL\fP +この配列要素は使用されておらず、その他のメンバの値は未定義である。 これにより、このプログラムヘッダのエントリは無視される。 +.TP +\fBPT_LOAD\fP +この配列要素は \fIp_filesz\fP と \fIp_memsz\fP で記述されるロード可能セグメントを指定する。 +このファイルからのバイトデータが、このメモリセグメントの先頭からマップされる。 セグメントのメモリサイズ \fISy\fPp_memsz がファイルサイズ +\fISy\fPp_filesz より大きい場合、 「余った」バイトは値 0 となり、 そのセグメント初期化データの後ろに置かれると定められている。 +ファイルサイズはメモリサイズより大きくてはいけない。 プログラムヘッダテーブルのロード可能セグメントエントリは、 \fIp_vaddr\fP +メンバの昇順にソートされて出現する。 +.TP +\fBPT_DYNAMIC\fP +この配列要素は動的リンク情報を指定する。 +.TP +\fBPT_INTERP\fP +この配列要素は、インタプリタとして起動されるパス名 (NULL 文字終端) の位置とサイズを指定する。 このセグメント型は +(共有オブジェクトにもあるかも知れないが) 実行可能ファイルでのみ意味を持つ。 ただし、このセグメント型は 1 つのファイルに 2 +回以上出現してはならない。 もし存在する場合、このセグメント型は 全てのロード可能セグメントエントリより前になければならない。 +.TP +\fBPT_NOTE\fP +この配列要素は補足情報 (auxiliary information) の位置とサイズを指定する。 +.TP +\fBPT_SHLIB\fP +このセグメント型は予約されているが、意味は指定されていない。 この型の配列要素を保持するプログラムは ABI に準拠しない。 +.TP +\fBPT_PHDR\fP +この配列要素は、もし存在しているならば、 ファイルおよびプログラムのメモリイメージ双方における プログラムヘッダテーブル自身の位置とサイズを指定する。 +このセグメント型は 1 つのファイルに 2 回以上出現してはならない。 さらに、このセグメント型が存在してもよいのは、プログラムヘッダテーブルが +プログラムのメモリイメージの一部である場合のみである。 もし存在する場合、これは全てのロード可能セグメントエントリより 前になければならない。 +.TP +\fBPT_LOPROC\fP +この値以上で \fBPT_HIPROC\fP 以下の値はプロセッサ固有の意味に予約されている。 +.TP +\fBPT_HIPROC\fP +この値以下で \fBPT_LOPROC\fP 以上の値はプロセッサ固有の意味に予約されている。 +.TP +\fBPT_GNU_STACK\fP .\" .El +GNU 拡張であり、Linux カーネルが \fIp_flags\fP のメンバーにセットされたフラグ経由でスタックの状態を制御するために使用する。 .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: -¤³¤Î¥á¥ó¥Ð¤Ï¥»¥°¥á¥ó¥È¤Ë´ØÏ¢¤¹¤ë¥Õ¥é¥°¤Î¥Ó¥Ã¥È¥Þ¥Ã¥×¤òÊÝ»ý¤¹¤ë: +.TP +\fIp_offset\fP +このメンバは、セグメントの先頭バイトがある (ファイル先頭からの) オフセットを保持する。 +.TP +\fIp_vaddr\fP +このメンバは、セグメントの先頭バイトがある メモリの仮想アドレスを保持する。 +.TP +\fIp_paddr\fP +物理アドレスが意味をもつシステムでは、 このメンバはセグメントの物理アドレスとして予約されている。 BSD ではこのメンバは使用されない。0 +でなければならない。 +.TP +\fIp_filesz\fP +このメンバはセグメントのファイルイメージのバイト数を保持する。 これは 0 でもよい。 +.TP +\fIp_memsz\fP +このメンバはセグメントのメモリイメージのバイト数を保持する。 これは 0 でもよい。 +.TP +\fIp_flags\fP .\" .Bl -tag -width "PF_X" -compact +このメンバはセグメントに関連するフラグのビットマスクを保持する: .RS 12 -.TP +.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. -Æɤ߹þ¤ß²Äǽ¥»¥°¥á¥ó¥È¡£ +\fBPF_X\fP +実行可能セグメント。 +.TP +\fBPF_W\fP +書き込み可能セグメント. +.TP +\fBPF_R\fP +読み込み可能セグメント。 .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¡×¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤)¡£ +テキストセグメントは一般にフラグ \fBPF_X\fP と \fBPF_R\fP を持つ。 データセグメントは一般に \fBPF_X\fP, \fBPF_W\fP, +\fBPF_R\fP を持つ。 +.TP +\fIp_align\fP .\" .El +このメンバは、セグメントがメモリおよびファイルにおいて配置 (align) される値を保持する。 +ロード可能プロセスセグメントは、ページサイズを法として \fIp_vaddr\fP と \fIp_offset\fP と合同でなければならない +(訳注:「p_vaddr mod ページサイズ = p_offset mod ページサイズ」 でなければならない)。。 0 と 1 +という値は配置が必要ないことを意味する。 それ以外の場合、 \fIp_align\fP は正で 2 の整数乗でなければならず、 \fIp_vaddr\fP は +\fIp_align\fP を法として \fIp_offset\fP と合同でなければならない (訳注:「p_vaddr mod p_align = +p_offset mod p_align」でなければならない)。 .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 -¤Ï³Æ¥¨¥ó¥È¥ê¤Î¥µ¥¤¥º (¥Ð¥¤¥Èñ°Ì) ¤òÊÝ»ý¤¹¤ë¡£ +ファイルのセクションヘッダテーブルには、 全てのファイルセクションの場所が記述されている。 セクションヘッダテーブルは \fIElf32_Shdr\fP +構造体または \fIElf64_Shdr\fP 構造体の配列である。 ELF ヘッダの \fIe_shoff\fP メンバはファイルの先頭から +セクションヘッダテーブルへのバイトオフセットである。 \fIe_shnum\fP はセクションヘッダテーブルに含まれるエントリの数を保持する。 +\fIe_shentsize\fP は各エントリのサイズ (バイト単位) を保持する。 .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. -¥»¥¯¥·¥ç¥ó¥Ø¥Ã¥À¥Æ¡¼¥Ö¥ë¤ÏͽÌ󤵤줿¥¤¥ó¥Ç¥Ã¥¯¥¹¤ËÂбþ¤¹¤ë¥¨¥ó¥È¥ê¤ò»ý¤¿¤Ê¤¤¡£ +セクションヘッダテーブルインデックスは、この配列の添字である。 +いくつかのセクションヘッダテーブルインデックスは予約されている。予約されて +いるのは、最初のエントリーと、\fBSHN_LORESERVE\fP と \fBSHN_HIRESERVE\fP の間の +インデックスである。 +最初のエントリーは、ELF 拡張で \fIe_phnum\fP, \fIe_shnum\fP, \fIe_strndx\fP に使用 +される。それ以外の場合、最初のエントリーの各フィールドには 0 が設定される。 +オブジェクトファイルにはこれらの特別なインデックスに対応するセクションはない。 +.RS +.TP 14 +\fBSHN_UNDEF\fP +この値は未定義・不明・無関係・無意味なセクション参照の印となる。 +.TP +\fBSHN_LORESERVE\fP +この値は予約済みのインデックス領域の下限を指定する。 +.TP +\fBSHN_LOPROC\fP +この値以上で \fBSHN_HIPROC\fP 以下の値はプロセッサ固有の意味に予約されている。 +.TP +\fBSHN_HIPROC\fP +この値以下で \fBSHN_HIPROC\fP 以上の値はプロセッサ固有の意味に予約されている。 +.TP +\fBSHN_ABS\fP +この値は対応する参照の絶対値を指定する。 例えば、セクション番号 \fBSHN_ABS\fP に関連して定義されているシンボルは、 +絶対値を保持しているので、再配置に影響されない。 +.TP +\fBSHN_COMMON\fP +このセクションに関連して定義されているシンボルは、 FORTRAN の COMMON や C の未割り当て外部変数のような共通シンボルである。 +.TP +\fBSHN_HIRESERVE\fP +この値は予約済みのインデックス領域の上限を指定する。 システムは \fBSHN_LORESERVE\fP と \fBSHN_HIRESERVE\fP +を含む範囲を予約する。 セクションヘッダテーブルは予約されたインデックスに対応するエントリを持たない。 +.RE .\" .El .PP -.\"O The section header has the following structure: -¥»¥¯¥·¥ç¥ó¥Ø¥Ã¥À¤Ï°Ê²¼¤Î¹½Â¤ÂΤò»ý¤Ä: +セクションヘッダは以下の構造体を持つ: .in +4n .nf @@ -1337,950 +752,266 @@ typedef struct { .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. -¤³¤Î¥á¥ó¥Ð¤Ï¥»¥¯¥·¥ç¥ó¤ÎÆâÍƤȰÕÌ£¤¬´Þ¤Þ¤ì¤ë¥«¥Æ¥´¥ê¤ò¼¨¤¹¡£ +32 ビットと 64 ビットのセクションヘッダには実際の違いはない。 +.TP 10 +\fIsh_name\fP +このメンバはセクション名を定める。 この値はセクションヘッダ文字列テーブルセクションのインデックスであり、 NULL +文字で終端された文字列の場所を示す。 +.TP +\fIsh_type\fP .\" .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 -¤Î´Ö¤Î¥»¥¯¥·¥ç¥ó¥¿¥¤¥×¤Ï¡¢ -¸½ºß¤Þ¤¿¤Ï¾­Íè¤Î¥·¥¹¥Æ¥àÄêµÁ¥»¥¯¥·¥ç¥ó¥¿¥¤¥×¤È¾×Æͤ¹¤ë¤³¤È¤Ê¤¯¡¢ -¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ +.TP 15 +\fBSHT_NULL\fP +この値はセクションヘッダが不活性であることを示す。 これは関連するセクションを持たない。 このセクションヘッダの他のメンバは、未定義の値を持つ。 +.TP +\fBSHT_PROGBITS\fP +このセクションはプログラムにより定義される情報を保持する。 この情報の形式と意味は、ひとえにプログラムによって決定される。 +.TP +\fBSHT_SYMTAB\fP +このセクションはシンボルテーブルを保持する。 一般には \fBSHT_SYMTAB\fP はリンク編集のためのシンボルを提供するが、 動的リンクにも使われる。 +完全なシンボルテーブルとして、動的リンクには不要な 多くのシンボルを保持できる。 オブジェクトファイルも \fBSHT_DYNSYM\fP +セクションを持つことができる。 +.TP +\fBSHT_STRTAB\fP +このセクションは文字列テーブルを保持する。 オブジェクトファイルは複数の文字列テーブルセクションを持つことができる。 +.TP +\fBSHT_RELA\fP +このセクションは明示的な加数 (addend) を持つ再配置エントリを保持する。 再配置エントリの型は、オブジェクトファイルの 32 ビットクラスでは +\fIElf32_Rela\fP である。 オブジェクトファイルは複数の再配置セクションを持つことができる。 +.TP +\fBSHT_HASH\fP +このセクションはシンボルハッシュテーブルを保持する。 動的リンクされるオブジェクトは、 シンボルハッシュテーブルを含んでいなければならない。 +オブジェクトファイルは 1 つのハッシュテーブルのみを持つことができる。 +.TP +\fBSHT_DYNAMIC\fP +このセクションは動的リンクの情報を保持する。 オブジェクトファイルは 1 つの動的セクションのみを持つことができる。 +.TP +\fBSHT_NOTE\fP +このセクションはファイルに何らかの印を付ける情報を保持する。 +.TP +\fBSHT_NOBITS\fP +このタイプのセクションはファイルの領域を使わないという以外は、 \fBSHT_PROGBITS\fP と似ている。 このセクションは 1 バイトも含まないが、 +\fIsh_offset\fP メンバは概念的なファイルオフセットを持つ。 +.TP +\fBSHT_REL\fP +このセクションは明示的な加数を持たない再配置オフセットを保持する。 再配置オフセットの型は、オブジェクトファイルの 32 ビットクラスでは +\fIElf32_Rel\fP である。 オブジェクトファイルは複数の再配置セクションを持つことができる。 +.TP +\fBSHT_SHLIB\fP +このセクションは予約されているが、意味は指定されていない。 +.TP +\fBSHT_DYNSYM\fP +このセクションは動的リンクシンボルの最小セットを保持する。 オブジェクトファイルは \fBSHT_SYMTAB\fP セクションも含むことができる。 +.TP +\fBSHT_LOPROC\fP +この値以上で \fBSHT_HIPROC\fP 以下の範囲はプロセッサ固有の意味に予約されている。 +.TP +\fBSHT_HIPROC\fP +この値以下で \fBSHT_LOPROC\fP 以上の範囲はプロセッサ固有の意味に予約されている。 +.TP +\fBSHT_LOUSER\fP +この値はアプリケーションプログラムのために予約される インデックス範囲の下限を指定する。 +.TP +\fBSHT_HIUSER\fP .\" .El +この値はアプリケーションプログラムのために予約される インデックス範囲の上限を指定する。 \fBSHT_LOUSER\fP から \fBSHT_HIUSER\fP +の間のセクションタイプは、 現在または将来のシステム定義セクションタイプと衝突することなく、 アプリケーションで使用することができる。 .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 ¤ËÀßÄꤵ¤ì¤ë¡£ +.TP +\fIsh_flags\fP .\" .Bl -tag -width "SHF_EXECINSTR" -compact +様々な属性を記述するための 1 ビットのフラグをサポートするセクション。 フラグビットが \fIsh_flags\fP +に設定された場合、そのセクションについての属性は "オン" になる。 それ以外の場合、属性が "オフ" であるか属性が適用されない。 未定義の属性は 0 +に設定される。 .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. -¤³¤Î¥Þ¥¹¥¯¤Ë´Þ¤Þ¤ì¤ëÁ´¤Æ¤Î¥Ó¥Ã¥È¤Ï¥×¥í¥»¥Ã¥µ¸ÇÍ­¤Î°ÕÌ£¤ËͽÌ󤵤ì¤Æ¤¤¤ë¡£ +.TP 15 +\fBSHF_WRITE\fP +このセクションはプロセス実行中に書き込み可能なデータを含む。 +.TP +\fBSHF_ALLOC\fP +このセクションはプロセス実行中にメモリを使用する。 制御セクションの中には、オブジェクトファイルのメモリイメージには 存在しないものもある。 +そうしたセクションの場合、この属性はオフである。 +.TP +\fBSHF_EXECINSTR\fP +このセクションは実行可能なマシン命令を含む。 +.TP +\fBSHF_MASKPROC\fP +このマスクに含まれる全てのビットはプロセッサ固有の意味に予約されている。 .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 ¤Î¾ì¹ç¡¢ -¤½¤Î¥»¥¯¥·¥ç¥ó¤Ï¸ÇÄꥵ¥¤¥º¥¨¥ó¥È¥ê¤Î¥Æ¡¼¥Ö¥ë¤òÊÝ»ý¤·¤Ê¤¤¡£ +.TP +\fIsh_addr\fP +このセクションがプロセスのメモリイメージにある場合、 このメンバはセクションの最初のバイトが存在するアドレスを保持する。 それ以外の場合、このメンバは +0 である。 +.TP +\fIsh_offset\fP +このメンバの値は、ファイルの先頭からセクションの最初のバイトへの バイトオフセットを保持する。 セクションタイプ \fBSHT_NOBITS\fP +はファイルの領域を全く使用せず、このタイプの \fIsh_offset\fP メンバはファイルの概念的な位置を示す。 +.TP +\fIsh_size\fP +このメンバはセクションのサイズ (バイト単位) を保持する。 セクションタイプが \fBSHT_NOBITS\fP でない限り、そのセクションはファイル中の +\fIsh_size\fP バイトを使用する。 タイプが \fBSHT_NOBITS\fP のセクションはサイズが 0 でないが、ファイルの領域を使用しない。 +.TP +\fIsh_link\fP +このメンバは、セクションヘッダテーブルインデックスリンクを保持する。 この解釈はセクションタイプに依存する。 +.TP +\fIsh_info\fP +このメンバは追加情報を保持する。 この解釈はセクションタイプに依存する。 +.TP +\fIsh_addralign\fP +アドレス配置に制約があるセクションもある。 セクションが倍長語 (doubleword) を保持する場合、 +システムは全てのセクションについて倍長語の配置を保証しなければならない。 つまり、 \fIsh_addr\fP の値は \fIsh_addralign\fP +の値を法として 0 と合同でなければならない (訳注:「sh_addr mod sh_addralign = 0 でなければならない)。 2 の 0 +乗と正の整数乗のみが許可される。 0 または 1 はセクションの配置に制約がないことを意味する。 +.TP +\fIsh_entsize\fP .\" .El +シンボルテーブルのような固定サイズエントリのテーブルを保持する セクションもある。 このようなセクションでは、 このメンバは各エントリのサイズ +(バイト単位) を表す。 このメンバが 0 の場合、 そのセクションは固定サイズエントリのテーブルを保持しない。 .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 -¤Ç¤¢¤ë¡£ +さまざまなセクションにプログラム情報・制御情報が保持される: +.TP 10 +\&\fI.bss\fP +このセクションはプログラムのメモリイメージに配置される 非初期化データを保持する。 定義上、システムはプログラムの実行開始時に、データを 0 +で初期化する。 このセクションのタイプは \fBSHT_NOBITS\fP である。 属性タイプは \fBSHF_ALLOC\fP と \fBSHF_WRITE\fP +である。 +.TP +\&\fI.comment\fP +このセクションはバージョン制御情報を保持する。 このセクションのタイプは \fBSHT_PROGBITS\fP である。 属性タイプは使用されない。 +.TP +\&\fI.ctors\fP +このセクションは C++ コンストラクタ関数への初期化されたポインタを保持する。 このセクションのタイプは \fBSHT_PROGBITS\fP である。 +属性タイプは \fBSHF_ALLOC\fP と \fBSHF_WRITE\fP である。 +.TP +\&\fI.data\fP +このセクションはプログラムのメモリイメージに配置される 初期化済みデータを保持する。 このセクションのタイプは \fBSHT_PROGBITS\fP である。 +属性タイプは \fBSHF_ALLOC\fP と \fBSHF_WRITE\fP である。 +.TP +\&\fI.data1\fP +このセクションはプログラムのメモリイメージに配置される 初期化済みデータを保持する。 このセクションのタイプは \fBSHT_PROGBITS\fP である。 +属性タイプは \fBSHF_ALLOC\fP と \fBSHF_WRITE\fP である。 +.TP +\&\fI.debug\fP +このセクションはシンボリックデバッグ用の情報を保持する。 その内容は指定されていない。 このセクションのタイプは \fBSHT_PROGBITS\fP +である。 属性タイプは使用されない。 +.TP +\&\fI.dtors\fP +このセクションは C++ デストラクタ関数への初期化されたポインタを保持する。 このセクションのタイプは \fBSHT_PROGBITS\fP である。 +属性タイプは \fBSHF_ALLOC\fP と \fBSHF_WRITE\fP である。 +.TP +\&\fI.dynamic\fP +このセクションは動的リンク情報を保持する。 このセクションの属性は \fBSHF_ALLOC\fP ビットを含む。 \fBSHF_WRITE\fP +ビットが設定されるか否かはプロセッサによる。 このセクションのタイプは \fBSHT_DYNAMIC\fP である。 上記の属性を参照すること。 +.TP +\&\fI.dynstr\fP +このセクションは動的リンクに必要な文字列を保持する。 最も一般的には、この文字列はシンボルテーブルエントリと 関連づけられた名前を表す。 +このセクションのタイプは \fBSHT_STRTAB\fP である。 使用される属性タイプは \fBSHF_ALLOC\fP である。 +.TP +\&\fI.dynsym\fP +このセクションは動的リンクシンボルテーブルを保持する。 このセクションのタイプは \fBSHT_DYNSYM\fP である。 使用される属性タイプは +\fBSHF_ALLOC\fP である。 +.TP +\&\fI.fini\fP +このセクションはプロセス終了コードに置かれる実行可能命令を保持する。 プロセスが正常に終了した場合、システムはこのセクションにある +コードを配置して実行する。 このセクションのタイプは \fBSHT_PROGBITS\fP である。 使用される属性タイプは \fBSHF_ALLOC\fP と +\fBSHF_EXECINSTR\fP である。 +.TP +\&\fI.gnu.version\fP +このセクションはバージョン・シンボル・テーブルを保持する。 その内容は \fIElfN_Half\fP 要素の配列である。 このセクションのタイプは +\fBSHT_GNU_versym\fP である。 使用される属性タイプは \fBSHF_ALLOC\fP である。 +.TP +\&\fI.gnu.version_d\fP +このセクションはバージョンシンボルの定義を保持する。 その内容は \fIElfN_Verdef\fP 構造体のテーブルである。 このセクションのタイプは +\fBSHT_GNU_verdef\fP である。 使用される属性タイプは \fBSHF_ALLOC\fP である。 +.TP +\&\fI.gnu.version_r\fP +このセクションはバージョンシンボルが必要とする要素を保持する。 その内容は \fIElfN_Verneed\fP 構造体のテーブルである。 +このセクションのタイプは \fBSHT_GNU_versym\fP である。 使用される属性タイプは \fBshf_alloc\fP である。 +.TP +\&\fI.got\fP +このセクションはグローバルオフセットテーブルを保持する。 このセクションのタイプは \fBSHT_PROGBITS\fP である。 +属性はプロセッサ毎に異なる。 +.TP +\&\fI.hash\fP +このセクションはシンボルハッシュテーブルを保持する。 セクションのタイプは \fBSHT_HASH\fP である。 使用される属性は \fBSHF_ALLOC\fP +である。 +.TP +\&\fI.init\fP +このセクションはプロセス初期化コードに配置される実行可能命令を保持する。 プログラムが実行を開始すると、 +システムはメインプログラムエントリポイントを呼び出す前に、 このセクションにあるコードを配置して実行する。 このセクションはのタイプは +\fBSHT_PROGBITS\fP である。 使用される属性は \fBSHF_ALLOC\fP と \fBSHF_EXECINSTR\fP である。 +.TP +\&\fI.interp\fP +このセクションはプログラムインタプリタのパス名を保持する。 ファイルにこのセクションを含むロード可能セグメントがある場合、 そのセクションの属性には +\fBSHF_ALLOC\fP ビットが含まれる。 それ以外の場合このビットはオフになる。 このセクションのタイプは \fBSHT_PROGBITS\fP である。 +.TP +\&\fI.line\fP +このセクションはシンボリックデバッグのための行番号情報を保持する。 ここにはプログラムソースコードとマシンコードの対応関係が記述される。 +内容は指定されていない。 このセクションのタイプは \fBSHT_PROGBITS\fP である。 属性タイプは使用されない。 +.TP +\&\fI.note\fP +このセクションは "Note Section" 形式で情報を保持する。このセクションのタイプ +は \fBSHT_NOTE\fP である。属性タイプは使用されない。通常 OpenBSD ネイティブ実行 +可能ファイルは自身を識別するために \fI.note.openbsd.ident\fP セクションを持つ。 +これによりカーネルは、ファイルをロードする際に 互換 ELF バイナリエミュレーショ +ンテストを回避できる。 +.TP +\&\fI.note.GNU\-stack\fP +このセクションは Linux のオブジェクトファイルで スタック属性を宣言するのに使用される。 セクションのタイプは \fBSHT_PROGBITS\fP +である。使用される属性は \fBSHF_EXECINSTR\fP だけである。この属性は GNU リンカに対して オブジェクトファイルが実行可能なスタック +(executable stack) を必要とする 示すものである。 +.TP +\&\fI.plt\fP +このセクションは手続き (procedure) リンクテーブルを保持する。 このセクションのタイプは \fBSHT_PROGBITS\fP である。 +属性はプロセッサ毎に異なる。 +.TP +\&\fI.relNAME\fP +このセクションは以下に記述される再配置情報を保持する。 ファイルが再配置を含むロード可能セグメントを持っている場合、 このセクションの属性は +\fBSHF_ALLOC\fP ビットを含む。 それ以外の場合、そのビットはオフである。 慣例として、 "NAME" +は再配置が適用されるセクションが指定される。 よって \fB.text\fP についての再配置セクションは、通常は \fB.rel.text\fP +という名前を持つ。 このセクションのタイプは \fBSHT_REL\fP である。 +.TP +\&\fI.relaNAME\fP +このセクションは以下に記述される再配置情報を保持する。 ファイルが再配置を含むロード可能セグメントを持っている場合、 このセクションの属性は +\fBSHF_ALLOC\fP ビットを含む。 それ以外の場合、そのビットはオフである。 慣例として、 "NAME" +は再配置が適用されるセクションが指定される。 よって \fB.text\fP についての再配置セクションは、通常は \fB.rela.text\fP +という名前を持つ。 このセクションのタイプは \fBSHT_RELA\fP である。 +.TP +\&\fI.rodata\fP +このセクションはリードオンリーのデータを保持する。 このデータはプロセスイメージにおける書き込み不可能なセグメントに置かれる。 このセクションのタイプは +\fBSHT_PROGBITS\fP である。 使用される属性は \fBSHF_ALLOC\fP である。 +.TP +\&\fI.rodata1\fP +このセクションはリードオンリーのデータを保持する。 このデータはプロセスイメージにおける書き込み不可能なセグメントに置かれる。 このセクションのタイプは +\fBSHT_PROGBITS\fP である。 使用される属性は \fBSHF_ALLOC\fP である。 +.TP +\&\fI.shstrtab\fP +このセクションはセクション名を保持する。 このセクションのタイプは \fBSHT_STRTAB\fP である。 属性タイプは使用されない。 +.TP +\&\fI.strtab\fP +このセクションは文字列を保持する。 最も一般的なのは、シンボルテーブルエントリに関連づけられた 名前を表す文字列である。 +ファイルがシンボル文字列テーブルを含むロード可能セグメントを持つ場合、 セクションの属性は \fBSHF_ALLOC\fP ビットを含む。 +それ以外の場合、そのビットはオフである。 このセクションのタイプは \fBSHT_STRTAB\fP である。 +.TP +\&\fI.symtab\fP +このセクションはシンボルテーブルを保持する。 ファイルがシンボルテーブルを含むロード可能セグメントを持つ場合、 セクションの属性は +\fBSHF_ALLOC\fP ビットを含む。 それ以外の場合、ビットはオフである。 このセクションのタイプは \fBSHT_SYMTAB\fP である。 +.TP +\&\fI.text\fP .\" .El +このセクションはプログラムの "テキスト" または実行可能命令を保持する。 セクションのタイプは \fBSHT_PROGBITS\fP である。 +使用される属性は \fBSHF_ALLOC\fP と \fBSHF_EXECINSTR\fP である。 .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 ¥Ð¥¤¥È¤Ç½ªÃ¼¤µ¤ì¤Æ¤¤¤ë¤³¤È¤òÊݾڤ¹¤ë¤¿¤á¤Ç¤¢¤ë¡£ +文字列テーブルセクションは NULL 文字で終端されたキャラクタ配列 (通常文字列と呼ばれるもの) を保持する。 オブジェクトファイルはこれらの文字列を +シンボル名とセクション名を表すために使う。 文字列は、文字列テーブルセクションへのインデックスとして参照される。 インデックス 0 +の最初のバイトは、NULL バイト (\(aq\e0\(aq) を 保持すると定義されている。 同様に文字列テーブルの最後のバイトも 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 @@ -2308,245 +1039,116 @@ typedef struct { .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) °À­¤ò»ØÄꤹ¤ë: +32 ビット版と 64 ビット版は同じメンバを持ち、単に順番が異なるだけである。 +.TP 10 +\fIst_name\fP +このメンバはオブジェクトファイルのシンボル文字列テーブルの インデックスを保持する。 シンボル文字列テーブルはシンボル名の文字表現を保持する。 この値が +0 でない場合、シンボル名を得るための文字テーブルインデックスを表す。 それ以外の場合、シンボルテーブルは名前を持たない。 +.TP +\fIst_value\fP +このメンバは関連づけられたシンボルの値を表す。 +.TP +\fIst_size\fP +多くのシンボルにはそれに関連づけられたサイズがある。 シンボルがサイズを持たない場合、またはサイズが不明な場合、 このメンバは 0 である。 +.TP +\fIst_info\fP +.\" .Bl -tag -width "STT_SECTION" +このメンバはシンボルのタイプとバインディング (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 -°Ê¾å¤ÎÈÏ°Ï¤Ï¥×¥í¥»¥Ã¥µ¸ÇÍ­¤Î°ÕÌ£¤ËͽÌ󤵤ì¤Æ¤¤¤ë¡£ +.TP 12 +\fBSTT_NOTYPE\fP +シンボルのタイプが定義されていない。 +.TP +\fBSTT_OBJECT\fP +シンボルはデータオブジェクトに関連づけられている。 +.TP +\fBSTT_FUNC\fP +シンボルは関数またはその他の実行コードに関連づけられている。 +.TP +\fBSTT_SECTION\fP +シンボルはセクションに関連づけられている。 このタイプのシンボルテーブルエントリは、 主として再配置のために存在し、通常は \fBSTB_LOCAL\fP +バインディングを持つ。 +.TP +\fBSTT_FILE\fP +慣例として、シンボルの名前は オブジェクトファイルに関連づけられたソースファイルの名前を指定する。 ファイルシンボルは \fBSTB_LOCAL\fP +バインディングを持ち、そのセクションインデックスは \fBSHN_ABS\fP である。 ファイルシンボルは、ファイルに他の \fBSTB_LOCAL\fP +シンボルがある場合は、それよりも先に来る。 +.TP +\fBSTT_LOPROC\fP +この値以上で \fBSTT_HIPROC\fP 以下の範囲はプロセッサ固有の意味に予約されている。 +.TP +\fBSTT_HIPROC\fP .\" .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 -°Ê¾å¤ÎÈÏ°Ï¤Ï¥×¥í¥»¥Ã¥µ¸ÇÍ­¤Î°ÕÌ£¤ËͽÌ󤵤ì¤Æ¤¤¤ë¡£ +この値以下で \fBSTT_LOPROC\fP 以上の範囲はプロセッサ固有の意味に予約されている。 +.TP +\fBSTB_LOCAL\fP +局所的シンボルはその定義を含むオブジェクトファイルの外からは見えない。 同じ名前の局所的シンボルは、お互いに影響を受けることなく、 +複数のファイルに存在できる。 +.TP +\fBSTB_GLOBAL\fP +大域的シンボルは結びつけられている全てのオブジェクトファイルから見える。 1 つのファイルで大域的シンボルが定義されていたら、 +他のファイルでは同じシンボルへの参照は未定義でなければならない。 +.TP +\fBSTB_WEAK\fP +弱シンボルは大域的シンボルに似ているが、その定義は優先度が低い。 +.TP +\fBSTB_LOPROC\fP +この値以上で \fBSTB_HIPROC\fP 以下の範囲はプロセッサ固有の意味に予約されている。 +.TP +\fBSTB_HIPROC\fP +この値以下で \fBSTB_LOPROC\fP 以上の範囲はプロセッサ固有の意味に予約されている。 .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 -¤ÎÃͤ«¤é¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤ò¼è¤ê½Ð¤¹¡£ +\fBELF32_ST_BIND\fP(info) または \fBELF64_ST_BIND\fP(info) \fIst_info\fP +の値からバインディングを取り出す。 .IP -.BR ELF32_ST_TYPE (info) -.\"O or -¤Þ¤¿¤Ï -.BR ELF64_ST_TYPE (info) +\fBELF32_ST_TYPE\fP(info) または \fBELF64_ST_TYPE\fP(info) .br -.\"O extract a type from an -.\"O .I st_info -.\"O value. -.I st_info -¤ÎÃͤ«¤é¥¿¥¤¥×¤ò¼è¤ê½Ð¤¹¡£ +\fIst_info\fP の値からタイプを取り出す。 .IP -.BR ELF32_ST_INFO "(bind, type)" -.\"O or -¤Þ¤¿¤Ï -.BR ELF64_ST_INFO "(bind, type)" +\fBELF32_ST_INFO\fP(bind, type) または \fBELF64_ST_INFO\fP(bind, type) .br -.\"O convert a binding and a type into an -.\"O .I st_info -.\"O value. -¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤È¥¿¥¤¥×¤ò -.I st_info -¤ÎÃͤËÊÑ´¹¤¹¤ë¡£ +バインディングとタイプを \fIst_info\fP の値に変換する。 .RE .\" .El -.TP -.IR st_other -.\"O This member defines the symbol visibility. -¤³¤Î¥á¥ó¥Ð¤Ï¥·¥ó¥Ü¥ë¤Î visibility (¸«¤¨¤ëÈÏ°Ï) ¤òµ¬Äꤹ¤ë¡£ +.TP +\fIst_other\fP .\" .Bl -tag -width "STV_PROTECTED" +このメンバはシンボルの visibility (見える範囲) を規定する。 .RS 10 -.TP 16 +.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)¡¢¸ø³«¤µ¤ì¤Ê¤¤¡£ +\fBSTV_DEFAULT\fP +デフォルトのシンボル visibility ルール。 +.TP +\fBSTV_INTERNAL\fP +プロセッサ固有の隠しクラス。 +.TP +\fBSTV_HIDDEN\fP +シンボルは他のモジュールからは利用できない。 +.TP +\fBSTV_PROTECTED\fP +横取りできず (not preemptible)、公開されない。 .PD .PP -.\"O There are macros for extracting the visibility type: -visibility ¼ïÊ̤òÃê½Ð¤¹¤ë¤¿¤á¤Î¥Þ¥¯¥í¤¬¤¢¤ë¡£ +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) +\fBELF32_ST_VISIBILITY\fP(other) または \fBELF64_ST_VISIBILITY\fP(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. -¤³¤Î¥á¥ó¥Ð¤Ï´ØÏ¢¤¹¤ë¥»¥¯¥·¥ç¥ó¥Ø¥Ã¥À¥Æ¡¼¥Ö¥ë¥¤¥ó¥Ç¥Ã¥¯¥¹¤òÊÝ»ý¤¹¤ë¡£ +.TP +\fIst_shndx\fP .\" .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 @@ -2566,8 +1168,7 @@ typedef struct { .fi .in .PP -.\"O Relocation structures that need an addend: -²Ã¿ô¤òɬÍפȤ¹¤ëºÆÇÛÃÖ¹½Â¤ÂΡ£ +加数を必要とする再配置構造体。 .in +4n .nf @@ -2589,61 +1190,22 @@ typedef struct { .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. -ºÆÇÛÃÖ²Äǽ¥Õ¥¡¥¤¥ë¤Î¾ì¹ç¡¢¤³¤ÎÃͤϥ»¥¯¥·¥ç¥ó¤ÎÀèƬ¤«¤é -ºÆÇÛÃ֤DZƶÁ¤ò¼õ¤±¤ë³ÊǼñ°Ì (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. -¼Â¹Ô²Äǽ¥Õ¥¡¥¤¥ë¤Þ¤¿¤Ï¶¦Í­¥ª¥Ö¥¸¥§¥¯¥È¤Î¾ì¹ç¡¢ -¤³¤ÎÃͤϺÆÇÛÃ֤DZƶÁ¤ò¼õ¤±¤ë³ÊǼñ°Ì¤Î²¾ÁÛ¥¢¥É¥ì¥¹¤Ç¤¢¤ë¡£ -.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. -¤³¤Î¥á¥ó¥Ð¤ÏÄê¿ô¤Î²Ã¿ô¤ò»ØÄꤹ¤ë¡£ -¤³¤Î²Ã¿ô¤ÏºÆÇÛÃÖ²Äǽ¥Õ¥£¡¼¥ë¥É¤Ë³ÊǼ¤µ¤ì¤ëÃͤò·×»»¤¹¤ë¤¿¤á¤Ë»È¤ï¤ì¤ë¡£ +.TP 12 +\fIr_offset\fP +このメンバは再配置動作が適用される位置を与える。 再配置可能ファイルの場合、この値はセクションの先頭から 再配置で影響を受ける格納単位 (storage +unit) までのバイトオフセットである。 実行可能ファイルまたは共有オブジェクトの場合、 この値は再配置で影響を受ける格納単位の仮想アドレスである。 +.TP +\fIr_info\fP +このメンバは、再配置が行われなければならないシンボルテーブルインデックスと、 適用される再配置のタイプの両方を与える。 +再配置タイプはプロセッサ毎に異なる。 テキストが再配置エントリの再配置タイプ またはシンボルテーブルインデックスを参照している場合、 それぞれエントリの +\fIr_info\fP メンバに対して、それぞれ \fBELF[32|64]_R_TYPE\fP と \fBELF[32|64]_R_SYM\fP +を適用した結果を意味する。 +.TP +\fIr_addend\fP .\" .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 ¤Î²ò¼á¤òÀ©¸æ¤¹¤ë¡£ +\&.dynamic セクションは、関連する動的リンク情報を保持している 一連の構造体を保持する。 d_tag メンバは d_un の解釈を制御する。 .in +4n .nf @@ -2671,209 +1233,142 @@ 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: -¤³¤Î¥á¥ó¥Ð¤Ï°Ê²¼¤ÎÃͤò»ý¤Ä¤³¤È¤¬¤Ç¤­¤ë: +.TP 10 +\fId_tag\fP .\" .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 -¥×¥í¥»¥Ã¥µ¸ÇÍ­¤Î°ÕÌ£¤Î½ªÎ» +.TP 12 +\fBDT_NULL\fP +動的セクションの終りのマーク +.TP +\fBDT_NEEDED\fP +必要なライブラリの名前への文字列テーブルオフセット +.TP +\fBDT_PLTRELSZ\fP +PLT 再配置 (reloc) テーブルのサイズ (バイト単位) +.TP +\fBDT_PLTGOT\fP +PLT と GOT (または何れか一方) のアドレス +.TP +\fBDT_HASH\fP +シンボルハッシュテーブルのアドレス +.TP +\fBDT_STRTAB\fP +文字列テーブルのアドレス +.TP +\fBDT_SYMTAB\fP +シンボルテーブルのアドレス +.TP +\fBDT_RELA\fP +Rela 再配置テーブルのアドレス +.TP +\fBDT_RELASZ\fP +Rela テーブルのサイズ (バイト単位) +.TP +\fBDT_RELAENT\fP +Rela テーブルエントリのサイズ (バイト単位) +.TP +\fBDT_STRSZ\fP +文字列テーブルのサイズ (バイト単位) +.TP +\fBDT_SYMENT\fP +シンボルテーブルエントリのサイズ (バイト単位) +.TP +\fBDT_INIT\fP +初期化関数のアドレス +.TP +\fBDT_FINI\fP +終了関数のアドレス +.TP +\fBDT_SONAME\fP +共有オブジェクトの名前への文字列テーブルオフセット +.TP +\fBDT_RPATH\fP +ライブラリ検索パスへの文字列テーブルオフセット (推奨されない) +.TP +\fBDT_SYMBOLIC\fP +リンカがシンボルの実行可能ファイルより前に この共有オブジェクトを検索した場合は、警告を出す。 +.TP +\fBDT_REL\fP +Rel 再配置テーブルのアドレス +.TP +\fBDT_RELSZ\fP +Rel テーブルのサイズ (バイト単位) +.TP +\fBDT_RELENT\fP +Rel テーブルエントリのサイズ (バイト単位) +.TP +\fBDT_PLTREL\fP +PLT が参照する再配置テーブルのタイプ (Rela または Rel) +.TP +\fBDT_DEBUG\fP +デバッグのために使用されている。内容は定義されていない。 +.TP +\fBDT_TEXTREL\fP +これが指定されていない場合、 書き込み不可のセグメントには再配置は適用されない。 +.TP +\fBDT_JMPREL\fP +PLT 専用の再配置エントリのアドレス +.TP +\fBDT_BIND_NOW\fP +実行可能ファイルに制御を譲る前に、 全ての再配置を処理するように動的リンカに指示する。 +.TP +\fBDT_RUNPATH\fP +ライブラリ検索パスへの文字列テーブルオフセット +.TP +\fBDT_LOPROC\fP +プロセッサ固有の意味の開始 +.TP +\fBDT_HIPROC\fP +プロセッサ固有の意味の終了 .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 ¥»¥¯¥·¥ç¥ó¤Ë¤¢¤ëÁ´¤Æ¤ÎưŪ¹½Â¤ÂΤò´Þ¤àÇÛÎó¡£ -¤³¤ì¤Ï¼«Æ°Åª¤Ë¥ê¥ó¥«¤ËÅϤµ¤ì¤ë¡£ +.TP +\fId_val\fP +このメンバは様々な意味に解釈される整数値である。 +.TP +\fId_ptr\fP +このメンバはプログラムの仮想アドレスを表す。 これらのアドレスを解釈する際に、 実際のアドレスは元々のファイルの値と +メモリの基底アドレスから計算される。 ファイルにはこれらのアドレスを修正するための 再配置エントリを含めてはならない。 +.TP +\fI_DYNAMIC\fP .\" .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. +\&.dynamic セクションにある全ての動的構造体を含む配列。 これは自動的にリンカに渡される。 +.SH 注意 .\" 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 ¥Ú¡¼¥¸¤Ë»É·ã¤ò¼õ¤±¤Æ +.\" ELF support first appeared in +.\" OpenBSD 1.2, +.\" although not all supported platforms use it as the native +.\" binary file format. +ELF は System V で初めて登場した。 ELF 自体は System V で初めて登場した。 ELF フォーマットは採択された標準である。 +.PP +.\" .SH AUTHORS +.\" The original version of this manual page was written by .\" .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) +.\" with inspiration from BSDi's +.\" .Bsx +.\" .Nm elf +.\" man page. +\fIe_phnum\fP, \fIe_shnum\fP, \fIe_strndx\fP に対する拡張は、いずれも Linux での拡張で +ある。Sun, BSD, AMD64 もこれに対応している。詳しい情報は、関連項目を参照。 +.SH 関連項目 +\fBas\fP(1), \fBgdb\fP(1), \fBld\fP(1), \fBobjdump\fP(1), \fBexecve\fP(2), \fBcore\fP(5) +.PP +Hewlett\-Packard, \fIElf\-64 Object File Format\fP. +.PP +Santa Cruz Operation, \fISystem V Application Binary Interface\fP. +.PP +UNIX System Laboratories, "Object Files", \fIExecutable and Linking Format +(ELF)\fP. .PP -Hewlett-Packard, -.IR "Elf-64 Object File Format" . +Sun Microsystems, \fILinker and Libraries Guide\fP. .PP -Santa Cruz Operation, -.IR "System V Application Binary Interface" . +AMD64 ABI Draft, \fISystem V Application Binary Interface AMD64 Architecture +Processor Supplement\fP. .PP -Unix System Laboratories, -"Object Files", -.IR "Executable and Linking Format (ELF)" . +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +である。プロジェクトの説明とバグ報告に関する情報は +http://www.kernel.org/doc/man\-pages/ に書かれている。