[M3devel] unnecessary relinks when import libs change

Olaf Wagner wagner at elegosoft.com
Sat Feb 23 16:27:59 CET 2008


I think cm3 reacts conservative if an imported library changes
because programs may be built standalone. A possible optimization
would be to check if the symbols are still the same (as you suggested)
and avoid the re-link in case of building shared (but not if building
standalone, as the symbols may be the same, but the code has changed).

Olaf

Quoting Jay <jayk123 at hotmail.com>:

> I see a lot of like:
>
> == package C:\\dev2\\cm3.2\m3-obliq\synloc == +++ ['cm3.exe -build   
> -keep -DROOT=/C/dev2/cm3.2 -DCM3_VERSION_TEXT=d5.6.0   
> -DCM3_VERSION_NUMBER=050600 -DCM3_LAST_CHANGED=2008-01-31 @M3novm',   
> 'cm3.exe -ship -keep -DROOT=/C/dev2/cm3.2 -DCM3_VERSION_TEXT=d5.6.0   
> -DCM3_VERSION_NUMBER=050600 -DCM3_LAST_CHANGED=2008-01-31 @M3novm']   
> +++
> --- building in NT386GNU ---
>
> ignoring ../src/m3overrides
> new "/C/cm3/pkg/libm3/NT386GNU/m3.lib" -> archiving synwr.lib         
>     *** This line ****mklib  -out:synwr.lib  SynWr.io SynWr.mo   
> SynLocation.io SynLocation.mo 2>&1 > synwr.lstgcc -shared   
> -Wl, at _m3responsefile1.txt 2>&1 > synwr.lstCreating library file:   
> synwr.lib--- shipping from NT386GNU ---
>
> This is mildly dumb.
> I should check as to why m3.lib changed, but an import .lib changing  
>  is rarely legitimate cause for a relink.
> As long as no symbols were added or removed, no relink is needed.
> Even then, it usually doesn't matter, but harder to tell.
>
> It's true the import .libs have "hints" as to "ordinals" but I don't  
>  think anyone cares about those.
>
> Definitely maybe the fix should be that when the import .lib is   
> made, if the list of symbols exported is identical to the previous   
> version, don't update the file.
>
>  - Jay
> _________________________________________________________________
> Connect and share in new ways with Windows Live.
> http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008



-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list