[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: |
nickc at redhat dot com |
Subject: |
[Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections |
Date: |
Wed, 20 Apr 2016 10:43:38 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=19938
--- Comment #15 from Nick Clifton <nickc at redhat dot com> ---
Created attachment 9206
--> https://sourceware.org/bugzilla/attachment.cgi?id=9206&action=edit
Proposed extra patch
Hi Ali, Hi Rainer.
Please try out the extra patch on top of the latest mainline sources. (I
have
not checked it in as I would like to be a bit more certain this time that it
does actually work this time...)
The problem, I think, was that some of the input sections had the
SHF_INFO_LINK flag (correctly) set, but the corresponding output sections did
not. This meant that the code that tried to match input sections to output
sections was rejecting a match with the proper output section, because of a
flag mistmatch. So no matching section was found and no copying of the info
and link fields was attempted. The patch fixes this problem my masking out
the SHF_INFO_LINK bit when comparing sections. It also makes sure that if
the input section had the SHF_INFO_LINK flag set, and a match could be found,
that the output section has the flag set too.
This problem pointed out another bug to me - the target specific function
for setting the info and link fields would only be called if this match could
be found. Really it should have a chance to set the fields even if no match
could be found. The patch takes care of this problem too.
I have tested the problem by objcopy'ing libc.so.1 and comparing the output,
and by stripping libc.so.1 and comparing the output. The results look better
but they are still not perfect. The .SUNW_version section has its sh_entsize
field set to 0 in the copied/stripped executables for example. I do not know
if this is important.
I also do not know anything about Solaris capabilities, so I am not sure if
these sections are being copied correctly.
Anyway please try out the patch and let me know what else needs to be done.
Cheers
Nick
--
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, ccoutant at gmail dot com, 2016/04/11
- [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/11
- [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/11
- [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/12
- [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/12
- [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/13
- [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/13
- [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/13
- [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 <=
- [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, 2016/04/28
- [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