* [PATCH] include: Sync lto-symtab.h and plugin-api.h with GCC
@ 2020-03-21 10:40 H.J. Lu
0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2020-03-21 10:40 UTC (permalink / raw)
To: binutils
From: Martin Liska <mliska@suse.cz>
Fix comma at end of enumerator list seen with -std=c++98.
* plugin-api.h (enum ld_plugin_symbol_type): Remove
comma after last value of an enum.
* lto-symtab.h (enum gcc_plugin_symbol_type): Likewise.
---
include/ChangeLog | 6 ++++++
include/lto-symtab.h | 2 +-
include/plugin-api.h | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/ChangeLog b/include/ChangeLog
index 16521ea040..357124762e 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,9 @@
+2020-03-21 Martin Liska <mliska@suse.cz>
+
+ * plugin-api.h (enum ld_plugin_symbol_type): Remove
+ comma after last value of an enum.
+ * lto-symtab.h (enum gcc_plugin_symbol_type): Likewise.
+
2020-03-19 Martin Liska <mliska@suse.cz>
* lto-symtab.h (enum gcc_plugin_symbol_type): New.
diff --git a/include/lto-symtab.h b/include/lto-symtab.h
index ef2e35f19c..81a288f5fb 100644
--- a/include/lto-symtab.h
+++ b/include/lto-symtab.h
@@ -42,7 +42,7 @@ enum gcc_plugin_symbol_type
{
GCCST_UNKNOWN,
GCCST_FUNCTION,
- GCCST_VARIABLE,
+ GCCST_VARIABLE
};
enum gcc_plugin_symbol_section_kind
diff --git a/include/plugin-api.h b/include/plugin-api.h
index f0f9667bf3..673f136ce6 100644
--- a/include/plugin-api.h
+++ b/include/plugin-api.h
@@ -141,7 +141,7 @@ enum ld_plugin_symbol_type
{
LDST_UNKNOWN,
LDST_FUNCTION,
- LDST_VARIABLE,
+ LDST_VARIABLE
};
enum ld_plugin_symbol_section_kind
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Include: Sync lto-symtab.h and plugin-api.h with GCC
@ 2020-03-19 16:17 H.J. Lu
0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2020-03-19 16:17 UTC (permalink / raw)
To: binutils
From: Martin Liska <mliska@suse.cz>
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.
---
include/ChangeLog | 13 +++++++++++++
include/lto-symtab.h | 13 +++++++++++++
include/plugin-api.h | 32 ++++++++++++++++++++++++++++++--
3 files changed, 56 insertions(+), 2 deletions(-)
diff --git a/include/ChangeLog b/include/ChangeLog
index c19d4d4881..16521ea040 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,16 @@
+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.
+
2020-03-13 Kamil Rytarowski <n54@gmx.com>
* elf/common.h (NT_NETBSDCORE_LWPSTATUS): New define.
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. */
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-21 10:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-21 10:40 [PATCH] include: Sync lto-symtab.h and plugin-api.h with GCC H.J. Lu
-- strict thread matches above, loose matches on Subject: below --
2020-03-19 16:17 [PATCH] Include: " H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).