bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: loadable builtins on HP-UX


From: Greg Wooledge
Subject: Re: loadable builtins on HP-UX
Date: Wed, 4 Nov 2015 09:04:45 -0500
User-agent: Mutt/1.4.2.3i

On Wed, Nov 04, 2015 at 12:09:56AM -0500, Mike Frysinger wrote:
> On 03 Nov 2015 18:25, Chet Ramey wrote:
> > On 11/3/15 4:45 PM, Greg Wooledge wrote:
> > > bash-4.4# enable -f ./tty tty
> > > bash-4.4# type -a tty
> > > tty is a shell builtin
> > > tty is /usr/bin/tty
> > > bash-4.4# tty
> > > /usr/lib/dld.sl: Unresolved symbol: reset_internal_getopt (code)  from 
> > > ./tty
> > > /usr/lib/dld.sl: Unresolved symbol: reset_internal_getopt (code)  from 
> > > ./tty
> > > ABORT instruction (core dumped)
> > 
> > It looks like shared objects loaded by dlopen don't have access to the
> > loading program's symbols.  That might be an HP-specific option to dlopen.
> > It might not, in which case you're out of luck.
> 
> FWIW, the option on linux is -rdynamic.  guess you'll (Greg) want to find
> the HP-UX equivalent to that.  see the configure.ac block for details.
> -mike

The linker option in HP-UX 11.11 is -E .  For gcc to pass it along,
the correct option is -Wl,-E .  I'm not sure how to do it if you're
using the pay-for HP C compiler.

bash-4.3# rm bash
bash-4.3# /usr/local/bin/make -n
rm -f bash
gcc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob -L./lib/tilde 
-L./lib/malloc -L./lib/sh    -g -O2 -Wno-parentheses -Wno-format-security -o 
bash shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o  dispose_cmd.o 
execute_cmd.o variables.o copy_cmd.o error.o expr.o flags.o jobs.o subst.o 
hashcmd.o hashlib.o mailcheck.o trap.o input.o unwind_prot.o pathexp.o sig.o 
test.o version.o alias.o array.o arrayfunc.o assoc.o braces.o bracecomp.o 
bashhist.o bashline.o siglist.o list.o stringlib.o locale.o findcmd.o redir.o 
pcomplete.o pcomplib.o syntax.o xmalloc.o  -lbuiltins -lglob -lsh -lreadline 
-lhistory -ltermcap -ltilde -lmalloc /usr/local/lib/libintl.sl -L/usr/local/lib 
/usr/local/lib/libiconv.sl /usr/local/lib/libiconv.sl -L/usr/local/lib  
ls -l bash
size bash
echo "bash last made for a hppa2.0w running hpux11.11" >.made


bash-4.3# gcc -Wl,-E -L./builtins -L./lib/readline -L./lib/readline 
-L./lib/glob -L./lib/tilde -L./lib/malloc -L./lib/sh    -g -O2 -Wno-parentheses 
-Wno-format-security -o bash shell.o eval.o y.tab.o general.o make_cmd.o 
print_cmd.o  dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o expr.o 
flags.o jobs.o subst.o hashcmd.o hashlib.o mailcheck.o trap.o input.o 
unwind_prot.o pathexp.o sig.o test.o version.o alias.o array.o arrayfunc.o 
assoc.o braces.o bracecomp.o bashhist.o bashline.o siglist.o list.o stringlib.o 
locale.o findcmd.o redir.o pcomplete.o pcomplib.o syntax.o xmalloc.o  
-lbuiltins -lglob -lsh -lreadline -lhistory -ltermcap -ltilde -lmalloc 
/usr/local/lib/libintl.sl -L/usr/local/lib /usr/local/lib/libiconv.sl 
/usr/local/lib/libiconv.sl -L/usr/local/lib
bash-4.3# ./bash
bash-4.4# cd examples/loadables/
bash-4.4# enable -f ./tty tty
bash-4.4# tty
/dev/pts/3


I don't



reply via email to

[Prev in Thread] Current Thread [Next in Thread]