patacongo commented on pull request #3626: URL: https://github.com/apache/incubator-nuttx/pull/3626#issuecomment-855882718
> For ELF binary, we have three case: > > 1. ELF binary in FLAT build, it simplify to the direct function call > > 2. ELF binary in PROTECTED build, switch to userspace by userspace_s > > 3. ELF binary in KERNEL build, switch to userspace by addrenv_reserve_s One thing that I really dislike about using function tables is that they can lead to code bloat. Initialing the function pointers in the function tables draws those functions into the build, whether they are used or not. This is only a minor problem for PROTECTED mode since there is only a single large blob, but would be a serious problem for KERNEL build where there may be many, small processes. For example, many processes will not use pthreads, but adding the pthread function points to the addrenv_reserve_s structure would cause the entire functionality to be drawn into every process (we do not as yet have shared libraries). So that needs to be avoided. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
