[fpc-devel] FPC internal linker issues with Win64 .a startic-link libraries by GCC newer than 4.8.1

Sven Barth pascaldragon at googlemail.com
Fri Dec 9 13:49:55 CET 2016


Am 09.12.2016 10:32 schrieb "Maciej Izak" <hnb.code at gmail.com>:
>
>
> 2016-09-18 2:31 GMT+02:00 Benjamin Rosseaux <benjamin at rosseaux.de>:
>>
>> i've noticed a weakness of the FPC internal linker at static-linking .a
libraries on the Win64 target, which're generated by GCC newer than 4.8.1,
due to the new refptr.* and .refptr.* symbols-can-be-multiple-defined stuff
(inside one single .a library file), which was introduced in newer GCC
versions.
>
>
> I don't have the real patch for this yet but I have my inner tool to
rename all duplicated symbols for statically linking FPC with C++ code (I
have improved cppclass type). My tool uses objconv :
http://www.agner.org/optimize/#objconv . Rename for symbols is simple with
few commands for objconv ("-dfhs" to list symbols and "-nr" to rename).

Improvements for cppclass are definitely welcome :)

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20161209/523ab3bd/attachment.html>


More information about the fpc-devel mailing list