[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/30979] objdump --disassemble of a .o file ignores the relo
From: |
bruno at clisp dot org |
Subject: |
[Bug binutils/30979] objdump --disassemble of a .o file ignores the relocations |
Date: |
Wed, 18 Oct 2023 11:52:39 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30979
--- Comment #6 from Bruno Haible <bruno at clisp dot org> ---
(In reply to Andreas Schwab from comment #5)
> It's impossible in general to resolve relocations without doing a full link.
Even if the general case cannot be handled, the --disassemble output would be
more useful with those cases handled that can be handled. In this case here,
the relocation provides
- the symbol __stack_chk_fail,
- the information that it's a PLT relocation,
- some offset.
>From this, it should be possible to generate output like:
3b: e8 00 00 00 00 call <__stack_chk_fail@plt>
The information about the target of the call was already present in the .s file
that was given to the assembler. In fact, I get more human-readable output by
running "gcc -S" instead of "gcc -c" + "objdump --disassemble". This proves
that it does not require running the linker in order to get better
human-readable output.
I'm using "objdump --disassemble" because the output of a build of a package is
typically a set of .o files, with no .s files. It requires extra effort to
generate the .s files. "objdump --disassemble" should be able to approximate
the .s file that was given to the assembler.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/30979] New: objdump --disassemble of a .o file ignores the relocations, bruno at clisp dot org, 2023/10/18
- [Bug binutils/30979] objdump --disassemble of a .o file ignores the relocations, bruno at clisp dot org, 2023/10/18
- [Bug binutils/30979] objdump --disassemble of a .o file ignores the relocations, bruno at clisp dot org, 2023/10/18
- [Bug binutils/30979] objdump --disassemble of a .o file ignores the relocations, bruno at clisp dot org, 2023/10/18
- [Bug binutils/30979] objdump --disassemble of a .o file ignores the relocations, address@hidden, 2023/10/18
- [Bug binutils/30979] objdump --disassemble of a .o file ignores the relocations, bruno at clisp dot org, 2023/10/18
- [Bug binutils/30979] objdump --disassemble of a .o file ignores the relocations, address@hidden, 2023/10/18
- [Bug binutils/30979] objdump --disassemble of a .o file ignores the relocations,
bruno at clisp dot org <=
- [Bug binutils/30979] objdump --disassemble of a .o file ignores the relocations, address@hidden, 2023/10/18
- [Bug binutils/30979] objdump --disassemble of a .o file ignores the relocations, nickc at redhat dot com, 2023/10/18