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
Nested ClassesModifier and TypeClassDescriptionstatic final recordContains 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
FieldsFields inherited from class ghidra.app.util.bin.format.elf.info.ElfNote
description, name, nameLen, vendorType -
Constructor Summary
ConstructorsConstructorDescriptionNoteGnuProperty(int nameLen, String name, int vendorType, List<NoteGnuProperty.NotePropertyElement> elements) Creates a instance using the specified values. -
Method Summary
Modifier and TypeMethodDescriptionvoiddecorateProgramInfo(Options programInfoOptions) Adds a single entry to the Options, built from theElfNote.getProgramInfoKey()value andElfNote.getNoteValueString()value.static NoteGnuPropertyfromProgram(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.voidmarkupProgram(Program program, Address address) Markup a program's info and memory with this item.static NoteGnuPropertyParses 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:
NoteGnuPropertyinstance- 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-Programto read from- Returns:
NoteGnuProperty
-
getNoteTypeName
Description copied from class:ElfNoteReturns 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:
getNoteTypeNamein classElfNote- Returns:
- descriptive string
-
decorateProgramInfo
Description copied from class:ElfNoteAdds a single entry to the Options, built from theElfNote.getProgramInfoKey()value andElfNote.getNoteValueString()value.- Overrides:
decorateProgramInfoin classElfNote- Parameters:
programInfoOptions-Optionsto add entry to
-
markupProgram
Description copied from interface:ElfInfoItemMarkup a program's info and memory with this item.- Specified by:
markupProgramin interfaceElfInfoItem- Overrides:
markupProgramin classElfNote- Parameters:
program-Programto markupaddress-Addressof the item in the program
-
toStructure
Description copied from class:ElfNoteReturns a Structure datatype that matches the format of this ElfNote, or null if this ElfNote shouldn't be represented/marked up.- Overrides:
toStructurein classElfNote- Parameters:
dtm-DataTypeManagerthat will receive the structure- Returns:
- StructureDataType that specifies the layout of the ElfNote, or null
-