This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] mips: fix segfault when creating a dso with discarded .dynsym section

James Cowgill <> 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[1], 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.
> Thanks,
> James
> [1]

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.

> bfd/
> 	* elfxx-mips.c(_bfd_mips_elf_finish_dynamic_sections): fix segfault when
> 	creating a dso with discarded dynsym section

OK, thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]