On Tue, Aug 27, 2019 at 9:28 AM Martin Liška <mli...@suse.cz> wrote: > > Hi. > > The patch is about better symbol table manipulation > for debug info objects. The patch fixes reported issue > on hppa64-hp-hpux11.11. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed?
+ prevailing_name_idx = ELF_FETCH_FIELD (type_functions, ei_class, + Sym, ent, + st_name, Elf_Addr); this should be Elf_Word. Please add a break; after you found a symbol. Please also amend the comment before this loop to say that we know there's a prevailing weak hidden symbol at the start of the .debug_info section so we'll always at least find that one. - undefined and sharing the gnu_lto_ name. */ + undefined and sharing a name of a prevailing + symbol. */ bind = STB_WEAK; other = STV_HIDDEN; + ELF_SET_FIELD (type_functions, ei_class, Sym, - ent, st_name, Elf_Word, - gnu_lto - strings); + ent, st_name, Elf_Addr, + prevailing_name_idx); + Likewise Elf_Word, no need to add vertical spacing before and after this stmt. ELF_SET_FIELD (type_functions, ei_class, Sym, > Thanks, > Martin > > libiberty/ChangeLog: > > 2019-08-27 Martin Liska <mli...@suse.cz> > > PR lto/91478 > * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): > First find a WEAK HIDDEN symbol in symbol table that will be > preserved. Later, use the symbol name for all removed symbols. > --- > libiberty/simple-object-elf.c | 71 +++++++++++++++++++++++------------ > 1 file changed, 48 insertions(+), 23 deletions(-) > >