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.

Reply via email to