[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mingw-users
Subject:    Re: [Mingw-users] ld option --gc-sections
From:       Eli Zaretskii <eliz () gnu ! org>
Date:       2014-04-15 12:54:58
Message-ID: 83sipekb19.fsf () gnu ! org
[Download RAW message or body]

> From: YIRAN LI <mrfun.china@gmail.com>
> Date: Tue, 15 Apr 2014 22:16:28 +1000
> 
> I'm trying to remove decode code from my library, I used
> -ffunction-sections -fdata-sections when compile, to put each function into
> individual sections and used --gc-sections as an option for linker to
> remove any unreferenced (dead) code.

Can you tell why do you need this?

> These options work perfectly on Ubuntu, but when running on MinGW, I could
> see that functions have been put into individual sections, but
> --gec-sections seems couldn't discard unused sections.
> 
> So here I'd like to know, if this option is really not supported currently
> and if there's an official or unofficial patch to support it?

According to this:

  https://sourceware.org/bugzilla/show_bug.cgi?id=11539

The --gc-sections option doesn't work with the PE-COFF target.  You
should be able to find in that bug report a patch to fix that.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may \
cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@lists.sourceforge.net?subject=unsubscribe


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic