-
I'm trying to port a program that calls I'd like to show my error and stop the execution in cases of such calls. Here's the stub for e.g. https://github.com/emscripten-core/emscripten/blob/main/system/lib/libc/emscripten_libc_stubs.c#L165 I'd like the build to use my That is, replace this symbol build-time OR after the build (or in any other way). |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 23 replies
-
If you include your own definition of Alternatively if you set From settings.js:
|
Beta Was this translation helpful? Give feedback.
-
Right now I'm building in two steps:
Where should I put the Should it go to (1) or (2)? In CFLAGS or LDFLAGS? P.S. I tried a couple of things, didn't work, so would like to ensure I do that right. |
Beta Was this translation helpful? Give feedback.
-
BTW, if you are going to try to implement |
Beta Was this translation helpful? Give feedback.
-
So I added My Does it seem to be a good PR if I add this |
Beta Was this translation helpful? Give feedback.
If you include your own definition of
fork
in your program (i.e. in one of your object files, or libraries) the linker will choose your definition over the stub one.Alternatively if you set
-sALLOW_UNIMPLEMENTED_SYSCALLS=0
the stub library will not be included at all, and you will be forced to implement any symbols your program depends on.From settings.js: