5.64 · exercise

Quiz: External Data - Advanced

Work through symbol scope, PC-relative address formation with adrp and add, section permissions, and indexing an array of pointers.

0 of 5 correct

Knowledge Check

In C, how does the scope of a static local variable differ from the scope of a static global variable?

Knowledge Check

An array of string pointers is indexed with ldr x2, [x0, w1, sxtw #3], where x0 holds the address of the array and w1 holds the index. What does the sxtw #3 contribute?

Knowledge Check

An adrp followed by an add builds an address relative to the program counter. How far from the PC can that pair reach in either direction?

Knowledge Check

A programmer-initialized constant is placed in the .text section, for example const_m: .hword 42. What happens if the program stores a new value to that address?

Knowledge Check

Reading a variable that lives in .data starts with adrp x0, var followed by add x0, x0, :lo12:var. Why are two instructions needed before the ldr?