Re: [PATCH v3] strip: keep .ctf section in stripped file

2023-03-09 Thread Mark Wielaard
Hi Nix, On Wed, Mar 08, 2023 at 05:45:02PM +, Nix wrote: > > On Sat, 2023-03-04 at 08:00 -0600, Guillermo E. Martinez wrote: > >> On Fri, Mar 03, 2023 at 12:24:19PM +, Nick Clifton wrote: > >> > > > > I am mainly wondering why binutils strip already seems to keep > >> > > > > ".ctf" > >>

Re: [PATCH v3] strip: keep .ctf section in stripped file

2023-03-08 Thread Nix
On 7 Mar 2023, Mark Wielaard said: > Hi Nick, Hi Guillermo, > > On Sat, 2023-03-04 at 08:00 -0600, Guillermo E. Martinez wrote: >> Hello, >> >> On Fri, Mar 03, 2023 at 12:24:19PM +, Nick Clifton wrote: >> > Hi Mark, >> > >> > > > > I am mainly wondering why binutils strip already seems to ke

Re: [PATCH v3] strip: keep .ctf section in stripped file

2023-03-07 Thread Guillermo E. Martinez via Elfutils-devel
On Tue, Mar 07, 2023 at 03:50:01PM +0100, Mark Wielaard wrote: > Hi Nick, Hi Guillermo, > Hi Mark, > On Sat, 2023-03-04 at 08:00 -0600, Guillermo E. Martinez wrote: > > Hello, > > > > On Fri, Mar 03, 2023 at 12:24:19PM +, Nick Clifton wrote: > > > Hi Mark, > > > > > > > > > I am mainly wo

Re: [PATCH v3] strip: keep .ctf section in stripped file

2023-03-07 Thread Mark Wielaard
Hi Nick, Hi Guillermo, On Sat, 2023-03-04 at 08:00 -0600, Guillermo E. Martinez wrote: > Hello, > > On Fri, Mar 03, 2023 at 12:24:19PM +, Nick Clifton wrote: > > Hi Mark, > > > > > > > I am mainly wondering why binutils strip already seems to keep ".ctf" > > > > > sections (even without -g).

Re: [PATCH v3] strip: keep .ctf section in stripped file

2023-03-04 Thread Guillermo E. Martinez via Elfutils-devel
Hello, On Fri, Mar 03, 2023 at 12:24:19PM +, Nick Clifton wrote: > Hi Mark, > > > > > I am mainly wondering why binutils strip already seems to keep ".ctf" > > > > sections (even without -g). > > > Right. But I am wondering how that mechanism works with binutils strip. > > Apparently we do s

Re: [PATCH v3] strip: keep .ctf section in stripped file

2023-03-03 Thread Nick Clifton via Elfutils-devel
Hi Mark, I am mainly wondering why binutils strip already seems to keep ".ctf" sections (even without -g). Right. But I am wondering how that mechanism works with binutils strip. Apparently we do something different in eu-strip which makes it necessary to add a --keep-ctf option based on the

Re: [PATCH v3] strip: keep .ctf section in stripped file

2023-03-03 Thread Mark Wielaard
Hi Guillermo, On Thu, 2023-03-02 at 20:40 -0600, Guillermo E. Martinez wrote: > On Tue, Feb 28, 2023 at 03:27:13PM +0100, Mark Wielaard wrote: > > There are some exceptions to the general rule in eu-strip of dropping > > not referenced, non-allocated, SHT_PROGBIT sections. SHT_NOTE sections > > ar

Re: [PATCH v3] strip: keep .ctf section in stripped file

2023-03-02 Thread Guillermo E. Martinez via Elfutils-devel
Hello Mark, On Tue, Feb 28, 2023 at 03:27:13PM +0100, Mark Wielaard wrote: > Hi Nick, > > On Tue, 2023-02-28 at 12:59 +, Nick Clifton wrote: > > > O, this surprises me. I wasn't aware binutils strip keeps unallocated > > > sections by default. But apparently it does. It doesn't seem specific

Re: [PATCH v3] strip: keep .ctf section in stripped file

2023-02-28 Thread Mark Wielaard
Hi Nick, On Tue, 2023-02-28 at 12:59 +, Nick Clifton wrote: > > O, this surprises me. I wasn't aware binutils strip keeps unallocated > > sections by default. But apparently it does. It doesn't seem specific > > to ".ctf". Do you know why? This seems counter to how strip is supposed > > to beh

Re: [PATCH v3] strip: keep .ctf section in stripped file

2023-02-28 Thread Nick Clifton via Elfutils-devel
Hi Mark, O, this surprises me. I wasn't aware binutils strip keeps unallocated sections by default. But apparently it does. It doesn't seem specific to ".ctf". Do you know why? This seems counter to how strip is supposed to behave, at least how I understand it. Actually thinking about it, ther

Re: [PATCH v3] strip: keep .ctf section in stripped file

2023-02-28 Thread Nick Clifton via Elfutils-devel
Hi Mark, Oh, I see, thanks for your comment!. My intention with this patch is to replicate the same proceeding by _default_ implemented in `binutils strip' tool, it is: not remove CTF section, except it is indicated explicitly. O, this surprises me. I wasn't aware binutils strip keeps unalloca

Re: [PATCH v3] strip: keep .ctf section in stripped file

2023-02-28 Thread Mark Wielaard
Hi Guillermo, CCed Nick to see if he knows why binutils strip does what it does. On Fri, 2023-02-24 at 10:48 -0600, Guillermo E. Martinez wrote: > On Fri, Feb 24, 2023 at 12:51:25PM +0100, Mark Wielaard wrote: > > > > On Thu, Feb 23, 2023 at 12:42:37PM -0600, Guillermo E. Martinez via > > Elfu

Re: [PATCH v3] strip: keep .ctf section in stripped file

2023-02-24 Thread Guillermo E. Martinez via Elfutils-devel
On Fri, Feb 24, 2023 at 12:51:25PM +0100, Mark Wielaard wrote: > Hi Guillermo, > Hi Mark, > On Thu, Feb 23, 2023 at 12:42:37PM -0600, Guillermo E. Martinez via > Elfutils-devel wrote: > > This is the third version of the patch to avoid remove the CTF section in > > stripped files. Changes from

Re: [PATCH v3] strip: keep .ctf section in stripped file

2023-02-24 Thread Mark Wielaard
Hi Guillermo, On Thu, Feb 23, 2023 at 12:42:37PM -0600, Guillermo E. Martinez via Elfutils-devel wrote: > This is the third version of the patch to avoid remove the CTF section in > stripped files. Changes from v2: > > - Rebased from master. > > Please let me know your thoughts. > > CTF debu

[PATCH v3] strip: keep .ctf section in stripped file

2023-02-23 Thread Guillermo E. Martinez via Elfutils-devel
Hello, This is the third version of the patch to avoid remove the CTF section in stripped files. Changes from v2: - Rebased from master. Please let me know your thoughts. Kind regards, guillermo -- CTF debug format was designed to be present in stripped files, so this section should not be r