On Tuesday, May 31, 2022 2:06:26 AM CDT Mark Wielaard wrote: Hi, Mark > > On Mon, May 30, 2022 at 09:26:19PM -0500, Guillermo E. Martinez via > Elfutils-devel wrote: > > Hello elfutils team, > > > > This patch is meant to avoid remove the CTF section in > > stripped files. Please let me know your thoughts. > > > > CTF debug format was designed to be present in stripped files, so > > this section should not be removed, so a new --remove-ctf option > > is added to indicate explicitly that .ctf section will be stripped > > out from binary file. > > First, very nice patch. My only real concern with it is that it should > describe how the testfile-ctf.bz2 is generated. We don't want really > random test binaries in the testsuite. There should be at least some > method to regenerate them, even if we don't automate that. See > e.g. tests/run-readelf-n.sh which also uses binary test files, but has > a little description on how each of them was generated. sure, I will take a look in tests/run-readelf-n.sh to see how it can be regenerated and update it in patch v2.
> I am CCing Nick Clifton who works on binutils and annobin to check how > binutils strip handles this. And because we were recently discussing > putting some annobin data in a special section and how to indicate > that this section should be explicitly kept or removed. It would be > great if we could come to some kind of standard way of marking such > sections so we don't need special arguments for each such section or > at least have a more generic SECTION_STRIP_P macro. ok, let me check how strip from binutils keeps by default .ctf section. > Note, that this might not be possible, these sections might be to > different/specific that generalizing over them is impossible. But it > would be good to at least try and discuss it. If only so that elfutils > eu-strip and binutils strip agree on how to handle/coordinate on such > special sections. ok. [...] Thanks for your comments! guillermo