diff options
author | Martin Liska <mliska@suse.cz> | 2019-07-22 09:34:47 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-07-22 07:34:47 +0000 |
commit | a861990d21a7f495695597e75509a834d44fdb2d (patch) | |
tree | 2db8d2971bc773879593177b253a46b32d2cbbca /libiberty | |
parent | d1caf05a899bb57d1a96acd4869890991dedca20 (diff) | |
download | gcc-a861990d21a7f495695597e75509a834d44fdb2d.zip gcc-a861990d21a7f495695597e75509a834d44fdb2d.tar.gz gcc-a861990d21a7f495695597e75509a834d44fdb2d.tar.bz2 |
Do not emit __gnu_lto_v1 symbol.
2019-07-22 Martin Liska <mliska@suse.cz>
* config/avr/avr.c (avr_asm_output_aligned_decl_common): Update
comment.
* toplev.c (compile_file): Do not emit __gnu_lto_v1 symbol.
2019-07-22 Martin Liska <mliska@suse.cz>
* config/pa/stublib.c: Remove stub symbol __gnu_lto_v1.
* config/pa/t-stublib: Likewise.
2019-07-22 Martin Liska <mliska@suse.cz>
* simple-object-elf.c (simple_object_elf_copy_lto_debug_sections):
Do not search for gnu_lto_v1, but search for first '\0'.
From-SVN: r273662
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 5 | ||||
-rw-r--r-- | libiberty/simple-object-elf.c | 23 |
2 files changed, 13 insertions, 15 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index af24257..a0508e9 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2019-07-22 Martin Liska <mliska@suse.cz> + + * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): + Do not search for gnu_lto_v1, but search for first '\0'. + 2019-07-18 Eduard-Mihai Burtescu <eddyb@lyken.rs> * cplus-dem.c: Include rust-demangle.h. diff --git a/libiberty/simple-object-elf.c b/libiberty/simple-object-elf.c index 22c9ae7..5023889 100644 --- a/libiberty/simple-object-elf.c +++ b/libiberty/simple-object-elf.c @@ -1358,9 +1358,8 @@ simple_object_elf_copy_lto_debug_sections (simple_object_read *sobj, return errmsg; } - /* If we are processing .symtab purge __gnu_lto_v1 and - __gnu_lto_slim symbols from it and any symbols in discarded - sections. */ + /* If we are processing .symtab purge __gnu_lto_slim symbol + from it and any symbols in discarded sections. */ if (sh_type == SHT_SYMTAB) { unsigned entsize = ELF_FETCH_FIELD (type_functions, ei_class, Shdr, @@ -1380,14 +1379,9 @@ simple_object_elf_copy_lto_debug_sections (simple_object_read *sobj, sobj->offset + stroff, (unsigned char *)strings, strsz, &errmsg, err); - /* Find gnu_lto_ in strings. */ - while ((gnu_lto = (char *) memchr (gnu_lto, 'g', - strings + strsz - gnu_lto))) - if (strncmp (gnu_lto, "gnu_lto_v1", - strings + strsz - gnu_lto) == 0) - break; - else - gnu_lto++; + /* Find first '\0' in strings. */ + gnu_lto = (char *) memchr (gnu_lto, '\0', + strings + strsz - gnu_lto + 1); /* Read the section index table if present. */ if (symtab_indices_shndx[i - 1] != 0) { @@ -1461,10 +1455,9 @@ simple_object_elf_copy_lto_debug_sections (simple_object_read *sobj, undefined and sharing the gnu_lto_ name. */ bind = STB_WEAK; other = STV_HIDDEN; - if (gnu_lto) - ELF_SET_FIELD (type_functions, ei_class, Sym, - ent, st_name, Elf_Word, - gnu_lto - strings); + ELF_SET_FIELD (type_functions, ei_class, Sym, + ent, st_name, Elf_Word, + gnu_lto - strings); ELF_SET_FIELD (type_functions, ei_class, Sym, ent, st_shndx, Elf_Half, SHN_UNDEF); } |