Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22032

Gcc flag to turn off string constants splitting for optimization

$
0
0

After switching to gcc 8.3.0 I've noticed that some string constants can't be found anymore in the binary file. It turned out that instead of multiple strings like PREFIX_SOMETHING_0, PREFIX_SOMETHING_1, ..., PREFIX_SOMETHING_X I can find in the binary 'PREFIX_SOMETHING' only (common prefix).

It seems that multiple occurrences of the prefix is optimized. But for testing purpose I need all strings whole.

With -O0 strings are ok but even with -O1 strings are split. I've tried to add -fno-ipa-icf or -fno-merge-constants flags but no luck.

What flag should I set to disable such gcc behaviour?


Viewing all articles
Browse latest Browse all 22032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>