]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Non-alloc sections don't belong in PT_LOAD segments
authorAlan Modra <amodra@gmail.com>
Fri, 24 Apr 2015 09:49:37 +0000 (19:19 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 10 Jul 2015 10:27:37 +0000 (19:57 +0930)
commit69ce3f1e12979420bbc699e791a403cbeb28740e
treec9875634a4c2ec2b3093de2ea3e4db1e829a1728
parent143e21ad43a55246809636b975891ec64250246d
Non-alloc sections don't belong in PT_LOAD segments

Taking them out showed a bug in the powerpc64 backend with .branch_lt
being removed from output_bfd but not from previously set up segment
section maps.  Removing the bfd sections meant their sh_flags (and
practically everything else) remaining zero, ie. not SHF_ALLOC,
triggering complaints about "`.branch_lt' can't be allocated in
segment".

include/elf/
* internal.h (ELF_SECTION_IN_SEGMENT_1): Ensure PT_LOAD and
similar segments only contain alloc sections.
ld/
* emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation):
Call gld${EMULATION_NAME}_map_segments regardless of need_laying_out.
include/elf/ChangeLog
include/elf/internal.h
ld/ChangeLog
ld/emultempl/ppc64elf.em