Re: Question about elf symbol's file offset

2025-03-30 Thread Henning Meyer
Chen wrote: 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 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 (w

Re: Question about elf symbol's file offset

2025-03-19 Thread Mark Wielaard
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) > in an elf (executable or shared object)? Could you point me to a description

Question about elf symbol's file offset

2025-03-10 Thread Hengqi Chen
Hi Mark, I want to ask you a question regarding elf internals. How to calculate a symbol's file offset (which is kernel uprobe expects) in an elf (executable or shared object)? Some real world use case use either section header like libbpf: https://github.com/libbpf/libbpf

Re: Question

2021-04-30 Thread Mark Wielaard
On Fri, 2021-04-30 at 13:06 -0400, Frank Ch. Eigler via Elfutils-devel wrote: > AIUI, the informal answer is: you choose. You don't have to make a > statement about what you're doing. Sometimes people communicate it by > removing one or the other license permission in a derived work. Or if > e.g

Re: Question

2021-04-30 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Hi, my name is John V. and I am seeking to use libelf. Welcome. > I notice from the Elfutils web page at sourceware.org/elfutils under > the section entitled “License” that “The libraries and backends are > dual GPLv2+/LGPLv3+.” Yes. > Does this mean that I can pick and choose to use li

Question

2021-04-30 Thread John Vassiliades
Hi, my name is John V. and I am seeking to use libelf. I notice from the Elfutils web page at sourceware.org/elfutils under the section entitled “License” that “The libraries and backends are dual GPLv2+/LGPLv3+.” Does this mean that I can pick and choose to use libelf under either the GPLv2+

Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-28 Thread Rich Felker
On Wed, Oct 28, 2020 at 11:05:58AM +0100, Mark Wielaard wrote: > Hi Rich, > > On Tue, 2020-10-27 at 18:25 -0400, Rich Felker wrote: > > On Tue, Oct 27, 2020 at 11:19:11PM +0100, Mark Wielaard wrote: > > > On Tue, Oct 27, 2020 at 01:08:17PM -0400, Rich Felker wrote: > > > > They do because they're

Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-28 Thread Mark Wielaard
Hi Rich, On Tue, 2020-10-27 at 18:25 -0400, Rich Felker wrote: > On Tue, Oct 27, 2020 at 11:19:11PM +0100, Mark Wielaard wrote: > > On Tue, Oct 27, 2020 at 01:08:17PM -0400, Rich Felker wrote: > > > They do because they're also in space, unless you want > > > exponential-time which is huge even on

Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-27 Thread Rich Felker
On Tue, Oct 27, 2020 at 11:19:11PM +0100, Mark Wielaard wrote: > Hi Rich, > > On Tue, Oct 27, 2020 at 01:08:17PM -0400, Rich Felker wrote: > > On Tue, Oct 27, 2020 at 04:04:44PM +0100, Mark Wielaard wrote: > > > Right, it is also adopted by zsh and some other shells. The big-O > > > properties don

Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-27 Thread Mark Wielaard
Hi Rich, On Tue, Oct 27, 2020 at 01:08:17PM -0400, Rich Felker wrote: > On Tue, Oct 27, 2020 at 04:04:44PM +0100, Mark Wielaard wrote: > > Right, it is also adopted by zsh and some other shells. The big-O > > properties don't really matter in this case because fnmatch is used on > > small input st

Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-27 Thread Rich Felker
On Tue, Oct 27, 2020 at 04:04:44PM +0100, Mark Wielaard wrote: > On Tue, 2020-10-27 at 10:19 +0100, Florian Weimer via Elfutils-devel > wrote: > > * Rich Felker: > > > > > As I stated in my other reply, I'm opposed to that because it does not > > > admit implementation with the same (very desirabl

Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-27 Thread Mark Wielaard
On Tue, 2020-10-27 at 10:19 +0100, Florian Weimer via Elfutils-devel wrote: > * Rich Felker: > > > As I stated in my other reply, I'm opposed to that because it does not > > admit implementation with the same (very desirable) big-O properties, > > and the "extmatch" syntax is not widely known or w

Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-27 Thread Florian Weimer via Elfutils-devel
* Rich Felker: > As I stated in my other reply, I'm opposed to that because it does not > admit implementation with the same (very desirable) big-O properties, > and the "extmatch" syntax is not widely known or widely used. The syntax comes from ksh and is used in shell scripts. (bash requires t

Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-26 Thread Rich Felker
On Mon, Oct 26, 2020 at 11:32:23PM +0100, Mark Wielaard wrote: > Hi Max, > > On Mon, 2020-10-26 at 13:54 -0400, Max Rees via Elfutils-devel wrote: > > On Mon Oct 26 01:28 PM, Érico Nogueira wrote: > > > On Mon Oct 26, 2020 at 3:10 PM -03, Mark Wielaard wrote: > > > > On Mon, 2020-10-26 at 12:03 -0

Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-26 Thread Mark Wielaard
Hi Max, On Mon, 2020-10-26 at 13:54 -0400, Max Rees via Elfutils-devel wrote: > On Mon Oct 26 01:28 PM, Érico Nogueira wrote: > > On Mon Oct 26, 2020 at 3:10 PM -03, Mark Wielaard wrote: > > > On Mon, 2020-10-26 at 12:03 -0300, Érico Nogueira via Elfutils- > > > devel > > > wrote: > > > > Do elfut

Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-26 Thread Rich Felker
On Mon, Oct 26, 2020 at 02:28:59PM -0300, Érico Nogueira wrote: > On Mon Oct 26, 2020 at 3:10 PM -03, Mark Wielaard wrote: > > Hi Érico, > > > > On Mon, 2020-10-26 at 12:03 -0300, Érico Nogueira via Elfutils-devel > > wrote: > > > Do elfutils program actually depend on the extra functionality > > >

Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-26 Thread Max Rees via Elfutils-devel
On Mon Oct 26 01:28 PM, Érico Nogueira wrote: > On Mon Oct 26, 2020 at 3:10 PM -03, Mark Wielaard wrote: > > Hi Érico, > > > > On Mon, 2020-10-26 at 12:03 -0300, Érico Nogueira via Elfutils-devel > > wrote: > > > Do elfutils program actually depend on the extra functionality > > > enabled by > > >

Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-26 Thread Érico Nogueira via Elfutils-devel
On Mon Oct 26, 2020 at 3:10 PM -03, Mark Wielaard wrote: > Hi Érico, > > On Mon, 2020-10-26 at 12:03 -0300, Érico Nogueira via Elfutils-devel > wrote: > > Do elfutils program actually depend on the extra functionality > > enabled by > > FNM_EXTMATCH? Is changing the flag to have no effect a "bug"?

Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-26 Thread Mark Wielaard
Hi Érico, On Mon, 2020-10-26 at 12:03 -0300, Érico Nogueira via Elfutils-devel wrote: > Do elfutils program actually depend on the extra functionality > enabled by > FNM_EXTMATCH? Is changing the flag to have no effect a "bug"? Yes. The extended wildcard pattern is relied upon by both eu-strip wi

[QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-26 Thread Érico Nogueira via Elfutils-devel
From: Érico Rolim Hi! Musl currently doesn't support the FNM_EXTMATCH extension to fnmatch(), leading most musl-based distros to patch the elfutils build to define FNM_EXTMATCH to 0. Do elfutils program actually depend on the extra functionality enabled by FNM_EXTMATCH? Is changing the flag to

Re: Question on how to copy an elf file and edit the .preinit_array section

2020-06-24 Thread Anastasios Andronidis via Elfutils-devel
Hello Mark, thanks a billion for you answer! You gave me a very good starting point! Kindly, Anastasios > On 19 Jun 2020, at 21:15, Mark Wielaard wrote: > > Hi, > > On Thu, 2020-06-11 at 15:25 +0100, Anastasios Andronidis via Elfutils- > devel wrote: >> Could someone please help me with this

Re: Question on how to copy an elf file and edit the .preinit_array section

2020-06-19 Thread Mark Wielaard
Hi, On Thu, 2020-06-11 at 15:25 +0100, Anastasios Andronidis via Elfutils- devel wrote: > Could someone please help me with this: > https://stackoverflow.com/questions/62293512/inject-a-preinit-array-section-in-an-elf-file-with-libelf > > I'm trying to do some runtime manipulation of an elf fil

Question on how to copy an elf file and edit the .preinit_array section

2020-06-11 Thread Anastasios Andronidis via Elfutils-devel
Hello everyone! Could someone please help me with this: https://stackoverflow.com/questions/62293512/inject-a-preinit-array-section-in-an-elf-file-with-libelf I'm trying to do some runtime manipulation of an elf file and I'm a little bit lost with how to use libelf :/ Basically I want to copy