NetBSD renames symbols for historical and compat reasons.
Add required symbol renames in sanitizer_common_interceptors.inc:
- gettimeofday -> __gettimeofday50
- getrusage -> __getrusage50
- shmctl -> __shmctl50
Additionally handle sigaction symbol mangling.
Rename the function symbol in the file to SIGACTION_SYMNAME and define
it as __sigaction14 for NetBSD and sigaction for !NetBSD. We cannot use
simple renaming with the proprocessor, as there are valid fields named
sigaction and they must be left intact.
Sponsored by <The NetBSD Foundation>
I expected you remove these too. However looks like we do the same in sanitizer_common_interceptors.inc
shmctl50 already defined there. Could you just delete "#define shmctl shmctl50" and "DECLARE_REAL(int, shmctl, int shmid, int cmd, void *buf)"
and move "INTERCEPTOR(void *, shmat" to just before "INTERCEPTOR(int, dl_iterate_phdr", after sanitizer_common_interceptors.inc ?