diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-01-28 10:27:31 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-01-28 10:27:31 -0800 |
commit | 15f7a26b0f42be812b0471ec09d91bad696fe26e (patch) | |
tree | fe3f56e6de16024a283713d428fd56c794ec952d /ld | |
parent | 61b86cb1948c47e5e6c49b25f33d11ac002c27cf (diff) | |
download | gdb-15f7a26b0f42be812b0471ec09d91bad696fe26e.zip gdb-15f7a26b0f42be812b0471ec09d91bad696fe26e.tar.gz gdb-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')
-rw-r--r-- | ld/ChangeLog | 11 | ||||
-rw-r--r-- | ld/plugin.c | 13 | ||||
-rw-r--r-- | ld/testplug.c | 6 | ||||
-rw-r--r-- | ld/testsuite/ChangeLog | 15 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/plugin-1.d | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/plugin-10.d | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/plugin-11.d | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/plugin-2.d | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/plugin-3.d | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/plugin-4.d | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/plugin-5.d | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/plugin-6.d | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/plugin-7.d | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/plugin-8.d | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/plugin-9.d | 1 |
15 files changed, 56 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 9cab995..9152e18 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,14 @@ +2015-01-28 H.J. Lu <hongjiu.lu@intel.com> + + 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. + 2015-01-28 Alan Modra <amodra@gmail.com> * emulparams/elf64ppc.sh (INITIAL_READWRITE_SECTIONS): Define. 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; diff --git a/ld/testplug.c b/ld/testplug.c index 3059e15..dce787a 100644 --- a/ld/testplug.c +++ b/ld/testplug.c @@ -87,6 +87,7 @@ static const tag_name_t tag_names[] = ADDENTRY(LDPT_ADD_INPUT_FILE), ADDENTRY(LDPT_MESSAGE), ADDENTRY(LDPT_GET_INPUT_FILE), + ADDENTRY(LDPT_GET_VIEW), ADDENTRY(LDPT_RELEASE_INPUT_FILE), ADDENTRY(LDPT_ADD_INPUT_LIBRARY), ADDENTRY(LDPT_OUTPUT_NAME), @@ -104,6 +105,7 @@ static ld_plugin_get_symbols tv_get_symbols_v2 = 0; static ld_plugin_add_input_file tv_add_input_file = 0; static ld_plugin_message tv_message = 0; static ld_plugin_get_input_file tv_get_input_file = 0; +static ld_plugin_get_view tv_get_view = 0; static ld_plugin_release_input_file tv_release_input_file = 0; static ld_plugin_add_input_library tv_add_input_library = 0; static ld_plugin_set_extra_library_path tv_set_extra_library_path = 0; @@ -367,6 +369,7 @@ dump_tv_tag (size_t n, struct ld_plugin_tv *tv) case LDPT_ADD_INPUT_FILE: case LDPT_MESSAGE: case LDPT_GET_INPUT_FILE: + case LDPT_GET_VIEW: case LDPT_RELEASE_INPUT_FILE: case LDPT_ADD_INPUT_LIBRARY: case LDPT_SET_EXTRA_LIBRARY_PATH: @@ -433,6 +436,9 @@ parse_tv_tag (struct ld_plugin_tv *tv) case LDPT_GET_INPUT_FILE: SETVAR(tv_get_input_file); break; + case LDPT_GET_VIEW: + SETVAR(tv_get_view); + break; case LDPT_RELEASE_INPUT_FILE: SETVAR(tv_release_input_file); break; diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 62c34b0..c5effcd 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2015-01-28 H.J. Lu <hongjiu.lu@intel.com> + + 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. + 2015-01-28 Jan Beulich <jbeulich@suse.com> * ld-elf/pr16322.s (p1): Rename to px1. diff --git a/ld/testsuite/ld-plugin/plugin-1.d b/ld/testsuite/ld-plugin/plugin-1.d index 49229f4..6aae4cd 100644 --- a/ld/testsuite/ld-plugin/plugin-1.d +++ b/ld/testsuite/ld-plugin/plugin-1.d @@ -9,6 +9,7 @@ Hello from testplugin. .*: LDPT_REGISTER_CLEANUP_HOOK func@0x.* .*: LDPT_ADD_SYMBOLS func@0x.* .*: LDPT_GET_INPUT_FILE func@0x.* +.*: LDPT_GET_VIEW func@0x.* .*: LDPT_RELEASE_INPUT_FILE func@0x.* .*: LDPT_GET_SYMBOLS func@0x.* .*: LDPT_GET_SYMBOLS_V2 func@0x.* diff --git a/ld/testsuite/ld-plugin/plugin-10.d b/ld/testsuite/ld-plugin/plugin-10.d index 37c9d9d..3818bf7 100644 --- a/ld/testsuite/ld-plugin/plugin-10.d +++ b/ld/testsuite/ld-plugin/plugin-10.d @@ -9,6 +9,7 @@ Hello from testplugin. .*: LDPT_REGISTER_CLEANUP_HOOK func@0x.* .*: LDPT_ADD_SYMBOLS func@0x.* .*: LDPT_GET_INPUT_FILE func@0x.* +.*: LDPT_GET_VIEW func@0x.* .*: LDPT_RELEASE_INPUT_FILE func@0x.* .*: LDPT_GET_SYMBOLS func@0x.* .*: LDPT_GET_SYMBOLS_V2 func@0x.* diff --git a/ld/testsuite/ld-plugin/plugin-11.d b/ld/testsuite/ld-plugin/plugin-11.d index b920429..10b8028 100644 --- a/ld/testsuite/ld-plugin/plugin-11.d +++ b/ld/testsuite/ld-plugin/plugin-11.d @@ -9,6 +9,7 @@ Hello from testplugin. .*: LDPT_REGISTER_CLEANUP_HOOK func@0x.* .*: LDPT_ADD_SYMBOLS func@0x.* .*: LDPT_GET_INPUT_FILE func@0x.* +.*: LDPT_GET_VIEW func@0x.* .*: LDPT_RELEASE_INPUT_FILE func@0x.* .*: LDPT_GET_SYMBOLS func@0x.* .*: LDPT_GET_SYMBOLS_V2 func@0x.* diff --git a/ld/testsuite/ld-plugin/plugin-2.d b/ld/testsuite/ld-plugin/plugin-2.d index d0190a7..91822c1 100644 --- a/ld/testsuite/ld-plugin/plugin-2.d +++ b/ld/testsuite/ld-plugin/plugin-2.d @@ -9,6 +9,7 @@ Hello from testplugin. .*: LDPT_REGISTER_CLEANUP_HOOK func@0x.* .*: LDPT_ADD_SYMBOLS func@0x.* .*: LDPT_GET_INPUT_FILE func@0x.* +.*: LDPT_GET_VIEW func@0x.* .*: LDPT_RELEASE_INPUT_FILE func@0x.* .*: LDPT_GET_SYMBOLS func@0x.* .*: LDPT_GET_SYMBOLS_V2 func@0x.* diff --git a/ld/testsuite/ld-plugin/plugin-3.d b/ld/testsuite/ld-plugin/plugin-3.d index a4b6a7f..f030da4 100644 --- a/ld/testsuite/ld-plugin/plugin-3.d +++ b/ld/testsuite/ld-plugin/plugin-3.d @@ -9,6 +9,7 @@ Hello from testplugin. .*: LDPT_REGISTER_CLEANUP_HOOK func@0x.* .*: LDPT_ADD_SYMBOLS func@0x.* .*: LDPT_GET_INPUT_FILE func@0x.* +.*: LDPT_GET_VIEW func@0x.* .*: LDPT_RELEASE_INPUT_FILE func@0x.* .*: LDPT_GET_SYMBOLS func@0x.* .*: LDPT_GET_SYMBOLS_V2 func@0x.* diff --git a/ld/testsuite/ld-plugin/plugin-4.d b/ld/testsuite/ld-plugin/plugin-4.d index 9f25fc6..b240eb2 100644 --- a/ld/testsuite/ld-plugin/plugin-4.d +++ b/ld/testsuite/ld-plugin/plugin-4.d @@ -9,6 +9,7 @@ Hello from testplugin. .*: LDPT_REGISTER_CLEANUP_HOOK func@0x.* .*: LDPT_ADD_SYMBOLS func@0x.* .*: LDPT_GET_INPUT_FILE func@0x.* +.*: LDPT_GET_VIEW func@0x.* .*: LDPT_RELEASE_INPUT_FILE func@0x.* .*: LDPT_GET_SYMBOLS func@0x.* .*: LDPT_GET_SYMBOLS_V2 func@0x.* diff --git a/ld/testsuite/ld-plugin/plugin-5.d b/ld/testsuite/ld-plugin/plugin-5.d index c0c55c2..52abaf2 100644 --- a/ld/testsuite/ld-plugin/plugin-5.d +++ b/ld/testsuite/ld-plugin/plugin-5.d @@ -9,6 +9,7 @@ Hello from testplugin. .*: LDPT_REGISTER_CLEANUP_HOOK func@0x.* .*: LDPT_ADD_SYMBOLS func@0x.* .*: LDPT_GET_INPUT_FILE func@0x.* +.*: LDPT_GET_VIEW func@0x.* .*: LDPT_RELEASE_INPUT_FILE func@0x.* .*: LDPT_GET_SYMBOLS func@0x.* .*: LDPT_GET_SYMBOLS_V2 func@0x.* diff --git a/ld/testsuite/ld-plugin/plugin-6.d b/ld/testsuite/ld-plugin/plugin-6.d index f3e13fe..07e54c6 100644 --- a/ld/testsuite/ld-plugin/plugin-6.d +++ b/ld/testsuite/ld-plugin/plugin-6.d @@ -9,6 +9,7 @@ Hello from testplugin. .*: LDPT_REGISTER_CLEANUP_HOOK func@0x.* .*: LDPT_ADD_SYMBOLS func@0x.* .*: LDPT_GET_INPUT_FILE func@0x.* +.*: LDPT_GET_VIEW func@0x.* .*: LDPT_RELEASE_INPUT_FILE func@0x.* .*: LDPT_GET_SYMBOLS func@0x.* .*: LDPT_GET_SYMBOLS_V2 func@0x.* diff --git a/ld/testsuite/ld-plugin/plugin-7.d b/ld/testsuite/ld-plugin/plugin-7.d index 357a89b..28a7036 100644 --- a/ld/testsuite/ld-plugin/plugin-7.d +++ b/ld/testsuite/ld-plugin/plugin-7.d @@ -9,6 +9,7 @@ Hello from testplugin. .*: LDPT_REGISTER_CLEANUP_HOOK func@0x.* .*: LDPT_ADD_SYMBOLS func@0x.* .*: LDPT_GET_INPUT_FILE func@0x.* +.*: LDPT_GET_VIEW func@0x.* .*: LDPT_RELEASE_INPUT_FILE func@0x.* .*: LDPT_GET_SYMBOLS func@0x.* .*: LDPT_GET_SYMBOLS_V2 func@0x.* diff --git a/ld/testsuite/ld-plugin/plugin-8.d b/ld/testsuite/ld-plugin/plugin-8.d index 72c86c6..8170b54 100644 --- a/ld/testsuite/ld-plugin/plugin-8.d +++ b/ld/testsuite/ld-plugin/plugin-8.d @@ -9,6 +9,7 @@ Hello from testplugin. .*: LDPT_REGISTER_CLEANUP_HOOK func@0x.* .*: LDPT_ADD_SYMBOLS func@0x.* .*: LDPT_GET_INPUT_FILE func@0x.* +.*: LDPT_GET_VIEW func@0x.* .*: LDPT_RELEASE_INPUT_FILE func@0x.* .*: LDPT_GET_SYMBOLS func@0x.* .*: LDPT_GET_SYMBOLS_V2 func@0x.* diff --git a/ld/testsuite/ld-plugin/plugin-9.d b/ld/testsuite/ld-plugin/plugin-9.d index c2ebc6b..1155f4f 100644 --- a/ld/testsuite/ld-plugin/plugin-9.d +++ b/ld/testsuite/ld-plugin/plugin-9.d @@ -9,6 +9,7 @@ Hello from testplugin. .*: LDPT_REGISTER_CLEANUP_HOOK func@0x.* .*: LDPT_ADD_SYMBOLS func@0x.* .*: LDPT_GET_INPUT_FILE func@0x.* +.*: LDPT_GET_VIEW func@0x.* .*: LDPT_RELEASE_INPUT_FILE func@0x.* .*: LDPT_GET_SYMBOLS func@0x.* .*: LDPT_GET_SYMBOLS_V2 func@0x.* |