The issue is that ubsan spotted a case where we extract 21 bits from a negative signed addend value in order to encode it into binary representation of reloc.
While behavior is harmless in this case, technically it does fall under undefined behavior. The patch extracts relevant bits into an unsigned variable first and then uses that unsigned value to shift bits around.