Skip to content

Unable to raise arm binary containing an array #170

@Doppel16

Description

@Doppel16

I have successfully been able to crosscompile simple c files to arm with arm-linux-gnueabi-gcc, and raising those binaries using mctoll. However now that I try a file containing the following lines with an array:

int main() {
  int array1[4];
  return 0;
}

I get the following error when using the same compiler (arm-linux-gnueabi-gcc):

llvm-mctoll: /home/mctoll/llvm-project/llvm/tools/llvm-mctoll/ARM/ARMMIRevising.cpp:500: void ARMMIRevising::addressPCRelativeData(llvm::MachineInstr&): Assertion `GlobVal && "A not addressed pc-relative data!"' failed.

When I looked through some of the mctoll tests in the repository I saw some arrays being declared and used so I thought raising those instructions wouldn't be a problem, so I imagine there is something I should do differently to fix my issue.

I also tried using a different compiler, and with the compiler arm-linux-gnueabihf-gcc I got a different error:

**** Warning: Failed to decode instruction
598: 01 d0 ff f7
llvm-mctoll: /home/mctoll/llvm-project/llvm/tools/llvm-mctoll/ARM/DAG/DAGRaisingInfo.cpp:23: llvm::Value* DAGRaisingInfo::getRealValue(llvm::SDNode*): Assertion `NPMap[Node] != nullptr && "Cannot find the corresponding node proprety!"' failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ARMRelates to raising ARM binariesbugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions