diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-08-12 17:01:05 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-08-13 15:43:05 -0700 |
commit | 549bc65f0599c04e57818cc920b39e24b67500d2 (patch) | |
tree | 57ffc9fa413d7fa73093438134fb4197f6ea1725 | |
parent | 722232dafd80a9fa13d9805ef87addaa5d5f72ae (diff) | |
download | binutils-549bc65f0599c04e57818cc920b39e24b67500d2.zip binutils-549bc65f0599c04e57818cc920b39e24b67500d2.tar.gz binutils-549bc65f0599c04e57818cc920b39e24b67500d2.tar.bz2 |
elf: Never set non_ir_ref_regular for debug reference
Never set non_ir_ref_regular for debug reference since references in
debug sections shouldn't impact LTO output.
* elflink.c (elf_link_add_object_symbols): Don't check strip for
references in debug sections when setting non_ir_ref_regular.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
-rw-r--r-- | bfd/elflink.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 2430d60..ed0bd71 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -5718,9 +5718,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if ((s->flags & SEC_RELOC) == 0 || s->reloc_count == 0 || (s->flags & SEC_EXCLUDE) != 0 - || ((info->strip == strip_all - || info->strip == strip_debugger) - && (s->flags & SEC_DEBUGGING) != 0)) + || (s->flags & SEC_DEBUGGING) != 0) continue; internal_relocs = _bfd_elf_link_info_read_relocs |