aboutsummaryrefslogtreecommitdiff
path: root/libiberty/simple-object-elf.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2017-08-28 13:14:28 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2017-08-28 13:14:28 +0000
commit1963f60adb1ea775220cc92e0c644bbb59ad3191 (patch)
tree468a5aa424ddfc53e2b966ef4d156d2317cb306d /libiberty/simple-object-elf.c
parent950904f8b72516e48a3edbec13c6d3fdcff82312 (diff)
downloadgcc-1963f60adb1ea775220cc92e0c644bbb59ad3191.zip
gcc-1963f60adb1ea775220cc92e0c644bbb59ad3191.tar.gz
gcc-1963f60adb1ea775220cc92e0c644bbb59ad3191.tar.bz2
re PR lto/81968 (early lto debug objects make Solaris ld SEGV)
2017-08-28 Richard Biener <rguenther@suse.de> PR lto/81968 * simple-object-elf.c (simple_object_elf_copy_lto_debug_section): Adjust field with for sh_type write, set SHF_EXCLUDE only for removed sections. From-SVN: r251384
Diffstat (limited to 'libiberty/simple-object-elf.c')
-rw-r--r--libiberty/simple-object-elf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libiberty/simple-object-elf.c b/libiberty/simple-object-elf.c
index 10bf5e7..ee7a38c 100644
--- a/libiberty/simple-object-elf.c
+++ b/libiberty/simple-object-elf.c
@@ -1382,7 +1382,7 @@ simple_object_elf_copy_lto_debug_sections (simple_object_read *sobj,
unused. That allows the link editor to remove it in a partial
link. */
ELF_SET_FIELD (type_functions, ei_class, Shdr,
- shdr, sh_type, Elf_Addr, SHT_NULL);
+ shdr, sh_type, Elf_Word, SHT_NULL);
}
flags = ELF_FETCH_FIELD (type_functions, ei_class, Shdr,
@@ -1390,7 +1390,7 @@ simple_object_elf_copy_lto_debug_sections (simple_object_read *sobj,
if (ret == 0)
flags &= ~SHF_EXCLUDE;
else if (ret == -1)
- flags |= SHF_EXCLUDE;
+ flags = SHF_EXCLUDE;
ELF_SET_FIELD (type_functions, ei_class, Shdr,
shdr, sh_flags, Elf_Addr, flags);
}