[PATCH 1/5] string: Add fallback implementation for ctz/clz

Wilco Dijkstra Wilco.Dijkstra@arm.com
Mon Sep 1 20:57:37 GMT 2025


Hi Adhemerval,


> I think there is a bug in libgcc where the __clz_tab prototype is missing a
> hidden definition (as done on glibc with 47618209d05).
>
> In any case, I still think we will need to work around this on glibc for
> the current gcc versions.

So presumably this affects all targets that do not have a CLZ/CTZ instruction
in some configurations? We may need a configure check for this.

Note that GLIBC static libs also contain many spurious GOT accesses, so there
could be more similar issues.

I wonder whether there is an easy way to find incorrectly linked symbols like this?

Cheers,
Wilco


More information about the Libc-alpha mailing list