Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to raise arm binary containing an array #170

Open
Doppel16 opened this issue May 19, 2022 · 3 comments
Open

Unable to raise arm binary containing an array #170

Doppel16 opened this issue May 19, 2022 · 3 comments
Labels
ARM Relates to raising ARM binaries bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Doppel16
Copy link

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.

@bharadwajy
Copy link
Contributor

Thanks for your interest in the project.

Unfortunately, support to raise ARM binaries has lagged behind as most of my (and other contributors') focus has been on raising x64 binaries in the recent past.

I would certainly appreciate any help with bringing support to raise ARM binaries at least on par with that of existing x64 raising.

@bharadwajy bharadwajy added help wanted Extra attention is needed bug Something isn't working good first issue Good for newcomers ARM Relates to raising ARM binaries labels May 20, 2022
@Doppel16
Copy link
Author

Thank you for the quick reply! So just to be clear, mctoll does currently not support raising ARM binaries from programs with arrays?

@bharadwajy
Copy link
Contributor

Correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM Relates to raising ARM binaries bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants