[PATCH 1/3] wineps.drv: Make the Unicode name-sorted glyph table fully const.

Erich E. Hoover erich.e.hoover at wine-staging.com
Wed Sep 16 12:22:15 CDT 2015


On Wed, Sep 16, 2015 at 10:42 AM, Henri Verbeet <hverbeet at gmail.com> wrote:
> On 16 September 2015 at 18:33, Erich E. Hoover
> <erich.e.hoover at wine-staging.com> wrote:
>> Sorry, I've been incredibly busy and wasn't paying close enough
>> attention to the fact that those tables did not contain pointers.
>> Patch 3 still applies.
>>
> They do, and that's what stops the compiler from putting them in
> .rodata. It's good to make the table in patch 3 const, but it won't
> really affect where it's placed. Either way, if you send this kind of
> patch you should verify it works.

Relevant section headers:
ehoover at lappy:/usr/local/lib/wine$ readelf --section-details wineps.drv.so
...
  [19] .data.rel.ro
       PROGBITS        000562c0 0552c0 024c20 00   0   0 32
       [00000003]: WRITE, ALLOC
...
  [23] .data
       PROGBITS        0007b0e0 07a0e0 007f08 00   0   0 32
       [00000003]: WRITE, ALLOC

Before:
ehoover at lappy:/usr/local/lib/wine$ readelf -s wineps.drv.so | grep -e
glyph_table -e Num
   Num:    Value  Size Type    Bind   Vis      Ndx Name
   214: 00082f00  1032 OBJECT  LOCAL  DEFAULT   23 glyph_table.17436

After:
ehoover at lappy:/usr/local/lib/wine$ readelf -s wineps.drv.so | grep -e
glyph_table -e Num
   Num:    Value  Size Type    Bind   Vis      Ndx Name
   214: 0007a8c0  1032 OBJECT  LOCAL  DEFAULT   19 glyph_table.17436

So yes, this works.

Best,
Erich



More information about the wine-devel mailing list