llvm-readelf prints relocation addends as "<symbol value>[+-]<absolute addend>" where [+-] is determined from whether addend is less than zero or not. However, it does not print the +/- if there is no symbol, which meant that negative addends became their positive value with no indication that this had happened. This patch stops the absolute conversion when addends are negative and there is no associated symbol.
Before:
0000000000000008 0000000000000000 R_X86_64_NONE 1
With patch:
0000000000000008 0000000000000000 R_X86_64_NONE ffffffffffffffff
If r_addend = LLONG_MIN, abs(r_addend) is ub...
"The behavior is undefined if the result cannot be represented by the return type."