Closed ArsenArsen closed 1 month ago
Detecting such errors might also be a convenient extra feature for a possible ABI checker.
LGTM
obviously the abi break is expected
As is, this needs some changes; managarm uses __mlibc_getPassthrough
in a few places, so this PR currently breaks boot.
that shouldn't break, since this only excludes _Z*
? or am I missing something?
It's not marked extern "C"
:^)
that's a silly name for a C++ function.. but, OK, we can export it also
Marking it extern "C"
would be simpler, and I suppose more correct for a libc
and an abi break, which might be problematic depending on what it's used for
Does that actually get used by other binaries?
I imagine boot wouldn't fail without it if it wasn't
based on the other __mlibc_
functions not being mangled I'm guessing that this is unintentionally not extern C. anyway, try this. might require that we start passing --no-undefined-version
at some point
don't merge yet, need to add a dep to the link_deps of the .so
edit: done, pls test
With managarm/managarm#715, the need to make __mlibc_getPassthrough
be extern "C"
is avoided. It no longer needs to be declared with C linkage or be excepted in the linker script.
okay, I'll revert that
Works on my machine™
result: https://gist.github.com/ArsenArsen/570e87410c48f5b17f46d579269f10c2
btw, I noticed that we have a C++ function that probably should not be a C++ function:
this would imply we lack tests for those..
I recall some discussion about how to detect such cases before in the mlibc channel, but I do not recall the result. if you can find it/remember it, please share