diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2022-11-08 14:46:25 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2022-11-08 18:39:28 -0800 |
commit | 1db13039a7c410e89f00e379fe874d8532385e41 (patch) | |
tree | 86d6d4e2cb3a0143d2ae7b85c7281db65df38a31 | |
parent | d8719e695d8e126d800787910cf31b66edb23b80 (diff) | |
download | gdb-1db13039a7c410e89f00e379fe874d8532385e41.zip gdb-1db13039a7c410e89f00e379fe874d8532385e41.tar.gz gdb-1db13039a7c410e89f00e379fe874d8532385e41.tar.bz2 |
ld: Always output local symbol for relocatable link
PR ld/29761
* elflink.c (elf_link_output_symstrtab): Don't skip local symbol
in SEC_EXCLUDE section for relocatable link.
-rw-r--r-- | bfd/elflink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 019ac30..4ef0739 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -9997,7 +9997,8 @@ elf_link_output_symstrtab (void *finf, if (name == NULL || *name == '\0' - || (input_sec->flags & SEC_EXCLUDE)) + || (!bfd_link_relocatable (flinfo->info) + && (input_sec->flags & SEC_EXCLUDE))) elfsym->st_name = (unsigned long) -1; else { |