aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <mcgrathr@google.com>2013-11-01 14:37:46 -0700
committerRoland McGrath <mcgrathr@google.com>2013-11-01 14:37:46 -0700
commit86e0565d9c985fa0ba46c85dbe6e77bcaf62dd33 (patch)
tree6032dea7d31f842b5f7cb760c5c0b5361c9ea905
parenta1b0fbee1d325b9b222d68d2d4ff34316ba10d38 (diff)
downloadfsf-binutils-gdb-86e0565d9c985fa0ba46c85dbe6e77bcaf62dd33.zip
fsf-binutils-gdb-86e0565d9c985fa0ba46c85dbe6e77bcaf62dd33.tar.gz
fsf-binutils-gdb-86e0565d9c985fa0ba46c85dbe6e77bcaf62dd33.tar.bz2
*-*-nacl* layout: Drop requirement that some section have SEC_HAS_CONTENTS set.
bfd/ * elf-nacl.c (segment_eligible_for_headers): Drop requirement that some section have SEC_HAS_CONTENTS set. It's not set for .note.gnu.build-id, and a segment of only read-only SHT_NOBITS sections is implausible and not really supportable anyway.
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf-nacl.c7
2 files changed, 9 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ae0a024..4299ae1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2013-11-01 Roland McGrath <mcgrathr@google.com>
+
+ * elf-nacl.c (segment_eligible_for_headers): Drop requirement that
+ some section have SEC_HAS_CONTENTS set. It's not set for
+ .note.gnu.build-id, and a segment of only read-only SHT_NOBITS
+ sections is implausible and not really supportable anyway.
+
2013-10-30 Alan Modra <amodra@gmail.com>
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Use new DT_PPC_OPT
diff --git a/bfd/elf-nacl.c b/bfd/elf-nacl.c
index 5ec1161..c46b4cb 100644
--- a/bfd/elf-nacl.c
+++ b/bfd/elf-nacl.c
@@ -44,14 +44,13 @@ segment_executable (struct elf_segment_map *seg)
}
/* Determine if this segment is eligible to receive the file and program
- headers. It must be read-only, non-executable, and have contents.
+ headers. It must be read-only and non-executable.
Its first section must start far enough past the page boundary to
allow space for the headers. */
static bfd_boolean
segment_eligible_for_headers (struct elf_segment_map *seg,
bfd_vma minpagesize, bfd_vma sizeof_headers)
{
- bfd_boolean any_contents = FALSE;
unsigned int i;
if (seg->count == 0 || seg->sections[0]->lma % minpagesize < sizeof_headers)
return FALSE;
@@ -59,10 +58,8 @@ segment_eligible_for_headers (struct elf_segment_map *seg,
{
if ((seg->sections[i]->flags & (SEC_CODE|SEC_READONLY)) != SEC_READONLY)
return FALSE;
- if (seg->sections[i]->flags & SEC_HAS_CONTENTS)
- any_contents = TRUE;
}
- return any_contents;
+ return TRUE;
}