arm-attr
Parses ARM build attributes from ELF files according to the 2023Q3 ARM ABI.
Contents
Examples
The two examples below show two different methods to read build attributes: iterator (lazy and fast) and struct (eager and slow but correct).
By iterator
This first example reads the tags directly. It's faster, but:
- It doesn't consider that one type of tag may appear multiple times.
- It doesn't handle enclosing scopes, i.e. section or symbol-specific attributes.
- If a tag could not be parsed, the iterator will stop with no error.
use ;
let data = ;
let build_attrs = new.unwrap;
for subsection in build_attrs.subsections
By struct
This second example collects all tags using into_public_attributes. It's slower but doesn't suffer from the flaws mentioned
in the first example.
let data = ;
let build_attrs = new.unwrap;
for subsection in build_attrs.subsections