History log of /llvm-project/llvm/tools/llvm-objdump/llvm-objdump.cpp (Results 51 – 75 of 727)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1b4a95c2 19-Apr-2023 Jacek Caban <jacek@codeweavers.com>

[llvm-objdump] [NFC] Use DisassemblerTarget for primary target in disassembleObject.

Further preparation for ARM64EC/ARM64X support.

Reviewed By: jhenderson
Differential Revision: https://reviews.l

[llvm-objdump] [NFC] Use DisassemblerTarget for primary target in disassembleObject.

Further preparation for ARM64EC/ARM64X support.

Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D149094

show more ...


# 9ea44c68 28-Jul-2023 Fangrui Song <i@maskray.me>

[llvm-objdump] -d: don't display mapping symbols as labels

Similar to D96617 for llvm-symbolizer.

This patch matches the GNU objdump -d behavior to suppress printing
labels for mapping symbols. Map

[llvm-objdump] -d: don't display mapping symbols as labels

Similar to D96617 for llvm-symbolizer.

This patch matches the GNU objdump -d behavior to suppress printing
labels for mapping symbols. Mapping symbol names don't convey much
information.

When --show-all-symbols (not in GNU) is specified, we still print
mapping symbols.

Note: the `for (size_t SI = 0, SE = Symbols.size(); SI != SE;)` loops
needs to iterate all mapping symbols, even if they are not displayed.
We use the new field `IsMappingSymbol` to recognize mapping symbols.
This field also enables simplification after D139131.

ELF/ARM/disassemble-all-mapping-symbols.s is enhanced to add `.space 2`.
If `End = std::min(End, Symbols[SI].Addr);` is not correctly set, we
would print a `.word`.

Reviewed By: jhenderson, jobnoorman, peter.smith

Differential Revision: https://reviews.llvm.org/D156190

show more ...


# e09a1b51 28-Jul-2023 Fangrui Song <i@maskray.me>

[MCDisassembler] Reorder XCOFF specific constructor parameters. NFC

to prevent overload resolution confusion. In particular, if we add
another parameter to the generic constructor, MCDisassemblerTes

[MCDisassembler] Reorder XCOFF specific constructor parameters. NFC

to prevent overload resolution confusion. In particular, if we add
another parameter to the generic constructor, MCDisassemblerTest.cpp
specified constructors will be resolve to the generic constructor, which
is unintended.

show more ...


# 2d40bd1e 26-Jul-2023 Fangrui Song <i@maskray.me>

[llvm-objdump] Remove bool MachOOnlyFirst from printPrivateHeaders after D155045. NFC

Mach-O can just use the global variable `FirstPrivateHeader`.
If we ever manage to remove global variables, we c

[llvm-objdump] Remove bool MachOOnlyFirst from printPrivateHeaders after D155045. NFC

Mach-O can just use the global variable `FirstPrivateHeader`.
If we ever manage to remove global variables, we can add a Config
variable to Dumper. Either case, the parameter is not needed.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D156291

show more ...


# b6cf0ea4 19-Apr-2023 Jacek Caban <jacek@codeweavers.com>

[llvm-objdump] [NFC] Factor out DisassemblerTarget class.

This is a preparation for ARM64EC/ARM64X binaries, which may contain both ARM64
and x86_64 code in the same file. llvm-objdump already has p

[llvm-objdump] [NFC] Factor out DisassemblerTarget class.

This is a preparation for ARM64EC/ARM64X binaries, which may contain both ARM64
and x86_64 code in the same file. llvm-objdump already has partial support for
mixing disassemblers for ARM thumb mode support. However, for ARM64EC we can't
share MCContext, MCInstrAnalysis and PrettyPrinter instances. This patch
provides additional abstraction which makes adding mixed code support later in
the series easier.

Reviewed By: jhenderson, MaskRay
Differential Revision: https://reviews.llvm.org/D149093

show more ...


# b9f3eafc 24-Jul-2023 Jacek Caban <jacek@codeweavers.com>

Revert "[llvm-objdump] [NFC] Factor out DisassemblerTarget class."

This reverts commit 6c48f57c14dcfe2410afcb4c6778dcbb40d294b5.

Build broken on GCC.


# 6c48f57c 19-Apr-2023 Jacek Caban <jacek@codeweavers.com>

[llvm-objdump] [NFC] Factor out DisassemblerTarget class.

This is a preparation for ARM64EC/ARM64X binaries, which may contain both ARM64
and x86_64 code in the same file. llvm-objdump already has p

[llvm-objdump] [NFC] Factor out DisassemblerTarget class.

This is a preparation for ARM64EC/ARM64X binaries, which may contain both ARM64
and x86_64 code in the same file. llvm-objdump already has partial support for
mixing disassemblers for ARM thumb mode support. However, for ARM64EC we can't
share MCContext, MCInstrAnalysis and PrettyPrinter instances. This patch
provides additional abstraction which makes adding mixed code support later in
the series easier.

Reviewed By: jhenderson, MaskRay
Differential Revision: https://reviews.llvm.org/D149093

show more ...


# bf98aaae 17-Jul-2023 Rahman Lavaee <rahmanl@google.com>

[llvm-objdump] Use BBEntry::BBID to represent basic block numbers.

Reviewed By: aidengrossman, mtrofin, JestrTulip

Differential Revision: https://reviews.llvm.org/D155464


# 7d1143b7 14-Jul-2023 Fangrui Song <i@maskray.me>

[llvm-objdump] Move printDynamicRelocations into ELFDump.cpp. NFC


# 0af663f8 14-Jul-2023 Fangrui Song <i@maskray.me>

[llvm-objdump] Create ObjectFile specific dumpers

We pay the one-off boilerplate overhead to create `*Dumper` classes that derive
from objdump::Dumper a la llvm-readobj. This has two primary advanta

[llvm-objdump] Create ObjectFile specific dumpers

We pay the one-off boilerplate overhead to create `*Dumper` classes that derive
from objdump::Dumper a la llvm-readobj. This has two primary advantages.

First, a lot object file format specific code can be moved from
llvm-objdump.cpp to *Dump.cpp files. Refactor `printPrivateHeaders` as
an example.

Second, with the introduction of ELFDumper<ELFT>, we can simplify
a few dispatch functions in ELFDump.cpp.

In addition, the ObjectFile specific dumpers contains a ObjectFile specific
reference so that we can remove a lot of `cast<*ObjectFile>(Obj)`.

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D155045

show more ...


# 3edef604 11-Jul-2023 Fangrui Song <i@maskray.me>

[llvm-objdump] Change errors to warnings for symbol section name dumping

Port D69671 (llvm-readobj) to llvm-objdump. Add a class llvm::objdump::Dumper
and move some free functions into Dumper so tha

[llvm-objdump] Change errors to warnings for symbol section name dumping

Port D69671 (llvm-readobj) to llvm-objdump. Add a class llvm::objdump::Dumper
and move some free functions into Dumper so that they can call
reportUniqueWarning.

Warnings seems preferable in these cases as the issue is localized and we can
continue dumping other information.

Differential Revision: https://reviews.llvm.org/D154754

show more ...


# 986001c8 29-Jun-2023 Scott Linder <Scott.Linder@amd.com>

[AMDGPU] Improve assembler + disassembler handling of kernel descriptors

* Relax the AsmParser to accept `.amdhsa_wavefront_size32 0` when the
`.amdhsa_shared_vgpr_count` directive is present.
* T

[AMDGPU] Improve assembler + disassembler handling of kernel descriptors

* Relax the AsmParser to accept `.amdhsa_wavefront_size32 0` when the
`.amdhsa_shared_vgpr_count` directive is present.
* Teach the KD disassembler to respect the setting of
KERNEL_CODE_PROPERTY_ENABLE_WAVEFRONT_SIZE32 when calculating the
value of `.amdhsa_next_free_vgpr`.
* Teach the KD disassembler to disassemble COMPUTE_PGM_RSRC3 for gfx90a
and gfx10+.
* Include "pseudo directive" comments for gfx10 fields which are not
controlled by any assembler directive.
* Fix disassembleObject failure diagnostic in llvm-objdump to not
hard-code a comment string, and to follow the convention of not
capitalizing the first sentence.

Reviewed By: rochauha

Differential Revision: https://reviews.llvm.org/D128014

show more ...


# d6d7f7b1 06-Jul-2023 zhijian <zhijian@ca.ibm.com>

[AIX][XCOFF] print out the traceback info

Summary:

Adding a new option -traceback-table to print out the traceback info of xcoff ojbect file.

Reviewers: James Henderson, Fangrui Song, Stephen Pe

[AIX][XCOFF] print out the traceback info

Summary:

Adding a new option -traceback-table to print out the traceback info of xcoff ojbect file.

Reviewers: James Henderson, Fangrui Song, Stephen Peckham, Xing Xue

Differential Revision: https://reviews.llvm.org/D89049

show more ...


# 8abbc17f 05-Jun-2023 Nick Desaulniers <ndesaulniers@google.com>

reland: [Demangle] make llvm::demangle take std::string_view rather than const std::string&

As suggested by @erichkeane in
https://reviews.llvm.org/D141451#inline-1429549

There's potential for a lo

reland: [Demangle] make llvm::demangle take std::string_view rather than const std::string&

As suggested by @erichkeane in
https://reviews.llvm.org/D141451#inline-1429549

There's potential for a lot more cleanups around these APIs. This is
just a start.

Callers need to be more careful about sub-expressions producing strings
that don't outlast the expression using `llvm::demangle`. Add a
release note.

Differential Revision: https://reviews.llvm.org/D149104

show more ...


# 9e37a7bd 16-May-2023 Fangrui Song <i@maskray.me>

[llvm-objdump][X86] Add @plt symbols for .plt.got

If a symbol needs both JUMP_SLOT and GLOB_DAT relocations, there is a
minor linker optimization to keep just GLOB_DAT. This optimization
is only imp

[llvm-objdump][X86] Add @plt symbols for .plt.got

If a symbol needs both JUMP_SLOT and GLOB_DAT relocations, there is a
minor linker optimization to keep just GLOB_DAT. This optimization
is only implemented by GNU ld's x86 port and mold.
https://maskray.me/blog/2021-08-29-all-about-global-offset-table#combining-.got-and-.got.plt

With the optimizing, the PLT entry is placed in .plt.got and the
associated GOTPLT entry is placed in .got (ld.bfd -z now) or .got.plt (ld.bfd -z lazy).
The relocation is in .rel[a].dyn.

This patch synthesizes `symbol@plt` labels for these .plt.got entries.

Example:
```
cat > a.s <<e
.globl _start; _start:
mov combined0@gotpcrel(%rip), %rax; mov combined1@gotpcrel(%rip), %rax
call combined0@plt; call combined1@plt
call foo0@plt; call foo1@plt
e
cat > b.s <<e
.globl foo0, foo1, combined0, combined1
foo0: foo1: combined0: combined1:
e
gcc -fuse-ld=bfd -shared b.s -o b.so
gcc -fuse-ld=bfd -pie -nostdlib a.s b.so -o a
```

```
Disassembly of section .plt:

0000000000001000 <.plt>:
1000: ff 35 ea 1f 00 00 pushq 0x1fea(%rip) # 0x2ff0 <_GLOBAL_OFFSET_TABLE_+0x8>
1006: ff 25 ec 1f 00 00 jmpq *0x1fec(%rip) # 0x2ff8 <_GLOBAL_OFFSET_TABLE_+0x10>
100c: 0f 1f 40 00 nopl (%rax)

0000000000001010 <foo1@plt>:
1010: ff 25 ea 1f 00 00 jmpq *0x1fea(%rip) # 0x3000 <_GLOBAL_OFFSET_TABLE_+0x18>
1016: 68 00 00 00 00 pushq $0x0
101b: e9 e0 ff ff ff jmp 0x1000 <.plt>

0000000000001020 <foo0@plt>:
1020: ff 25 e2 1f 00 00 jmpq *0x1fe2(%rip) # 0x3008 <_GLOBAL_OFFSET_TABLE_+0x20>
1026: 68 01 00 00 00 pushq $0x1
102b: e9 d0 ff ff ff jmp 0x1000 <.plt>

Disassembly of section .plt.got:

0000000000001030 <combined0@plt>:
1030: ff 25 a2 1f 00 00 jmpq *0x1fa2(%rip) # 0x2fd8 <foo1+0x2fd8>
1036: 66 90 nop

0000000000001038 <combined1@plt>:
1038: ff 25 a2 1f 00 00 jmpq *0x1fa2(%rip) # 0x2fe0 <foo1+0x2fe0>
103e: 66 90 nop
```

For x86-32, with -z now, if we remove `foo0` and `foo1`, the absence of regular
PLT will cause GNU ld to omit .got.plt, and our code cannot synthesize @plt
labels. This is an extreme corner case that almost never happens in practice (to
trigger the case, ensure every PLT symbol has been taken address). To fix it, we
can get the `_GLOBAL_OFFSET_TABLE_` symbol value, but the complexity is not
worth it.

Close https://github.com/llvm/llvm-project/issues/62537

Reviewed By: bd1976llvm

Differential Revision: https://reviews.llvm.org/D149817

show more ...


# 7aeb1536 04-May-2023 Fangrui Song <i@maskray.me>

[llvm-objdump] addPltEntries: reduce indentation. NFC


# 3e3c6f24 02-May-2023 Nick Desaulniers <ndesaulniers@google.com>

Revert "[Demangle] make llvm::demangle take std::string_view rather than const std::string&"

This reverts commit c117c2c8ba4afd45a006043ec6dd858652b2ffcc.

itaniumDemangle calls std::strlen with the

Revert "[Demangle] make llvm::demangle take std::string_view rather than const std::string&"

This reverts commit c117c2c8ba4afd45a006043ec6dd858652b2ffcc.

itaniumDemangle calls std::strlen with the results of
std::string_view::data() which may not be NUL-terminated. This causes
lld/test/wasm/why-extract.s to fail when "expensive checks" are enabled
via -DLLVM_ENABLE_EXPENSIVE_CHECKS=ON. See D149675 for further
discussion. Back this out until the individual demanglers are converted
to use std::string_view.

show more ...


# c117c2c8 02-May-2023 Nick Desaulniers <ndesaulniers@google.com>

[Demangle] make llvm::demangle take std::string_view rather than const std::string&

As suggested by @erichkeane in
https://reviews.llvm.org/D141451#inline-1429549

There's potential for a lot more c

[Demangle] make llvm::demangle take std::string_view rather than const std::string&

As suggested by @erichkeane in
https://reviews.llvm.org/D141451#inline-1429549

There's potential for a lot more cleanups around these APIs. This is
just a start.

Callers need to be more careful about sub-expressions producing strings
that don't outlast the expression using ``llvm::demangle``. Add a
release note.

Reviewed By: MaskRay, #lld-macho

Differential Revision: https://reviews.llvm.org/D149104

show more ...


Revision tags: llvmorg-16.0.1
# 9812948d 03-Apr-2023 Daniel Thornburgh <dthorn@google.com>

[Object] Refactor build ID parsing into Object lib.

This makes parsing for build IDs in the markup filter slightly more
permissive, in line with fromHex.

It also removes the distinction between mis

[Object] Refactor build ID parsing into Object lib.

This makes parsing for build IDs in the markup filter slightly more
permissive, in line with fromHex.

It also removes the distinction between missing build ID and empty build
ID; empty build IDs aren't a useful concept, since their purpose is to
uniquely identify a binary. This removes a layer of indirection wherever
build IDs are obtained.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D147485

show more ...


Revision tags: llvmorg-16.0.0, llvmorg-16.0.0-rc4
# 175aa049 25-Feb-2023 Aiden Grossman <agrossman154@yahoo.com>

[Propeller] Make decoding BBAddrMaps trace through relocations

Currently when using the LLVM tools (eg llvm-readobj, llvm-objdump) to
find information about basic block locations using the propeller

[Propeller] Make decoding BBAddrMaps trace through relocations

Currently when using the LLVM tools (eg llvm-readobj, llvm-objdump) to
find information about basic block locations using the propeller tooling
in relocatable object files function addresses are not mapped properly
which causes problems. In llvm-readobj this means that incorrect
function names will be pulled. In llvm-objdum this means that most BBs
won't show up in the output if --symbolize-operands is used. This patch
changes the behavior of decodeBBAddrMap to trace through relocations
to get correct function addresses if it is going through a relocatable
object file. This fixes the behavior in both tools and also other
consumers of decodeBBAddrMap. Some helper functions have been added
in/refactoring done to aid in grabbing BB address map sections now that
in some cases both relocation and BB address map sections need to be
obtained at the same time.

Regression tests moved around/added.

Differential Revision: https://reviews.llvm.org/D143841

show more ...


Revision tags: llvmorg-16.0.0-rc3
# d768bf99 10-Feb-2023 Archibald Elliott <archibald.elliott@arm.com>

[NFC][TargetParser] Replace uses of llvm/Support/Host.h

The forwarding header is left in place because of its use in
`polly/lib/External/isl/interface/extract_interface.cc`, but I have
added a GCC w

[NFC][TargetParser] Replace uses of llvm/Support/Host.h

The forwarding header is left in place because of its use in
`polly/lib/External/isl/interface/extract_interface.cc`, but I have
added a GCC warning about the fact it is deprecated, because it is used
in `isl` from where it is included by Polly.

show more ...


Revision tags: llvmorg-16.0.0-rc2
# 62c7f035 07-Feb-2023 Archibald Elliott <archibald.elliott@arm.com>

[NFC][TargetParser] Remove llvm/ADT/Triple.h

I also ran `git clang-format` to get the headers in the right order for
the new location, which has changed the order of other headers in two
files.


Revision tags: llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4
# a3b0dde4 24-Oct-2022 Daniel Thornburgh <dthorn@google.com>

Reland: [llvm-cov] Look up object files using debuginfod

Reviewed By: gulfem

Differential Revision: https://reviews.llvm.org/D136702


# bce91024 26-Jan-2023 Douglas Yung <douglas.yung@sony.com>

Revert "[llvm-cov] Look up object files using debuginfod"

This reverts commit efbc8bb18eda63007216ad0cb5a8de04963eddd5.

This change is causing failures when detecting curl on several build bots:
-

Revert "[llvm-cov] Look up object files using debuginfod"

This reverts commit efbc8bb18eda63007216ad0cb5a8de04963eddd5.

This change is causing failures when detecting curl on several build bots:
- https://lab.llvm.org/buildbot/#/builders/247/builds/884
- https://lab.llvm.org/buildbot/#/builders/231/builds/7688
- https://lab.llvm.org/buildbot/#/builders/121/builds/27389
- https://lab.llvm.org/buildbot/#/builders/230/builds/8464
- https://lab.llvm.org/buildbot/#/builders/57/builds/24209
- https://lab.llvm.org/buildbot/#/builders/127/builds/42722

show more ...


# efbc8bb1 24-Oct-2022 Daniel Thornburgh <dthorn@google.com>

[llvm-cov] Look up object files using debuginfod

Reviewed By: gulfem

Differential Revision: https://reviews.llvm.org/D136702


12345678910>>...30