summaryrefslogtreecommitdiff
path: root/sys-apps/sparc-utils
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /sys-apps/sparc-utils
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'sys-apps/sparc-utils')
-rw-r--r--sys-apps/sparc-utils/Manifest3
-rw-r--r--sys-apps/sparc-utils/files/elftoaout-2.3-64bit_fixes-1.patch261
-rw-r--r--sys-apps/sparc-utils/sparc-utils-1.9-r6.ebuild (renamed from sys-apps/sparc-utils/sparc-utils-1.9-r5.ebuild)1
3 files changed, 264 insertions, 1 deletions
diff --git a/sys-apps/sparc-utils/Manifest b/sys-apps/sparc-utils/Manifest
index 21f4655f183a..ee60518746ce 100644
--- a/sys-apps/sparc-utils/Manifest
+++ b/sys-apps/sparc-utils/Manifest
@@ -1,5 +1,6 @@
+AUX elftoaout-2.3-64bit_fixes-1.patch 6806 BLAKE2B 49b9ce39d215496a858785c77c951d1ba2a920ff311e89c47993ee760a697781f925fe23d194a2e8fcac785c8f2c104fe3d186543bb2a8e094508cccebe9c2b1 SHA512 9d0363ec85c337de6e381d15b2bec68fb363b289b5b9e424c3963def31f445a1bcd1834bcae66b6ac3083dc6235ab0e130d0655ef427820305e546f11dd297c0
AUX sparc-utils-1.9-no-implicit.patch 584 BLAKE2B 153440b685bfd044c24f3da85598895724873b536628ec205c24028baf908e84008c0e629381a6f703f42baa7d6bef3534e77bb03af6dd3b23d9a9017a43ebda SHA512 302c29f1a33ea6b92184bd272fc974b1886168e7aa3d0f0cdcc117024475cf6b27eed9336f8b7edd84b40862144f58c3337fcc47cf3c1a744e5f4a71f8ee4f7f
DIST sparc-utils_1.9-4.diff.gz 9083 BLAKE2B e4b16c26fe67be73d0fd3ad8e1e80b19356d5961abac344f28650e4d355cac9c557999591947391c41be88d819ebb703ae1ff177b4fbe0d9bea7a411a791821f SHA512 ef79dc480471117da3a778450b3a122eaf64fdee69d35ff30b301f2360ff5d76c6343ce37c25cc188891c1619809daa0595d01c6e85781ddd7ddf1713c8378b7
DIST sparc-utils_1.9.orig.tar.gz 110080 BLAKE2B 52f47c130fb8e24b0340589c846292fb2e4e9b211a10cddf52a7a63edd70673e2b7d05c2415e558c5f2d1235f33f4ae65b777d3f8b2cf2c50a601d1f0a7a941a SHA512 bde05f1a98211aaf502be6dfd757ddfb21c136cedbb46ca84a4539706c71901815c9d8bedfebc3800c7340634b32276197c75f92f9cc829e4f50c37d203e9358
-EBUILD sparc-utils-1.9-r5.ebuild 1546 BLAKE2B 5123d5ebf807f9d52f452615f73067592af46a903584a1abd505baa085f29d010e2773c64fdc85c0a5b884742b78b1ccc2d867accf379536092db0d62a60d805 SHA512 90c68e797ce41ec6816b3c0c5e578b7ade6b8799424a3310bee599f6bd4cfab423a0ba70cce51c6eb95b72c0749f2627aff862cdc7cdf6f09d64ad670f8d3cbd
+EBUILD sparc-utils-1.9-r6.ebuild 1595 BLAKE2B 9a6a0436f6da5368a2167aef10251095c9e063c9ec1971c483c1980960710e7423385765a8dc33586894be7c57c7beadbeacd2e9b6c7047eea60af6a55b50558 SHA512 78b0d1d52e616eaa55f16de32b2854c011b07bd3239a1f89091d4084a8340d23ecac55a941a9d81d943cc7ac97b8d508bd422ffa7f9405bd247aab613d613ae5
MISC metadata.xml 416 BLAKE2B 3d0e052bc957750b869856cabb6e94d86dc1655e63da29ac3753c16d8437e7a9a97c89e225f03b6267bb32bdbe6215c25717f088684e493b5785a6d334854dd1 SHA512 c057eea9ea65b87cb366e802dd8962901024335a85b3ec53caa6c342c9e1a23e656dcadc2a70692e5e7ab55a0ac82637ef052699844f50061461a645613b688d
diff --git a/sys-apps/sparc-utils/files/elftoaout-2.3-64bit_fixes-1.patch b/sys-apps/sparc-utils/files/elftoaout-2.3-64bit_fixes-1.patch
new file mode 100644
index 000000000000..2be0e67184f6
--- /dev/null
+++ b/sys-apps/sparc-utils/files/elftoaout-2.3-64bit_fixes-1.patch
@@ -0,0 +1,261 @@
+Submitted By: Jim Gifford (patches at jg555 dot com)
+Date: 2006-01-03
+Initial Package Version: 2.3
+Origin: Dave Miller
+Upstream Status: Unknown
+Description: Fixes 64 Bit Issues with Elftoaout
+
+ https://marc.info/?l=linux-sparc&m=113617505627794&w=2
+
+diff -Naur elftoaout-2.3/elftoaout.c elftoaout-2.3/elftoaout.c
+--- a/elftoaout-2.3/elftoaout.c 2000-06-03 20:20:12.000000000 +0000
++++ b/elftoaout-2.3/elftoaout.c 2006-01-03 22:33:28.000000000 +0000
+@@ -20,16 +20,36 @@
+ */
+ #include <stdio.h>
+ #include <stdlib.h>
+-#ifdef linux
+ #include <linux/elf.h>
+-#define ELFDATA2MSB 2
+-#else
+-#include <sys/elf.h>
+-#endif
+-
+-#define swab16(x) (((x)<<8&0xFF00)|((x)>>8&0x00FF))
+-#define swab32(x) (((x)<<24&0xFF000000)|((x)<<8&0x00FF0000)|((x)>>24&0x000000FF)|((x)>>8&0x0000FF00))
+-#define swab64(x) ((((unsigned long long)(swab32((unsigned int)x))) << 32) | (swab32(((unsigned long long)x)>>32)))
++#include <sys/types.h>
++
++static inline u_int16_t swab16(u_int16_t x)
++{
++ return (((x << 8) & 0xFF00) |
++ ((x >> 8) & 0x00FF));
++}
++
++static inline u_int32_t swab32(u_int32_t x)
++{
++ return (((x << 24) & 0xFF000000) |
++ ((x << 8) & 0x00FF0000) |
++ ((x >> 24) & 0x000000FF) |
++ ((x >> 8) & 0x0000FF00));
++}
++
++static inline u_int64_t swab64(u_int64_t x)
++{
++ return ((u_int64_t)
++ ((u_int64_t)(((u_int64_t)x & (u_int64_t)0x00000000000000ffULL) << 56) |
++ (u_int64_t)(((u_int64_t)x & (u_int64_t)0x000000000000ff00ULL) << 40) |
++ (u_int64_t)(((u_int64_t)x & (u_int64_t)0x0000000000ff0000ULL) << 24) |
++ (u_int64_t)(((u_int64_t)x & (u_int64_t)0x00000000ff000000ULL) << 8) |
++ (u_int64_t)(((u_int64_t)x & (u_int64_t)0x000000ff00000000ULL) >> 8) |
++ (u_int64_t)(((u_int64_t)x & (u_int64_t)0x0000ff0000000000ULL) >> 24) |
++ (u_int64_t)(((u_int64_t)x & (u_int64_t)0x00ff000000000000ULL) >> 40) |
++ (u_int64_t)(((u_int64_t)x & (u_int64_t)0xff00000000000000ULL) >> 56)));
++}
++
+
+ /* We carry a.out header here in order to compile the thing on Solaris */
+
+@@ -37,14 +57,14 @@
+ #define CMAGIC 0x01030108
+
+ typedef struct {
+- unsigned long a_magic; /* magic number */
+- unsigned long a_text; /* size of text segment */
+- unsigned long a_data; /* size of initialized data */
+- unsigned long a_bss; /* size of uninitialized data */
+- unsigned long a_syms; /* size of symbol table || checksum */
+- unsigned long a_entry; /* entry point */
+- unsigned long a_trsize; /* size of text relocation */
+- unsigned long a_drsize; /* size of data relocation */
++ u_int32_t a_magic; /* magic number */
++ u_int32_t a_text; /* size of text segment */
++ u_int32_t a_data; /* size of initialized data */
++ u_int32_t a_bss; /* size of uninitialized data */
++ u_int32_t a_syms; /* size of symbol table || checksum */
++ u_int32_t a_entry; /* entry point */
++ u_int32_t a_trsize; /* size of text relocation */
++ u_int32_t a_drsize; /* size of data relocation */
+ } Exec;
+
+
+@@ -56,17 +76,16 @@
+ int swab;
+ int sparc64;
+ int csum;
+- /* friend void Usage(void); */
+ } Application;
+
+ typedef struct {
+ Elf32_Phdr *tab;
+- unsigned len;
++ unsigned int len;
+ } ProgTable;
+
+ typedef struct {
+ Elf64_Phdr *tab;
+- unsigned len;
++ unsigned int len;
+ } ProgTable64;
+
+ void get_ptab(ProgTable *t, FILE *inp, const Elf32_Ehdr *h);
+@@ -75,9 +94,9 @@
+ void print_ptab64(ProgTable64 *t);
+
+ typedef struct {
+- char *buf; /* Image data */
+- unsigned len; /* Length of buffer */
+- unsigned bss; /* Length of extra data */
++ unsigned char *buf; /* Image data */
++ unsigned int len; /* Length of buffer */
++ unsigned int bss; /* Length of extra data */
+ } Segment;
+
+ void load_image(Segment *t, const ProgTable *h, FILE *inp);
+@@ -105,7 +124,8 @@
+
+ parse_args(&prog, argc, argv);
+
+- if (prog.version) Version();
++ if (prog.version)
++ Version();
+
+ if (freopen(prog.iname, "r", stdin) == NULL) {
+ fprintf(stderr, "Cannot open \"%s\"\n", prog.iname);
+@@ -141,7 +161,8 @@
+ exit(0);
+ }
+
+-void parse_args( Application *t, unsigned argc, const char **argv ){
++void parse_args( Application *t, unsigned argc, const char **argv )
++{
+ const char *arg;
+ union {
+ char c[4];
+@@ -185,8 +206,8 @@
+ if (t->csum && t->sun4_mode) Usage (); /* Checksum lives in header. */
+ }
+
+-void get_header(Elf32_Ehdr *t, FILE *inp) {
+-
++void get_header(Elf32_Ehdr *t, FILE *inp)
++{
+ if (fread((void*) t, sizeof(Elf64_Ehdr), 1, inp) != 1) {
+ fprintf(stderr, "Read error on header\n");
+ exit(1);
+@@ -249,8 +270,9 @@
+ }
+ }
+
+-void get_ptab(ProgTable *t, FILE *inp, const Elf32_Ehdr *h) {
+- unsigned x;
++void get_ptab(ProgTable *t, FILE *inp, const Elf32_Ehdr *h)
++{
++ unsigned int x;
+
+ /** fprintf(stderr, "Program header table off = 0x%x\n",
+ (unsigned) h->e_phoff); **/
+@@ -294,8 +316,9 @@
+ }
+ }
+
+-void get_ptab64(ProgTable64 *t, FILE *inp, const Elf64_Ehdr *h) {
+- unsigned x;
++void get_ptab64(ProgTable64 *t, FILE *inp, const Elf64_Ehdr *h)
++{
++ unsigned int x;
+
+ if (h->e_phoff == 0) {
+ fprintf(stderr, "No Program Header Table\n");
+@@ -332,8 +355,9 @@
+ }
+ }
+
+-void print_ptab(ProgTable *t) {
+- unsigned x;
++void print_ptab(ProgTable *t)
++{
++ unsigned int x;
+ const Elf32_Phdr *p;
+
+ for (x = 0; x < t->len; x++) {
+@@ -374,8 +398,9 @@
+ }
+ }
+
+-void print_ptab64(ProgTable64 *t) {
+- unsigned x;
++void print_ptab64(ProgTable64 *t)
++{
++ unsigned int x;
+ const Elf64_Phdr *p;
+
+ for (x = 0; x < t->len; x++) {
+@@ -387,8 +412,11 @@
+ break;
+ case PT_LOAD:
+ printf("Loadable to 0x%Lx[0x%Lx] from 0x%Lx[0x%Lx] align 0x%Lx",
+- p->p_vaddr, p->p_memsz, p->p_offset, p->p_filesz,
+- p->p_align);
++ (unsigned long long) p->p_vaddr,
++ (unsigned long long) p->p_memsz,
++ (unsigned long long) p->p_offset,
++ (unsigned long long) p->p_filesz,
++ (unsigned long long) p->p_align);
+ break;
+ case PT_DYNAMIC:
+ printf("Dynamic");
+@@ -416,9 +444,10 @@
+ }
+ }
+
+-void load_image(Segment *t, const ProgTable *tp, FILE *inp) {
++void load_image(Segment *t, const ProgTable *tp, FILE *inp)
++{
+ Elf32_Phdr *p, *q;
+- unsigned x;
++ unsigned int x;
+ unsigned long off, len;
+
+ p = 0;
+@@ -484,9 +513,10 @@
+ }
+ }
+
+-void load_image64(Segment *t, const ProgTable64 *tp, FILE *inp) {
++void load_image64(Segment *t, const ProgTable64 *tp, FILE *inp)
++{
+ Elf64_Phdr *p, *q;
+- unsigned x;
++ unsigned int x;
+ unsigned long long off, len;
+
+ p = 0;
+@@ -547,7 +577,8 @@
+ }
+ }
+
+-void store_image(Segment *t, FILE *out) {
++void store_image(Segment *t, FILE *out)
++{
+ Exec ohdb;
+
+ if (prog.swab) {
+@@ -585,13 +616,15 @@
+ return;
+ }
+
+-void Usage(){
++void Usage()
++{
+ if (prog.version) Version();
+ fprintf(stderr, "Usage: elftoaout [-o output] [-c|-b] [-V] input\n");
+ exit(1);
+ }
+
+-void Version(){
++void Version()
++{
+ printf("elftoaout 2.3: ELF to a.out convertor for SPARC and SPARC64 bootstraps\n");
+ }
+
diff --git a/sys-apps/sparc-utils/sparc-utils-1.9-r5.ebuild b/sys-apps/sparc-utils/sparc-utils-1.9-r6.ebuild
index 3f13a6d64e5d..3aec8e00f8eb 100644
--- a/sys-apps/sparc-utils/sparc-utils-1.9-r5.ebuild
+++ b/sys-apps/sparc-utils/sparc-utils-1.9-r6.ebuild
@@ -23,6 +23,7 @@ S=${WORKDIR}/${P}.orig
PATCHES=(
"${WORKDIR}/${PN}_${PV}-4.diff"
"${FILESDIR}"/${P}-no-implicit.patch
+ "${FILESDIR}"/elftoaout-2.3-64bit_fixes-1.patch
)
src_compile() {