Issue in patching __scatterload()

Hi,

I am trying to patch the library __scatterload() function for Cortex-R5 startup code, but got some issues:

1) Before patching,  the disassemble code of  _main() function are:

__main
0x0000015C : BLX __scatterload ; 0x164
0x00000160 : BLX __rt_entry ; 0x310
__scatterload
0x00000164 : ADR r6,{pc}+0x54 ; 0x1b8
0x00000166 : LDM r6,{r10,r11}
0x0000016A : ADD r10,r10,r6

2) I used $Sub$$__scatterload() as below:

void $Sub$$__scatterload(void)
{
      ExtraFuncCall();
      // Call the original scatter-load function
      $Super$$__scatterload();
}

3) After patching in 2), the disassemble code of __main() became:

__main
0x0000015C : MOV r0,r0
0x00000160 : BLX __rt_entry ; 0x2B0
__decompress
0x00000164 : ADD r2,r2,r1

..

It seems the __scatterload() function was skipped at all.

I am using ARM DS 2023.1, ARM C Compiler for Embedded 6. 

Please help to see what wrong in my usage. Thanks