Improve error handling of getRelocationAddend.