nuttx/libs/libc/machine
guoshichao ba63a4d234 ghs: fix the UsageFault:INVSTATE error triggered by exception_common
when we build with greenhills compiler, if the exception_common function
is put into a separate section: ".text.exception_common", then the
address of exception_common function is an even number, for example "0x16a6c",
in this case, it will trigger the UsageFaults:INVSTATE error.
The reason for this error is that in the GHS compiler, a section declared
through the ".section" directive must specify at least the "a" attribute.
Otherwise, this section will not be linked into the final file, and this
is why the address of exception_common function is invalid.
The following is the official explanation in the GHS compiler documentation:
"The reason for this error is that in the GHS compiler, a section
declared through the .section directive must specify at least the "a"
attribute. Otherwise, this section will not be linked into the final
file. The following is the official explanation in the documentation:
"Sections that are intended be part of the final linked output should
have at least the `a` attribute"
and for GHS compiler, the .text section is recommended specify the
attribute of `ax`.

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-01-16 09:41:13 +08:00
..
arm ghs: fix the UsageFault:INVSTATE error triggered by exception_common 2026-01-16 09:41:13 +08:00
arm64 libc/arm64: add cfi for optimized func 2025-12-18 22:05:12 +08:00
renesas libc/machine/renesas: Move all source files out of gnu folder 2025-06-30 09:56:27 +08:00
risc-v libs/risc-v:add cfi for optimized compilation func 2025-12-18 22:05:12 +08:00
sim Remove FAR from 32/64bit arch 2024-12-05 22:55:39 +08:00
sparc libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
tricore libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
x86 libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
x86_64 libc/machine/x86_64: Move all source files out of gnu folder 2025-06-30 09:56:27 +08:00
xtensa libc/machine/xtensa: add mcount implementation for gprof 2025-12-13 13:31:46 +08:00
arch_atomic.c sched/spin_lock: rename raw_spin_lock to spin_lock_notrace 2025-02-13 20:48:15 +08:00
arch_libc.c string:use builtin function to optimize libc function 2025-12-20 10:38:53 +08:00
CMakeLists.txt libc/machine/CMakeLists: should alaways build arch_atomic.c 2024-11-03 02:33:03 +08:00
Kconfig arch:use ARCH_64BIT to mark arch is support 64bit 2025-12-18 22:05:12 +08:00
Make.defs libc/machine:Add prefixes to libc functions implemented by arch 2024-10-31 18:11:16 +08:00