[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/25458] --gc-sections removes _environ symbol since version 2.21
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/25458] --gc-sections removes _environ symbol since version 2.21 |
Date: |
Fri, 24 Jan 2020 21:18:39 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=25458
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
Does this work?
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 300be3f743..be9518fc4a 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -13148,7 +13148,15 @@ _bfd_elf_gc_mark_rsec (struct bfd_link_info *info,
asection *sec,
dynamic reloc info on the non-weak definition for code
handling copy relocs. */
if (h->is_weakalias)
- weakdef (h)->mark = 1;
+ {
+ struct elf_link_hash_entry *hw = h->u.alias;
+ hw->mark = 1;
+ while (hw->is_weakalias)
+ {
+ hw = hw->u.alias;
+ hw->mark = 1;
+ }
+ }
if (start_stop != NULL)
{
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/25458] New: --gc-sections removes _environ symbol since version 2.21, andrew at ishiboo dot com, 2020/01/24
- [Bug ld/25458] --gc-sections removes _environ symbol since version 2.21, andrew at ishiboo dot com, 2020/01/24
- [Bug ld/25458] --gc-sections removes _environ symbol since version 2.21, yfinkelberg at bloomberg dot net, 2020/01/24
- [Bug ld/25458] --gc-sections removes _environ symbol since version 2.21, address@hidden, 2020/01/24
- [Bug ld/25458] --gc-sections removes _environ symbol since version 2.21, hjl.tools at gmail dot com, 2020/01/24
- [Bug ld/25458] --gc-sections removes _environ symbol since version 2.21, hjl.tools at gmail dot com, 2020/01/24
- [Bug ld/25458] --gc-sections removes _environ symbol since version 2.21,
hjl.tools at gmail dot com <=
- [Bug ld/25458] --gc-sections removes _environ symbol since version 2.21, hjl.tools at gmail dot com, 2020/01/25
- [Bug ld/25458] --gc-sections removes _environ symbol since version 2.21, cvs-commit at gcc dot gnu.org, 2020/01/26
- [Bug ld/25458] --gc-sections removes _environ symbol since version 2.21, hjl.tools at gmail dot com, 2020/01/27
- [Bug ld/25458] --gc-sections removes _environ symbol since version 2.21, cvs-commit at gcc dot gnu.org, 2020/01/29