This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Gold linker patch to split unlikely text into a separate segment
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Sriraman Tallam <tmsriram at google dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, Krzysztof Pszeniczny <kpszeniczny at google dot com>, Chris Kennelly <ckennelly at google dot com>, Xinliang David Li <davidxl at google dot com>, Stephane Eranian <eranian at google dot com>, binutils <binutils at sourceware dot org>
- Date: Thu, 19 Oct 2017 21:04:05 -0700
- Subject: Re: Gold linker patch to split unlikely text into a separate segment
- Authentication-results: sourceware.org; auth=none
- References: <CAAs8HmxCpQrbpw8YTLx6zGhTn5XqEp_TBn5_h7v4wTwSHQsQPg@mail.gmail.com> <CAMe9rOpjtiGPQ=zLB4kFgBfamusoYv1ZGkUgnEqt5N+FmiL1_A@mail.gmail.com> <CAAs8Hmx6-TAV5UVjYKzLL70=E=5xWMCb-g6db3EPa=uzMwxF-g@mail.gmail.com> <CAMe9rOoPkLgh6GX=VfBXsfNnVOaz3wr8QQnEzWnBGni3cqZmsQ@mail.gmail.com> <CAAs8Hmw3g7ULov0C8k+ywP8aMM-8gyRu3Ft9FeurpHSP4PBO5A@mail.gmail.com> <CAAs8Hmwmnk=D=cXUdNQuryRFv2yr8Vgk7B3KvwB8Cu-OpPPvnQ@mail.gmail.com> <CAAs8Hmy7=MRfVGTqFuSmT5ja464uTsJ+LjLUqYehPfNz24GV0A@mail.gmail.com> <CAJimCsHyDU172JMjH7tNqT+F5Gc-vj9CkcSgaUrd70Y7OYko=g@mail.gmail.com> <CAAs8HmxhV08ETQ8UxofLs6P5Jamw3pvTdef23WNVWCvoA-W=aA@mail.gmail.com> <CAJimCsGbxdhPmPBNoYaM5hymcZeBYy0Ev5-6WUUyAvsVzze0hw@mail.gmail.com> <CAAs8Hmx00f91c2TA+7J0bcfp4ozorCL=fsJeYkuCf-6L-FR8Ww@mail.gmail.com>
>> Won't that put *each* .text.unlikely section in its own unique
>> segment? Don't you want one segment containing all .text.unlikely
>> sections?
>
> Yes and that is exactly what this does. The output section here
> aggregates all text.unlikely sections. The set_is_unique_segment puts
> this output section in a separate PT_LOAD segment.
>
> There are two is_unique_segment methods, one for Output_section and
> one for Output_segment, maybe that is why this is confusing. This
> patch does not change Output_segment, it only changes Output_section.
Got it. Sorry for the confusion.
This is OK. Thanks!
-cary