セクション ヘッダーの構造体は次のようになります。
typedef struct {
uint32_t sh_name;
uint32_t sh_type;
uint32_t sh_flags;
Elf32_Addr sh_addr;
Elf32_Off sh_offset;
uint32_t sh_size;
uint32_t sh_link;
uint32_t sh_info;
uint32_t sh_addralign;
uint32_t sh_entsize;
} Elf32_Shdr;
したがって、Al
列の下に表示されるのはsh_addralign
です。elf manpageからそのメンバーの説明を見てみましょう:
sh_addralign
Some sections have address alignment constraints. If a
section holds a doubleword, the system must ensure
doubleword alignment for the entire section. That is, the
value of sh_addr must be congruent to zero, modulo the
value of sh_addralign. Only zero and positive integral
powers of two are allowed. Values of zero or one mean the
section has no alignment constraints.
TL;DRAl
:列に表示されている配置制約はAddr
(ゼロであるため、このケースでは配置されています) 用であり、 用ではありませんOff
。つまり、イメージがメモリにロードされるアドレスのアライメント制約であり、ELF ファイルにイメージが格納されている場所ではありません。