-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Labels
area: Minimal libcMinimal C Standard LibraryMinimal C Standard LibrarybugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug
Description
Can't override System V syscalls by my own implementation
- Configure project: CONFIG_NEWLIB_LIBC=y
- add trace into:zephyr/lib/libc/newlib/libc-hooks.c
int _open(const char *name, int mode)
{
+ printk(" %s '%s' %d\n", __FUNCTION__, name, mode);
- add into main()
FILE *f = fopen("file", "r+"); - run it.
So far so good - try implement your own "open"
- lib/libc/newlib/libc-hooks.c:190: multiple definition of `_open';
Expected behavior
libc-hooks.c expected to have weak aliases
Impact
All syscall users
Environment (please complete the following information):
- Ubuntu 18 x64
- Toolchain: Zephyr
- Commit SHA f95a7fa
Metadata
Metadata
Assignees
Labels
area: Minimal libcMinimal C Standard LibraryMinimal C Standard LibrarybugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug