Donate Share

MinGW-w64 - for 32 and 64 bit Windows

Tracker: Bugs

5 Linker option '--version-script' does not work as expected - ID: 2891262
Last Update: Settings changed ( ktietz70 )

Hi,

I have found out this issue when trying to compile libpng-1.2.40 with
32-bit native toolchain (binaries provided by sezero - marked as
"20091101").

The problem is that using:

gcc -shared obj1.o obj2.o -Wl,--enable-auto-image-base
-Wl,--out-implib=lib.dll.a -Wl,--version-script=file.vers

Does not work as expected - simply the resulting lib.dll.a is broken. I
have distilled the proof of concept for this issue from libpng and put it
here:
http://svn.ali.as/cpan/users/kmx/strawberry_gcc-toolchain/bug_version-scrip
t/ - Simply run build.sh and check lib_A.dll.a (which generated badly)

The example above:
- compiles fine on 32-bit gcc3 from mingw.org
- fails on 32-bit gcc4 from your project

--
kmx


kmx ( kmx1 ) - 2009-11-03 13:41

5

Closed

Invalid

Nobody/Anonymous

build system

None

Public


Comment ( 1 )

Date: 2009-11-10 19:51
Sender: ktietz70Project AdminAccepting Donations

Ah, I now remember this issue. We encountered that one before.
It is not an issue of gcc, it is reasoned by a bugfix in binutils.

The problem is related to a broken Makefile prefixing of by underscores in
the input .def file generation. libpng uses here some magic about
__USER_LABEL_PREFIX, which is bogus and should be fixed in this project.
Just remove this magic and it works for old and new binutils

Cheers,
Kai


Attached File

No Files Currently Attached

Changes ( 6 )

Field Old Value Date By
status_id Pending 2009-11-12 20:43 ktietz70
allow_comments 1 2009-11-12 20:43 ktietz70
close_date 2009-11-10 19:51 2009-11-12 20:43 ktietz70
status_id Open 2009-11-10 19:51 ktietz70
resolution_id None 2009-11-10 19:51 ktietz70
close_date - 2009-11-10 19:51 ktietz70