ELF::Writer::Section - Object representing the fields of one section in an ELF file.
version 0.011
The following are elf section header fields:
Pointer to name of this section within the Strings table. (.shstrtab)
TODO: auto-generate the string table if this is set to anything other than a number.
Type of this section. A 32-bit number, or one of: "null" (or undef), "progbits", "symtab", "strtab", "rela", "hash", "dynamic", "note", "nobits", "rel", "shlib", "dynsym", "num".
"null"
undef
"progbits"
"symtab"
"strtab"
"rela"
"hash"
"dynamic"
"note"
"nobits"
"rel"
"shlib"
"dynsym"
"num"
32-bit flags. Use the attributes below to access known flag bits.
Read/write accessor for write bit of flags
Read/write accesor for alloc bit of flags
Read/write accessor for execinstr bit of flags
The address in the process's memory where this section gets loaded, or zero if it doesn't.
Location within the ELF file where this section is located.
Size (in bytes) of the section within the ELF file. If the type of the section is 'nobits' then this field is ignored and the section does not occupy bytes of the ELF file.
Reference to another section, as an index into the section table. Meaning depends on section type.
Extra info, depending on section type.
Required alignment for the "addr" field. Addr must be a multiple of this value. Values 0 and 1 both mean no alignment is required.
If the section holds a table of fixed-size entries, this is the size of each entry. Set to 0 otherwise.
The data bytes of this section
Use this attribute to introduce padding between the start of the section and the offset where your 'data' should be written. This is mainly of use for segments, but provided on sections for symmetry.
Read-only sum of "offset" and "data_start". This is the file offset at which your data scalar (if provided) will be written to the file.
standard Moo constructor. Pass any attributes, *including* the flag aliases.
$class->coerce($thing)
Returns $thing if it is an instance of $class, or passes $thing to the constructor otherwise.
$thing
$class
Clone this instance.
Michael Conrad <mike@nrdvana.net>
This software is copyright (c) 2017 by Michael Conrad.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install ELF::Writer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ELF::Writer
CPAN shell
perl -MCPAN -e shell install ELF::Writer
For more information on module installation, please visit the detailed CPAN module installation guide.