Hi!

Nikita Karetnikov <nik...@karetnikov.org> 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