https://sourceware.org/bugzilla/show_bug.cgi?id=18452
Cristian Gavril Olar <cristiangavril_olar at yahoo dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #9136|0 |1 is obsolete| | --- Comment #9 from Cristian Gavril Olar <cristiangavril_olar at yahoo dot com> --- Created attachment 9137 --> https://sourceware.org/bugzilla/attachment.cgi?id=9137&action=edit ADDING OVERLAP keyword with IGNORESECTION (In reply to Alan Modra from comment #7) > Since there seems to be enough interest in this bug for people to actually > write patches, here is what I think would work and be accepted: > > In lang_size_sections_1, near the comment "A backwards move of dot", set a > static global var whenever seeing "dot < last->vma". This should flag all > cases where overlays are used without false triggers. > But this would detect all overlays. It still does not resolve the problem that some overlays are intentional and others are not. This depends on user choice. The fact that one section is or isn't !SEC_LOAD does not necessarily mean that that is a good case or a bad case. We'd be in the same situation as before the 2009 patch, would we not? > Modify lang_check_section_addresses to check for vma overlap when no > overlays are detected. > - Use IGNORE_SECTION again to choose interesting sections (the attached > patch was wrong in treatment of .tbss) Point taken. Reattaching last patch with IGNORE_SECTION back in there. Saw the original 2.24 source was still leaving it out so I left it out too, although I had noticed the difference and was a little bit curious why that define is still left in there for apparently no particular reason. > - In the existing lma checking loop, ignore !SEC_LOAD sections. Some > rewriting might be necessary to elegantly handle the case of the first > section being !SEC_LOAD. Not all !SEC_LOAD sections should be ignored either, or else we'd be in the same situation as we are today (well, almost). The problem is specifically marking which sections are intentional overlay vs which ones are not. The OVERLAY keyword is there, yes, but reading through the world knowledge base it has a different meaning right now so I would not recommend hijacking that keyword for this. > - Write another loop to check vmas if overlays not present This assumes that whoever has overlays intends to have his whole application accept all overlays, and only who does not have overlays at all accepts a clean application. I think these suggestions would be OK if the case would be that it is a general flag that is required to be detected, as per the very first patch submitted, but thinking more about things, I do not think that is true. The same application can have valid overlays and invalid ones, I cannot see any way around this other than allowing the user to specifically mark which ones are valid. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils