Package: aboot Version: 1.0~pre20200212-1 Severity: important Dear Maintainer,
a.out support has been dropped in upstream kernel. However a.out.h header is still being using by abootimg tool via objstrip.c. It has support for both a.out image types and ELF. I have blidly dropped a.out.h support and made ELF support mandatory in https://lore.kernel.org/all/20231123180246.750674-2-dimitri.led...@canonical.com/ but I have no way to build it for alpha or test if everything still works. Upgrades, installed systems, and cd-boot. Could you please consider the attached NMU, build it and test it, and let me know if everything still works. Cause then a.out.h header can be removed from upstream linux kernel on all architectures. Regards, Dimitri.
diff -Nru aboot-1.0~pre20200212/debian/changelog aboot-1.0~pre20200212/debian/changelog --- aboot-1.0~pre20200212/debian/changelog 2020-03-07 11:12:47.000000000 +0000 +++ aboot-1.0~pre20200212/debian/changelog 2024-01-02 17:25:40.000000000 +0000 @@ -1,3 +1,11 @@ +aboot (1.0~pre20200212-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Drop a.out support from objstrip, and require ELF format. As a.out + support is long dead in upstream linux. + + -- Dimitri John Ledkov <dimitri.led...@canonical.com> Tue, 02 Jan 2024 17:25:40 +0000 + aboot (1.0~pre20200212-1) unstable; urgency=medium * New upstream version diff -Nru aboot-1.0~pre20200212/debian/patches/drop-a.out.patch aboot-1.0~pre20200212/debian/patches/drop-a.out.patch --- aboot-1.0~pre20200212/debian/patches/drop-a.out.patch 1970-01-01 01:00:00.000000000 +0100 +++ aboot-1.0~pre20200212/debian/patches/drop-a.out.patch 2024-01-02 17:24:24.000000000 +0000 @@ -0,0 +1,96 @@ +Subject: [PATCH 1/5] alpha: remove a.out support from tools/objstrip +Link: https://lore.kernel.org/all/20231123180246.750674-2-dimitri.led...@canonical.com/ + +As a.out support has been dropped from alpha port, drop a.out support +and make ELF support required. + +Only performed a test build on x86 for native x86 and cross-compiled +for alpha. + +Index: aboot-1.0~pre20200212/tools/objstrip.c +=================================================================== +--- aboot-1.0~pre20200212.orig/tools/objstrip.c ++++ aboot-1.0~pre20200212/tools/objstrip.c +@@ -20,17 +20,12 @@ + + #include <sys/fcntl.h> + #include <sys/stat.h> +-#include <sys/types.h> + +-#include <linux/a.out.h> +-#include <linux/coff.h> +-#include <linux/param.h> +-#ifdef __ELF__ +-# include <linux/elf.h> +-# define elfhdr elf64_hdr +-# define elf_phdr elf64_phdr +-# define elf_check_arch(x) ((x)->e_machine == EM_ALPHA) +-#endif ++#include <linux/elf.h> ++#define elfhdr elf64_hdr ++#define elf_phdr elf64_phdr ++#define elf_check_arch(x) ((x)->e_machine == EM_ALPHA) ++ + + /* bootfile size must be multiple of BLOCK_SIZE: */ + #define BLOCK_SIZE 512 +@@ -54,13 +49,10 @@ main (int argc, char *argv[]) + size_t nwritten, tocopy, n, mem_size, fil_size, pad = 0; + int fd, ofd, i, j, verbose = 0, primary = 0; + char buf[8192], *inname; +- struct exec * aout; /* includes file & aout header */ + long offset; +-#ifdef __ELF__ + struct elfhdr *elf; + struct elf_phdr *elf_phdr; /* program header */ + unsigned long long e_entry; +-#endif + + prog_name = argv[0]; + +@@ -144,7 +136,6 @@ main (int argc, char *argv[]) + exit(1); + } + +-#ifdef __ELF__ + elf = (struct elfhdr *) buf; + + if (elf->e_ident[0] == 0x7f && strncmp((char *)elf->e_ident + 1, "ELF", 3) == 0) { +@@ -191,37 +182,6 @@ main (int argc, char *argv[]) + prog_name, (long) elf_phdr->p_vaddr, + elf_phdr->p_vaddr + fil_size, offset); + } +- } else +-#endif +- { +- aout = (struct exec *) buf; +- +- if (!(aout->fh.f_flags & COFF_F_EXEC)) { +- fprintf(stderr, "%s: %s is not in executable format\n", +- prog_name, inname); +- exit(1); +- } +- +- if (aout->fh.f_opthdr != sizeof(aout->ah)) { +- fprintf(stderr, "%s: %s has unexpected optional header size\n", +- prog_name, inname); +- exit(1); +- } +- +- if (N_MAGIC(*aout) != OMAGIC) { +- fprintf(stderr, "%s: %s is not an OMAGIC file\n", +- prog_name, inname); +- exit(1); +- } +- offset = N_TXTOFF(*aout); +- fil_size = aout->ah.tsize + aout->ah.dsize; +- mem_size = fil_size + aout->ah.bsize; +- +- if (verbose) { +- fprintf(stderr, "%s: extracting %#016lx-%#016lx (at %lx)\n", +- prog_name, aout->ah.text_start, +- aout->ah.text_start + fil_size, offset); +- } + } + + if (lseek(fd, offset, SEEK_SET) != offset) { diff -Nru aboot-1.0~pre20200212/debian/patches/series aboot-1.0~pre20200212/debian/patches/series --- aboot-1.0~pre20200212/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ aboot-1.0~pre20200212/debian/patches/series 2024-01-02 17:22:53.000000000 +0000 @@ -0,0 +1 @@ +drop-a.out.patch