https://sourceware.org/bugzilla/show_bug.cgi?id=16212
Bug ID: 16212 Summary: Linaro linker fails on BFD assertion, no details provided Product: binutils Version: 2.23 Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: ttmost at gmail dot com Hi, I'm trying to use Linaro's toolchain, which reports for some reason a BFD_ASSERT on line 4104 of elf.c. After looking at the source code, it seems there's currently a bug there, here is the relevant source code of elf.c (starting at line 4080 of the source version). In the loop first_tls gets assigned from s because masking it with SEC_THREAD_LOCAL returns 1. Continuing to the next block of code, we look at firs_tls's flag and return an ASSERT. Obviously the ASSERT will happen as first_tls->flags & SEC_THREAD_LOCAL == 1. I suppose this is a bug. I'm not really sure how to reproduce it. if (s->flags & SEC_THREAD_LOCAL) { if (! tls_count) first_tls = s; tls_count++; } } /* If there are any SHF_TLS output sections, add PT_TLS segment. */ if (tls_count > 0) { amt = sizeof (struct elf_segment_map); amt += (tls_count - 1) * sizeof (asection *); m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); if (m == NULL) goto error_return; m->next = NULL; m->p_type = PT_TLS; m->count = tls_count; /* Mandated PF_R. */ m->p_flags = PF_R; m->p_flags_valid = 1; for (i = 0; i < (unsigned int) tls_count; ++i) { BFD_ASSERT (first_tls->flags & SEC_THREAD_LOCAL); m->sections[i] = first_tls; first_tls = first_tls->next; } *pm = m; pm = &m->next; } -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils