diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elflink.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index dbb240a..b947c51 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2021-01-17 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/27193 + * elflink.c (elf_create_symbuf): Also ignore section symbols. + 2021-01-16 H.J. Lu <hongjiu.lu@intel.com> PR ld/23169 diff --git a/bfd/elflink.c b/bfd/elflink.c index 8794864..59a6080 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -8126,8 +8126,12 @@ elf_create_symbuf (size_t symcount, Elf_Internal_Sym *isymbuf) if (indbuf == NULL) return NULL; + /* NB: When checking if 2 sections define the same set of local and + global symbols, ignore both undefined and section symbols in the + symbol table. */ for (ind = indbuf, i = 0; i < symcount; i++) - if (isymbuf[i].st_shndx != SHN_UNDEF) + if (isymbuf[i].st_shndx != SHN_UNDEF + && ELF_ST_TYPE (isymbuf[i].st_info) != STT_SECTION) *ind++ = &isymbuf[i]; indbufend = ind; |