Upgrade to LLD 14

Previous linker versions had inserted some zero padding bytes
between the ELF headers and the first section, but LLD 14 does
not anymore.

Hard-coding the offset of the first section in ksupport.elf
manually isn't ideal; we should probably parse the ELF program
headers instead when first setting up the kernel CPU.
pull/2158/head
David Nadlinger 2023-08-06 08:20:12 +08:00 committed by Sébastien Bourdeauducq
parent 3ed7e0ed06
commit 4d636ea593
3 changed files with 12 additions and 9 deletions

View File

@ -17,7 +17,7 @@ void send_to_rtio_log(struct slice data);
#define KERNELCPU_EXEC_ADDRESS 0x45000000
#define KERNELCPU_PAYLOAD_ADDRESS 0x45060000
#define KERNELCPU_LAST_ADDRESS 0x4fffffff
#define KSUPPORT_HEADER_SIZE 0x80
#define KSUPPORT_HEADER_SIZE 0x74
FILE *stderr;

View File

@ -5,7 +5,10 @@ use dyld;
pub const KERNELCPU_EXEC_ADDRESS: usize = 0x45000000;
pub const KERNELCPU_PAYLOAD_ADDRESS: usize = 0x45060000;
pub const KERNELCPU_LAST_ADDRESS: usize = 0x4fffffff;
pub const KSUPPORT_HEADER_SIZE: usize = 0x80;
// Must match the offset of the first (starting at KERNELCPU_EXEC_ADDRESS)
// section in ksupport.elf.
pub const KSUPPORT_HEADER_SIZE: usize = 0x74;
#[derive(Debug)]
pub enum Message<'a> {

View File

@ -124,7 +124,7 @@
nativeBuildInputs = [ pkgs.qt5.wrapQtAppsHook ];
# keep llvm_x and lld_x in sync with llvmlite
propagatedBuildInputs = [ pkgs.llvm_11 pkgs.lld_11 sipyco.packages.x86_64-linux.sipyco pythonparser pkgs.qt5.qtsvg artiq-comtools.packages.x86_64-linux.artiq-comtools ]
propagatedBuildInputs = [ pkgs.llvm_11 pkgs.lld_14 sipyco.packages.x86_64-linux.sipyco pythonparser pkgs.qt5.qtsvg artiq-comtools.packages.x86_64-linux.artiq-comtools ]
++ (with pkgs.python3Packages; [ llvmlite pyqtgraph pygit2 numpy dateutil scipy prettytable pyserial levenshtein h5py pyqt5 qasync tqdm lmdb jsonschema ]);
dontWrapQtApps = true;
@ -147,10 +147,10 @@
"--set FONTCONFIG_FILE ${pkgs.fontconfig.out}/etc/fonts/fonts.conf"
];
# FIXME: automatically propagate lld_11 llvm_11 dependencies
# FIXME: automatically propagate lld_14 llvm_11 dependencies
# cacert is required in the check stage only, as certificates are to be
# obtained from system elsewhere
nativeCheckInputs = [ pkgs.lld_11 pkgs.llvm_11 libartiq-support pkgs.lit outputcheck pkgs.cacert ];
nativeCheckInputs = [ pkgs.lld_14 pkgs.llvm_11 libartiq-support pkgs.lit outputcheck pkgs.cacert ];
checkPhase = ''
python -m unittest discover -v artiq.test
@ -229,7 +229,7 @@
pkgs.cargo-xbuild
pkgs.llvmPackages_11.clang-unwrapped
pkgs.llvm_11
pkgs.lld_11
pkgs.lld_14
vivado
rustPlatform.cargoSetupHook
];
@ -392,7 +392,7 @@
pkgs.cargo-xbuild
pkgs.llvmPackages_11.clang-unwrapped
pkgs.llvm_11
pkgs.lld_11
pkgs.lld_14
# To manually run compiler tests:
pkgs.lit
outputcheck
@ -420,7 +420,7 @@
pkgs.cargo-xbuild
pkgs.llvmPackages_11.clang-unwrapped
pkgs.llvm_11
pkgs.lld_11
pkgs.lld_14
packages.x86_64-linux.vivado
packages.x86_64-linux.openocd-bscanspi
];
@ -454,7 +454,7 @@
buildInputs = [
(pkgs.python3.withPackages(ps: with packages.x86_64-linux; [ artiq ps.paramiko ]))
pkgs.llvm_11
pkgs.lld_11
pkgs.lld_14
pkgs.openssh
packages.x86_64-linux.openocd-bscanspi # for the bscanspi bitstreams
];