contrib/elf2dmp: Use rol64() to decode
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Thu, 7 Mar 2024 10:20:57 +0000 (19:20 +0900)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 11 Mar 2024 17:06:06 +0000 (17:06 +0000)
commitf024f5031ee570d952d3e93c4bb00ee111eb9dc6
tree48686a651c80b81ce4ee8e98c7b05935e23e67a4
parent2aa501af351c25f91c56f3c9fd023df4bbea3f3c
contrib/elf2dmp: Use rol64() to decode

rol64() is roubust against too large shift values and fixes UBSan
warnings.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240307-elf2dmp-v4-14-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
contrib/elf2dmp/main.c