summaryrefslogtreecommitdiff
path: root/libdwfl
diff options
context:
space:
mode:
authorAlexander Miller <alex.miller@gmx.de>2021-02-18 03:38:56 +0100
committerMark Wielaard <mark@klomp.org>2021-11-08 22:33:05 +0100
commit039f427a3574ec75985c755108399a2bb37c2c86 (patch)
tree5011f802564349666f35d32da38fc6bd6197bf3d /libdwfl
parentc1e8c8c6b25cb2b5c16553609f19a9ed5dd4e146 (diff)
downloadelfutils-039f427a3574ec75985c755108399a2bb37c2c86.tar.gz
Improve building with LTO
Use symver attribute for symbol versioning instead of .symver assembler directive when available. Convert to use double @ syntax for default version in all cases (required when using the attribute). Add the attributes externally_visible, no_reorder if available when using assembler directives to improve the situation for < gcc-10. This is not 100% reliable, though; -flto-partition=none may still be needed in some cases. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24498 Signed-off-by: Alexander Miller <alex.miller@gmx.de>
Diffstat (limited to 'libdwfl')
-rw-r--r--libdwfl/ChangeLog7
-rw-r--r--libdwfl/core-file.c4
-rw-r--r--libdwfl/dwfl_module_build_id.c4
-rw-r--r--libdwfl/dwfl_report_elf.c4
4 files changed, 13 insertions, 6 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index d35674c7..f7e24a21 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,10 @@
+2021-02-14 Alexander Miller <alex.miller@gmx.de>
+
+ * core-file.c (dwfl_core_file_report): Move NEW_VERSION before
+ definition. Replace INTDEF with NEW_INTDEF.
+ * dwfl_module_build_id.c (dwfl_module_build_id): Likewise.
+ * dwfl_report_elf.c (dwfl_report_elf): Likewise.
+
2021-09-06 Dmitry V. Levin <ldv@altlinux.org>
* linux-pid-attach.c (read_cached_memory): Remove cast of malloc
diff --git a/libdwfl/core-file.c b/libdwfl/core-file.c
index a0ccc9b3..4e4c9b3c 100644
--- a/libdwfl/core-file.c
+++ b/libdwfl/core-file.c
@@ -440,6 +440,7 @@ __libdwfl_dynamic_vaddr_get (Elf *elf, GElf_Addr *vaddrp)
return false;
}
+NEW_VERSION (dwfl_core_file_report, ELFUTILS_0.158)
int
dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable)
{
@@ -625,8 +626,7 @@ dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable)
error rather than just nothing found. */
return listed > 0 ? listed : retval;
}
-INTDEF (dwfl_core_file_report)
-NEW_VERSION (dwfl_core_file_report, ELFUTILS_0.158)
+NEW_INTDEF (dwfl_core_file_report)
#ifdef SYMBOL_VERSIONING
int _compat_without_executable_dwfl_core_file_report (Dwfl *dwfl, Elf *elf);
diff --git a/libdwfl/dwfl_module_build_id.c b/libdwfl/dwfl_module_build_id.c
index 6ca93761..0c198f23 100644
--- a/libdwfl/dwfl_module_build_id.c
+++ b/libdwfl/dwfl_module_build_id.c
@@ -77,6 +77,7 @@ __libdwfl_find_build_id (Dwfl_Module *mod, bool set, Elf *elf)
return found_build_id (mod, set, build_id_bits, build_id_len, build_id_vaddr);
}
+NEW_VERSION (dwfl_module_build_id, ELFUTILS_0.138)
int
dwfl_module_build_id (Dwfl_Module *mod,
const unsigned char **bits, GElf_Addr *vaddr)
@@ -102,8 +103,7 @@ dwfl_module_build_id (Dwfl_Module *mod,
*vaddr = mod->build_id_vaddr;
return mod->build_id_len;
}
-INTDEF (dwfl_module_build_id)
-NEW_VERSION (dwfl_module_build_id, ELFUTILS_0.138)
+NEW_INTDEF (dwfl_module_build_id)
#ifdef SYMBOL_VERSIONING
COMPAT_VERSION (dwfl_module_build_id, ELFUTILS_0.130, vaddr_at_end)
diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c
index 9da86698..a5f0e5e5 100644
--- a/libdwfl/dwfl_report_elf.c
+++ b/libdwfl/dwfl_report_elf.c
@@ -287,6 +287,7 @@ __libdwfl_report_elf (Dwfl *dwfl, const char *name, const char *file_name,
return m;
}
+NEW_VERSION (dwfl_report_elf, ELFUTILS_0.156)
Dwfl_Module *
dwfl_report_elf (Dwfl *dwfl, const char *name, const char *file_name, int fd,
GElf_Addr base, bool add_p_vaddr)
@@ -322,8 +323,7 @@ dwfl_report_elf (Dwfl *dwfl, const char *name, const char *file_name, int fd,
return mod;
}
-INTDEF (dwfl_report_elf)
-NEW_VERSION (dwfl_report_elf, ELFUTILS_0.156)
+NEW_INTDEF (dwfl_report_elf)
#ifdef SYMBOL_VERSIONING
Dwfl_Module *