This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: --gc-sections support under win32 mingw
- From: Brian Dessent <brian at dessent dot net>
- To: Davide Pippa <thepyper at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 04 Apr 2008 13:18:38 -0700
- Subject: Re: --gc-sections support under win32 mingw
- References: <47F615BD.9080303@gmail.com>
- Reply-to: binutils at sourceware dot org
Davide Pippa wrote:
> I'd like to know is there a version of ld supporting the --gc-sections
> option under win32?
In the BFD PE target bfd_gc_sections maps to bfd_generic_gc_sections
which is a dummy function that does nothing, so the PE ld accepts
--gc-sections but it does not do anything. It looks like only ELF
targets (and not all of them) provide the necessary code to support the
option. I don't see any technical reason why PE couldn't support this
as well, other than the fact that somebody would have to write and
contribute the code -- the ELF code obviously won't work for PE. But
maybe I'm missing some aspect of PE that makes it infeasible.
> Is there a mingw port?
Of course there's a mingw port of the binutils, but due to the above the
option won't do anything.
Brian