diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-util/elfkickers/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-util/elfkickers/files')
5 files changed, 304 insertions, 0 deletions
diff --git a/dev-util/elfkickers/files/add-freebsd-elf-defs.patch b/dev-util/elfkickers/files/add-freebsd-elf-defs.patch new file mode 100644 index 000000000000..792a91d6dfb2 --- /dev/null +++ b/dev-util/elfkickers/files/add-freebsd-elf-defs.patch @@ -0,0 +1,68 @@ +--- ./elfrw/elfrw.h.orig 2011-05-31 01:47:08.000000000 +0200 ++++ ./elfrw/elfrw.h 2011-06-08 12:16:37.000000000 +0200 +@@ -10,6 +10,24 @@ + #include <stdio.h> + #include <elf.h> + ++#ifdef __FreeBSD__ ++typedef uint16_t Elf64_Section; ++ ++#define PT_GNU_STACK 0x6474e551 ++#define PT_GNU_RELRO 0x6474e552 ++ ++#if __FreeBSD_version < 700022 ++#define SHT_GNU_HASH 0x6ffffff6 ++#define EM_CRIS 76 ++#define EM_M32R 88 ++#define EM_MN10300 89 ++#endif ++ ++#define ELFCLASSNUM 3 ++#define ELFDATANUM 3 ++#define EV_NUM 2 ++#endif ++ + /* + * The initialization functions. Call one of these to set the flavor + * of ELF structures to translate to and from. The library can be +--- ./elftoc/readelf.h.orig 2011-05-22 20:46:29.000000000 +0200 ++++ ./elftoc/readelf.h 2011-06-08 12:16:37.000000000 +0200 +@@ -7,6 +7,12 @@ + #ifndef _readelf_h_ + #define _readelf_h_ + ++#ifdef __FreeBSD__ ++#define ELFCLASSNUM 3 ++#define ELFDATANUM 3 ++#define EV_NUM 2 ++#endif ++ + /* Read all of the basic headers from the file image (namely the ELF + * header, the program segment header table, and the section header + * table). False is returned if the file could not be parsed as an ELF +--- ./elftoc/pieces.c.orig 2011-05-26 03:25:14.000000000 +0200 ++++ ./elftoc/pieces.c 2011-06-08 12:16:37.000000000 +0200 +@@ -16,6 +16,10 @@ + #include "out.h" + #include "pieces.h" + ++#ifdef __FreeBSD__ ++typedef uint64_t Elf32_Xword; ++#endif ++ + /* Flags used to insert warnings in the generated source code. + */ + #define PW_MISALIGNED 0x0001 /* piece misaligned for original type */ +--- ./elftoc/outbase.h.orig 2011-05-22 20:46:29.000000000 +0200 ++++ ./elftoc/outbase.h 2011-06-08 12:16:37.000000000 +0200 +@@ -7,6 +7,10 @@ + #ifndef _outbase_h_ + #define _outbase_h_ + ++#ifdef __FreeBSD__ ++#define NT_AUXV 6 ++#endif ++ + /* Set the current output file. Call this before calling any output + * functions. (The FILE* argument is given as a void* so as to not + * include stdio.h here.) diff --git a/dev-util/elfkickers/files/create-destdir-path.patch b/dev-util/elfkickers/files/create-destdir-path.patch new file mode 100644 index 000000000000..d279db0ad606 --- /dev/null +++ b/dev-util/elfkickers/files/create-destdir-path.patch @@ -0,0 +1,14 @@ +--- Makefile.orig 2011-05-30 16:37:41.000000000 -0400 ++++ Makefile 2011-05-30 16:38:30.000000000 -0400 +@@ -22,8 +22,9 @@ + infect: bin/infect doc/infect.1 + + install: $(PROGRAMS:%=bin/%) +- cp bin/* $(prefix)/bin/. +- cp doc/* $(prefix)/share/man/man1/. ++ install -d $(prefix)/usr/bin $(prefix)/usr/share/man/man1 ++ install bin/* $(prefix)/usr/bin ++ install -m 644 doc/* $(prefix)/usr/share/man/man1 + + clean: + for dir in elfrw $(PROGRAMS) ; do $(MAKE) -C$$dir clean ; done diff --git a/dev-util/elfkickers/files/elfkickers-3.1-create-destdir-path.patch b/dev-util/elfkickers/files/elfkickers-3.1-create-destdir-path.patch new file mode 100644 index 000000000000..1f0c3e94fe9b --- /dev/null +++ b/dev-util/elfkickers/files/elfkickers-3.1-create-destdir-path.patch @@ -0,0 +1,17 @@ +diff -Naur ELFkickers-3.1.orig/Makefile ELFkickers-3.1/Makefile +--- ELFkickers-3.1.orig/Makefile 2015-07-23 13:25:30.000000000 -0400 ++++ ELFkickers-3.1/Makefile 2016-11-16 17:17:08.237039268 -0500 +@@ -24,10 +24,9 @@ + infect: bin/infect doc/infect.1 + + install: $(PROGRAMS) +- mkdir -p $(prefix)/bin +- cp bin/* $(prefix)/bin/. +- mkdir -p $(prefix)/share/man/man1 +- cp doc/* $(prefix)/share/man/man1/. ++ install -d $(prefix)/usr/bin $(prefix)/usr/share/man/man1 ++ install bin/* $(prefix)/usr/bin ++ install -m 644 doc/* $(prefix)/usr/share/man/man1 + + clean: + for dir in elfrw $(PROGRAMS) ; do $(MAKE) -C$$dir clean ; done diff --git a/dev-util/elfkickers/files/elfkickers-3.1-respect-CFLAGS-LDFLAGS.patch b/dev-util/elfkickers/files/elfkickers-3.1-respect-CFLAGS-LDFLAGS.patch new file mode 100644 index 000000000000..b285f3b2509c --- /dev/null +++ b/dev-util/elfkickers/files/elfkickers-3.1-respect-CFLAGS-LDFLAGS.patch @@ -0,0 +1,103 @@ +diff -Naur ELFkickers-3.1.orig/ebfc/Makefile ELFkickers-3.1/ebfc/Makefile +--- ELFkickers-3.1.orig/ebfc/Makefile 2014-11-17 14:50:34.000000000 -0500 ++++ ELFkickers-3.1/ebfc/Makefile 2016-11-16 17:13:53.297033908 -0500 +@@ -1,7 +1,7 @@ + # Makefile for ebfc + +-CC = gcc +-CFLAGS = -Wall -Wextra -Wno-missing-field-initializers ++CC ?= gcc ++CFLAGS += -Wno-missing-field-initializers + + ebfc: ebfc.o brainfuck.o libelfparts.a + +diff -Naur ELFkickers-3.1.orig/elfls/Makefile ELFkickers-3.1/elfls/Makefile +--- ELFkickers-3.1.orig/elfls/Makefile 2011-05-31 02:53:05.000000000 -0400 ++++ ELFkickers-3.1/elfls/Makefile 2016-11-16 17:12:48.885032137 -0500 +@@ -1,7 +1,7 @@ + # Makefile for elfls + +-CC = gcc +-CFLAGS = -Wall -Wextra -I../elfrw ++CC ?= gcc ++CFLAGS += -I../elfrw + + elfls: elfls.c ../elfrw/libelfrw.a + +diff -Naur ELFkickers-3.1.orig/elfrw/Makefile ELFkickers-3.1/elfrw/Makefile +--- ELFkickers-3.1.orig/elfrw/Makefile 2011-05-22 14:02:12.000000000 -0400 ++++ ELFkickers-3.1/elfrw/Makefile 2016-11-16 17:13:06.653032625 -0500 +@@ -1,7 +1,6 @@ + # Makefile for libelfrw.a + +-CC = gcc +-CFLAGS = -Wall -Wextra -O3 ++CC ?= gcc + + LIBOBJS = elfrw.o elfrw_dyn.o elfrw_ehdr.o elfrw_phdr.o elfrw_rel.o \ + elfrw_shdr.o elfrw_sym.o elfrw_ver.o +diff -Naur ELFkickers-3.1.orig/elftoc/Makefile ELFkickers-3.1/elftoc/Makefile +--- ELFkickers-3.1.orig/elftoc/Makefile 2011-05-23 23:30:22.000000000 -0400 ++++ ELFkickers-3.1/elftoc/Makefile 2016-11-16 17:12:57.549032375 -0500 +@@ -1,8 +1,6 @@ + # Makefile for elftoc + +-CC = gcc +-CFLAGS = -Wall -Wextra +-LDFLAGS = -Wall -Wextra ++CC ?= gcc + + OBJS = gen.o names.o address.o readelf.o shdrtab.o phdrtab.o dynamic.o \ + pieces.o outbase.o outitems.o outelf64.o outelf32.o out.o elftoc.o +diff -Naur ELFkickers-3.1.orig/infect/Makefile ELFkickers-3.1/infect/Makefile +--- ELFkickers-3.1.orig/infect/Makefile 2011-05-31 02:52:27.000000000 -0400 ++++ ELFkickers-3.1/infect/Makefile 2016-11-16 17:12:30.617031634 -0500 +@@ -1,7 +1,6 @@ + # Makefile for infect + +-CC = gcc +-CFLAGS = -Wall -Wextra ++CC ?= gcc + + infect: infect.c + +diff -Naur ELFkickers-3.1.orig/objres/Makefile ELFkickers-3.1/objres/Makefile +--- ELFkickers-3.1.orig/objres/Makefile 2016-11-14 16:46:24.000000000 -0500 ++++ ELFkickers-3.1/objres/Makefile 2016-11-16 17:13:40.225033549 -0500 +@@ -1,8 +1,7 @@ + # Makefile for objres + +-CC = gcc +-CFLAGS = -Wall -Wextra -I../elfrw +-LDFLAGS = -Wall -Wextra ++CC ?= gcc ++CFLAGS += -I../elfrw + + objres: objres.o ../elfrw/libelfrw.a + +diff -Naur ELFkickers-3.1.orig/rebind/Makefile ELFkickers-3.1/rebind/Makefile +--- ELFkickers-3.1.orig/rebind/Makefile 2011-05-23 23:29:16.000000000 -0400 ++++ ELFkickers-3.1/rebind/Makefile 2016-11-16 17:13:17.373032920 -0500 +@@ -1,7 +1,7 @@ + # Makefile for rebind + +-CC = gcc +-CFLAGS = -Wall -Wextra -I../elfrw ++CC ?= gcc ++CFLAGS += -I../elfrw + + rebind: rebind.c ../elfrw/libelfrw.a + +diff -Naur ELFkickers-3.1.orig/sstrip/Makefile ELFkickers-3.1/sstrip/Makefile +--- ELFkickers-3.1.orig/sstrip/Makefile 2011-05-23 23:29:58.000000000 -0400 ++++ ELFkickers-3.1/sstrip/Makefile 2016-11-16 17:14:05.949034256 -0500 +@@ -1,7 +1,7 @@ + # Makefile for sstrip + +-CC = gcc +-CFLAGS = -Wall -Wextra -I../elfrw ++CC ?= gcc ++CFLAGS += -I../elfrw + + sstrip: sstrip.c ../elfrw/libelfrw.a + diff --git a/dev-util/elfkickers/files/respect-CFLAGS-LDFLAGS.patch b/dev-util/elfkickers/files/respect-CFLAGS-LDFLAGS.patch new file mode 100644 index 000000000000..6663ef8e79af --- /dev/null +++ b/dev-util/elfkickers/files/respect-CFLAGS-LDFLAGS.patch @@ -0,0 +1,102 @@ +diff -Naur ELFkickers-3.0.orig//ebfc/Makefile ELFkickers-3.0/ebfc/Makefile +--- ELFkickers-3.0.orig//ebfc/Makefile 2011-05-24 00:51:07.000000000 -0400 ++++ ELFkickers-3.0/ebfc/Makefile 2011-06-02 23:05:30.000000000 -0400 +@@ -1,7 +1,7 @@ + # Makefile for ebfc + +-CC = gcc +-CFLAGS = -Wall -Wextra -Wno-missing-field-initializers ++CC ?= gcc ++CFLAGS += -Wno-missing-field-initializers + + ebfc: ebfc.o brainfuck.o libelfparts.a + +diff -Naur ELFkickers-3.0.orig//elfls/Makefile ELFkickers-3.0/elfls/Makefile +--- ELFkickers-3.0.orig//elfls/Makefile 2011-05-31 02:53:05.000000000 -0400 ++++ ELFkickers-3.0/elfls/Makefile 2011-06-02 23:04:15.000000000 -0400 +@@ -1,7 +1,7 @@ + # Makefile for elfls + +-CC = gcc +-CFLAGS = -Wall -Wextra -I../elfrw ++CC ?= gcc ++CFLAGS += -I../elfrw + + elfls: elfls.c ../elfrw/libelfrw.a + +diff -Naur ELFkickers-3.0.orig//elfrw/Makefile ELFkickers-3.0/elfrw/Makefile +--- ELFkickers-3.0.orig//elfrw/Makefile 2011-05-22 14:02:12.000000000 -0400 ++++ ELFkickers-3.0/elfrw/Makefile 2011-06-02 23:04:37.000000000 -0400 +@@ -1,7 +1,6 @@ + # Makefile for libelfrw.a + +-CC = gcc +-CFLAGS = -Wall -Wextra -O3 ++CC ?= gcc + + LIBOBJS = elfrw.o elfrw_dyn.o elfrw_ehdr.o elfrw_phdr.o elfrw_rel.o \ + elfrw_shdr.o elfrw_sym.o elfrw_ver.o +diff -Naur ELFkickers-3.0.orig//elftoc/Makefile ELFkickers-3.0/elftoc/Makefile +--- ELFkickers-3.0.orig//elftoc/Makefile 2011-05-23 23:30:22.000000000 -0400 ++++ ELFkickers-3.0/elftoc/Makefile 2011-06-02 23:04:27.000000000 -0400 +@@ -1,8 +1,6 @@ + # Makefile for elftoc + +-CC = gcc +-CFLAGS = -Wall -Wextra +-LDFLAGS = -Wall -Wextra ++CC ?= gcc + + OBJS = gen.o names.o address.o readelf.o shdrtab.o phdrtab.o dynamic.o \ + pieces.o outbase.o outitems.o outelf64.o outelf32.o out.o elftoc.o +diff -Naur ELFkickers-3.0.orig//infect/Makefile ELFkickers-3.0/infect/Makefile +--- ELFkickers-3.0.orig//infect/Makefile 2011-05-31 02:52:27.000000000 -0400 ++++ ELFkickers-3.0/infect/Makefile 2011-06-02 23:04:01.000000000 -0400 +@@ -1,7 +1,6 @@ + # Makefile for infect + +-CC = gcc +-CFLAGS = -Wall -Wextra ++CC ?= gcc + + infect: infect.c + +diff -Naur ELFkickers-3.0.orig//objres/Makefile ELFkickers-3.0/objres/Makefile +--- ELFkickers-3.0.orig//objres/Makefile 2011-05-23 23:29:39.000000000 -0400 ++++ ELFkickers-3.0/objres/Makefile 2011-06-02 23:05:08.000000000 -0400 +@@ -1,7 +1,7 @@ + # Makefile for objres + +-CC = gcc +-CFLAGS = -Wall -Wextra -I../elfrw ++CC ?= gcc ++CFLAGS += -I../elfrw + + objres: objres.c ../elfrw/libelfrw.a + +diff -Naur ELFkickers-3.0.orig//rebind/Makefile ELFkickers-3.0/rebind/Makefile +--- ELFkickers-3.0.orig//rebind/Makefile 2011-05-23 23:29:16.000000000 -0400 ++++ ELFkickers-3.0/rebind/Makefile 2011-06-02 23:04:57.000000000 -0400 +@@ -1,7 +1,7 @@ + # Makefile for rebind + +-CC = gcc +-CFLAGS = -Wall -Wextra -I../elfrw ++CC ?= gcc ++CFLAGS += -I../elfrw + + rebind: rebind.c ../elfrw/libelfrw.a + +diff -Naur ELFkickers-3.0.orig//sstrip/Makefile ELFkickers-3.0/sstrip/Makefile +--- ELFkickers-3.0.orig//sstrip/Makefile 2011-05-23 23:29:58.000000000 -0400 ++++ ELFkickers-3.0/sstrip/Makefile 2011-06-02 23:05:41.000000000 -0400 +@@ -1,7 +1,7 @@ + # Makefile for sstrip + +-CC = gcc +-CFLAGS = -Wall -Wextra -I../elfrw ++CC ?= gcc ++CFLAGS += -I../elfrw + + sstrip: sstrip.c ../elfrw/libelfrw.a + |