Closed lecopzer closed 8 years ago
@lecopzer : Thanks for pointing the misleading messages while merging the changes done by @gapry . In fact, using bsearch
is a hack to implement the semantics of jumping into specific function pointer, and it is meaningless to check its return value.
resolved in commit ba36d3f77c475c46fdd4a32deba67116545dcb24.
7094c3f
If return value from _start is not equal to 0, res will be NULL
In some test: tests/ptr.c tests/shift.c tests/arginc.c ... main() returns non-zero or have no return, and print the Error.
It's pretty weird to the error message "can't find the function pointer". Can't find what pointer? At this state the program finishes executing jit-progrom, if pointer means _start, "can't find" is really meaningless. Is it better message for "main function return for non-zero value: %d" or something else to let some test file (ex: tests/arginc.c only return argc + 2) make sense?