*  x24        __primary_switch() .. relocate_kernel()
         *                                        current RELR displacement
         */
-ENTRY(stext)
+SYM_CODE_START(stext)
        bl      preserve_boot_args
        bl      el2_setup                       // Drop to EL1, w0=cpu_boot_mode
        adrp    x23, __PHYS_OFFSET
         */
        bl      __cpu_setup                     // initialise processor
        b       __primary_switch
-ENDPROC(stext)
+SYM_CODE_END(stext)
 
 /*
  * Preserve the arguments passed by the bootloader in x0 .. x3
  */
-preserve_boot_args:
+SYM_CODE_START_LOCAL(preserve_boot_args)
        mov     x21, x0                         // x21=FDT
 
        adr_l   x0, boot_args                   // record the contents of
 
        mov     x1, #0x20                       // 4 x 8 bytes
        b       __inval_dcache_area             // tail call
-ENDPROC(preserve_boot_args)
+SYM_CODE_END(preserve_boot_args)
 
 /*
  * Macro to create a table entry to the next page.