--select=select_options
When used with --fieldoffsets
or --text -a
options, displays only those fields that match a specified pattern list.
Syntax
--select=select_options
Where
is a list of patterns to match.
Use special characters to select multiple fields:select_options
Use a comma-separated list to specify multiple fields, for example:
a*,b*,c*
Use the wildcard character
*
to match any name.Use the wildcard character
?
to match any single letter.Prefix the
string withselect_options
+
to specify the fields to include. This is the default behavior.Prefix the
string withselect_options
~
to specify the fields to exclude.
If you are using a special character on Unix platforms, you must enclose the options in quotes to prevent the shell expanding the selection.
Usage
Use this option with either --fieldoffsets
or --text
-a
.
Example
The output from the --fieldoffsets
option might include the following data structure:
|structure.f1| EQU 0 ; int16_t |structure.f2| EQU 0x2 ; int16_t |structure.f3| EQU 0x4 ; int16_t |structure.f11| EQU 0x6 ; int16_t |structure.f21| EQU 0x8 ; int16_t |structure.f31| EQU 0xA ; int16_t |structure.f111| EQU 0xC ; int16_t
To output only those fields that start with f1
, enter:
fromelf --select=structure.f1* --fieldoffsets infile.axf
This produces the output:
|structure.f1| EQU 0 ; int16_t |structure.f11| EQU 0x6 ; int16_t |structure.f111| EQU 0xC ; int16_t END