Skip to content

--arch-name causing objdump problems #136

Description

@moridinga

Working on an embedded project, targeting a Cortex-R52, and I've discovered that the fact that the --arch-name argument is passed to the llvm-objdump tool is causing disassembly to fundamentally misbehave (lots of <unknown> in the output as the disassembler won't decode certain opcodes). The executable is built using the armv7r-none-eabihf target triple, with target-cpu=cortex-r52 rustflag. If I run llvm-objdump -d directly against the output binary, the disassembly is perfect. If I run it with the additional --arch-name=arm (which is what the cargo-binutils is adding on when calling cargo objdump), then we see this problem. In other words, cargo-binutil's insistence on adding the --arch-name argument to the tool call is actually breaking it for this target. If this arg really is needed for some architectures, then I would request we make a similar exception for "arm" that we use for "thumb" and stop blindly passing this down to the tool invocation. It is not even clear why objdump is receiving this special treatment, while none of the other tools do.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions