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

Re: [Xen-devel] [PATCH v10 17/24] build_id: Provide ld-embedded build-ids



On Mon, May 02, 2016 at 05:13:24AM -0600, Jan Beulich wrote:
> >>> On 02.05.16 at 13:05, <wei.liu2@xxxxxxxxxx> wrote:
> > On Mon, May 02, 2016 at 12:02:43AM -0600, Jan Beulich wrote:
> >> >>> On 29.04.16 at 19:23, <konrad.wilk@xxxxxxxxxx> wrote:
> >> > On Fri, Apr 29, 2016 at 10:38:07AM -0600, Jan Beulich wrote:
> >> >> >>> On 27.04.16 at 21:27, <konrad.wilk@xxxxxxxxxx> wrote:
> >> >> > @@ -304,6 +338,32 @@ int main(int argc, char **argv)
> >> >> >      /*mem_siz = (u32)in64_phdr.p_memsz;*/
> >> >> >      mem_siz = (u32)(final_exec_addr - in64_phdr.p_vaddr);
> >> >> >  
> >> >> > +    note_sz = note_base = offset = 0;
> >> >> > +    if ( num_phdrs > 1 )
> >> >> > +    {
> >> >> > +        offset = in64_phdr.p_offset;
> >> >> > +        note_base = in64_phdr.p_vaddr;
> >> >> > +
> >> >> > +        (void)lseek(infd, in64_ehdr.e_phoff+sizeof(in64_phdr), 
> >> >> > SEEK_SET);
> >> >> > +        do_read(infd, &in64_phdr, sizeof(in64_phdr));
> >> >> > +        endianadjust_phdr64(&in64_phdr);
> >> >> > +
> >> >> > +        (void)lseek(infd, offset, SEEK_SET);
> >> >> > +
> >> >> > +        note_sz = in64_phdr.p_memsz;
> >> >> > +        note_base = in64_phdr.p_vaddr - note_base;
> >> >> > +
> >> >> > +        if ( in64_phdr.p_offset > dat_siz || offset > 
> >> >> > in64_phdr.p_offset )
> >> >> > +        {
> >> >> > +            fprintf(stderr, "Expected .note section within .text 
> >> > section!\n" \
> >> >> > +                    "Offset %ld not within %d!\n",
> >> >> > +                    in64_phdr.p_offset, dat_siz);
> >> >> 
> >> >> This fails to build on a 32-bit build host (which is one of the two
> >> >> post-commit, pre-push checks I normally do).
> >> > 
> >> > I hadn't realized that it was possible to build an 64-bit hypervisor on 
> >> > 32-bit
> >> > GCC toolchain. I've never done that - always built the hypervisor in 
> >> > 64-bit 
> >> > env and the 32-bit toolstack in 32-bit environment. Then booted it.
> >> 
> >> 32-bit toolchain? No. A 64-bit cross tool chain (similar to what I use
> >> for ARM build testing, except that here I also actively run the
> >> resulting hypervisor).
> > 
> > Then I'm a bit confused what you meant by "32-bit build host" in your
> > previous email.
> 
> What's confusing you here? Running a 64-bit hypervisor and/or a
> 64-bit kernel underneath a 32-bit distro is working quite fine.
> 

Hmm... How did you discover that problem if you did not cross-compile
with 32-bit toolchain? That's how I discovered the breakage.

Actually never mind. It's probably counter-productive to quibble over
words we use to describe build setups, especially ...

> > Anyway,  does my patch ("mkelf32: fix compilation on 32 bit build host")
> > fix the problem you saw?
> 
> Yes. That was also what I had used as a temporary workaround. I
> just didn't have the time right away to put this into proper patch
> shape.
> 

... now that you confirm the build is fixed.

Thanks for confirming BTW.

Wei.

> Jan
> 

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