[PATCH] mips: fix segfault when creating a dso with discarded .dynsym section
Tue Nov 4 22:12:00 GMT 2014
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
More information about the Binutils