Output "warning:" or "error:" in plugin messages
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 11 Feb 2015 20:16:07 +0000 (12:16 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 11 Feb 2015 22:00:51 +0000 (14:00 -0800)
commit45e813544eb076dd52fefe7b36e28b088963207d
treea3954237e7a9dfcf3c529a82eb3007328868fb89
parente3001fd92063282c55ad251d58f112b10a0cf7d6
Output "warning:" or "error:" in plugin messages

When plugin generates LDPL_WARNING, LDPL_FATAL and LDPL_ERROR messages,
linker should display "warning:" or "error:" in plugin messages like
regular linker messages.

ld/

* plugin.c (message): Output "warning:" for LDPL_WARNING. Output
"error:" for LDPL_FATAL and LDPL_ERROR.
* testplug2.c (parse_option): Handle fatal, error and warning.

ld/testsuite/

* ld-plugin/plugin-27.d: New.
* ld-plugin/plugin-28.d: Likewise.
* ld-plugin/plugin-29.d: Likewise.
* plugin.exp (plugin_tests): Add tests for LDPL_FATAL, LDPL_ERROR
and LDPL_WARNING.
ld/ChangeLog
ld/plugin.c
ld/testplug2.c
ld/testsuite/ChangeLog
ld/testsuite/ld-plugin/plugin-27.d [new file with mode: 0644]
ld/testsuite/ld-plugin/plugin-28.d [new file with mode: 0644]
ld/testsuite/ld-plugin/plugin-29.d [new file with mode: 0644]
ld/testsuite/ld-plugin/plugin.exp