[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Many of the example loadable builtins don't work anymore
From: |
Emanuele Torre |
Subject: |
Re: Many of the example loadable builtins don't work anymore |
Date: |
Sat, 25 Nov 2023 08:53:48 +0100 |
User-agent: |
Mutt/2.2.12 (2023-09-09) |
On Sat, Nov 25, 2023 at 04:32:36AM +0100, Emanuele Torre wrote:
> I've noticed that a lib/sh/compat.c file was added that still provides
> the declaration for the legacy legal_ functions.
>
> The bash executable I was getting from building the devel branch did not
> have those symbols though.
>
> The reason was that lib/sh/Makefile was not getting regenerated, so the
> recipe for libsh.a did not include compat.o.
>
> Re-building bash from a clean tree correctly produces a bash with legal_
> symbols.
Actually, nevermind that message. It still does not work. I was building
master instead of devel.
Now I can see that compat.o is actually being used to create
lib/sh/libsh.a, and that libsh.a contains the legal_ symbols
$ make -j
[...]
ar cr libsh.a clktck.o clock.o getenv.o oslib.o setlinebuf.o strnlen.o
itos.o zread.o zwrite.o shtty.o shmatch.o eaccess.o netconn.o netopen.o
timeval.o makepath.o pathcanon.o pathphys.o tmpfile.o stringlist.o stringvec.o
spell.o shquote.o strtrans.o snprintf.o mailstat.o fmtulong.o fmtullong.o
fmtumax.o zcatfd.o zmapfd.o winsize.o wcsdup.o fpurge.o zgetline.o mbscmp.o
mbsncmp.o uconvert.o ufuncs.o casemod.o input_avail.o mbscasecmp.o fnxform.o
unicode.o shmbchar.o strvis.o strscpy.o anonfile.o compat.o utf8.o random.o
gettimeofday.o timers.o wcsnwidth.o mbschr.o
[...]
$ grep -abo legal_identifier lib/sh/libsh.a
2579:legal_identifier
567032:legal_identifier
But the bash executable still does not contain the legal_ symbols:
$ grep -abo legal_identifier ./bash || echo nope
nope
$ ./bash -c 'enable -f {examples/loadables/,}mktemp; mktemp -v foo'
./bash: symbol lookup error: examples/loadables/mktemp: undefined symbol:
legal_identifier
o/
emanuele6