This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Accept odd result in ld-powerpc/tocnovar testcase
- From: Alan Modra <amodra at gmail dot com>
- To: Cary Coutant <ccoutant at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Fri, 24 Apr 2015 11:56:48 +0930
- Subject: Re: Accept odd result in ld-powerpc/tocnovar testcase
- Authentication-results: sourceware.org; auth=none
- References: <20150423035955 dot GN12627 at bubble dot grove dot modra dot org> <CAJimCsEz82BK0oLbE4E8RqdCdsKuMuKMNdsP+PPmLzFpJBr6Wg at mail dot gmail dot com>
On Thu, Apr 23, 2015 at 08:06:17AM -0700, Cary Coutant wrote:
> > I didn't commit this with the relro and powerpc .TOC. changes,
> > thinking that something should be done about the odd result of
> > .shstrtab appearing in PT_GNU_RELRO. On looking at it further,
> > I think that changing readelf would be wrong, so let's just
> > accept the results. Real binaries will always have other sections
> > past .got, so PT_GNU_RELRO won't finish past the end of loaded
> > sections.
>
> Still, why should readelf show any non-allocated sections as part of a segment?
I shouldn't have said "would be wrong" without qualifying. The truth
is more like: Changing readelf to not show the non-alloc sections
involves changing include/elf/internal.h ELF_SECTION_IN_SEGMENT_1. My
first attempt resulted in failures of ld-elf/maxpage5, ld-elf/note-1
and ld-elf/note-2. At that point I decided I didn't want to spend
time on the problem, and it would be wrong to make a change there
without significant research.
--
Alan Modra
Australia Development Lab, IBM