[PATCH] elf: Use dl-symbol-redir-ifunc.h instead _dl_strlen

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Wed Feb 11 14:07:59 GMT 2026



On 11/02/26 10:58, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>>  static char **
>>  get_next_env (char **envp, char **name, char **val, char ***prev_envp)
>>  {
>> @@ -334,8 +324,9 @@ __tunables_init (char **envp)
>>  
>>  	  if (tunable_is_name (name, envname))
>>  	    {
>> +	      size_t envvallen = 0;
>>  	      /* The environment variable is always null-terminated.  */
>> -	      size_t envvallen = _dl_strlen (envval);
>> +	      for (const char *p = envval; *p != '\0'; p++, envvallen++);
> 

Because it would require potentially more dl-symbol-redir-ifunc.h change
than the ones I am testing now (x86_64/aarch64).  At least for clang-21,
we only supports these architectures.


More information about the Libc-alpha mailing list