mips: don't duplicate options section
Alexandre Oliva
aoliva@redhat.com
Sat Oct 19 14:06:00 GMT 2002
Linking a very complex non-IRIX MIPS ELF64 shared library, containing
many object files with their own options sections, some of them having
undergone ld -r, fails because not enough space was allocated in the
program headers for the options section.
It turns out that _bfd_mips_elf_additional_program_headers() only
allocates on additional header for the options section in IRIX 6
compatibility mode, but _bfd_mips_elf_modify_segment_map introduces a
separate segment for it regardless of IRIX 6 compatibility mode, so we
end up missing space for this additional segment.
This used not to be a problem back when we simply dropped options
sections, but this was fixed with:
2002-09-17 Stan Cox <scox@redhat.com>
[...]
* elfxx-mips.c (_bfd_mips_elf_final_link): Always create
.MIPS.options/.options section.
This patch fixes the problem such that we only introduce a separate
segment for the options section when IRIX 6 compatibility is enabled,
so that we don't run out of header space. I'm not entirely sure we're
not duplicating the options section on IRIX 6, though. Unfortunately,
our only IRIX box is having issues to come back up after the move, so
I couldn't test this myself. However, since this patch preserves the
behavior on IRIX 6, I thought I'd submit it anyway. Ok to install?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mips-bfd-undup-options.patch
Type: text/x-patch
Size: 1141 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20021019/4757316e/attachment.bin>
-------------- next part --------------
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer
More information about the Binutils
mailing list