LoongArch: Avoid signed overflow when dumping relocation addends
loongarch_dump_reloc_record negates a negative long addend to print.
When the addend is INT64_MIN, the negation overflows and trigger
undefined behavior, using bfd_vma subtraction to compute the absolute
value of addend and print it with PRIu64.
This also handles INT64_MIN without signed overflow and preserves the
output for other addends.
PR ld/34808
bfd/
* elfnn-loongarch.c (loongarch_dump_reloc_record): Using
bfd_vma subtraction to compute the absolute value of addend and
print it with PRIu64.
5 files changed