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

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



On 24/08/16 08:44, 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>

Other than Juliens concerns, I am generally -1 so far for this patch.

I can appreciate the improvement you are trying to make, but this patch
is using an entirely undocumented feature of gnu LD, with no guarantees
that the feature won't disappear under our feet.  Were these to become
formally documented as stable, then that would be fine.

It also doesn't cater for the Clang build, which is a hard blocker to
accepting the patch.

~Andrew

_______________________________________________
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®.