help-bash
[Top][All Lists]
Advanced

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

Re: trying to solve some missing symbols during linking (porting to Plan


From: Jens Staal
Subject: Re: trying to solve some missing symbols during linking (porting to Plan9)
Date: Tue, 15 Oct 2024 09:36:45 +0200

On Mon, Oct 14, 2024 at 08:38:18PM -0400, Chet Ramey wrote:
> On 10/14/24 1:42 PM, Jens Staal wrote:
> 
> > stack trace in acid:
> > 
> > acid: new()
> > 1420: system        call _main  MOVQ     AX,_tos(SB)
> > 1420: breakpoint    main+0x7    MOVL    BP,argc+0x0(FP)
> > acid: stk()
> > main(argc=0x0,argv=0x7fffffffefa0,env=0x532260) +0x7 (path)/bash/shell.c:370
> > _apemain(argc=0x1,argv=0x7ffffffefa0) +0x2d (path)/ap/plan9/callmain.c:39
> > _callmain +0x60 (path)/ap/plan9/callmain.c:31
> 
> Looks like it dies immediately. That probably indicates it doesn't like
> the bash malloc (fair, I never ported it to Plan 9).
> 
> You can build --without-bash-malloc to avoid it.
>

I did the build without malloc and minimal-sh config and I still had the
crash. xmalloc (in the list of bash object files) still needs to be
included in order to build bash.

term% acid bash
bash:amd64 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/amd64
acid: new()
14073: system call      _main   MOVQ    AX,_tos(SB)
14073: breakpoint       main+0x4        MOVL    BP,argc+0x0(FP)
acid: lstk()
main(argc=0x0,argv=0x7fffffffefa0,env=0x523080)+0x4 
/usr/glenda/APExp/sys/src/external/bash/shell.c:370
        arg_index=0x1300000021
        locally_skip_execution=0x2200000013
        i=0x25fd5800000003
        top_level_arg_index=0x2100000022
        old_errexit_flag=0x400000022
        t=0x300001b58
_apemain(argc=0x1,argv=0x7fffffffefa0)+0x2d 
/usr/glenda/APExp/sys/src/ape/lib/ap/plan9/callmain.c:39
_callmain+0x60 /usr/glenda/APExp/sys/src/ape/lib/ap/plan9/callmain.c:31
acid: 

I also eliminated a if(interactive_shell){} section in shell.c relating to 
term=emacs which is
not relevant. In the previous build, those variable names also popped up
in the lstk() output.

As I said. I am for sure out of my depth here.

> -- 
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/






reply via email to

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