https://sourceware.org/bugzilla/show_bug.cgi?id=19938
--- Comment #22 from Thomas Preud'homme <thopre01 at gcc dot gnu.org> --- (In reply to Nick Clifton from comment #21) > Created attachment 9222 [details] > extended patch > > Right, here is another revision of the patch. In this version: > > * The EI_ABIVERSION field of the input file is copied to the output file. > > * The section header copying code now makes two passes over the input > sections, trying to find a match between an input section and an output > section. The first pass looks for a direct mapping between the sections, > based upon the pointers stored in the structures. (Thanks to Thomas for > suggesting this). The second pass tries to match up sections based upon > their characteristics (address, type, flags, etc). If both passes fail > the backend copying function is given one last chance to set the fields, > but with a NULL matching input section. > > * Updates readelf to report Solaris specific program header types. > > * General code tidying and cleanup. > > Ali, Rainer. Thomas - please could you try out this version and let me know > if > you are happy with it. > > One thing that this patch does not do is zero the p_paddr fields of the > program > headers for Solaris targets. I did look at doing this, but it would a lot of > hacking on very complicated, fragile code in the BFGD library. Something > that > I think would be very likely to introduce new bugs. > > Cheers > Nick Hi Nick, As for the previous version, the patch does fix the problem we have at hand. I'm glad my suggestion was useful to you. I skimmed over your patch as I was curious to learn about objcopy and I realized that it is not working exactly as I thought. I had in mind that setup_section () in binutils/objcopy.c would create a record input section number -> output section number for each section it copy and that we could use this to skip find_link altogether. Seeing how old is binutils I guess this must be impossible for a reason I'm missing. Thank you for such a quick fix. Best regards, Thomas -- 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