syacer
syacer

Reputation: 167

Need help to understand .vector, %function and .label

Need some help to understand the following code:

  1. What is label?
  2. What does .vectors do in here
  3. What does type \label, %function do?
  4. What does \label: do?
/*
 * Create an entry in the exception vector table, enforcing it is
 * aligned on a 128-byte boundary, as required by the ARMv8 architecture.
 * Use zero bytes as the fill value to be stored in the padding bytes
 * so that it inserts illegal AArch64 instructions. This increases
 * security, robustness and potentially facilitates debugging.
 */

.macro vector_entry  label, section_name=.vectors
.cfi_sections .debug_frame
.section \section_name, "ax"
.align 7, 0
.type \label, %function
.cfi_startproc
\label:
.endm

The code snippet is from ARM ATF code asm_macros.S, I am not an expert on this. Are there any references that introduce these kind of topics.

Upvotes: 1

Views: 131

Answers (0)

Related Questions