Re: [PATCH v2 0/8] Improve ld.lld-21+ compatibility when building i386-pc target

Nicholas Vinson <[email protected]> Thu, 12 Feb 2026 08:21:28 -0500
Newsgroups org.gnu.grub-devel
Message-ID <[email protected]>
On 2/12/26 02:53, Radoslav Kolev wrote:
> On Wed, Feb 11, 2026 at 1:28 AM Nicholas Vinson <nvinso in a linker
> error. Furthermore,
>> The changes for ofpath.c are a bit more involved because the original
>> code would modify the string 'ed' pointed to. With C23, ed needs to be a
>> 'const char *' because sysfs_path is a 'const char *'. This also means
>> that the line "*q = '\0'" is no longer valid because you cannot safely
>> modify a const char string.
> 
> I may be completely missing something important here, but I run into
> the same issue trying to build against glibc 2.43 and my fix for
> ofpath.c was less invasive. I'm sending my patch in a reply, please
> have a look.

I think the issue is I missed the xstrdup() call on my first pass 
through. That said, on re-evaluation, I find the xstrdup() call to be 
superfluous and recommend removing it. It's removal would allow the 
function to execute without reduced dynamic memory allocation (only 
space for path is needed) and reduces the total number of strstr() calls 
to 1.

I want to review my commit messages before publishing the revised patch 
(which I'll do later).

Thanks,
Nicholas Vinson

> 
> Regards,
> Rado


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel