Skip to content

llvm-objdump --adjust-vma does not adjust symbol table #63203

@mysterymath

Description

@mysterymath

The llvm-objdump version of the --adjust-vma flag does not adjust the addresses of symbol table entries, while the binutils objdump does. This seems to have been an oversight, as symbol addresses are elsewhere adjusted (e.g., in the disassembly).

Example from the adjust-vma LLVM test case:

$ objdump --all-headers -D -z --adjust-vma=0x123000 adjust-vma.test.tmp
...
SYMBOL TABLE:
0000000000123001 l     F .text  0000000000000000 func
0000000000123000 l       .text  0000000000000000 sym
0000000000123000 l    d  .text  0000000000000000 .text

$ llvm-objdump --all-headers -D -z --adjust-vma=0x123000 adjust-vma.test.tmp
...
SYMBOL TABLE:
0000000000000001 l     F .text  0000000000000000 func
0000000000000000 l       .text  0000000000000000 sym
0000000000000000 l    d  .text  0000000000000000 .text

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions