zephyr/kernel
Adithya Baglody 2fce4e4c9b kernel: userspace: Fixed the issue of handlers getting dropped by linker
The linker was always picking a weak handler over the actual one.
The linker always searches for the first definition of any function
weak or otherwise. When it finds this function it just links and
skips traversing through the full list.

In the context of userspace, we create the _handlers_ for each system
call in the respective file. And these _handlers_ would get linked to
a table defined in syscalls_dispatch.c. If for instance that this
handler is not defined then we link to a default error handler.

In the build procedure we create a library file from the kernel folder.
When creating this library file, we need to make sure that the file
syscalls_dispatch.c is the last to get linked(i.e userspace.c).
Because the table inside syscalls_dispatch.c would need all the
correct _handler_ definitions. If this is not handled then the system
call layer will not function correctly because of the linker feature.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2017-12-14 09:07:23 -08:00
..
include kernel: have k_sched_lock call _sched_lock 2017-11-17 17:42:54 -05:00
CMakeLists.txt kernel: userspace: Fixed the issue of handlers getting dropped by linker 2017-12-14 09:07:23 -08:00
Kconfig kconfig: fix help syntax and add spaces 2017-12-13 17:43:28 -06:00
Kconfig.event_logger
Kconfig.power_mgmt
alert.c kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
atomic_c.c
compiler_stack_protect.c
device.c kernel: Compare pointers before strings when getting device binding 2017-10-19 14:43:48 -07:00
errno.c
idle.c
init.c kernel: init: mem_domain structure is initialized for dummy thread. 2017-11-07 12:22:43 -08:00
int_latency_bench.c
mailbox.c kernel: Use SYS_DLIST_FOR_EACH_CONTAINER whenever possible 2017-08-25 09:08:50 -04:00
mem_domain.c kernel: Arch specific memory domain APIs added 2017-11-07 12:22:43 -08:00
mem_slab.c kernel: introduce object validation mechanism 2017-09-07 16:33:33 -07:00
mempool.c mempool: add assertion for calloc bounds overflow 2017-11-14 12:50:10 -08:00
msg_q.c kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
mutex.c kernel: Remove dead or commented code from k_mutex_lock() 2017-10-24 11:11:00 -07:00
pipes.c kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
poll.c poll: Update code comments to reflect latest changes 2017-11-21 06:54:51 -05:00
pthread.c kernel: POSIX thread IPC support 2017-08-15 19:42:07 -04:00
queue.c queue: k_queue_cancel_wait: Fix not interrupting other threads 2017-10-18 13:02:52 -04:00
sched.c kernel: have k_sched_lock call _sched_lock 2017-11-17 17:42:54 -05:00
sem.c kernel: Fix comment section of semaphore object 2017-10-27 10:56:58 -07:00
stack.c kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
sys_clock.c kernel: sys_clock: remove obsolete and unused functions 2017-12-09 08:48:51 -06:00
system_work_q.c
thread.c kernel: threads: remove thread groups 2017-12-09 08:48:51 -06:00
thread_abort.c kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
timer.c kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
userspace.c userspace: assign thread IDs at build time 2017-11-03 11:29:23 -07:00
userspace_handler.c userspace: assign thread IDs at build time 2017-11-03 11:29:23 -07:00
version.c kernel: version: no need to store version in RAM 2017-09-07 16:34:50 -07:00
work_q.c kernel: fix k_thread_stack_t definition 2017-10-17 08:24:29 -07:00