Warn and return for duplicated plugin
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 4 Jul 2016 15:55:04 +0000 (08:55 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 4 Jul 2016 15:55:20 +0000 (08:55 -0700)
commitc3e1c28ebfdb20ff4498bcc792228283b903d393
treead03cee00b4e79c0ca3c9cbbf7a864253fc4ed2d
parent1dc8bf195d2c4d382e0d6d371f16ebfe83573acc
Warn and return for duplicated plugin

If a plugin has been loaded already, we should warn and return, instead
of adding it on the plugin list.

PR ld/20321
* plugin.c (plugin_opt_plugin): Warn and return if plugin has
been loaded already.
* testsuite/ld-plugin/lto.exp: Run PR ld/20321 test.
* testsuite/ld-plugin/pr20321.c: New file.
ld/ChangeLog
ld/plugin.c
ld/testsuite/ld-plugin/lto.exp
ld/testsuite/ld-plugin/pr20321.c [new file with mode: 0644]