From 9a8041fd94b7b5c12cb802f87648cce954d18d2a Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 19 Apr 2021 13:28:35 +0200 Subject: gas: drop sprint_value() Its (documented) behavior is unhelpful in particular in 64-bit build environments: While printing large 32-bit numbers in decimal already isn't very meaningful to most people, this even more so goes for yet larger 64-bit numbers. bfd_sprintf_vma() still tries to limit the number of digits printed (without depending on a build system property), but uniformly produces hex output. --- gas/write.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gas/write.c') diff --git a/gas/write.c b/gas/write.c index 706c9c0..682e28f 100644 --- a/gas/write.c +++ b/gas/write.c @@ -1110,9 +1110,9 @@ fixup_segment (fixS *fixP, segT this_segment) if ((add_number & mask) != 0 && (add_number & mask) != mask) { char buf[50], buf2[50]; - sprint_value (buf, fragP->fr_address + fixP->fx_where); + bfd_sprintf_vma (stdoutput, buf, fragP->fr_address + fixP->fx_where); if (add_number > 1000) - sprint_value (buf2, add_number); + bfd_sprintf_vma (stdoutput, buf2, add_number); else sprintf (buf2, "%ld", (long) add_number); as_bad_where (fixP->fx_file, fixP->fx_line, @@ -2866,7 +2866,9 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass) if (flag_warn_displacement) { char buf[50]; - sprint_value (buf, (addressT) lie->addnum); + + bfd_sprintf_vma (stdoutput, buf, + (addressT) lie->addnum); as_warn_where (fragP->fr_file, fragP->fr_line, _(".word %s-%s+%s didn't fit"), S_GET_NAME (lie->add), -- cgit v1.1