Chapter 4. API Guides
• archive: * is specified, which is a short-hand for all the object files under the archive.
To know what an entry means, let us expand a sample object-granularity placement:
object (scheme)
Then expanding the scheme fragment from its entries definitions, we have:
object (sections -> target,
sections -> target,
...)
Expanding the sections fragment with its entries definition:
object (.section, # given this object file
.section, # put its sections listed here at this
... -> target, # target
.section,
.section, # same should be done for these sections
... -> target,
...) # and so on
Example:
[mapping:map]
archive: libfreertos.a
entries:
* (noflash)
Aside from the entity and scheme, flags can also be specified in an entry. The following flags are supported (note: <>
= argument name, [] = optional):
1. ALIGN(<alignment>[, pre, post])
Align the placement by the amount specified in alignment. Generates
2. SORT([<sort_by_first>, <sort_by_second>])
Emits SORT_BY_NAME, SORT_BY_ALIGNMENT, SORT_BY_INIT_PRIORITY or SORT in
the input section description.
Possible values for sort_by_first and sort_by_second are: name, alignment,
init_priority.
If both sort_by_first and sort_by_second are not specified, the input sections are sorted
by name. If both are specified, then the nested sorting follows the same rules discussed in https:
//sourceware.org/binutils/docs/ld/Input-Section-Wildcards.html.
3. KEEP()
Prevent the linker from discarding the placement by surrounding the input section description with
KEEP command. See https://sourceware.org/binutils/docs/ld/Input-Section-Keep.html for more
details.
4.SURROUND(<name>)
Generate symbols before and after the placement. The generated symbols follow the naming
_<name>_start and _<name>_end. For example, if name == sym1,
When adding flags, the specific section -> target in the scheme needs to be specified. For multiple section
-> target, use a comma as a separator. For example,
# Notes:
# A. semicolon after entity-scheme
# B. comma before section2 -> target2
# C. section1 -> target1 and section2 -> target2 should be defined in entries of␣
,→scheme1
(continues on next page)
Espressif Systems 1418
Submit Document Feedback
Release v4.4