As explained in this post I wanted to patch a symbol in a binary file, and for that needed to echo a specific byte value (xEA) into a sed command appearing in a Makefile recipe. Now, you may be aware that the echo command lives in /bin/, but the shell also provide an echo shell builtin. Let's see how we can echo a byte with hex value EA in both cases:
Read More…
Latest Posts
Non ASCII characters in C identifiers According to cppreference.com unicode characters can appear in C identifiers, using the \u and \U escape notation. In practice, it seems they can also be used directly with UTF-8 encoding: For example, the following UTF-8 file is accepted both by gcc 13 and clang 14: #include <stdio.h> void taille_fenêtre(int dx, int dy) { fprintf(stderr, "::taille_fenêtre %i %i\n",dx, dy); } This file is compiled to an object file that will contain the (UTF-8 encoded) global symbol taille_fenêtre for the above function.
Read More…