On Tue, Jul 24, 2012 at 9:11 PM, David Korn <d...@research.att.com> wrote: > cc: ast-developers@research.att.com > Subject: Re: Preventing linker from removing ksh93 builtins which are not > enabled by default ... / was: Re: [ast-developers] Prototype poll(1) > builtin... > -------- > >> On Fri, Jul 20, 2012 at 4:31 PM, Irek Szczesniak <iszczesn...@gmail.com> >> wrote: >> [snip] >> > 5. Linker issues: shtab_builtins in src/cmd/ksh93/data/builtins.c is a >> > NULL-terminated list. You can put builtins like poll(1) which should >> > not be enabled by default *after* the NULL slot.That should "anchor" >> > them. This would be a general solution to the ongoing s**t that a lot >> > of builtins are not available in the AT&T default binaries because the >> > *y************-linker removes them. >> >> I tried that... this prevents the |b_poll()| symbol from being removed >> at the final link step but ksh93 then won't be able to find it. It >> seems the problem is that ksh93 somehow doesn't look inside itself for >> builtins specified via $ builtin fooname #, e.g. without -f libname >> (and if I specify $ builtin -f $0 poll # ksh93 comes back and >> complains about the missing |plugin_version()|). >> >> Or short: Your "anchoring" idea works... but we need more work to make >> it practially useable... > > We could add another table of potential builtins, > > const struct shtable3 shtab_xbuiltins[] = > { > }; > > and then modify builtin to lookup the built-in in this > table after looking in loaded libraries and checking > that it is not already a built-in. > > Thus, shtab_xbuiltins will behave like a built-in library > except that each entry can have its own pathname associated with it.
Mhhh... before we do that I'd like to figure out why ksh93 can't find the "poll" builtin even if the |b_poll()| symbol is there... maybe we don't need any extra table (my guess is that ksh93 needs to be able to look inside ksh93 itself and libshell and ignore the whole |plugin_version()| thing for both). ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.ma...@nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) _______________________________________________ ast-developers mailing list ast-developers@research.att.com https://mailman.research.att.com/mailman/listinfo/ast-developers