With this code: extern void func(char *a, char *b); void f(void) { func("abc", "xabc"); func("abc", "abc"); } we get: .LC0: .string "xabc" .LC1: .string "abc" So the "abc"s get deduped. But it could also dedup the postfix by pointing "abc" to "xabc" + 1. This would save some space.
Confirmed. Constant/literal pool also misses merging V2DF { 0., 0. } with DF 0. for example (and more). There's another PR for that somewhere with some hackish patch from me.
This is done by the linker, as part of the merge section handling. Contents of section .rodata: 4005b0 01000200 78616263 00 ....xabc.