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, 27 Apr 2016 16:15:01 +0000

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

--- Comment #19 from Nick Clifton <nickc at redhat dot com> ---
(In reply to Thomas Preud'homme from comment #17)

> I therefore believe that the set of fields tested in not enough to identify
> a section uniquely.

True.

>  We could add address and offset which is more likely to
> yield correct results (I don't know if two sections can share the same
> address and offset but I guess if they do they would have different type and
> flags).

Or if they are overlay sections.

The real problem is that at the time that the code to set the sh_link and
sh_info fields is called, the output string tables have not been assigned to
the output bfd.  So it is very hard to find the names of the output sections.  
If we did have the output section names available then we could compare the 
EXIDX section name with the various .text.* section names and find a match.  
(Maybe I should try harder to find a way to obtain those section names).

For now, the heuristic in the patch that I uploaded simply associates the EXIDX
section with the nearest executable section before it in the section table.  
This works provided that the sections have not been scrambled or sorted 
somehow.  I have my fingers crossed that this will be enough...

Cheers
  Nick

-- 
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]