aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2020-03-25 06:47:35 -0700
committerAndreas K. Hüttel <dilfridge@gentoo.org>2020-05-08 20:45:03 +0300
commit29ad03ddf3dcc4b997dfd49bdd4e495fac6ac665 (patch)
tree428251515da2773f3949be2a184f160844cb5fe1
parentFix dwarf.c build with GCC 10 (diff)
downloadbinutils-gdb-29ad03ddf3dcc4b997dfd49bdd4e495fac6ac665.tar.gz
binutils-gdb-29ad03ddf3dcc4b997dfd49bdd4e495fac6ac665.tar.bz2
binutils-gdb-29ad03ddf3dcc4b997dfd49bdd4e495fac6ac665.zip
Include: Sync lto-symtab.h and plugin-api.h with GCC
2020-03-19 Martin Liska <mliska@suse.cz> * lto-symtab.h (enum gcc_plugin_symbol_type): New. (enum gcc_plugin_symbol_section_kind): Likewise. 2020-03-19 Martin Liska <mliska@suse.cz> * plugin-api.h (struct ld_plugin_symbol): Split int def into 4 char fields. (enum ld_plugin_symbol_type): New. (enum ld_plugin_symbol_section_kind): New. (enum ld_plugin_tag): Add LDPT_ADD_SYMBOLS_V2. (cherry picked from commit 3734bec8336f6f33927ab99460cb681035c2ca4f) (cherry picked from commit e7c0ee5110c175cc8762a8d379bdf2e3405d45d3)
-rw-r--r--include/ChangeLog13
-rw-r--r--include/lto-symtab.h13
-rw-r--r--include/plugin-api.h32
3 files changed, 56 insertions, 2 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index c7fd4ab141..7ce635dbe5 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,16 @@
+2020-03-25 Martin Liska <mliska@suse.cz>
+
+ * lto-symtab.h (enum gcc_plugin_symbol_type): New.
+ (enum gcc_plugin_symbol_section_kind): Likewise.
+
+2020-03-25 Martin Liska <mliska@suse.cz>
+
+ * plugin-api.h (struct ld_plugin_symbol): Split
+ int def into 4 char fields.
+ (enum ld_plugin_symbol_type): New.
+ (enum ld_plugin_symbol_section_kind): New.
+ (enum ld_plugin_tag): Add LDPT_ADD_SYMBOLS_V2.
+
2020-01-18 Nick Clifton <nickc@redhat.com>
Binutils 2.34 branch created.
diff --git a/include/lto-symtab.h b/include/lto-symtab.h
index 0ce0de1012..ef2e35f19c 100644
--- a/include/lto-symtab.h
+++ b/include/lto-symtab.h
@@ -38,4 +38,17 @@ enum gcc_plugin_symbol_visibility
GCCPV_HIDDEN
};
+enum gcc_plugin_symbol_type
+{
+ GCCST_UNKNOWN,
+ GCCST_FUNCTION,
+ GCCST_VARIABLE,
+};
+
+enum gcc_plugin_symbol_section_kind
+{
+ GCCSSK_DEFAULT,
+ GCCSSK_BSS
+};
+
#endif /* GCC_LTO_SYMTAB_H */
diff --git a/include/plugin-api.h b/include/plugin-api.h
index 09e1202df0..f0f9667bf3 100644
--- a/include/plugin-api.h
+++ b/include/plugin-api.h
@@ -87,7 +87,19 @@ struct ld_plugin_symbol
{
char *name;
char *version;
- int def;
+ /* This is for compatibility with older ABIs. The older ABI defined
+ only 'def' field. */
+#ifdef __BIG_ENDIAN__
+ char unused;
+ char section_kind;
+ char symbol_type;
+ char def;
+#else
+ char def;
+ char symbol_type;
+ char section_kind;
+ char unused;
+#endif
int visibility;
uint64_t size;
char *comdat_key;
@@ -123,6 +135,21 @@ enum ld_plugin_symbol_visibility
LDPV_HIDDEN
};
+/* The type of the symbol. */
+
+enum ld_plugin_symbol_type
+{
+ LDST_UNKNOWN,
+ LDST_FUNCTION,
+ LDST_VARIABLE,
+};
+
+enum ld_plugin_symbol_section_kind
+{
+ LDSSK_DEFAULT,
+ LDSSK_BSS
+};
+
/* How a symbol is resolved. */
enum ld_plugin_symbol_resolution
@@ -431,7 +458,8 @@ enum ld_plugin_tag
LDPT_GET_INPUT_SECTION_ALIGNMENT = 29,
LDPT_GET_INPUT_SECTION_SIZE = 30,
LDPT_REGISTER_NEW_INPUT_HOOK = 31,
- LDPT_GET_WRAP_SYMBOLS = 32
+ LDPT_GET_WRAP_SYMBOLS = 32,
+ LDPT_ADD_SYMBOLS_V2 = 33
};
/* The plugin transfer vector. */