This is the mail archive of the binutils@sourceware.org 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: Mips target in gold - revision 3 - part 2


One more issue I just noticed...

In Mips_output_section_reginfo::do_write:

>       const unsigned char* section_contents =
>         relobj->section_contents(shndx, &section_size, false);
>
>       gprmask |= elfcpp::Swap<size, big_endian>::readval(section_contents);
>       cprmask1 |= elfcpp::Swap<size, big_endian>::readval(section_contents + 4);
>       cprmask2 |= elfcpp::Swap<size, big_endian>::readval(section_contents + 8);
>       cprmask3 |=
>         elfcpp::Swap<size, big_endian>::readval(section_contents + 12);
>       cprmask4 |=
>         elfcpp::Swap<size, big_endian>::readval(section_contents + 16);

Going back to the input sections at this point could be a performance
issue, especially for very large links. This is essentially another
pass over the input files, and if we've run out of file descriptors,
we'll have to close and reopen all the input files one more time each.
It would be better to read these values and accumulate the five masks
in do_read_symbols(), and you won't have to call
set_always_keeps_input_sections() for Mips_output_section_reginfo.

-cary


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