文字列リテラルはつながるの件
$ cat test.c; gcc test.c && ./a.out#include <stdio.h>#define place "world"void main(void){puts("Hello, " place);}
Hello, world
.rodataセクションに文字列が格納されるみたいよね。文字列リテラルはそこへのポインタとして扱われるんだとおもー
$ objdump -s a.out :Contents of section .rodata: 2000 01000200 48656c6c 6f2c2077 6f726c64 ....Hello, world 2010 00 . :
Mastodon is the best way to keep up with what's happening.
Follow anyone across the fediverse and see it all in chronological order. No algorithms, ads, or clickbait in sight.