1 comment:
Patch Set #1, Line 22: strlen
Hmm.. […]
I wasn't aware that libc marks its symbols weak (and I'm not sure that this is the case everywhere). One option to go at this in a structured way could be to rename symbols in string.o during linking or with objcopy, but that gets tedious real quick (you have to carry around a full list of that kind of symbols).
For testing that it picks up the right symbols (and that libc really takes the backseat), we could do as follows:
1. Add some non-sense implementation of a libc function (e.g. a strlen that always returns 42) to tests/,
2. Add a test that uses this function and expects it to return 42 no matter the (non-42 char length) input.
That way we have a signal indicating that the tests are looking at the right thing in the normal case, too, right? If we see that there are major libc implementations that fail this, we can still reconsider our options.
That's all not for this commit, but please put it on your backlog.
To view, visit change 40538. To unsubscribe, or for help writing mail filters, visit settings.