This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch ld]: Adjust for i?86-w64-mingw* autoimport and rdata merge to data
- From: Danny Smith <dansmister at gmail dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: Binutils <binutils at sourceware dot org>, Dave Korn <dave dot korn dot cygwin at gmail dot com>
- Date: Thu, 20 May 2010 09:20:13 +1200
- Subject: Re: [patch ld]: Adjust for i?86-w64-mingw* autoimport and rdata merge to data
- References: <AANLkTimwngCZHunw9Qkg8SX-sjJ2f-5cGVvcmMqDwJLF@mail.gmail.com>
On Thu, May 20, 2010 at 1:39 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
> Hello,
>
> This patch specifies for *-w64-mingw* triplet that for enabled
> auto-import the rdata section doesn't get merged into data section,
> when pseudo-relocation-v2 is used. For v2 there is no need (at least
> for win32) that this merge happens.
>
> ChangeLog
>
> 2010-05-19 ?Kai Tietz
>
> ? ? ? ?* emultempl/pe.em (default_merge_rdata): New shell variable.
> ? ? ? ?(MERGE_RDATA_V2): New macro.
> ? ? ? ?(gld_${EMULATION_NAME}_get_script): Adjust rule for auto-import selected
> ? ? ? ?script.
>
Why do we need to test a default_merge_rdata. Isn't sufficient just
to test the actual value of link_info.pei386_runtime_pseudo_reloc?
Like so:
- echo ' ; else if (link_info.pei386_auto_import == 1) return' >>
e${EMULATION_NAME}.c
+echo ' ; else if (link_info.pei386_auto_import == 1' >> e${EMULATION_NAME}.c
+echo ' && link_info.pei386_runtime_pseudo_reloc != 2)
return' >> e${EMULATION_NAME}.c
Fanny