+2015-04-24 Alan Modra <amodra@gmail.com>
+
+ * internal.h (ELF_SECTION_IN_SEGMENT_1): Ensure PT_LOAD and
+ similar segments only contain alloc sections.
+
2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/18316
|| (((sec_hdr)->sh_flags & SHF_TLS) == 0 \
&& (segment)->p_type != PT_TLS \
&& (segment)->p_type != PT_PHDR)) \
+ /* PT_LOAD and similar segments only have SHF_ALLOC sections. */ \
+ && !(((sec_hdr)->sh_flags & SHF_ALLOC) == 0 \
+ && ((segment)->p_type == PT_LOAD \
+ || (segment)->p_type == PT_DYNAMIC \
+ || (segment)->p_type == PT_GNU_EH_FRAME \
+ || (segment)->p_type == PT_GNU_RELRO \
+ || (segment)->p_type == PT_GNU_STACK)) \
/* Any section besides one of type SHT_NOBITS must have file \
offsets within the segment. */ \
&& ((sec_hdr)->sh_type == SHT_NOBITS \
+2015-04-24 Alan Modra <amodra@gmail.com>
+
+ * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation):
+ Call gld${EMULATION_NAME}_map_segments regardless of need_laying_out.
+
2015-04-24 DJ Delorie <dj@redhat.com>
* Makefile.am (msp430): Rename primary emulation to msp430elf.
else if (ret > 0)
need_laying_out = 1;
- if (need_laying_out != -1)
- {
- gld${EMULATION_NAME}_map_segments (need_laying_out);
-
- if (!link_info.relocatable)
- ppc64_elf_set_toc (&link_info, link_info.output_bfd);
- }
+ /* Call map_segments regardless of the state of need_laying_out.
+ need_laying_out set to -1 means we have just laid everything out,
+ but ppc64_elf_size_stubs strips .branch_lt and .eh_frame if
+ unneeded, after ppc_layout_sections_again. Another call removes
+ these sections from the segment map. Their presence is
+ innocuous except for confusing ELF_SECTION_IN_SEGMENT. */
+ gld${EMULATION_NAME}_map_segments (need_laying_out > 0);
+
+ if (need_laying_out != -1 && !link_info.relocatable)
+ ppc64_elf_set_toc (&link_info, link_info.output_bfd);
}
+2015-04-24 Alan Modra <amodra@gmail.com>
+
+ * ld-powerpc/tocnovar.d: Revert last change.
+
2015-04-24 Richard Earnshaw <rearnsha@arm.com>
* ld-arm/armthumb-lib.d: Regenerate expected output.
#...
+00 +\.text
+01 +\.opd \.got
- +02 +\.opd \.got .*
+ +02 +\.opd \.got