On 16 September 2015 at 19:22, Erich E. Hoover erich.e.hoover@wine-staging.com wrote:
So yes, this works.
It does something for patch 3, but I'd be very surprised if it did anything for the first two. (Though for what it's worth, the version of gcc I have (4.9.2) seems to put "glyph_table" in .data.rel.ro even before making the table const, as long as the compiler can determine it's never written to.)
But note the "WRITE" flag on .data.rel.ro. While .data.rel.ro is slightly better than .data, it's only made read-only after processing relocations. It's not going to do much for e.g. .so load times. If you really wanted to put the various tables in .rodata you'd have to replace the string pointers in GLYPHNAME with indices into a string table. Since those tables seem to be generated that's probably feasible, although whether it's worth the effort is a different question.