You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The vector table now resembles the results of all the code snippets in this book so far. To summarize:
222
+
- In the [_Inspecting it_] section of the earlier memory chapter, we learned that:
223
+
- The first entry in the vector table contains the initial value of the stack pointer.
224
+
- Objdump prints in `little endian` format, so the stack starts at `0x2001_0000`.
225
+
- The second entry points to address `0x0000_0041`, the Reset handler.
226
+
- The address of the Reset handler can be seen in the disassembly above, being `0x40`.
227
+
- The first bit being set to 1 does not alter the address due to alignment requirements. Instead, it causes the function to be executed in _thumb mode_.
228
+
- Afterwards, a pattern of addresses alternating between `0x79` and `0x00` is visible.
229
+
- Looking at the disassembly above, it is clear that `0x79` refers to the `DefaultExceptionHandler` (`0x78` executed in thumb mode).
230
+
- Cross referncing the pattern to the vector table that was set up earlier in this chapter (see the definition of `pub static EXCEPTIONS`) with [the vector table layout for the Cortex-M], it is clear that the address of the `DefaultExceptionHandler` is present each time a respective handler entry is present in the table.
0 commit comments