This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Mips target in gold - revision 3 - part 2
- From: Cary Coutant <ccoutant at google dot com>
- To: Sasa Stankovic <Sasa dot Stankovic at imgtec dot com>
- Cc: Rich Fuhler <Rich dot Fuhler at imgtec dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>, "iant at google dot com" <iant at google dot com>, Petar Jovanovic <Petar dot Jovanovic at imgtec dot com>
- Date: Tue, 15 Apr 2014 14:08:39 -0700
- Subject: Re: Mips target in gold - revision 3 - part 2
- Authentication-results: sourceware.org; auth=none
- References: <7EDC79CE48A9944A88968ABABE6038EE6D41C348 at BADAG02 dot ba dot imgtec dot org> <CAHACq4qGRR4=UaD3dPafHnZmjMF+ig2my79Dwo6wNwZnq9W1-g at mail dot gmail dot com>
One more issue I just noticed...
In Mips_output_section_reginfo::do_write:
> const unsigned char* section_contents =
> relobj->section_contents(shndx, §ion_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