Re: [PATCH] linux-user/elfload: Fix handling of pure BSS segments

2020-12-17 Thread Laurent Vivier
Le 18/11/2020 à 17:52, Stephen Long a écrit : > qemu-user fails to load ELFs with only BSS and no data section > > Signed-off-by: Ben Hutchings > Signed-off-by: Stephen Long > --- > > Submitting this on behalf of Ben Hutchings. Feel free to edit the commit > msg. > > linux-user/elfload.c | 2

Re: [PATCH] linux-user/elfload: Fix handling of pure BSS segments

2020-12-02 Thread Peter Maydell
On Wed, 25 Nov 2020 at 09:39, Alex Bennée wrote: > How hairy is the generation of these binaries? If it's all doable with > standard gcc/ldd command lines it would be useful to add them as a > tcg/multiarch test case. Rather than using C it might be simpler just to create a failing binary by-hand

Re: [PATCH] linux-user/elfload: Fix handling of pure BSS segments

2020-12-02 Thread Stephen Long
Alex Bennee writes: > Hmm I tried the following patch but evidently there is more to be done > to convince it: > collect2: fatal error: cannot find 'ld' Oh, I'm using ld.lld-10. aarch64-linux-gnu-gcc -B/usr/lib/llvm-10/bin works for me. You'll have to get the necessary packages for lld-10 and p

Re: [PATCH] linux-user/elfload: Fix handling of pure BSS segments

2020-12-02 Thread Alex Bennée
Stephen Long writes: > Alex Bennee writes: > >>> Apologies for the unclear commit msg. I was also seeing a SIGSEGV in >>> zero_bss() with the binaries I was generating. I was using LLD to generate >>> the binaries. The binaries all had LOAD segments with a file size of >>> 0. >> >> How hairy i

Re: [PATCH] linux-user/elfload: Fix handling of pure BSS segments

2020-12-01 Thread Stephen Long
Alex Bennee writes: >> Apologies for the unclear commit msg. I was also seeing a SIGSEGV in >> zero_bss() with the binaries I was generating. I was using LLD to generate >> the binaries. The binaries all had LOAD segments with a file size of >> 0. > > How hairy is the generation of these binaries

Re: [PATCH] linux-user/elfload: Fix handling of pure BSS segments

2020-11-25 Thread Alex Bennée
Stephen Long writes: > Hi Peter, > >> (a) what does "fails to load" mean here? In the sample binary >> I had, we got a SIGSEGV in zero_bss() when it tried to memset() >> memory that hadn't been mmap()ed. Is that the only failure mode, >> or can this manifest in other ways too? > > Apologies fo

Re: Re: [PATCH] linux-user/elfload: Fix handling of pure BSS segments

2020-11-24 Thread Stephen Long
Hi Peter, > (a) what does "fails to load" mean here? In the sample binary > I had, we got a SIGSEGV in zero_bss() when it tried to memset() > memory that hadn't been mmap()ed. Is that the only failure mode, > or can this manifest in other ways too? Apologies for the unclear commit msg. I was als

Re: [PATCH] linux-user/elfload: Fix handling of pure BSS segments

2020-11-24 Thread Peter Maydell
On Wed, 18 Nov 2020 at 16:55, Stephen Long wrote: > > qemu-user fails to load ELFs with only BSS and no data section > > Signed-off-by: Ben Hutchings > Signed-off-by: Stephen Long > --- > > Submitting this on behalf of Ben Hutchings. Feel free to edit the commit > msg. > > linux-user/elfload.c

Re: [PATCH] linux-user/elfload: Fix handling of pure BSS segments

2020-11-24 Thread Richard Henderson
On 11/18/20 8:52 AM, Stephen Long wrote: > qemu-user fails to load ELFs with only BSS and no data section > > Signed-off-by: Ben Hutchings > Signed-off-by: Stephen Long > --- Reviewed-by: Richard Henderson r~