The vector table has to be setup with normal C (or assembly) code.
Instead an array of vectors has to be allocated and initialized with the address of the handlers and with their initial thread argument.