guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'substitute*' fails with "string contains #\nul character"


From: Ludovic Courtès
Subject: Re: 'substitute*' fails with "string contains #\nul character"
Date: Thu, 15 Aug 2013 12:37:11 +0200
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Hi!

Nikita Karetnikov <address@hidden> skribis:

> If you compile this program:
>
> #include <stdio.h>
>
> int main()
> {
>   printf("Hello, world!\n");
>
>   return 0;
> }
>
> and try to replace “Hello” with “Hallo,” it will work.  If strings are
> not equally sized, ‘a.out’ will crash with a segfault.

This is expected.

> I’m not sure how to proceed and fail to find any howtos.  Is there a
> tool that I could use?

ELF tools like Andy Wingo’s tools being added to Guile 2.1, or maybe BFD
(part of Binutils), might allow you to modify the ELF string table that
contains string constants.

For the purposes of bootstrapping GHC, I would rather steal whatever
trick Nixpkgs uses, though.  :-)

HTH,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]