diff options
author | Alan Modra <amodra@gmail.com> | 2021-01-29 10:57:48 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-01-29 11:07:18 +1030 |
commit | c4566785ac265b3e4b3cde0e43733975c58d9175 (patch) | |
tree | 97ee2882d2e0d4f0f8d6406f2169c59cbbc7d1fe /bfd | |
parent | 986dbd541ae550352fd1cf1d53e7c89b93bcd8d2 (diff) | |
download | gdb-c4566785ac265b3e4b3cde0e43733975c58d9175.zip gdb-c4566785ac265b3e4b3cde0e43733975c58d9175.tar.gz gdb-c4566785ac265b3e4b3cde0e43733975c58d9175.tar.bz2 |
PR27271, c6x-uclinux-ld segfaults linking ld-uClibc-1.0.37.so
bfd/
PR 27271
* elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
on symbols defined in absolute or other special sections.
ld/
* testsuite/ld-tic6x/tic6x.exp: Add pr27271 test.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elflink.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0fdc1fa..1eebae0 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2021-01-29 Alan Modra <amodra@gmail.com> + + PR 27271 + * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault + on symbols defined in absolute or other special sections. + 2021-01-28 Alan Modra <amodra@gmail.com> PR 27259 diff --git a/bfd/elflink.c b/bfd/elflink.c index 47c3fb4..3a3ca3b 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -537,8 +537,10 @@ bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info, if (!elf_hash_table (info)->is_relocatable_executable || ((h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) + && h->root.u.def.section->owner != NULL && h->root.u.def.section->owner->no_export) || (h->root.type == bfd_link_hash_common + && h->root.u.c.p->section->owner != NULL && h->root.u.c.p->section->owner->no_export)) return TRUE; } |