xiaoxiang781216 commented on code in PR #7165: URL: https://github.com/apache/incubator-nuttx/pull/7165#discussion_r977834924
########## arch/arm/src/common/arm_internal.h: ########## @@ -148,6 +148,24 @@ #define arm_switchcontext(saveregs, restoreregs) \ sys_call2(SYS_switch_context, (uintptr_t)saveregs, (uintptr_t)restoreregs); +/* Redefine the linker symbols as armlink style */ + +#ifdef CONFIG_ARM_TOOLCHAIN_ARMCLANG +# define _stext Image$$text$$Base +# define _etext Image$$text$$Limit +# define _eronly Image$$eronly$$Base +# define _sdata Image$$data$$Base +# define _edata Image$$data$$RW$$Limit +# define _sbss Image$$bss$$Base +# define _ebss Image$$bss$$ZI$$Limit +# define _stdata Image$$tdata$$Base +# define _etdata Image$$tdata$$Limit +# define _stbss Image$$tbss$$Base +# define _etbss Image$$tbss$$Limit +# define _snoinit Image$$noinit$$Base +# define _enoinit Image$$noinit$$Limit Review Comment: armclang(armlink) has special link script grammar which doesn't support to define the custom label. You can reference the guild here: [https://developer.arm.com/documentation/dui0803](https://developer.arm.com/documentation/dui0803/a/Accessing-and-managing-symbols-with-armlink/What-is-a-steering-file-) The only solution @anchao found is to use the steering file to alias Image$$xxx$$yyy to _[s|e]xxx. The change is here https://github.com/apache/incubator-nuttx/pull/7121, but it is complex and hard to extend. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org