Skip to content

Error 'The program has no entry point' on goto-binary without main(), although --function is given #175

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

Closed
peterschrammel opened this issue Jul 18, 2016 · 5 comments

Comments

@peterschrammel
Copy link
Member

when --function is given, cbmc should analyze the binary regardless of the presence of a main() function

@tautschnig
Copy link
Collaborator

Isn't it even worse in that --function no longer works at all?

@tautschnig
Copy link
Collaborator

Apologies, here is what works:

  • cbmc --function foo foo.c
  • goto-cc --function foo foo.o -o foo ; cbmc foo

Maybe there should just be helpful output stating that --function cannot be used with goto binaries, and goto-cc should be used instead.

@peterschrammel
Copy link
Member Author

Yes, that works. But it's totally impracticable to recompile the goto-binaries for each function...

@peterschrammel
Copy link
Member Author

@tautschnig, is there any fundamental reason why --function does not work with goto-binaries?

@tautschnig
Copy link
Collaborator

The problem is that the entry point (_start) would have to be thrown away and rebuilt. It shouldn't be a big deal to do that (actually I had been doing this in fshell because it permitted re-setting the entry point at runtime), just a bit of care. The code can't be re-used as-is, but here's what I had been doing: https://github.com/tautschnig/fshell/blob/master/fshell2/command/command_processing.cpp#L596

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

No branches or pull requests

2 participants