This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: readelf display of 0x800...000 addend


Hi Alan,


Nick, in commit 834f871cdc, you changed readelf to display
sym + 8000...0000 for rela relocs with a MIN_INT addend.
Previously we showed sym - 8000...0000, which I think is a little more
correct if readelf is showing signed addends.  Was the change just to
avoid a ubsan warning about negation of MIN_INT?

Yes.

> If so, we can avoid
the warning by simply doing unsigned arithmetic.

Of course.

	* readelf.c (dump_relocations): Show MIN_INT addends as negative.

OK?

Indeed - please apply.

Cheers
  Nick



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]