Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11834

Re: loadable builtins on HP-UX

From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups gnu.bash.bug
Subject Re: loadable builtins on HP-UX
Date 2015-11-04 09:04 -0500
Message-ID <mailman.1680.1446645897.7904.bug-bash@gnu.org> (permalink)
References <20151103214551.GI27325@eeg.ccf.org> <56394274.9050607@case.edu> <20151104050956.GW5154@vapier.lan>

Show all headers | View raw


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

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: loadable builtins on HP-UX Greg Wooledge <wooledg@eeg.ccf.org> - 2015-11-04 09:04 -0500

csiph-web