From 9e628ca00c00f7e878fcae89d3ce4d232ce41933 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 28 Jan 2016 14:03:55 +0100 Subject: [PATCH] 0.165-3 - Add elfutils-0.165-reloc.patch. --- elfutils-0.165-reloc.patch | 73 ++++++++++++++++++++++++++++++++++++++ elfutils.spec | 7 +++- 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 elfutils-0.165-reloc.patch diff --git a/elfutils-0.165-reloc.patch b/elfutils-0.165-reloc.patch new file mode 100644 index 0000000..53cc0bc --- /dev/null +++ b/elfutils-0.165-reloc.patch @@ -0,0 +1,73 @@ +diff --git a/backends/i386_reloc.def b/backends/i386_reloc.def +index de3575d..a6a03f3 100644 +--- a/backends/i386_reloc.def ++++ b/backends/i386_reloc.def +@@ -68,3 +68,4 @@ RELOC_TYPE (TLS_GOTDESC, REL) + RELOC_TYPE (TLS_DESC_CALL, REL) + RELOC_TYPE (TLS_DESC, EXEC) + RELOC_TYPE (IRELATIVE, EXEC|DYN) ++RELOC_TYPE (GOT32X, REL) +diff --git a/backends/x86_64_reloc.def b/backends/x86_64_reloc.def +index ad84efa..07a7c3d 100644 +--- a/backends/x86_64_reloc.def ++++ b/backends/x86_64_reloc.def +@@ -61,3 +61,5 @@ RELOC_TYPE (GOTPC32_TLSDESC, REL) + RELOC_TYPE (TLSDESC_CALL, REL) + RELOC_TYPE (TLSDESC, REL|EXEC|DYN) + RELOC_TYPE (IRELATIVE, EXEC|DYN) ++RELOC_TYPE (GOTPCRELX, REL) ++RELOC_TYPE (REX_GOTPCRELX, REL) +diff --git a/libelf/elf.h b/libelf/elf.h +index 12feb91..1a7000b 100644 +--- a/libelf/elf.h ++++ b/libelf/elf.h +@@ -1,5 +1,5 @@ + /* This file defines standard ELF types, structures, and macros. +- Copyright (C) 1995-2015 Free Software Foundation, Inc. ++ Copyright (C) 1995-2016 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -1269,8 +1269,10 @@ typedef struct + argument, returning the TLS + offset for the symbol. */ + #define R_386_IRELATIVE 42 /* Adjust indirectly by program base */ ++#define R_386_GOT32X 43 /* Load from 32 bit GOT entry, ++ relaxable. */ + /* Keep this the last entry. */ +-#define R_386_NUM 43 ++#define R_386_NUM 44 + + /* SUN SPARC specific definitions. */ + +@@ -1727,7 +1729,11 @@ typedef struct + PLT is writable. For a non-writable PLT, this is omitted or has a zero + value. */ + #define DT_MIPS_RWPLT 0x70000034 +-#define DT_MIPS_NUM 0x35 ++/* An alternative description of the classic MIPS RLD_MAP that is usable ++ in a PIE as it stores a relative offset from the address of the tag ++ rather than an absolute address. */ ++#define DT_MIPS_RLD_MAP_REL 0x70000035 ++#define DT_MIPS_NUM 0x36 + + /* Legal values for DT_MIPS_FLAGS Elf32_Dyn entry. */ + +@@ -3140,8 +3146,15 @@ enum + #define R_X86_64_TLSDESC 36 /* TLS descriptor. */ + #define R_X86_64_IRELATIVE 37 /* Adjust indirectly by program base */ + #define R_X86_64_RELATIVE64 38 /* 64-bit adjust by program base */ +- +-#define R_X86_64_NUM 39 ++ /* 39 Reserved was R_X86_64_PC32_BND */ ++ /* 40 Reserved was R_X86_64_PLT32_BND */ ++#define R_X86_64_GOTPCRELX 41 /* Load from 32 bit signed pc relative ++ offset to GOT entry without REX ++ prefix, relaxable. */ ++#define R_X86_64_REX_GOTPCRELX 42 /* Load from 32 bit signed pc relative ++ offset to GOT entry with REX prefix, ++ relaxable. */ ++#define R_X86_64_NUM 43 + + + /* AM33 relocations. */ diff --git a/elfutils.spec b/elfutils.spec index 4ce1ad0..4e057db 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,7 +1,7 @@ Name: elfutils Summary: A collection of utilities and DSOs to handle compiled objects Version: 0.165 -%global baserelease 2 +%global baserelease 3 URL: https://fedorahosted.org/elfutils/ %global source_url http://fedorahosted.org/releases/e/l/elfutils/%{version}/ License: GPLv3+ and (GPLv2+ or LGPLv3+) @@ -23,6 +23,7 @@ Source: %{?source_url}%{name}-%{version}.tar.bz2 # Needed for older (pre-2.22) glibc (f22 and earlier) Patch1: elfutils-0.165-elf-libelf.patch +Patch2: elfutils-0.165-reloc.patch Requires: elfutils-libelf%{depsuffix} = %{version}-%{release} Requires: elfutils-libs%{depsuffix} = %{version}-%{release} @@ -167,6 +168,7 @@ profiling) of processes. # Apply patches %patch1 -p1 -b .elf_libelf +%patch2 -p1 -b .reloc find . -name \*.sh ! -perm -0100 -print | xargs chmod +x @@ -303,6 +305,9 @@ rm -rf ${RPM_BUILD_ROOT} %endif %changelog +* Thu Jan 28 2016 Mark Wielaard - 0.165-3 +- Add elfutils-0.165-reloc.patch. + * Thu Jan 14 2016 Mark Wielaard - 0.165-2 - Add elfutils-0.165-elf-libelf.patch.