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] |
> Let me think about this. I'm thinking of something a bit more > ambitious (but just a bit). Here's what I'm thinking: - Move the loop from do_relocate_sections() to a new protected, but non-virtual method, relocate_section_range(). This new method will take a start_shndx and end_shndx. - The default implementation of do_relocate_sections() will simply call relocate_section_range() with start_shndx = 1 and end_shndx = this->shnum() - 1. - The overrides in the Arm targets will now call the new method instead of the overridden base implementation. - Your override for PPC can call relocate_section_range() three times, for these section index ranges: [toc_shndx, toc_shndx], [1, toc_shndx - 1], [toc_shndx + 1, shnum - 1]. I can imagine targets having even more complex needs for controlling the order of section relocation. This gives the target more control than simply naming a start index. A proposed patch is attached for your thoughts. I trust that it's never the case that a candidate for this TOC optimization might refer to a TOC entry from a different relocatable object. -cary
Attachment:
reloc-sect-range.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |