Class NoteGnuProperty
java.lang.Object
ghidra.app.util.bin.format.elf.info.ElfNote
ghidra.app.util.bin.format.elf.info.NoteGnuProperty
- All Implemented Interfaces:
ElfInfoItem
An ELF note that contains a list of enumerated "properties".
Currently known property types are stack_size and no_copy_on_protected (flag).
array of Elf_Prop { word pr_type; word pr_datasz; byte pr_data[pr_datasz]; byte padding[] }
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
Contains the information of an individual note property.Nested classes/interfaces inherited from class ghidra.app.util.bin.format.elf.info.ElfNote
ElfNote.NoteReaderFunc<T extends ElfNote>
Nested classes/interfaces inherited from interface ghidra.app.util.bin.format.elf.info.ElfInfoItem
ElfInfoItem.ItemWithAddress<T>, ElfInfoItem.ReaderFunc<T>
-
Field Summary
Fields inherited from class ghidra.app.util.bin.format.elf.info.ElfNote
description, name, nameLen, vendorType
-
Constructor Summary
ConstructorDescriptionNoteGnuProperty
(int nameLen, String name, int vendorType, List<NoteGnuProperty.NotePropertyElement> elements) Creates a instance using the specified values. -
Method Summary
Modifier and TypeMethodDescriptionvoid
decorateProgramInfo
(Options programInfoOptions) Adds a single entry to the Options, built from theElfNote.getProgramInfoKey()
value andElfNote.getNoteValueString()
value.static NoteGnuProperty
fromProgram
(Program program) Returns a NoteGnuProperty instance containing the information found in the program's ".note.gnu.property" section, or null if there is no section.Returns a string that describes this note's type, used when creating the defaultElfNote.getProgramInfoKey()
value.void
markupProgram
(Program program, Address address) Markup a program's info and memory with this item.static NoteGnuProperty
Parses a NoteGnuProperty instance from the specified generic note.Returns a Structure datatype that matches the format of this ElfNote, or null if this ElfNote shouldn't be represented/marked up.Methods inherited from class ghidra.app.util.bin.format.elf.info.ElfNote
createNoteStructure, getDescription, getDescriptionAsHexString, getDescriptionLen, getDescriptionReader, getName, getNameLen, getNoteValueString, getProgramInfoKey, getVendorType, isGnu, read, readFromProgramHelper, toString
-
Field Details
-
SECTION_NAME
- See Also:
-
-
Constructor Details
-
NoteGnuProperty
public NoteGnuProperty(int nameLen, String name, int vendorType, List<NoteGnuProperty.NotePropertyElement> elements) Creates a instance using the specified values.- Parameters:
name
- name of propertyvendorType
- vendor type of propertyelements
- list of NotePropertyElements
-
-
Method Details
-
read
Parses a NoteGnuProperty instance from the specified generic note.- Parameters:
note
- generic note that contains the data from a .note.gnu.property sectionprogram
- Program that contains the note section- Returns:
NoteGnuProperty
instance- Throws:
IOException
- if IO error parsing data
-
fromProgram
Returns a NoteGnuProperty instance containing the information found in the program's ".note.gnu.property" section, or null if there is no section.- Parameters:
program
-Program
to read from- Returns:
NoteGnuProperty
-
getNoteTypeName
Description copied from class:ElfNote
Returns a string that describes this note's type, used when creating the defaultElfNote.getProgramInfoKey()
value.Specific Note subclasses can override this to return a better string than this default implementation, or can override the
ElfNote.getProgramInfoKey()
method.- Overrides:
getNoteTypeName
in classElfNote
- Returns:
- descriptive string
-
decorateProgramInfo
Description copied from class:ElfNote
Adds a single entry to the Options, built from theElfNote.getProgramInfoKey()
value andElfNote.getNoteValueString()
value.- Overrides:
decorateProgramInfo
in classElfNote
- Parameters:
programInfoOptions
-Options
to add entry to
-
markupProgram
Description copied from interface:ElfInfoItem
Markup a program's info and memory with this item.- Specified by:
markupProgram
in interfaceElfInfoItem
- Overrides:
markupProgram
in classElfNote
- Parameters:
program
-Program
to markupaddress
-Address
of the item in the program
-
toStructure
Description copied from class:ElfNote
Returns a Structure datatype that matches the format of this ElfNote, or null if this ElfNote shouldn't be represented/marked up.- Overrides:
toStructure
in classElfNote
- Parameters:
dtm
-DataTypeManager
that will receive the structure- Returns:
- StructureDataType that specifies the layout of the ElfNote, or null
-