From: Paul F. <pj...@wa...> - 2025-05-11 10:01:47
|
On 08/05/2025 11:31, Florian Krohm wrote: > > I am wondering whether adding -nodefaultlibs to the compile flags helps. > > <quote> > '-nodefaultlibs' > Do not use the standard system libraries when linking. ... > </quote> > > If GCC still adds a dependency on a library function that I'm telling > it won't be there - that would be quite odd... Unfortunately it _is_ a bit odd https://godbolt.org/z/86nrE4odb > Could you give that a try? Or may be change VG_(strlen) to return > __builtin_strlen(str) ? > __builtin_strlen() isn't builtin either, it results in a call to strlen(). LLVM has __attribute__((no_builtin("strlen"))) but not GCC so we can't use that. The only alternative I have for the moment is to drop the optimization level to 01 as in the godbolt link above. There are 4 places in the code where I had to do that (3 strlen replacements and drd_pre_mem_read_asciiz which is effectively doing an strlen as a check before calling DRD_(trace_load)). A+ Paul |