I meant that I can't create a __weak_alias ppoll(2) to pollts(2) in libc as pollts(2) has its definition in sys/sys. But yes the resulting weak alias symbol works from everywhere.
On Mon, 25 May, 2020, 14:59 Martin Husemann, <mar...@duskware.de> wrote: > On Mon, May 25, 2020 at 11:24:14AM +0200, Joerg Sonnenberger wrote: > > On Mon, May 25, 2020 at 10:06:22AM +0200, Martin Husemann wrote: > > > On Mon, May 25, 2020 at 12:20:53PM +0530, Apurva Nandan wrote: > > > > The problem with __weak_alias is that they only work inside the same > C file > > > > where the original symbol is defined, and don't work outside that > file for > > > > that symbol. > > > > > > That is not true. > > > > It is. ELF symbols are all attached an actual byte range. There is no > > way to create an indirect symbol. > > We must be talking about different things here. The weak alias has to be > defined in the same file as the syscall stub, but the resulting symbol > would work from everywhere - right? > > Martin >