Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
platform/posix: Port fuzzer to upstream "native_sim" board
The older native_posix board is being deprecated, use native_sim, which is the future-proof API. In theory this should be as simple as just swapping the board name at the west level, but there are a few changes: The C API is broadly identical between the two, modulo some prefix renaming. Unfortunately linkage is more of a hassle, as the fuzzing framework inverts the sense of "entry point" and causes some trouble with the way native_sim does its two-stage link. We have to add some hackery: 1. Make sure the fuzz entry point doesn't get dropped during the initial zephyr.elf link, as it calls OS/sim layer and not the reverse. 2. Force it to be a global symbol in the final stage, so it can be seen by the code in libfuzzer that needs to call it (normally all Zephyr-side symbols are forced to be library-private to prevent collisions with the global Linux/glibc namespace environment) Signed-off-by: Andy Ross <[email protected]>
- Loading branch information