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.
+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.
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,
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)
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;
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),
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;
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:
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;
+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.
.*: 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.*
.*: 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.*
.*: 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.*
.*: 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.*
.*: 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.*
.*: 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.*
.*: 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.*
.*: 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.*
.*: 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.*
.*: 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.*
.*: 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.*