[PATCH v2] Break out ldconfig parser
DJ Delorie
dj@redhat.com
Wed Mar 11 16:02:07 GMT 2026
Yury Khrustalev <yury.khrustalev@arm.com> writes:
>> Documented. I also cleaned up the API a bit.
>>
>> elf: factor out ld.conf parsing
>
> Thanks for this, sorry I'm late with my comments and I see Adhemerval
> has already added RB, but I have a few more questions.
>
> I agree with Adhemerval that ldconfig_parse_config should be marked as hidden.
I suppose I could put a #ifdef there that says if you try to include it
in libc.so it fails; this function only exists in ldconfig so need not
be marked hidden.
>> +/* Parse a configuration file.
>> . . .
>> + */
>
> Maybe this should be in the header?
Perhaps, but that's not generally the way we do it.
>> + if (dir[0] != '\0')
>> + parse_conf_include (filename, lineno, do_chroot, dir, opt_chroot, callback);
>
> There was this bit that seem to have disappeared:
>
> else if (!strncasecmp (cp, "hwcap", 5) && isblank (cp[5]))
> error (0, 0, _("%s:%u: hwcap directive ignored"), filename, lineno);
>
> Was it on purpose?
In v3 you'll see it moved to ldconfig.c's add_dir_callback as it's
specific to ld.so.conf.
>> +/* Declared in ldconfig-parse.c */
>
> Nit: Defined? Though I see that "Declared" is used everywhere in this
> header...
Ok, *now* that bugs me too. I'm going to keep it consistent, feel free
to mass-fix it after ;-)
More information about the Libc-alpha
mailing list