12_merge_strings.c (495B)
1 /* Exercises SHF_MERGE+SHF_STRINGS in .rodata.str1.1. 2 * String literals with internal linkage land in a mergeable string 3 * section. The roundtrip must preserve sh_flags (MS) and sh_entsize=1. 4 * The duplicate "hello" may or may not be merged by the compiler — 5 * the normalizer compares the section type/flags, not byte content. */ 6 7 const char* str_a(void) { return "hello"; } 8 const char* str_b(void) { return "world"; } 9 const char* str_c(void) { return "hello"; } /* possible duplicate */