This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: --gc-sections support under win32 mingw


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]