This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] mips: fix segfault when creating a dso with discarded .dynsym section
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: James Cowgill <James dot Cowgill at imgtec dot com>
- Cc: "binutils\ at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 04 Nov 2014 22:12:24 +0000
- Subject: Re: [PATCH] mips: fix segfault when creating a dso with discarded .dynsym section
- Authentication-results: sourceware.org; auth=none
- References: <104ADEDC18AE5E45870C06CF0304E344A4EDC9 at LEMAIL01 dot le dot imgtec dot org>
James Cowgill <James.Cowgill@imgtec.com> writes:
> An assertion in elfxx-mips.c fails during the creation of the .dynamic
> section because it assumes there will always be a .dynsym section present
> which may not be true if the .dynsym section was (crazily) discarded.
Yeah, that's a pretty weird thing to do. I agree the patch is correct
though. And it looks like this is the only part of elfxx-mips.c that
fails to handle a missing .dynsym.
> I discovered this while trying to debug some MIPS testsuite failures.
> Looking at the build logs from debian, I don't think the testsuite
> has passed for over 10 years. I can take a better look at these unless
> there's a reason noone's fixed them.
>  https://buildd.debian.org/status/logs.php?pkg=binutils&arch=mipsel&suite=sid
Don't have time to check ATM, but are the failing tests ones that only
run natively? If so it's certainly possible that they've been failing
for a long time. I regularly ran the linker testsuite on a cross
toolchain without failures, but it was only cross rather than native.
> * elfxx-mips.c(_bfd_mips_elf_finish_dynamic_sections): fix segfault when
> creating a dso with discarded dynsym section