RFC: Is it OK to disassemble instructions twice ?
Nick Clifton
nickc@redhat.com
Tue Aug 20 16:30:00 GMT 2019
Hi Guys,
I am attaching a revised version of my original patch. In this
version I have added a new field to the bfd_arch_info structure
which specifies the maximum offset a reloc can have from the start
of the instruction to which it applies. If this value is greater
than zero then objdump will use the double disassembly trick when
there is a possibility that a reloc might need to be applied to
the current instruction. This means for architectures where
the max-reloc-offset field is zero there will be no double
disassembly.
Eagle eyed patch reviewers may note that I have set the max-
reloc-offset field to zero for *all* targets. This is because
I have not found any targets that actually seem to need it.
But it is probable that I have missed something, and besides
the code to check for potential middle-of-instruction-relocs
must have been added to objdump for a reason. So I feel that
it is likely that a need will turn up in the future.
One final point - I would like to delay committing the patch
until after the 2.33 branch is cut, just because it does make
changes to every target and that is always a potential point
for introducing new bugs. Plus it means that there is more
time for people to make comments on the patch, if they want to.
Cheers
Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr24907.patch.2
Type: application/x-troff-man
Size: 146734 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20190820/8ea3732a/attachment.2>
More information about the Binutils
mailing list