]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - ld/ChangeLog-2015
ld: Fix LTO for MinGW targets
authorKwok Cheung Yeung <kcy@codesourcery.com>
Thu, 10 Dec 2015 16:11:07 +0000 (16:11 +0000)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Thu, 10 Dec 2015 16:12:33 +0000 (16:12 +0000)
commit4a07dc81356ed8728e204e9aabeb256703c59aef
tree8309af8857ed7f07c40f05ce3ab88e65a35d4ca9
parent6479e48ef9e7345e1111ed9fe578babd74faa1ef
ld: Fix LTO for MinGW targets

When creating a dummy BFD for an IR file, the output BFD is used as
a template for the new BFD, when it needs to be the input BFD passed
into the function when not dealing with a BFD plugin.

On most targets this is not an issue as the input and output formats
are the same anyway, but on MinGW targets, there are two variant
formats used (pe-i386/pe-x86-64 and pei-i386/pei-x86-64) which are
similar but not interchangeable here.

PR ld/18199
* plugin.c (plugin_get_ir_dummy_bfd): Use srctemplate as the
template when calling bfd_create if it does not use the BFD
plugin target vector.
ld/ChangeLog
ld/plugin.c