s-objrea.adb
65.4 KB
-
[Ada] Tighten Object_Reader.Get_Memory_Bounds · c77384a4
Symbolization of traceback entries from dwarf info was failing in some cases with shared libraries on ELF targets, from unexpected overlapping of what we believed were code regions for distinct modules. This is caused by the inclusion of all SHF_ALLOC sections in the set of sections of possible relevance to determine the span of possible code addresses for a module. This change renames the Get_memory_Bound subprogram to better convey that we really care about sections hosting executable code in particular, matching what the spec comments already claims. It also renames the boolean flag conveying the info of relevance in the Object_Section record, and adjusts the ELF implementation of Get_Section to feed this flag from SHF_EXECINSTR instead of SHF_ALLOC. 2018-05-21 Olivier Hainque <hainque@adacore.com> gcc/ada/ * libgnat/s-objrea.ads (Get_Memory_Bounds): Rename as Get_Xcode_Bounds. (Object_Section): Rename Flag_Alloc component as Flag_Xcode. * libgnat/s-objrea.adb (Get_Xcode_Bounds): Adjust to new subprogram and component name. (Get_Section, ELF case): Set Flag_Xcode from SHF_EXECINSTR. * libgnat/s-dwalin.adb (Open): Adjust to the Get_Memory_Bounds name change. From-SVN: r260451
Olivier Hainque committed