[Bug 27349] SafeDisc v2.x API entry analyzer flags Wine's user32.dll as "bad" (too many exports with PIC loads in prolog code) (SimCity 4, IL-2 FB, NFSU)

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Mar 12 19:17:55 CDT 2012


http://bugs.winehq.org/show_bug.cgi?id=27349

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #22 from Anastasius Focht <focht at gmx.net> 2012-03-12 19:17:55 CDT ---
Hello Stefan,

feel free to create new bug(s).

I retested some SafeDisc v2.x games, they all work with recent Wine:

BF1942 original: Safedisc v2.60.052
BF1942 patched to 1.6.19: Safedisc v2.80.010
IL-2 FB: Safedisc v2.80.011
NFS Underground: Safedisc v2.90.040

---

For completeness I measured the influence of optimization levels, frame pointer
omission and visibility of functions.

gcc version 4.6.2 20111027 (Red Hat 4.6.2-1) (GCC) 

--- snip ---
CFLAGS="-g -gdwarf-2 -O2" (default "-fno-omit-frame-pointer" enforced by Wine)

    kernel32   user32      gdi32       condition (cx < threshold)
--------------------------------------------------------------------
c1:  0x3E       0x47        0x39        0x5F
c2:  0x1B       0x2D        0x21        0x3C
c3:  0x00       0x00        0x00        0x5A
--- snip ---

--- snip ---
CFLAGS="-g -gdwarf-2 -O2 -fomit-frame-pointer" (override of Wine's default)

    kernel32   user32      gdi32       condition (cx < threshold)
--------------------------------------------------------------------
c1:  0x41       0x49        0x3C        0x5F
c2:  0x20       0x32        0x23        0x3C
c3:  0x00       0x00        0x00        0x5A
--- snip ---

--- snip ---
CFLAGS="-g -gdwarf-2 -O0" (default "-fno-omit-frame-pointer" enforced by Wine)

    kernel32   user32      gdi32       condition (cx < threshold)
--------------------------------------------------------------------
c1:  0x44       0x50        0x50        0x5F
c2:  0x21       0x33        0x39        0x3C
c3:  0x00       0x00        0x00        0x5A
--- snip ---

Disabling "DECLSPEC_HIDDEN" (__attribute__((visibility ("hidden")))):

--- snip ---
CFLAGS="-g -gdwarf-2 -O0" (default "-fno-omit-frame-pointer" enforced by Wine)

    kernel32   user32      gdi32       condition (cx < threshold)
--------------------------------------------------------------------
c1:  0x4B       0x55        0x53        0x5F
c2:  0x2C       0x3C*       0x43*       0x3C
c3:  0x00       0x00        0x00        0x5A

* = threshold exceeded -> bad
--- snip ---

I'm a bit surprised about "-O0" being worst, there might be additional metrics
involved here (align/padding?).

Summarizing the improvements:

- more API hotpatchable
- more functions with hidden visibility
- enforcing "-fno-omit-frame-pointer"
(http://source.winehq.org/git/wine.git/commit/5cfe7db1854ff1142d598eaf49f6050676c8d547)

Current Wine built with default settings keeps a safe distance to threshold so
I think it's fine to close this bug.

Regards

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list