bug-binutils
[Top][All Lists]
Advanced

[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:48:16 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=19938

Nick Clifton <nickc at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #16 from Nick Clifton <nickc at redhat dot com> ---
Hi Ali, Hi Rainer.

  [Revised text with typos fixed.  I really should make more of an effort
   to proofread these things].
---------------------------------------------------------------------------
  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).

  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, because of a flag mistmatch.  So no matching 
  section was found and no copying of the info and link fields took place.  The
  patch fixes this problem by 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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]