NetBSD-Bugs archive

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

toolchain/57223: new binutils break evbarm kernels



>Number:         57223
>Category:       toolchain
>Synopsis:       new binutils break evbarm kernels
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 09 12:40:01 +0000 2023
>Originator:     Martin Husemann
>Release:        NetBSD 10.99.2
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD zero2.aprisoft.de 9.99.100 NetBSD 9.99.100 (GENERIC) #85: Thu Feb 9 13:12:37 CET 2023 martin%martins.aprisoft.de@localhost:/home/martin/wifi/sys/arch/evbarm/compile/GENERIC evbarm
Architecture: earmv7hfeb
Machine: evbarm
>Description:

After switching to new binutils, evbarm kernels do not boot any more.
New kernel output (with VERBOSE_INIT_ARM enabled):

## Booting kernel from Legacy Image at 42000000 ...
   Image Name:   NetBSD/earmv7hfeb 10.99.2
   Image Type:   ARM Linux Kernel Image (no loading done) (uncompressed)
   Data Size:    11751264 Bytes = 11.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 4f000000
   Booting using the fdt blob at 0x4f000000
   XIP Kernel Image (no loading done) ... OK
   Loading Device Tree to 49ff6000, end 49fffc64 ... OK

Starting kernel ...


pc    : 0x42000090
off   : 0xbdffffc0
sp    : 0x42c88040
panic: vtop not L1_FRAME aligned (0xbdffffc0)

The ELF header of the new kernel shows an entry point of 0:

ELF Header:
  Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, big endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          52 (bytes into file)
  Start of section headers:          13768996 (bytes into file)
  Flags:                             0x5800200, Version5 EABI, soft-float ABI, BE8
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         2
  Size of section headers:           40 (bytes)
  Number of section headers:         33
  Section header string table index: 32


while the old kernel showed 0x80000040 (i.e. KERNEL_BASE_virt):

ELF Header:
  Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, big endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x80000040
  Start of program headers:          52 (bytes into file)
  Start of section headers:          12950476 (bytes into file)
  Flags:                             0x5800200, Version5 EABI, soft-float ABI, BE8
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         2
  Size of section headers:           40 (bytes)
  Number of section headers:         31
  Section header string table index: 30


(which I do not quite understand, as the generated ldscript has

 ENTRY(KERNEL_BASE_phys)

which might be undefined at this point and only later is set to 0x00000040
(but I don't understand the ldscript language really).


>How-To-Repeat:

Boot some evbarm* kernel in -current (or check the b5 test runs:
https://releng.netbsd.org/b5reports/evbarm-earmv7hf/ )

>Fix:
n/a



Home | Main Index | Thread Index | Old Index