diff options
author | Jan Beulich <jbeulich@suse.com> | 2021-04-19 13:28:35 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2021-04-19 13:28:35 +0200 |
commit | 9a8041fd94b7b5c12cb802f87648cce954d18d2a (patch) | |
tree | 0c3070b7a9525345185ba17ef4ff6efba4be9978 /gas/write.c | |
parent | 4dee4f3ea143a8910de487a810e972152154292d (diff) | |
download | gdb-9a8041fd94b7b5c12cb802f87648cce954d18d2a.zip gdb-9a8041fd94b7b5c12cb802f87648cce954d18d2a.tar.gz gdb-9a8041fd94b7b5c12cb802f87648cce954d18d2a.tar.bz2 |
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.
Diffstat (limited to 'gas/write.c')
-rw-r--r-- | gas/write.c | 8 |
1 files changed, 5 insertions, 3 deletions
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), |