|
|
Message-ID: <20251121030009.GT1827@brightrain.aerifal.cx> Date: Thu, 20 Nov 2025 22:00:09 -0500 From: Rich Felker <dalias@...c.org> To: Bill Roberts <bill.roberts@...s.arm.com> Cc: musl@...ts.openwall.com, Szabolcs Nagy <nsz@...t70.net> Subject: Re: questions on src/ldso/aarch64/dlsym.s On Thu, Nov 20, 2025 at 08:49:07PM -0600, Bill Roberts wrote: > Howdy folks, > > I was hoping you could shed some light on src/ldso/aarch64/dlsym.s? As it's > not apparent to me how this stub gets executed. I have tried a few things to > no avail. I don't get how there is C symbols defined with the same name and > then these defined in asm, what am I missing, it seems obvious... > > ```asm > .global dlsym > .hidden __dlsym > .type dlsym,%function > dlsym: > mov x2,x30 > b __dlsym > ``` > > Thanks, > Bill In the make rules, presence of src/xxx/$ARCH/yyy.[csS] files replaces the corresponding src/xxx/yyy.c file and prevents the latter from being built at all. The above isn't a stub, it's the definition for the public dlsym symbol, and it calls the hidden __dlsym symbol. __dlsym in turn has an always-failing weak definition in src/ldso/__dlsym.c that's superseded by the actually-functional definition of __dlsym in ldso/dynlink.c for dynamic libc. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.