mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-13 20:12:26 +00:00
This allows add.c to run unmodified on both! For that to work, use int main on baremetal, and pass the return value to the final exit.
14 lines
191 B
C
14 lines
191 B
C
#include <common.h>
|
|
|
|
int main(void) {
|
|
int i, j, k;
|
|
i = 1;
|
|
/* test-gdb-op1 */
|
|
j = 2;
|
|
/* test-gdb-op2 */
|
|
k = i + j;
|
|
/* test-gdb-result */
|
|
if (k != 3)
|
|
common_assert_fail();
|
|
}
|