
The frame pointer was already omitted in the object files that TinyGo emits, but wasn't yet omitted in the C files it compiles. Omitting the frame pointer is good for code size (and perhaps performance). The frame pointer was originally used for printing stack traces in a debugger. However, advances in DWARF debug info have made it largely unnecessary (debug info contains enough information now to recover the frame pointer even without an explicit frame pointer register). In fact, GDB has been able to produce backtraces in TinyGo compiled code for a while now while it didn't include a frame pointer.
28 строки
563 Б
JSON
28 строки
563 Б
JSON
{
|
|
"build-tags": ["cortexm", "baremetal", "linux", "arm"],
|
|
"goos": "linux",
|
|
"goarch": "arm",
|
|
"compiler": "clang",
|
|
"gc": "conservative",
|
|
"scheduler": "tasks",
|
|
"linker": "ld.lld",
|
|
"rtlib": "compiler-rt",
|
|
"libc": "picolibc",
|
|
"cflags": [
|
|
"-Oz",
|
|
"-mthumb",
|
|
"-Werror",
|
|
"-fshort-enums",
|
|
"-fomit-frame-pointer",
|
|
"-fno-exceptions", "-fno-unwind-tables",
|
|
"-ffunction-sections", "-fdata-sections"
|
|
],
|
|
"ldflags": [
|
|
"--gc-sections"
|
|
],
|
|
"extra-files": [
|
|
"src/device/arm/cortexm.s",
|
|
"src/runtime/scheduler_cortexm.S"
|
|
],
|
|
"gdb": "gdb-multiarch"
|
|
}
|