bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/24993] RISC-V: Address 0x00000000000xxxxx is out of bounds


From: wilson at gcc dot gnu.org
Subject: [Bug binutils/24993] RISC-V: Address 0x00000000000xxxxx is out of bounds when "objdump -D"
Date: Wed, 11 Sep 2019 22:53:32 +0000

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

Jim Wilson <wilson at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |wilson at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #1 from Jim Wilson <wilson at gcc dot gnu.org> ---
the problem is that you are using objdump -D, and this is almost always the
wrong thing to do.  The correct option is "-d".

-D will dump data sections as if they are text sections, but data sections are
not text, and thus (normally) all you will get is garbage.  There is also the
problem that risc-v instructions require nature alignment and power of 2 sizes,
and data does not.

So in this case, you have an odd number of bytes in the data section, which
can't be translated into a RISC-V instruction, and so you are getting an
objdump error, which is correct.  The error message could perhaps be a little
friendlier, but the error is correct.

I think there is some old RISC-V docs somewhere telling people to use objdump
-D when they should not be using it, as there is an epidemic of RISC-V folks
reporting bugs with objdump -D when it isn't broken, and when they shouldn't
have used -D in the first place.

If you are aware of docs someplace recommending people use objdump -D, then
please report bugs against those docs, not against binutils.

-- 
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]