[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYN
From: |
thopre01 at gcc dot gnu.org |
Subject: |
[Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections |
Date: |
Thu, 28 Apr 2016 15:53:28 +0000 |
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/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections, (continued)
- [Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections, cvs-commit at gcc dot gnu.org, 2016/04/14
- [Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections, nickc at redhat dot com, 2016/04/14
- [Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections, nickc at redhat dot com, 2016/04/20
- [Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections, nickc at redhat dot com, 2016/04/20
- [Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections, thopre01 at gcc dot gnu.org, 2016/04/27
- [Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections, nickc at redhat dot com, 2016/04/27
- [Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections, nickc at redhat dot com, 2016/04/27
- [Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections, thopre01 at gcc dot gnu.org, 2016/04/27
- [Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections, andre.simoesdiasvieira at arm dot com, 2016/04/28
- [Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections, nickc at redhat dot com, 2016/04/28
- [Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections,
thopre01 at gcc dot gnu.org <=
- [Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections, ali_swbugzilla at emvision dot com, 2016/04/28
- [Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections, nickc at redhat dot com, 2016/04/29
- [Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections, cvs-commit at gcc dot gnu.org, 2016/04/29