#
644e6d7d |
| 18-Dec-2023 |
Fangrui Song <i@maskray.me> |
[llvm-objdump] --disassemble-symbols: skip inline relocs from symbols that are not dumped (#75724)
When a section contains two functions x1 and x2, we incorrectly display
x1's relocations when dump
[llvm-objdump] --disassemble-symbols: skip inline relocs from symbols that are not dumped (#75724)
When a section contains two functions x1 and x2, we incorrectly display
x1's relocations when dumping x2 for `--disassemble-symbols=x2 -r`.
Fix #75539 by ignoring these relocations.
show more ...
|
#
586ecdf2 |
| 12-Dec-2023 |
Kazu Hirata <kazu@google.com> |
[llvm] Use StringRef::{starts,ends}_with (NFC) (#74956)
This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::
[llvm] Use StringRef::{starts,ends}_with (NFC) (#74956)
This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.
I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.
show more ...
|
#
6b4812f7 |
| 02-Dec-2023 |
Kazu Hirata <kazu@google.com> |
[llvm-objdump] Stop including llvm/ADT/IndexedMap.h (NFC)
Identified with clangd.
|
Revision tags: llvmorg-17.0.6 |
|
#
fab690d6 |
| 17-Nov-2023 |
Rahman Lavaee <rahmanl@google.com> |
[NFC][SHT_LLVM_BB_ADDR_MAP] Define and use constructor and accessors for BBAddrMap fields. (#72689)
The fields are still kept as public for now since our tooling accesses
them. Will change them to
[NFC][SHT_LLVM_BB_ADDR_MAP] Define and use constructor and accessors for BBAddrMap fields. (#72689)
The fields are still kept as public for now since our tooling accesses
them. Will change them to private visibility in a later patch.
show more ...
|
#
506c0fa0 |
| 15-Nov-2023 |
stephenpeckham <118857872+stephenpeckham@users.noreply.github.com> |
[NFC] Rename variable to better document usage. (#71973)
Change variable DisassembleAsData to DisassembleAsELFData so that its
name better matches its usage.
|
Revision tags: llvmorg-17.0.5 |
|
#
87f5dc03 |
| 14-Nov-2023 |
Mike Hommey <mh@glandium.org> |
[llvm] Add missing include for std::set after 01702c3f7f1a (#72161)
Cc: @kazutakahirata
|
#
01702c3f |
| 11-Nov-2023 |
Kazu Hirata <kazu@google.com> |
[llvm] Stop including llvm/ADT/SmallSet.h (NFC)
Identified with clangd.
|
Revision tags: llvmorg-17.0.4 |
|
#
95f924f3 |
| 20-Oct-2023 |
Job Noorman <jnoorman@igalia.com> |
[RISCV][MC] Implement evaluateBranch for auipc+jalr pairs (#65480)
This patch implements `MCInstrAnalysis` state in order to be able
analyze auipc+jalr pairs inside `evaluateBranch`.
This is imp
[RISCV][MC] Implement evaluateBranch for auipc+jalr pairs (#65480)
This patch implements `MCInstrAnalysis` state in order to be able
analyze auipc+jalr pairs inside `evaluateBranch`.
This is implemented as follows:
- State: array of currently known GPR values;
- Whenever an auipc is detected in `updateState`, update the state value
of RD with the immediate;
- Whenever a jalr is detected in `evaluateBranch`, check if the state
holds a value for RS1 and use that to compute its target.
Note that this is similar to how binutils implements it and the output
of llvm-objdump should now mostly match the one of GNU objdump.
This patch also updates the relevant llvm-objdump patches and adds a new
one testing the output for interleaved auipc+jalr pairs.
show more ...
|
#
614a8cbf |
| 20-Oct-2023 |
Job Noorman <jnoorman@igalia.com> |
[MC][NFC] Allow MCInstrAnalysis to store state (#65479)
Currently, all the analysis functions provided by `MCInstrAnalysis` work
on a single instruction. On some targets, this limits the kind of
i
[MC][NFC] Allow MCInstrAnalysis to store state (#65479)
Currently, all the analysis functions provided by `MCInstrAnalysis` work
on a single instruction. On some targets, this limits the kind of
instructions that can be successfully analyzed as common constructs may
need multiple instructions.
For example, a typical call sequence on RISC-V uses a auipc+jalr pair.
In order to analyse the jalr inside `evaluateBranch`, information about
the corresponding auipc is needed. Similarly, AArch64 uses adrp+ldr
pairs to access globals.
This patch proposes to add state to `MCInstrAnalysis` to support these
use cases. Two new virtual methods are added:
- `updateState`: takes an instruction and its address. This methods
should be called by clients on every instruction and allows targets to
store whatever information they need to analyse future instructions.
- `resetState`: clears the state whenever it becomes irrelevant. Clients
could call this, for example, when starting to disassemble a new
function.
Note that the default implementations do nothing so this patch is NFC.
No actual state is stored inside `MCInstrAnalysis`; deciding the
structure of the state is left to the targets.
This patch also modifies llvm-objdump to use the new interface.
This patch is an alternative to
[D116677](https://reviews.llvm.org/D116677) and the idea of storing
state in `MCInstrAnalysis` was first discussed there.
show more ...
|
Revision tags: llvmorg-17.0.3 |
|
#
4a0ccfa8 |
| 13-Oct-2023 |
Kazu Hirata <kazu@google.com> |
Use llvm::endianness::{big,little,native} (NFC)
Note that llvm::support::endianness has been renamed to llvm::endianness while becoming an enum class as opposed to an enum. This patch replaces suppo
Use llvm::endianness::{big,little,native} (NFC)
Note that llvm::support::endianness has been renamed to llvm::endianness while becoming an enum class as opposed to an enum. This patch replaces support::{big,little,native} with llvm::endianness::{big,little,native}.
show more ...
|
#
b8885926 |
| 11-Oct-2023 |
Kazu Hirata <kazu@google.com> |
Use llvm::endianness::{big,little,native} (NFC)
Note that llvm::support::endianness has been renamed to llvm::endianness while becoming an enum class as opposed to an enum. This patch replaces llvm:
Use llvm::endianness::{big,little,native} (NFC)
Note that llvm::support::endianness has been renamed to llvm::endianness while becoming an enum class as opposed to an enum. This patch replaces llvm::support::{big,little,native} with llvm::endianness::{big,little,native}.
show more ...
|
#
a9d50568 |
| 11-Oct-2023 |
Kazu Hirata <kazu@google.com> |
Use llvm::endianness (NFC)
Now that llvm::support::endianness has been renamed to llvm::endianness, we can use the shorter form. This patch replaces support::endianness with llvm::endianness.
|
#
d7b18d50 |
| 09-Oct-2023 |
Kazu Hirata <kazu@google.com> |
Use llvm::endianness{,::little,::native} (NFC)
Now that llvm::support::endianness has been renamed to llvm::endianness, we can use the shorter form. This patch replaces llvm::support::endianness wi
Use llvm::endianness{,::little,::native} (NFC)
Now that llvm::support::endianness has been renamed to llvm::endianness, we can use the shorter form. This patch replaces llvm::support::endianness with llvm::endianness.
show more ...
|
Revision tags: llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4 |
|
#
d15f96fe |
| 07-May-2023 |
Eduard Zingerman <eddyz87@gmail.com> |
[BPF][DebugInfo] Show CO-RE relocations in llvm-objdump
Extend llvm-objdump to show CO-RE relocations when `-r` option is passed and object file has .BTF and .BTF.ext sections.
For example, the fol
[BPF][DebugInfo] Show CO-RE relocations in llvm-objdump
Extend llvm-objdump to show CO-RE relocations when `-r` option is passed and object file has .BTF and .BTF.ext sections.
For example, the following C program:
#define __pai __attribute__((preserve_access_index))
struct foo { int i; int j;} __pai; struct bar { struct foo f[7]; } __pai; extern void sink(void *);
void root(struct bar *bar) { sink(&bar[2].f[3].j); }
Should lead to the following objdump output:
$ clang --target=bpf -O2 -g t.c -c -o - | \ llvm-objdump --no-addresses --no-show-raw-insn -dr -
... r2 = 0x94 CO-RE <byte_off> [2] struct bar::[2].f[3].j (2:0:3:1) r1 += r2 call -0x1 R_BPF_64_32 sink exit ...
More examples could be found in unit tests, see BTFParserTest.cpp.
To achieve this: - Move CO-RE relocation kinds definitions from BPFCORE.h to BTF.h. - Extend BTF.h with types derived from BTF::CommonType, e.g. BTF::IntType and BTF::StrutType, to allow dyn_cast() and access to type additional data. - Extend BTFParser to load BTF type and relocation data. - Modify llvm-objdump.cpp to create instance of BTFParser when disassembly of object file with BTF sections is processed and `-r` flag is supplied.
Additional information about CO-RE is available at [1].
[1] https://docs.kernel.org/bpf/llvm_reloc.html
Depends on D149058
Differential Revision: https://reviews.llvm.org/D150079
show more ...
|
#
7b747060 |
| 11-Sep-2023 |
Shivam Gupta <Shivam.Gupta2@amd.com> |
[llvm-objdump] --adjust-vma adjust symbol table
Add a shouldAdjustVA(Section) guard on top of address update.
Update llvm-objdump file to update symbol table when --adjust-vma used.
Fixes #63203
[llvm-objdump] --adjust-vma adjust symbol table
Add a shouldAdjustVA(Section) guard on top of address update.
Update llvm-objdump file to update symbol table when --adjust-vma used.
Fixes #63203
Patch by HamidrezaSK (Hamidreza Sanaee)
show more ...
|
#
95062d74 |
| 01-Sep-2023 |
Jonas Devlieghere <jonas@devlieghere.com> |
[llvm-objdump] Enable disassembly color highlighting
Enable color highlighting of disassembly in llvm-objdump. This patch introduces a new flag --disassembler-color=<mode> that enables or disables h
[llvm-objdump] Enable disassembly color highlighting
Enable color highlighting of disassembly in llvm-objdump. This patch introduces a new flag --disassembler-color=<mode> that enables or disables highlighting disassembly with ANSI escape codes. The default mode is to enable color highlighting if outputting to a color-enabled terminal.
Differential revision: https://reviews.llvm.org/D159224
show more ...
|
#
d5ca9004 |
| 11-Aug-2023 |
Andrés Villegas <andresvi@google.com> |
[llvm-{debuginfod,ml,objdump,symbolizer}, dsymutil] Enable multicall driver
Differential Revision: https://reviews.llvm.org/D157670
|
#
99f8751c |
| 17-Aug-2023 |
Petr Hosek <phosek@google.com> |
Revert "[llvm-{debuginfod,ml,objdump,symbolizer}, dsymutil] Enable multicall driver"
This reverts commit 2628fa3351b021d2ab82dcd833a14d7b52840a01 since it broke the multicall driver build.
|
#
2628fa33 |
| 11-Aug-2023 |
Andrés Villegas <andresvi@google.com> |
[llvm-{debuginfod,ml,objdump,symbolizer}, dsymutil] Enable multicall driver
Differential Revision: https://reviews.llvm.org/D157670
|
Revision tags: llvmorg-16.0.3, llvmorg-16.0.2 |
|
#
7a28b0b6 |
| 15-Apr-2023 |
Jacek Caban <jacek@codeweavers.com> |
[llvm-objdump] Support CHPE code ranges in disassembler.
Reviewed By: jhenderson, MaskRay Differential Revision: https://reviews.llvm.org/D149095
|
#
4192c419 |
| 14-Aug-2023 |
Fangrui Song <i@maskray.me> |
[llvm-objdump] Add WarningHandler as a member variable. NFC
This can be used to avoid `auto WarningHandler = ...`. Similar to llvm-readobj.
|
#
eeccbe1e |
| 14-Aug-2023 |
Fangrui Song <i@maskray.me> |
[llvm-objdump,llvm-symbolizer] Remove unused ExitOnErr after D136702. NFC
|
#
3f092f37 |
| 04-Aug-2023 |
Jan Svoboda <jan_svoboda@apple.com> |
[llvm] Extract common `OptTable` bits into macros
All command-line tools using `llvm::opt` create an enum of option IDs and a table of `OptTable::Info` object. Most of the tools use the same ID (`OP
[llvm] Extract common `OptTable` bits into macros
All command-line tools using `llvm::opt` create an enum of option IDs and a table of `OptTable::Info` object. Most of the tools use the same ID (`OPT_##ID`), kind (`Option::KIND##Class`), group ID (`OPT_##GROUP`) and alias ID (`OPT_##ALIAS`). This patch extracts that common code into canonical macros. This results in fewer changes when tweaking the `OPTION` macros emitted by the TableGen backend.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D157028
show more ...
|
#
bf8cce60 |
| 02-Aug-2023 |
Jacek Caban <jacek@codeweavers.com> |
Revert "[llvm-objdump] [NFC] Use a single vector to store all symbol mappings."
Breaks CSKY tests.
This reverts commit 948f205ae1a0135eda3eeff0e123d70732d271d5.
|
#
948f205a |
| 28-Jul-2023 |
Jacek Caban <jacek@codeweavers.com> |
[llvm-objdump] [NFC] Use a single vector to store all symbol mappings.
Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D156622
|