aboutsummaryrefslogtreecommitdiff
path: root/ld/plugin.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-01-28 10:27:31 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-01-28 10:27:31 -0800
commit15f7a26b0f42be812b0471ec09d91bad696fe26e (patch)
treefe3f56e6de16024a283713d428fd56c794ec952d /ld/plugin.c
parent61b86cb1948c47e5e6c49b25f33d11ac002c27cf (diff)
downloadbinutils-15f7a26b0f42be812b0471ec09d91bad696fe26e.zip
binutils-15f7a26b0f42be812b0471ec09d91bad696fe26e.tar.gz
binutils-15f7a26b0f42be812b0471ec09d91bad696fe26e.tar.bz2
The initial support for LDPT_GET_VIEW
This patch adds the initial support for LDPT_GET_VIEW. ld/ PR ld/17878 * plugin.c (tv_header_tags(): Add LDPT_GET_VIEW. (get_view): New function. (set_tv_header): Handle LDPT_GET_VIEW. * testplug.c (tag_names): Add LDPT_GET_VIEW. (tv_get_view): New. (dump_tv_tag): Handle LDPT_GET_VIEW. (parse_tv_tag): Likewise. ld/testsuite/ PR ld/17878 * ld-plugin/plugin-1.d: Add LDPT_GET_VIEW. * ld-plugin/plugin-10.d: Likewise. * ld-plugin/plugin-11.d: Likewise. * ld-plugin/plugin-2.d: Likewise. * ld-plugin/plugin-3.d: Likewise. * ld-plugin/plugin-4.d: Likewise. * ld-plugin/plugin-5.d: Likewise. * ld-plugin/plugin-6.d: Likewise. * ld-plugin/plugin-7.d: Likewise. * ld-plugin/plugin-8.d: Likewise. * ld-plugin/plugin-9.d: Likewise.
Diffstat (limited to 'ld/plugin.c')
-rw-r--r--ld/plugin.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ld/plugin.c b/ld/plugin.c
index f6f85ba..c6df096 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -114,6 +114,7 @@ static const enum ld_plugin_tag tv_header_tags[] =
LDPT_REGISTER_CLEANUP_HOOK,
LDPT_ADD_SYMBOLS,
LDPT_GET_INPUT_FILE,
+ LDPT_GET_VIEW,
LDPT_RELEASE_INPUT_FILE,
LDPT_GET_SYMBOLS,
LDPT_GET_SYMBOLS_V2,
@@ -443,6 +444,15 @@ get_input_file (const void *handle ATTRIBUTE_UNUSED,
return LDPS_ERR;
}
+/* Get view of the input file. */
+static enum ld_plugin_status
+get_view (const void *handle ATTRIBUTE_UNUSED,
+ const void **viewp ATTRIBUTE_UNUSED)
+{
+ ASSERT (called_plugin);
+ return LDPS_ERR;
+}
+
/* Release the input file. */
static enum ld_plugin_status
release_input_file (const void *handle ATTRIBUTE_UNUSED)
@@ -731,6 +741,9 @@ set_tv_header (struct ld_plugin_tv *tv)
case LDPT_GET_INPUT_FILE:
TVU(get_input_file) = get_input_file;
break;
+ case LDPT_GET_VIEW:
+ TVU(get_view) = get_view;
+ break;
case LDPT_RELEASE_INPUT_FILE:
TVU(release_input_file) = release_input_file;
break;