[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/2] make use of .startof.() and .sizeof.() assembler expressions



>>> On 15.08.16 at 11:43, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 12/08/16 15:48, Jan Beulich wrote:
>> Section start symbols frequently obscure the actual symbol name living
>> at the start of the section. Eliminate them where they can be replaced
>> by linker resolved .startof.* symbols. (Section end symbols may have
>> the same undesirable effect, but they're less easy to eliminate, as
>> they'd need to be represented by the sum of .startof.<section> and
>> .sizeof.<section>).
>>
>> Along those lines use .sizeof.* where section sizes get calculated
>> from the difference of section and and section start symbols.
>>
>> Note that this would be nice for the build-id section too, but:
>> - The generated (by ld) section names differ between ELF and COFF/PE
>>   (ELF: .note.gnu.build-id; COFF/PE[2.26+]: .buildid), yet we compile
>>   version.c just once (and hence can use only either of the necessary
>>   .startof./.sizeof. forms).
>> - The ELF section name needs to be quoted in the .startof./.sizeof.
>>   expressions, yet that quoting is supported only by gas 2.26+.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> Is there any documentation of these?  I cant seem to find any.

Indeed I can't find any either, at least not inside the binutils
repo. But the support for this has been there for a long time
(it is present in 2.16.1, which is the oldest I have readily available).

> Does this work on Clang at all?

To be honest - I have no idea.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.