bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/27672] New: Fix quirky size output in readelf symbol table


From: nick.lott at gmail dot com
Subject: [Bug binutils/27672] New: Fix quirky size output in readelf symbol tables
Date: Wed, 31 Mar 2021 08:15:38 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=27672

            Bug ID: 27672
           Summary: Fix quirky size output in readelf symbol tables
           Product: binutils
           Version: 2.37 (HEAD)
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: nick.lott at gmail dot com
  Target Milestone: ---

Created attachment 13338
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13338&action=edit
Patch to print symbol sizes consistantly.

When listing the symbol table using 'readelf' the size is listed in decimal for
objects smaller than 100,000 bytes. For objects this size or larger the
notation switches to hexadecimal format.

This is inconsistent with other binutils programs such as 'nm' and 'objdump'
which use consistent notation throughout an output and as specified via the
command options.

This is not a bug as it is exactly the behavior described in the commit given
below:

----8<-----
b19aac67f88 18 years ago nickc@redhat.com When printing DEC_5 values, if the
number is bigger than 99999 switch to using hexadecimal notation.
----8<-----

When examining the reason given in the mailing list in 2003 (see below) the
problem was with printing large values having the output become negative.

----8<-----
>From nickc@redhat.com  Thu Jun 19 10:23:00 2003
From: nickc@redhat.com (Nick Clifton)
Date: Thu, 19 Jun 2003 10:23:00 -0000
Subject: readelf: Handle symbols with large values.
Message-ID: <m33ci6id6a.fsf@redhat.com>

Hi Guys,

  Here is a patch to readelf to slightly improve its displaying of
  symbols with large values.  At the moment readelf will print out a
  large negative number like this:
...
----8<-----

I believe the better solution would be to print sizes as unsigned numbers
rather than signed or hexadecimal. 

The attached patch changes this behavior to constantly use decimal for the size
field in the symbol table.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]