Skip to content

Commit

Permalink
Add an additional AuxData entry for elfSoname
Browse files Browse the repository at this point in the history
  • Loading branch information
junghee committed Jan 4, 2024
1 parent e55adef commit b2b65d7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
11 changes: 11 additions & 0 deletions AuxData.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ The following are the sanctioned AuxData table schemata.
|-------------------------------------------|----------------------------------------------------|
| [`"elfDynamicInit"`](#elfDynamicInit) | ```gtirb::UUID``` |
| [`"elfDynamicFini"`](#elfDynamicFini) | ```gtirb::UUID``` |
| [`"elfSoname"`](#elfSoname) | ```std::string``` |
| [`"elfStackExec"`](#elfStackExec) | ```bool``` |
| [`"elfStackSize"`](#elfStackSize) | ```uint64_t``` |
| [`"functionBlocks"`](#functionblocks) | ```std::map<gtirb::UUID, std::set<gtirb::UUID>>``` |
Expand Down Expand Up @@ -126,6 +127,16 @@ The following are the sanctioned AuxData table schemata.
| AttachedTo | gtirb::Module |
| Note | The CodeBlock to which a DT_FINI entry in an ELF file's .dynamic section refers. |

### elfSoname

| <!-- --> | <!-- --> |
|----------|----------------------------------------------------|
| Label | ```"elfSoname"``` |
| Type | ```std::string``` |
| Value | The SONAME of a library. |
| AttachedTo | gtirb::Module |
| Note | The string value which the DT_SONAME entry in an ELF file's .dynamic section contains. |

### elfStackExec

| <!-- --> | <!-- --> |
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

# 2.0.1 (Unreleased)

* Add elfSoname AuxData definition

# 2.0.0

* The Java API has been substantially reworked. Including:
Expand Down
7 changes: 7 additions & 0 deletions include/gtirb/AuxDataSchema.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ struct ElfDynamicFini {
typedef gtirb::UUID Type;
};

/// \brief Schema class for ELF file's dynamic entry DT_SONAME.
/// It contains a SONAME as string
struct ElfSoname {
static constexpr const char* Name = "elfSoname";
typedef std::string Type;
};

/// \brief Schema class for stack executable flag specified by PT_GNU_STACK
/// segment in ELF files.
struct ElfStackExec {
Expand Down
7 changes: 7 additions & 0 deletions java/com/grammatech/gtirb/AuxDataSchemas.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ public class AuxDataSchemas {
public final static AuxDataSchema<UUID> elfDynamicFini =
new AuxDataSchema<>("elfDynamicFini", new UuidCodec());

/**
* The string value which the DT_SONAME entry in an ELF file's .dynamic
* section contains.
*/
public final static AuxDataSchema<string> elfSoname =
new AuxDataSchema<>("elfSoname", new StringCodec());

/**
* Stack executable flag specified by PT_GNU_STACK in ELF files.
*/
Expand Down

0 comments on commit b2b65d7

Please sign in to comment.