summaryrefslogtreecommitdiffstats
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
parentPR28514: debuginfod: limit groom operation times (diff)
downloadelfutils-039f427a3574ec75985c755108399a2bb37c2c86.tar.gz
elfutils-039f427a3574ec75985c755108399a2bb37c2c86.tar.bz2
elfutils-039f427a3574ec75985c755108399a2bb37c2c86.tar.xz
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 @@
12021-02-14 Alexander Miller <alex.miller@gmx.de>
2
3 * core-file.c (dwfl_core_file_report): Move NEW_VERSION before
4 definition. Replace INTDEF with NEW_INTDEF.
5 * dwfl_module_build_id.c (dwfl_module_build_id): Likewise.
6 * dwfl_report_elf.c (dwfl_report_elf): Likewise.
7
12021-09-06 Dmitry V. Levin <ldv@altlinux.org> 82021-09-06 Dmitry V. Levin <ldv@altlinux.org>
2 9
3 * linux-pid-attach.c (read_cached_memory): Remove cast of malloc 10 * 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)
440 return false; 440 return false;
441} 441}
442 442
443NEW_VERSION (dwfl_core_file_report, ELFUTILS_0.158)
443int 444int
444dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable) 445dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable)
445{ 446{
@@ -625,8 +626,7 @@ dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable)
625 error rather than just nothing found. */ 626 error rather than just nothing found. */
626 return listed > 0 ? listed : retval; 627 return listed > 0 ? listed : retval;
627} 628}
628INTDEF (dwfl_core_file_report) 629NEW_INTDEF (dwfl_core_file_report)
629NEW_VERSION (dwfl_core_file_report, ELFUTILS_0.158)
630 630
631#ifdef SYMBOL_VERSIONING 631#ifdef SYMBOL_VERSIONING
632int _compat_without_executable_dwfl_core_file_report (Dwfl *dwfl, Elf *elf); 632int _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)
77 return found_build_id (mod, set, build_id_bits, build_id_len, build_id_vaddr); 77 return found_build_id (mod, set, build_id_bits, build_id_len, build_id_vaddr);
78} 78}
79 79
80NEW_VERSION (dwfl_module_build_id, ELFUTILS_0.138)
80int 81int
81dwfl_module_build_id (Dwfl_Module *mod, 82dwfl_module_build_id (Dwfl_Module *mod,
82 const unsigned char **bits, GElf_Addr *vaddr) 83 const unsigned char **bits, GElf_Addr *vaddr)
@@ -102,8 +103,7 @@ dwfl_module_build_id (Dwfl_Module *mod,
102 *vaddr = mod->build_id_vaddr; 103 *vaddr = mod->build_id_vaddr;
103 return mod->build_id_len; 104 return mod->build_id_len;
104} 105}
105INTDEF (dwfl_module_build_id) 106NEW_INTDEF (dwfl_module_build_id)
106NEW_VERSION (dwfl_module_build_id, ELFUTILS_0.138)
107 107
108#ifdef SYMBOL_VERSIONING 108#ifdef SYMBOL_VERSIONING
109COMPAT_VERSION (dwfl_module_build_id, ELFUTILS_0.130, vaddr_at_end) 109COMPAT_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,
287 return m; 287 return m;
288} 288}
289 289
290NEW_VERSION (dwfl_report_elf, ELFUTILS_0.156)
290Dwfl_Module * 291Dwfl_Module *
291dwfl_report_elf (Dwfl *dwfl, const char *name, const char *file_name, int fd, 292dwfl_report_elf (Dwfl *dwfl, const char *name, const char *file_name, int fd,
292 GElf_Addr base, bool add_p_vaddr) 293 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,
322 323
323 return mod; 324 return mod;
324} 325}
325INTDEF (dwfl_report_elf) 326NEW_INTDEF (dwfl_report_elf)
326NEW_VERSION (dwfl_report_elf, ELFUTILS_0.156)
327 327
328#ifdef SYMBOL_VERSIONING 328#ifdef SYMBOL_VERSIONING
329Dwfl_Module * 329Dwfl_Module *