ELFLib
The ELF Library from the Embedded Experts
SEGGER’s ELFLib is a library for extracting information from ELF files. It extracts both generic ELF-related information and compiler specific debugging information.
Overview
SEGGER’s ELFLib is the preferred solution when creating things like visualization utilities, target control utilities and more. Basically, anything that needs to connect target application information to user interaction and/or data representation can benefit from ELFLib.
ELFLib lets developers extract debugging information like the addresses of variables from target applications. Normally, DWARF is used to interpret debugging information. However, compilers can be very different. This is the main reason one IDE cannot handle ELF files that were generated by one another. SEGGER’s ELFLib solves this problem.
Key features
- No viral licensing (no third-party code)
- Support for ELF output from different compilers
- Multi-platform: Windows, Linux, macOS
- Simple API
What is ELF?
ELF stands for Executable and Linkable Format. It describes a standard for executable files, object code and similar data points. ELF defines the structure of the file (where to find what information) and is often combined with the DWARF debugging format to specify a way of presenting debugging information, for example: Finding out where a variable is present in memory, what type it is, etc.
Use cases
Many IDEs have various ways to display and interpret data collected by the target application. These data display methods may not fit a particular case's needs. They also bind the development to a certain IDE that may not be available for specific architectures.
SEGGER’s ELFLib lets developers create their own application that visualizes this data, removing dependency on the IDE used during development.
Consider the following use cases:
Use case #1
A real world use case of the SEGGER ELFLib is monitoring and modifying variable values of the target application running on an embedded system without the need to implement an extra protocol in the application itself, to get variable data. For example, the SEGGER J-Scope software uses the ELFLib to extract information about what variables are present in a target application. This means the developer can select which ones to visualize.
Use case #2
Another use case of the ELFLib is for example to create a graphical user interface to control the behavior of an embedded target, without implementing a specific protocol etc. for this, by using modifying values of various variables inside the target application This way, the target application itself would not need to be modified (avoiding unnecessary code and saving space in memory) and would be directly usable on any target application.
Deliverables & licensing
The SEGGER ELFLib is delivered as a static library (with the option on source code) and available for Windows, Linux and MacOS. The shipment comes with a sample application that demonstrates the usage of the API of the ELFLib.
The ELFLib is licensed on a company wide license. This means that after the library has purchased once, as many utilities as liked can be created and used inside the company that purchased the ELFLib.
* Applies to second seat/product and all additional seats/products of the Single Product License and Single Developer License.