This is the mail archive of the
mailing list for the binutils project.
Re: [patch ld]: Fix for bug ld/11539: ld --gc-sections should work for PE-COFF on MinGW
2012/8/14 xunxun <firstname.lastname@example.org>:
> Hello, Kai
> ä 2012/8/13 20:37, Kai Tietz åé:
>> This patch addresses for pe-coff and pe+-coff the issue reported about
> I notice that the patch only modifies the linker script
> I remembered --gc-sections option is ignored by the linker on MinGW, so to
> enable the option also should modify libbfd?
> I saw the initial patch in ld/11539 also modify bfd, but I don't know
> whether the bfd part is fixed now.
Ok, I will take a look for it.
> And you also added
> When I tested the KEEP half one year ago, I really found KEEP(*(.eh_frame*))
> can make all --gc-sections target to work, but exe target using the KEEP
> will increase the size. Can we only use the KEEP to dll target?
Well, that size is increasing here I had expected. The issue is that
some dups aren't anylonger removed from link. Not sure if I can limit
this linker-script to use keep on dll-target only. It doesn't sound
sane to me to do that.