> > > > Date: Tue, 27 Feb 2018 22:30:43 +0100 (CET)
> > > > From: Mark Kettenis <mark.kette...@xs4all.nl>
> > > > 
...
> > > > The stack needs 8-byte alignment, so .align 3.  In a "bad" kernel I
> > > > have lying around the stack is properly aligned though.  But esym
> > > > isn't because .data isn't aligned properly.
> > > > 
> > > > The diff below fixes both issues.  I'll go through the other assembly
> > > > files and make sure the alignment of the .data and .bss is correct
> > > > there as well and I'll send a new diff if I find any further issues.
> > > > 
> > > > ok?

OK, it was able to relink kernels and reboot in a loop (I modified my 
/usr/libexec/reorder_kernel script to start with sleep 60 and end with reboot) 
for about 9 hours, then it had a hang after "checking quotas: done."

Cycling power and booting again on the same kernel got past that point though, 
after fscking, so I'm going to mark that down as a fluke. Maybe the microsd 
card had a problem, maybe there was a power glitch.

In any case, it's a LOT better than it was before. I was not able to do this 
relinking loop for more than ~30 minutes without having a hang before.

> > > > Index: arch/arm/arm/locore.S
> > > > ===================================================================
> > > > RCS file: /cvs/src/sys/arch/arm/arm/locore.S,v
> > > > retrieving revision 1.13
> > > > diff -u -p -r1.13 locore.S
> > > > --- arch/arm/arm/locore.S       6 Jan 2017 00:06:02 -0000       1.13
> > > > +++ arch/arm/arm/locore.S       27 Feb 2018 21:27:10 -0000
> > > > @@ -101,6 +101,7 @@ ASENTRY_NP(start)
> > > >         .align  2
> > > >  
> > > >         .bss
> > > > +       .align  3
> > > >  svcstk:
> > > >         .space  INIT_ARM_STACK_SIZE
> > > >  
> > > > @@ -179,6 +180,7 @@ ENTRY(longjmp)
> > > >         mov     pc, lr
> > > >  
> > > >         .data
> > > > +       .align  2
> > > >         .global _C_LABEL(esym)
> > > >  _C_LABEL(esym):        .word   _C_LABEL(end)
> > > >  
> > > > 
> > > > 

-- 
  Brandon Bergren
  Technical Generalist

Reply via email to