This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Why GNU LD puts ".?tor*" sections into ".text" section when linking a PE image?
- From: Nick Clifton <nickc at redhat dot com>
- To: Igor Kudrin <ikudrin at accesssoftek dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Mon, 5 Dec 2016 15:08:16 +0000
- Subject: Re: Why GNU LD puts ".?tor*" sections into ".text" section when linking a PE image?
- Authentication-results: sourceware.org; auth=none
- References: <757463e5759f41f4b1685f48231eab0a@vm-mail2k13.accesssoftek.com> <940bd6bc-a16b-c08a-ecf8-5588dfc3cf6b@redhat.com> <1480944127784.57629@accesssoftek.com>
Hi Igor,
> I've checked the behavior of MS tools and it looks like they use input
> sections ".CRT$XCU" for the same tasks as "ctor*" sections. The content
> of these sections goes to ".rdata" output section.
>
> I'm going to propose a patch to make the behavior of GNU ld more close
> to MS tools. What do you think?
I think that this is an excellent idea. You will need to be a bit paranoid
and run lots of tests I think - just to make sure that the patch does not
break anything. But in principle I am all for this patch.
Cheers
Nick