This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [GOLD] Adjust testcase for PowerPC64

On Mon, Dec 12, 2016 at 08:10:45AM -0800, Cary Coutant wrote:
> > PowerPC64 needs .got to contain .toc, or at least to have a .toc input
> > sections within cooee of the linker created symbol .TOC. in .got.
> > OK?
> >
> >         * testsuite/pr20717.t: Add .got output section containing .toc.
> OK, thanks!
> I'm curious, though -- since this test doesn't run -- we just link and
> check section placement -- does the test actually fail on PPC? If so,
> there might still be some issues with orphan section placement. (Maybe
> not important ones, as I'd expect most linker scripts to be sane, but
> still something I'd want to take a look at.)

The test failed to link on powerpc64.  Orphan section placement put
input .toc sections in their own .toc output section located before
.data with .got placed later.  They aren't very far apart, but crt1.o
has an R_PPC64_TOC16_DS reloc referencing the crt1.o .toc section.
This is a 16-bit signed offset reloc calculating the difference
between its symbol and .TOC., the powerpc64 equivalent of
_GLOBAL_OFFSET_TABLE_.  .TOC. is defined 32k into .got so it isn't
possible to reach anything located before .got.

Alan Modra
Australia Development Lab, IBM

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]