[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/17556] crashing when mixing SHF_ALLOC and non SHF_ALLOC sectio
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug gold/17556] crashing when mixing SHF_ALLOC and non SHF_ALLOC sections |
Date: |
Fri, 21 Jun 2019 16:43:14 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=17556
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
This avoids crash:
diff --git a/gold/object.cc b/gold/object.cc
index 689448f50c..9051438e73 100644
--- a/gold/object.cc
+++ b/gold/object.cc
@@ -1644,6 +1644,13 @@ Sized_relobj_file<size,
big_endian>::do_layout(Symbol_table* symtab,
omit[i] = true;
}
+ // Skip empty sections without flags.
+ if (!(shdr.get_sh_flags() & ~elfcpp::SHF_GROUP)
+ && !shdr.get_sh_size())
+ {
+ omit[i] = true;
+ }
+
bool discard = omit[i];
if (!discard)
{
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gold/17556] crashing when mixing SHF_ALLOC and non SHF_ALLOC sections,
hjl.tools at gmail dot com <=
- [Bug gold/17556] crashing when mixing SHF_ALLOC and non SHF_ALLOC sections, hjl.tools at gmail dot com, 2019/06/21
- [Bug gold/17556] crashing when mixing SHF_ALLOC and non SHF_ALLOC sections, fweimer at redhat dot com, 2019/06/21
- [Bug gold/17556] crashing when mixing SHF_ALLOC and non SHF_ALLOC sections, hjl.tools at gmail dot com, 2019/06/21
- [Bug gold/17556] crashing when mixing SHF_ALLOC and non SHF_ALLOC sections, hjl.tools at gmail dot com, 2019/06/21
- [Bug gold/17556] crashing when mixing SHF_ALLOC and non SHF_ALLOC sections, hjl.tools at gmail dot com, 2019/06/21
- [Bug gold/17556] crashing when mixing SHF_ALLOC and non SHF_ALLOC sections, hjl.tools at gmail dot com, 2019/06/24