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

Re: [Xen-devel] [PATCH]: PVH: specify xen features strings cleany for PVH



On Fri, 2013-01-25 at 10:27 +0000, Jan Beulich wrote:
> >>> On 25.01.13 at 11:11, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> > On Fri, 2013-01-25 at 08:02 +0000, Jan Beulich wrote:
> >> >>> On 25.01.13 at 00:13, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote:
> >> > This is on top of what konrad already has in his linux tree so he
> >> > can just apply it. Here's the final version of the file, just in case:
> >> 
> >> Looks okay to me, and I don't mind whether this
> >> 
> >> >         ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .ascii 
> >> > "!writable_page_tables|pae_pgdir_above_4gb"; .asciz PVH_FEATURES_STR);
> >> 
> >> is done using the .ascii/.asciz or the simpler string concatenation
> >> way, as long as the latter works.
> > 
> > String concat in gas doesn't work like in C, you get a \0 at the join...
> 
> But this is going through the C preprocessor, and that one,
> according to all I know, ought to concatenate adjacent strings.

I don't think so, turning
        "Foo" "Bar"
into
        "FooBar"
happens at the C level not the CPP level.

        #define FOO(x) x
        FOO(.asciz "Foo" "Bar")
        
        #define CAT(x,y) x y
        FOO(.asciz CAT("Foo","Bar"))
        
        #define CAT2(x,y) x #y
        FOO(CAT2(.asciz, Foo Bar))
will produce
        .asciz "Foo" "Bar"
        .asciz "Foo" "Bar"
        .asciz "Foo Bar"

(where FOO(x) ~= ELFNOTE(..., x))

The third form might be an alternative fix to this issue but I don't
think it is any better than the .ascii/.asciz solution.

Ian.


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


 


Rackspace

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