From 3537c84bf45bc24ceb87f64316de75940b744a90 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Tue, 1 Jun 2010 19:32:27 +0000 Subject: [PATCH] 2010-06-01 Rafael Espindola * plugin-api.h (ld_plugin_tag): Add LDPT_OUTPUT_NAME. 2010-06-01 Rafael Espindola * plugin.cc (Plugin::load): Pass the output name to the plugin. --- gold/ChangeLog | 4 ++++ gold/plugin.cc | 6 +++++- include/ChangeLog | 4 ++++ include/plugin-api.h | 3 ++- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index 8e8493f0a45..2b4e94b9168 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,7 @@ +2010-06-01 Rafael Espindola + + * plugin.cc (Plugin::load): Pass the output name to the plugin. + 2010-06-01 Rafael Espindola * plugin.cc (Sized_pluginobj::::do_add_symbols): Correctly set the diff --git a/gold/plugin.cc b/gold/plugin.cc index a7bdbb53802..798b601e709 100644 --- a/gold/plugin.cc +++ b/gold/plugin.cc @@ -127,7 +127,7 @@ Plugin::load() sscanf(ver, "%d.%d", &major, &minor); // Allocate and populate a transfer vector. - const int tv_fixed_size = 14; + const int tv_fixed_size = 15; int tv_size = this->args_.size() + tv_fixed_size; ld_plugin_tv *tv = new ld_plugin_tv[tv_size]; @@ -154,6 +154,10 @@ Plugin::load() else tv[i].tv_u.tv_val = LDPO_EXEC; + ++i; + tv[i].tv_tag = LDPT_OUTPUT_NAME; + tv[i].tv_u.tv_string = parameters->options().output(); + for (unsigned int j = 0; j < this->args_.size(); ++j) { ++i; diff --git a/include/ChangeLog b/include/ChangeLog index 95a7f00510b..f6d896f085c 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2010-06-01 Rafael Espindola + + * plugin-api.h (ld_plugin_tag): Add LDPT_OUTPUT_NAME. + 2010-04-26 Pedro Alves * filenames.h (PATH_SEPARATOR): Delete. diff --git a/include/plugin-api.h b/include/plugin-api.h index 572621fc374..582178554b3 100644 --- a/include/plugin-api.h +++ b/include/plugin-api.h @@ -260,7 +260,8 @@ enum ld_plugin_tag LDPT_MESSAGE, LDPT_GET_INPUT_FILE, LDPT_RELEASE_INPUT_FILE, - LDPT_ADD_INPUT_LIBRARY + LDPT_ADD_INPUT_LIBRARY, + LDPT_OUTPUT_NAME }; /* The plugin transfer vector. */ -- 2.30.2