[all-commits] [llvm/llvm-project] abd335: [llvm-objdump] Fix unstable disassembly output for...
James Henderson via All-commits
all-commits at lists.llvm.org
Wed Apr 8 02:57:38 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: abd335a339cb2c5aaf30463ff8451f1eb6e223c7
https://github.com/llvm/llvm-project/commit/abd335a339cb2c5aaf30463ff8451f1eb6e223c7
Author: James Henderson <james.henderson at sony.com>
Date: 2020-04-08 (Wed, 08 Apr 2020)
Changed paths:
A llvm/test/tools/llvm-objdump/X86/disassemble-same-section-addr.test
M llvm/tools/llvm-objdump/llvm-objdump.cpp
Log Message:
-----------
[llvm-objdump] Fix unstable disassembly output for sections with same address
When two sections shared the same address, the disassembly code was
using pointer values when sorting (see the SectionRef less than
operator). Since those values aren't guaranteed to have a specific
order, this meant the disassembly code would sometimes change which
section to pick when finding symbols targeted by calls in fully linked
objects.
This change fixes the non-determinism, so that the same section is
always picked. This might have a negative impact in that now a section
without any symbol might be picked over a section with symbols, but this
will be addressed in a later commit.
Fixes https://bugs.llvm.org/show_bug.cgi?id=45411.
Reviewed by: grimar, MaskRay
Differential Revision: https://reviews.llvm.org/D77640
More information about the All-commits
mailing list