Re: [PATCH] linux-user: Fix loading of BSS segments

2021-02-13 Thread Laurent Vivier
Le 17/12/2020 à 11:17, Giuseppe Musacchio a écrit : > Some ELF binaries encode the .bss section as an extension of the data > ones by setting the segment p_memsz > p_filesz. Some other binaries take > a different route and encode it as a stand-alone PT_LOAD segment with > p_filesz = 0 and p_memsz >

Re: [PATCH] linux-user: Fix loading of BSS segments

2020-12-19 Thread Giuseppe Musacchio
On 19/12/20 11:55, Laurent Vivier wrote: > Le 17/12/2020 à 11:17, Giuseppe Musacchio a écrit : >> Some ELF binaries encode the .bss section as an extension of the data >> ones by setting the segment p_memsz > p_filesz. Some other binaries take >> a different route and encode it as a stand-alone PT_

Re: [PATCH] linux-user: Fix loading of BSS segments

2020-12-19 Thread Laurent Vivier
Le 17/12/2020 à 11:17, Giuseppe Musacchio a écrit : > Some ELF binaries encode the .bss section as an extension of the data > ones by setting the segment p_memsz > p_filesz. Some other binaries take > a different route and encode it as a stand-alone PT_LOAD segment with > p_filesz = 0 and p_memsz >

Re: [PATCH] linux-user: Fix loading of BSS segments

2020-12-17 Thread Stephen Long
Laurent Vivier wrote: > If this patch fixes also your problem I will take this one instead. Awesome, I can confirm that this patch fixes my problem. Thanks, Stephen

Re: [PATCH] linux-user: Fix loading of BSS segments

2020-12-17 Thread Laurent Vivier
Le 17/12/2020 à 18:40, Stephen Long a écrit : > Laurent Vivier wrote: >> Is this also fixing what "linux-user/elfload: Fix handling of pure BSS >> segments" [1] patch fixes? > > I can do a v2 of my patch with a better commit description and addressing > Peter's > questions, but feel free to take

Re: [PATCH] linux-user: Fix loading of BSS segments

2020-12-17 Thread Stephen Long
Laurent Vivier wrote: > Is this also fixing what "linux-user/elfload: Fix handling of pure BSS > segments" [1] patch fixes? I can do a v2 of my patch with a better commit description and addressing Peter's questions, but feel free to take this patch instead. It has a much clearer commit msg and

Re: [PATCH] linux-user: Fix loading of BSS segments

2020-12-17 Thread Giuseppe Musacchio
On 17/12/20 11:48, Laurent Vivier wrote: > Le 17/12/2020 à 11:17, Giuseppe Musacchio a écrit : >> Some ELF binaries encode the .bss section as an extension of the data >> ones by setting the segment p_memsz > p_filesz. Some other binaries take >> a different route and encode it as a stand-alone PT_

Re: [PATCH] linux-user: Fix loading of BSS segments

2020-12-17 Thread Laurent Vivier
Le 17/12/2020 à 11:17, Giuseppe Musacchio a écrit : > Some ELF binaries encode the .bss section as an extension of the data > ones by setting the segment p_memsz > p_filesz. Some other binaries take > a different route and encode it as a stand-alone PT_LOAD segment with > p_filesz = 0 and p_memsz >

[PATCH] linux-user: Fix loading of BSS segments

2020-12-17 Thread Giuseppe Musacchio
Some ELF binaries encode the .bss section as an extension of the data ones by setting the segment p_memsz > p_filesz. Some other binaries take a different route and encode it as a stand-alone PT_LOAD segment with p_filesz = 0 and p_memsz > 0. Both the encodings are actually correct per ELF specifi