[PATCH,RFC 0/7] Definition and Implementation of CTF Frame format

Michael Matz matz@suse.de
Fri May 13 13:08:40 GMT 2022


Hello,

On Fri, 6 May 2022, Indu Bhagat via Binutils wrote:

> PT_GNU_CTF_FRAME) in ELF linked binaries. The CTF Frame format specifies the
> minimal necessary unwind information, i.e., information needed to recover only
> the CFA and the return address (RA) for all insns of a program.  This
> information is a subset of what .eh_frame can convey: .eh_frame specifies how
> to resurrect all callee-saved registers, if need be.

So, it's designed to be less complete than .eh_frame.  That in itself is 
not a problem, but ...

> ratio = (.ctf_frame / (.eh_frame+.eh_frame_hdr))
> 
> ---------------------------------------------------
> program    |  [x86_64] ratio  |  [aarch64] ratio
> ---------------------------------------------------
> addr2line  |       1.13       |    0.67
> ar         |       1.03       |    0.70
> as         |       1.00       |    0.73
> c++filt    |       1.08       |    0.64
> elfedit    |       1.03       |    0.66
> gprof      |       1.06       |    0.71
> ld         |       1.02       |    0.73
> nm         |       1.07       |    0.69
> objcopy    |       1.08       |    0.72
> objdump    |       1.08       |    0.73
> size       |       1.10       |    0.67
> strings    |       1.09       |    0.67

... this is.  You need more space on x86-64 to store severely less 
information, and even on aarch64 the savings are meager when compared to 
the information loss.

So, hmm, who would want to ever enable .ctf_frame instead of .eh_frame?


Ciao,
Michael.


More information about the Binutils mailing list