Re: Question about elf symbol's file offset

2025-03-30 Thread Hengqi Chen
Hi Mark, Sorry for the late reply On Wed, Mar 19, 2025 at 8:55 PM Mark Wielaard wrote: > > Hi Hengqi, > > On Tue, 2025-03-11 at 13:27 +0800, Hengqi Chen wrote: > > I want to ask you a question regarding elf internals. > > How to calculate a symbol's file offset (which is kernel uprobe expects) >

Re: Question about elf symbol's file offset

2025-03-30 Thread Henning Meyer
The stripped redpanda binary you link to is systematically off by 2 in its dynamic symbol table: some data symbols point to section 7 (.rela.dyn), .rodata is 9 function symbols point to section 13 (.frame_ehdr), .text is 15 some data symbols (not TLS) point to section 20 (.tbss), .data.rel.ro is