Commit 11c542a
[nrf fromlist] linker: discard eh_frame when C++ exceptions are disabled
Discard the eh_frame section when C++ exceptions are disabled.
In principle the eh_frame may be used for other purposes such as
backtracing when linking C programs, then Zephyr compiles each source
file with '-fno-asynchronous-unwind-tables', thus keeping the eh_frame
in the elf output just takes up space.
When using gcc/ld, then the eh_frame is generally generally discarded
per default, however for clang/lld it will be included but give a
warning that the section is auto-placed.
Some platforms already discards the eh_frame, so unify this for all
targets.
As eh_frame is now discarded in linker scripts then post processing step
of removing the section during hex or bin conversion can also be
removed.
Upstream PR #: 88970
Signed-off-by: Torsten Rasmussen <[email protected]>1 parent be57ad0 commit 11c542a
File tree
4 files changed
+5
-18
lines changed- include/zephyr
- arch/x86
- ia32
- intel64
- linker
4 files changed
+5
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1714 | 1714 | | |
1715 | 1715 | | |
1716 | 1716 | | |
1717 | | - | |
1718 | | - | |
1719 | | - | |
1720 | | - | |
1721 | | - | |
1722 | 1717 | | |
1723 | | - | |
| 1718 | + | |
1724 | 1719 | | |
1725 | 1720 | | |
1726 | 1721 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | 560 | | |
567 | 561 | | |
568 | 562 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | 226 | | |
233 | 227 | | |
234 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
0 commit comments