diff options
17 files changed, 11458 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.155/arm_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.155/arm_backend.diff new file mode 100644 index 0000000000..46d42fa76b --- /dev/null +++ b/meta/recipes-devtools/elfutils/elfutils-0.155/arm_backend.diff @@ -0,0 +1,450 @@ +Upstream-Status: Backport + +Index: elfutils-0.155/backends/arm_init.c +=================================================================== +--- elfutils-0.155.orig/backends/arm_init.c ++++ elfutils-0.155/backends/arm_init.c +@@ -35,21 +35,32 @@ + #define RELOC_PREFIX R_ARM_ + #include "libebl_CPU.h" + ++#include "libebl_arm.h" ++ + /* This defines the common reloc hooks based on arm_reloc.def. */ + #include "common-reloc.c" + + + const char * + arm_init (elf, machine, eh, ehlen) +- Elf *elf __attribute__ ((unused)); ++ Elf *elf; + GElf_Half machine __attribute__ ((unused)); + Ebl *eh; + size_t ehlen; + { ++ int soft_float = 0; ++ + /* Check whether the Elf_BH object has a sufficent size. */ + if (ehlen < sizeof (Ebl)) + return NULL; + ++ if (elf) { ++ GElf_Ehdr ehdr_mem; ++ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); ++ if (ehdr && (ehdr->e_flags & EF_ARM_SOFT_FLOAT)) ++ soft_float = 1; ++ } ++ + /* We handle it. */ + eh->name = "ARM"; + arm_init_reloc (eh); +@@ -61,7 +72,10 @@ arm_init (elf, machine, eh, ehlen) + HOOK (eh, core_note); + HOOK (eh, auxv_info); + HOOK (eh, check_object_attribute); +- HOOK (eh, return_value_location); ++ if (soft_float) ++ eh->return_value_location = arm_return_value_location_soft; ++ else ++ eh->return_value_location = arm_return_value_location_hard; + + return MODVERSION; + } +Index: elfutils-0.155/backends/arm_regs.c +=================================================================== +--- elfutils-0.155.orig/backends/arm_regs.c ++++ elfutils-0.155/backends/arm_regs.c +@@ -31,6 +31,7 @@ + #endif + + #include <string.h> ++#include <stdio.h> + #include <dwarf.h> + + #define BACKEND arm_ +@@ -61,7 +62,15 @@ arm_register_info (Ebl *ebl __attribute_ + namelen = 2; + break; + +- case 10 ... 12: ++ case 10 ... 11: ++ name[0] = 'r'; ++ name[1] = '1'; ++ name[2] = regno % 10 + '0'; ++ namelen = 3; ++ break; ++ ++ case 12: ++ *type = DW_ATE_unsigned; + name[0] = 'r'; + name[1] = '1'; + name[2] = regno % 10 + '0'; +@@ -76,6 +85,9 @@ arm_register_info (Ebl *ebl __attribute_ + break; + + case 16 + 0 ... 16 + 7: ++ /* AADWARF says that there are no registers in that range, ++ * but gcc maps FPA registers here ++ */ + regno += 96 - 16; + /* Fall through. */ + case 96 + 0 ... 96 + 7: +@@ -87,11 +99,139 @@ arm_register_info (Ebl *ebl __attribute_ + namelen = 2; + break; + ++ case 64 + 0 ... 64 + 9: ++ *setname = "VFP"; ++ *bits = 32; ++ *type = DW_ATE_float; ++ name[0] = 's'; ++ name[1] = regno - 64 + '0'; ++ namelen = 2; ++ break; ++ ++ case 64 + 10 ... 64 + 31: ++ *setname = "VFP"; ++ *bits = 32; ++ *type = DW_ATE_float; ++ name[0] = 's'; ++ name[1] = (regno - 64) / 10 + '0'; ++ name[2] = (regno - 64) % 10 + '0'; ++ namelen = 3; ++ break; ++ ++ case 104 + 0 ... 104 + 7: ++ /* XXX TODO: ++ * This can be either intel wireless MMX general purpose/control ++ * registers or xscale accumulator, which have different usage. ++ * We only have the intel wireless MMX here now. ++ * The name needs to be changed for the xscale accumulator too. */ ++ *setname = "MMX"; ++ *type = DW_ATE_unsigned; ++ *bits = 32; ++ memcpy(name, "wcgr", 4); ++ name[4] = regno - 104 + '0'; ++ namelen = 5; ++ break; ++ ++ case 112 + 0 ... 112 + 9: ++ *setname = "MMX"; ++ *type = DW_ATE_unsigned; ++ *bits = 64; ++ name[0] = 'w'; ++ name[1] = 'r'; ++ name[2] = regno - 112 + '0'; ++ namelen = 3; ++ break; ++ ++ case 112 + 10 ... 112 + 15: ++ *setname = "MMX"; ++ *type = DW_ATE_unsigned; ++ *bits = 64; ++ name[0] = 'w'; ++ name[1] = 'r'; ++ name[2] = '1'; ++ name[3] = regno - 112 - 10 + '0'; ++ namelen = 4; ++ break; ++ + case 128: ++ *setname = "special"; + *type = DW_ATE_unsigned; + return stpcpy (name, "spsr") + 1 - name; + ++ case 129: ++ *setname = "special"; ++ *type = DW_ATE_unsigned; ++ return stpcpy(name, "spsr_fiq") + 1 - name; ++ ++ case 130: ++ *setname = "special"; ++ *type = DW_ATE_unsigned; ++ return stpcpy(name, "spsr_irq") + 1 - name; ++ ++ case 131: ++ *setname = "special"; ++ *type = DW_ATE_unsigned; ++ return stpcpy(name, "spsr_abt") + 1 - name; ++ ++ case 132: ++ *setname = "special"; ++ *type = DW_ATE_unsigned; ++ return stpcpy(name, "spsr_und") + 1 - name; ++ ++ case 133: ++ *setname = "special"; ++ *type = DW_ATE_unsigned; ++ return stpcpy(name, "spsr_svc") + 1 - name; ++ ++ case 144 ... 150: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_usr", regno - 144 + 8) + 1; ++ ++ case 151 ... 157: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_fiq", regno - 151 + 8) + 1; ++ ++ case 158 ... 159: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_irq", regno - 158 + 13) + 1; ++ ++ case 160 ... 161: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_abt", regno - 160 + 13) + 1; ++ ++ case 162 ... 163: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_und", regno - 162 + 13) + 1; ++ ++ case 164 ... 165: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_svc", regno - 164 + 13) + 1; ++ ++ case 192 ... 199: ++ *setname = "MMX"; ++ *bits = 32; ++ *type = DW_ATE_unsigned; ++ name[0] = 'w'; ++ name[1] = 'c'; ++ name[2] = regno - 192 + '0'; ++ namelen = 3; ++ break; ++ + case 256 + 0 ... 256 + 9: ++ /* XXX TODO: Neon also uses those registers and can contain ++ * both float and integers */ + *setname = "VFP"; + *type = DW_ATE_float; + *bits = 64; +Index: elfutils-0.155/backends/arm_retval.c +=================================================================== +--- elfutils-0.155.orig/backends/arm_retval.c ++++ elfutils-0.155/backends/arm_retval.c +@@ -48,6 +48,13 @@ static const Dwarf_Op loc_intreg[] = + #define nloc_intreg 1 + #define nloc_intregs(n) (2 * (n)) + ++/* f1 */ /* XXX TODO: f0 can also have number 96 if program was compiled with -mabi=aapcs */ ++static const Dwarf_Op loc_fpreg[] = ++ { ++ { .atom = DW_OP_reg16 }, ++ }; ++#define nloc_fpreg 1 ++ + /* The return value is a structure and is actually stored in stack space + passed in a hidden argument by the caller. But, the compiler + helpfully returns the address of that space in r0. */ +@@ -58,8 +65,9 @@ static const Dwarf_Op loc_aggregate[] = + #define nloc_aggregate 1 + + +-int +-arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) ++static int ++arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, ++ int soft_float) + { + /* Start with the function's type, and get the DW_AT_type attribute, + which is the type of the return value. */ +@@ -112,14 +120,31 @@ arm_return_value_location (Dwarf_Die *fu + else + return -1; + } ++ if (tag == DW_TAG_base_type) ++ { ++ Dwarf_Word encoding; ++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding, ++ &attr_mem), &encoding) != 0) ++ return -1; ++ ++ if ((encoding == DW_ATE_float) && !soft_float) ++ { ++ *locp = loc_fpreg; ++ if (size <= 8) ++ return nloc_fpreg; ++ goto aggregate; ++ } ++ } + if (size <= 16) + { + intreg: + *locp = loc_intreg; + return size <= 4 ? nloc_intreg : nloc_intregs ((size + 3) / 4); + } ++ /* fall through. */ + + aggregate: ++ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */ + *locp = loc_aggregate; + return nloc_aggregate; + +@@ -138,3 +163,18 @@ arm_return_value_location (Dwarf_Die *fu + DWARF and might be valid. */ + return -2; + } ++ ++/* return location for -mabi=apcs-gnu -msoft-float */ ++int ++arm_return_value_location_soft (Dwarf_Die *functypedie, const Dwarf_Op **locp) ++{ ++ return arm_return_value_location_ (functypedie, locp, 1); ++} ++ ++/* return location for -mabi=apcs-gnu -mhard-float (current default) */ ++int ++arm_return_value_location_hard (Dwarf_Die *functypedie, const Dwarf_Op **locp) ++{ ++ return arm_return_value_location_ (functypedie, locp, 0); ++} ++ +Index: elfutils-0.155/libelf/elf.h +=================================================================== +--- elfutils-0.155.orig/libelf/elf.h ++++ elfutils-0.155/libelf/elf.h +@@ -2281,6 +2281,9 @@ typedef Elf32_Addr Elf32_Conflict; + #define EF_ARM_EABI_VER4 0x04000000 + #define EF_ARM_EABI_VER5 0x05000000 + ++/* EI_OSABI values */ ++#define ELFOSABI_ARM_AEABI 64 /* Contains symbol versioning. */ ++ + /* Additional symbol types for Thumb. */ + #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */ + #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */ +@@ -2298,12 +2301,19 @@ typedef Elf32_Addr Elf32_Conflict; + + /* Processor specific values for the Phdr p_type field. */ + #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */ ++#define PT_ARM_UNWIND PT_ARM_EXIDX + + /* Processor specific values for the Shdr sh_type field. */ + #define SHT_ARM_EXIDX (SHT_LOPROC + 1) /* ARM unwind section. */ + #define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) /* Preemption details. */ + #define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) /* ARM attributes section. */ + ++/* Processor specific values for the Dyn d_tag field. */ ++#define DT_ARM_RESERVED1 (DT_LOPROC + 0) ++#define DT_ARM_SYMTABSZ (DT_LOPROC + 1) ++#define DT_ARM_PREEMTMAB (DT_LOPROC + 2) ++#define DT_ARM_RESERVED2 (DT_LOPROC + 3) ++#define DT_ARM_NUM 4 + + /* ARM relocs. */ + +@@ -2336,12 +2346,75 @@ typedef Elf32_Addr Elf32_Conflict; + #define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */ + #define R_ARM_GOT32 26 /* 32 bit GOT entry */ + #define R_ARM_PLT32 27 /* 32 bit PLT address */ ++#define R_ARM_CALL 28 ++#define R_ARM_JUMP24 29 ++#define R_ARM_THM_JUMP24 30 ++#define R_ARM_BASE_ABS 31 + #define R_ARM_ALU_PCREL_7_0 32 + #define R_ARM_ALU_PCREL_15_8 33 + #define R_ARM_ALU_PCREL_23_15 34 + #define R_ARM_LDR_SBREL_11_0 35 + #define R_ARM_ALU_SBREL_19_12 36 + #define R_ARM_ALU_SBREL_27_20 37 ++#define R_ARM_TARGET1 38 ++#define R_ARM_SBREL31 39 ++#define R_ARM_V4BX 40 ++#define R_ARM_TARGET2 41 ++#define R_ARM_PREL31 42 ++#define R_ARM_MOVW_ABS_NC 43 ++#define R_ARM_MOVT_ABS 44 ++#define R_ARM_MOVW_PREL_NC 45 ++#define R_ARM_MOVT_PREL 46 ++#define R_ARM_THM_MOVW_ABS_NC 47 ++#define R_ARM_THM_MOVT_ABS 48 ++#define R_ARM_THM_MOVW_PREL_NC 49 ++#define R_ARM_THM_MOVT_PREL 50 ++#define R_ARM_THM_JUMP19 51 ++#define R_ARM_THM_JUMP6 52 ++#define R_ARM_THM_ALU_PREL_11_0 53 ++#define R_ARM_THM_PC12 54 ++#define R_ARM_ABS32_NO 55 ++#define R_ARM_REL32_NO 56 ++#define R_ARM_ALU_PC_G0_NC 57 ++#define R_ARM_ALU_PC_G0 58 ++#define R_ARM_ALU_PC_G1_NC 59 ++#define R_ARM_ALU_PC_G1 60 ++#define R_ARM_ALU_PC_G2 61 ++#define R_ARM_LDR_PC_G1 62 ++#define R_ARM_LDR_PC_G2 63 ++#define R_ARM_LDRS_PC_G0 64 ++#define R_ARM_LDRS_PC_G1 65 ++#define R_ARM_LDRS_PC_G2 66 ++#define R_ARM_LDC_PC_G0 67 ++#define R_ARM_LDC_PC_G1 68 ++#define R_ARM_LDC_PC_G2 69 ++#define R_ARM_ALU_SB_G0_NC 70 ++#define R_ARM_ALU_SB_G0 71 ++#define R_ARM_ALU_SB_G1_NC 72 ++#define R_ARM_ALU_SB_G1 73 ++#define R_ARM_ALU_SB_G2 74 ++#define R_ARM_LDR_SB_G0 75 ++#define R_ARM_LDR_SB_G1 76 ++#define R_ARM_LDR_SB_G2 77 ++#define R_ARM_LDRS_SB_G0 78 ++#define R_ARM_LDRS_SB_G1 79 ++#define R_ARM_LDRS_SB_G2 80 ++#define R_ARM_LDC_G0 81 ++#define R_ARM_LDC_G1 82 ++#define R_ARM_LDC_G2 83 ++#define R_ARM_MOVW_BREL_NC 84 ++#define R_ARM_MOVT_BREL 85 ++#define R_ARM_MOVW_BREL 86 ++#define R_ARM_THM_MOVW_BREL_NC 87 ++#define R_ARM_THM_MOVT_BREL 88 ++#define R_ARM_THM_MOVW_BREL 89 ++/* 90-93 unallocated */ ++#define R_ARM_PLT32_ABS 94 ++#define R_ARM_GOT_ABS 95 ++#define R_ARM_GOT_PREL 96 ++#define R_ARM_GOT_BREL12 97 ++#define R_ARM_GOTOFF12 98 ++#define R_ARM_GOTRELAX 99 + #define R_ARM_TLS_GOTDESC 90 + #define R_ARM_TLS_CALL 91 + #define R_ARM_TLS_DESCSEQ 92 +@@ -2360,6 +2433,13 @@ typedef Elf32_Addr Elf32_Conflict; + static TLS block offset */ + #define R_ARM_TLS_LE32 108 /* 32 bit offset relative to static + TLS block */ ++#define R_ARM_TLS_LDO12 109 ++#define R_ARM_TLS_LE12 110 ++#define R_ARM_TLS_IE12GP 111 ++/* 112 - 127 private range */ ++#define R_ARM_ME_TOO 128|/* obsolete */ ++ ++ + #define R_ARM_THM_TLS_DESCSEQ 129 + #define R_ARM_IRELATIVE 160 + #define R_ARM_RXPC25 249 +Index: elfutils-0.155/backends/libebl_arm.h +=================================================================== +--- /dev/null ++++ elfutils-0.155/backends/libebl_arm.h +@@ -0,0 +1,9 @@ ++#ifndef _LIBEBL_ARM_H ++#define _LIBEBL_ARM_H 1 ++ ++#include <libdw.h> ++ ++extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp); ++extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp); ++ ++#endif diff --git a/meta/recipes-devtools/elfutils/elfutils-0.155/do-autoreconf.diff b/meta/recipes-devtools/elfutils/elfutils-0.155/do-autoreconf.diff new file mode 100644 index 0000000000..c601f40e41 --- /dev/null +++ b/meta/recipes-devtools/elfutils/elfutils-0.155/do-autoreconf.diff @@ -0,0 +1,215 @@ +Upstream-Status: Backport + +Generated by copying the whole dir, running `sh debian/autogen.sh` and diffing. + +Index: elfutils-0.155/backends/Makefile.in +=================================================================== +--- elfutils-0.155.orig/backends/Makefile.in ++++ elfutils-0.155/backends/Makefile.in +@@ -78,39 +78,54 @@ libebl_ia64_pic_a_LIBADD = + am__objects_4 = ia64_init.$(OBJEXT) ia64_symbol.$(OBJEXT) \ + ia64_regs.$(OBJEXT) ia64_retval.$(OBJEXT) + libebl_ia64_pic_a_OBJECTS = $(am_libebl_ia64_pic_a_OBJECTS) ++libebl_m68k_pic_a_AR = $(AR) $(ARFLAGS) ++libebl_m68k_pic_a_LIBADD = ++am__objects_5 = m68k_init.$(OBJEXT) m68k_symbol.$(OBJEXT) \ ++ m68k_regs.$(OBJEXT) ++libebl_m68k_pic_a_OBJECTS = $(am_libebl_m68k_pic_a_OBJECTS) ++libebl_mips_pic_a_AR = $(AR) $(ARFLAGS) ++libebl_mips_pic_a_LIBADD = ++am__objects_6 = mips_init.$(OBJEXT) mips_symbol.$(OBJEXT) \ ++ mips_regs.$(OBJEXT) mips_retval.$(OBJEXT) ++libebl_mips_pic_a_OBJECTS = $(am_libebl_mips_pic_a_OBJECTS) ++libebl_parisc_pic_a_AR = $(AR) $(ARFLAGS) ++libebl_parisc_pic_a_LIBADD = ++am__objects_7 = parisc_init.$(OBJEXT) parisc_symbol.$(OBJEXT) \ ++ parisc_regs.$(OBJEXT) parisc_retval.$(OBJEXT) ++libebl_parisc_pic_a_OBJECTS = $(am_libebl_parisc_pic_a_OBJECTS) + libebl_ppc64_pic_a_AR = $(AR) $(ARFLAGS) + libebl_ppc64_pic_a_LIBADD = +-am__objects_5 = ppc64_init.$(OBJEXT) ppc64_symbol.$(OBJEXT) \ ++am__objects_8 = ppc64_init.$(OBJEXT) ppc64_symbol.$(OBJEXT) \ + ppc64_retval.$(OBJEXT) ppc64_corenote.$(OBJEXT) \ + ppc_regs.$(OBJEXT) ppc_auxv.$(OBJEXT) ppc_attrs.$(OBJEXT) \ + ppc_syscall.$(OBJEXT) + libebl_ppc64_pic_a_OBJECTS = $(am_libebl_ppc64_pic_a_OBJECTS) + libebl_ppc_pic_a_AR = $(AR) $(ARFLAGS) + libebl_ppc_pic_a_LIBADD = +-am__objects_6 = ppc_init.$(OBJEXT) ppc_symbol.$(OBJEXT) \ ++am__objects_9 = ppc_init.$(OBJEXT) ppc_symbol.$(OBJEXT) \ + ppc_retval.$(OBJEXT) ppc_regs.$(OBJEXT) ppc_corenote.$(OBJEXT) \ + ppc_auxv.$(OBJEXT) ppc_attrs.$(OBJEXT) ppc_syscall.$(OBJEXT) + libebl_ppc_pic_a_OBJECTS = $(am_libebl_ppc_pic_a_OBJECTS) + libebl_s390_pic_a_AR = $(AR) $(ARFLAGS) + libebl_s390_pic_a_LIBADD = +-am__objects_7 = s390_init.$(OBJEXT) s390_symbol.$(OBJEXT) \ ++am__objects_10 = s390_init.$(OBJEXT) s390_symbol.$(OBJEXT) \ + s390_regs.$(OBJEXT) s390_retval.$(OBJEXT) + libebl_s390_pic_a_OBJECTS = $(am_libebl_s390_pic_a_OBJECTS) + libebl_sh_pic_a_AR = $(AR) $(ARFLAGS) + libebl_sh_pic_a_LIBADD = +-am__objects_8 = sh_init.$(OBJEXT) sh_symbol.$(OBJEXT) \ ++am__objects_11 = sh_init.$(OBJEXT) sh_symbol.$(OBJEXT) \ + sh_corenote.$(OBJEXT) sh_regs.$(OBJEXT) sh_retval.$(OBJEXT) + libebl_sh_pic_a_OBJECTS = $(am_libebl_sh_pic_a_OBJECTS) + libebl_sparc_pic_a_AR = $(AR) $(ARFLAGS) + libebl_sparc_pic_a_LIBADD = +-am__objects_9 = sparc_init.$(OBJEXT) sparc_symbol.$(OBJEXT) \ ++am__objects_12 = sparc_init.$(OBJEXT) sparc_symbol.$(OBJEXT) \ + sparc_regs.$(OBJEXT) sparc_retval.$(OBJEXT) \ + sparc_corenote.$(OBJEXT) sparc64_corenote.$(OBJEXT) \ + sparc_auxv.$(OBJEXT) + libebl_sparc_pic_a_OBJECTS = $(am_libebl_sparc_pic_a_OBJECTS) + libebl_tilegx_pic_a_AR = $(AR) $(ARFLAGS) + libebl_tilegx_pic_a_LIBADD = +-am__objects_10 = tilegx_init.$(OBJEXT) tilegx_symbol.$(OBJEXT) \ ++am__objects_13 = x86_64_init.$(OBJEXT) x86_64_symbol.$(OBJEXT) \ + tilegx_regs.$(OBJEXT) tilegx_retval.$(OBJEXT) \ + tilegx_corenote.$(OBJEXT) + libebl_tilegx_pic_a_OBJECTS = $(am_libebl_tilegx_pic_a_OBJECTS) +@@ -131,16 +146,18 @@ CCLD = $(CC) + LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ + SOURCES = $(libebl_alpha_pic_a_SOURCES) $(libebl_arm_pic_a_SOURCES) \ + $(libebl_i386_pic_a_SOURCES) $(libebl_ia64_pic_a_SOURCES) \ +- $(libebl_ppc64_pic_a_SOURCES) $(libebl_ppc_pic_a_SOURCES) \ +- $(libebl_s390_pic_a_SOURCES) $(libebl_sh_pic_a_SOURCES) \ +- $(libebl_sparc_pic_a_SOURCES) $(libebl_tilegx_pic_a_SOURCES) \ ++ $(libebl_m68k_pic_a_SOURCES) $(libebl_mips_pic_a_SOURCES) \ ++ $(libebl_parisc_pic_a_SOURCES) $(libebl_ppc64_pic_a_SOURCES) \ ++ $(libebl_ppc_pic_a_SOURCES) $(libebl_s390_pic_a_SOURCES) \ ++ $(libebl_sh_pic_a_SOURCES) $(libebl_sparc_pic_a_SOURCES) \ + $(libebl_x86_64_pic_a_SOURCES) + DIST_SOURCES = $(libebl_alpha_pic_a_SOURCES) \ + $(libebl_arm_pic_a_SOURCES) $(libebl_i386_pic_a_SOURCES) \ +- $(libebl_ia64_pic_a_SOURCES) $(libebl_ppc64_pic_a_SOURCES) \ +- $(libebl_ppc_pic_a_SOURCES) $(libebl_s390_pic_a_SOURCES) \ +- $(libebl_sh_pic_a_SOURCES) $(libebl_sparc_pic_a_SOURCES) \ +- $(libebl_tilegx_pic_a_SOURCES) $(libebl_x86_64_pic_a_SOURCES) ++ $(libebl_ia64_pic_a_SOURCES) $(libebl_m68k_pic_a_SOURCES) \ ++ $(libebl_mips_pic_a_SOURCES) $(libebl_parisc_pic_a_SOURCES) \ ++ $(libebl_ppc64_pic_a_SOURCES) $(libebl_ppc_pic_a_SOURCES) \ ++ $(libebl_s390_pic_a_SOURCES) $(libebl_sh_pic_a_SOURCES) \ ++ $(libebl_sparc_pic_a_SOURCES) $(libebl_x86_64_pic_a_SOURCES) + DATA = $(noinst_DATA) + HEADERS = $(noinst_HEADERS) + ETAGS = etags +@@ -277,11 +294,12 @@ COMPILE.os = $(filter-out -fprofile-arcs + CLEANFILES = *.gcno *.gcda $(foreach m,$(modules), libebl_$(m).map \ + libebl_$(m).so $(am_libebl_$(m)_pic_a_OBJECTS)) + textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi +-modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 tilegx ++modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 tilegx parisc mips m68k + libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ + libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ + libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \ +- libebl_s390_pic.a libebl_tilegx_pic.a ++ libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a \ ++ libebl_tilegx_pic.a libebl_m68k_pic.a + + noinst_LIBRARIES = $(libebl_pic) + noinst_DATA = $(libebl_pic:_pic.a=.so) +@@ -298,46 +316,60 @@ am_libebl_i386_pic_a_OBJECTS = $(i386_SR + sh_SRCS = sh_init.c sh_symbol.c sh_corenote.c sh_regs.c sh_retval.c + libebl_sh_pic_a_SOURCES = $(sh_SRCS) + am_libebl_sh_pic_a_OBJECTS = $(sh_SRCS:.c=.os) ++ + x86_64_SRCS = x86_64_init.c x86_64_symbol.c x86_64_corenote.c x86_64_cfi.c \ + x86_64_retval.c x86_64_regs.c i386_auxv.c x86_64_syscall.c +- + cpu_x86_64 = ../libcpu/libcpu_x86_64.a + libebl_x86_64_pic_a_SOURCES = $(x86_64_SRCS) + am_libebl_x86_64_pic_a_OBJECTS = $(x86_64_SRCS:.c=.os) ++ + ia64_SRCS = ia64_init.c ia64_symbol.c ia64_regs.c ia64_retval.c + libebl_ia64_pic_a_SOURCES = $(ia64_SRCS) + am_libebl_ia64_pic_a_OBJECTS = $(ia64_SRCS:.c=.os) ++ + alpha_SRCS = alpha_init.c alpha_symbol.c alpha_retval.c alpha_regs.c \ + alpha_corenote.c alpha_auxv.c +- + libebl_alpha_pic_a_SOURCES = $(alpha_SRCS) + am_libebl_alpha_pic_a_OBJECTS = $(alpha_SRCS:.c=.os) ++ + arm_SRCS = arm_init.c arm_symbol.c arm_regs.c arm_corenote.c \ + arm_auxv.c arm_attrs.c arm_retval.c +- + libebl_arm_pic_a_SOURCES = $(arm_SRCS) + am_libebl_arm_pic_a_OBJECTS = $(arm_SRCS:.c=.os) ++ + sparc_SRCS = sparc_init.c sparc_symbol.c sparc_regs.c sparc_retval.c \ + sparc_corenote.c sparc64_corenote.c sparc_auxv.c +- + libebl_sparc_pic_a_SOURCES = $(sparc_SRCS) + am_libebl_sparc_pic_a_OBJECTS = $(sparc_SRCS:.c=.os) ++ + ppc_SRCS = ppc_init.c ppc_symbol.c ppc_retval.c ppc_regs.c \ + ppc_corenote.c ppc_auxv.c ppc_attrs.c ppc_syscall.c +- + libebl_ppc_pic_a_SOURCES = $(ppc_SRCS) + am_libebl_ppc_pic_a_OBJECTS = $(ppc_SRCS:.c=.os) ++ + ppc64_SRCS = ppc64_init.c ppc64_symbol.c ppc64_retval.c \ + ppc64_corenote.c ppc_regs.c ppc_auxv.c ppc_attrs.c ppc_syscall.c +- + libebl_ppc64_pic_a_SOURCES = $(ppc64_SRCS) + am_libebl_ppc64_pic_a_OBJECTS = $(ppc64_SRCS:.c=.os) ++ + s390_SRCS = s390_init.c s390_symbol.c s390_regs.c s390_retval.c + libebl_s390_pic_a_SOURCES = $(s390_SRCS) + am_libebl_s390_pic_a_OBJECTS = $(s390_SRCS:.c=.os) ++ ++parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c ++libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) ++am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) ++ ++mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c ++libebl_mips_pic_a_SOURCES = $(mips_SRCS) ++am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os) ++ ++m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c ++libebl_m68k_pic_a_SOURCES = $(m68k_SRCS) ++am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os) ++ + tilegx_SRCS = tilegx_init.c tilegx_symbol.c tilegx_regs.c \ + tilegx_retval.c tilegx_corenote.c +- + libebl_tilegx_pic_a_SOURCES = $(tilegx_SRCS) + am_libebl_tilegx_pic_a_OBJECTS = $(tilegx_SRCS:.c=.os) + noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c +@@ -396,6 +428,18 @@ libebl_ia64_pic.a: $(libebl_ia64_pic_a_O + -rm -f libebl_ia64_pic.a + $(libebl_ia64_pic_a_AR) libebl_ia64_pic.a $(libebl_ia64_pic_a_OBJECTS) $(libebl_ia64_pic_a_LIBADD) + $(RANLIB) libebl_ia64_pic.a ++libebl_m68k_pic.a: $(libebl_m68k_pic_a_OBJECTS) $(libebl_m68k_pic_a_DEPENDENCIES) ++ -rm -f libebl_m68k_pic.a ++ $(libebl_m68k_pic_a_AR) libebl_m68k_pic.a $(libebl_m68k_pic_a_OBJECTS) $(libebl_m68k_pic_a_LIBADD) ++ $(RANLIB) libebl_m68k_pic.a ++libebl_mips_pic.a: $(libebl_mips_pic_a_OBJECTS) $(libebl_mips_pic_a_DEPENDENCIES) ++ -rm -f libebl_mips_pic.a ++ $(libebl_mips_pic_a_AR) libebl_mips_pic.a $(libebl_mips_pic_a_OBJECTS) $(libebl_mips_pic_a_LIBADD) ++ $(RANLIB) libebl_mips_pic.a ++libebl_parisc_pic.a: $(libebl_parisc_pic_a_OBJECTS) $(libebl_parisc_pic_a_DEPENDENCIES) ++ -rm -f libebl_parisc_pic.a ++ $(libebl_parisc_pic_a_AR) libebl_parisc_pic.a $(libebl_parisc_pic_a_OBJECTS) $(libebl_parisc_pic_a_LIBADD) ++ $(RANLIB) libebl_parisc_pic.a + libebl_ppc64_pic.a: $(libebl_ppc64_pic_a_OBJECTS) $(libebl_ppc64_pic_a_DEPENDENCIES) $(EXTRA_libebl_ppc64_pic_a_DEPENDENCIES) + -rm -f libebl_ppc64_pic.a + $(libebl_ppc64_pic_a_AR) libebl_ppc64_pic.a $(libebl_ppc64_pic_a_OBJECTS) $(libebl_ppc64_pic_a_LIBADD) +@@ -456,6 +500,17 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64_regs.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64_retval.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64_symbol.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68k_init.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68k_regs.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68k_symbol.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_init.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_regs.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_retval.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_symbol.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_init.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_regs.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_retval.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_symbol.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc64_corenote.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc64_init.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc64_retval.Po@am__quote@ diff --git a/meta/recipes-devtools/elfutils/elfutils-0.155/dso-link-change.patch b/meta/recipes-devtools/elfutils/elfutils-0.155/dso-link-change.patch new file mode 100644 index 0000000000..f375a8ad64 --- /dev/null +++ b/meta/recipes-devtools/elfutils/elfutils-0.155/dso-link-change.patch @@ -0,0 +1,32 @@ +Upstream-Status: Pending + +# This patch makes the link to the dependencies of libdw explicit, as recent +# ld no longer implicitly links them. See +# http://lists.fedoraproject.org/pipermail/devel/2010-March/133601.html as +# a similar example of the error message you can encounter without this patch, +# and https://fedoraproject.org/wiki/UnderstandingDSOLinkChange and +# https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking for more +# details. + +--- elfutils-0.155.orig/src/Makefile.am ++++ elfutils-0.155/src/Makefile.am +@@ -86,7 +86,7 @@ libdw = ../libdw/libdw.a $(zip_LIBS) $(l + libelf = ../libelf/libelf.a + else + libasm = ../libasm/libasm.so +-libdw = ../libdw/libdw.so ++libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl + libelf = ../libelf/libelf.so + endif + libebl = ../libebl/libebl.a +--- elfutils-0.155.orig/tests/Makefile.am ++++ elfutils-0.155/tests/Makefile.am +@@ -172,7 +172,7 @@ libdw = ../libdw/libdw.a $(zip_LIBS) $(l + libelf = ../libelf/libelf.a + libasm = ../libasm/libasm.a + else +-libdw = ../libdw/libdw.so ++libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl + libelf = ../libelf/libelf.so + libasm = ../libasm/libasm.so + endif diff --git a/meta/recipes-devtools/elfutils/elfutils-0.155/elf_additions.diff b/meta/recipes-devtools/elfutils/elfutils-0.155/elf_additions.diff new file mode 100644 index 0000000000..7c7f8a1bc0 --- /dev/null +++ b/meta/recipes-devtools/elfutils/elfutils-0.155/elf_additions.diff @@ -0,0 +1,61 @@ +Upstream-Status: Backport + +Index: elfutils-0.155/libelf/elf.h +=================================================================== +--- elfutils-0.155.orig/libelf/elf.h ++++ elfutils-0.155/libelf/elf.h +@@ -149,8 +149,13 @@ typedef struct + #define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX. */ + #define ELFOSABI_MODESTO 11 /* Novell Modesto. */ + #define ELFOSABI_OPENBSD 12 /* OpenBSD. */ ++#define ELFOSABI_OPENVMS 13 /* OpenVMS */ ++#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */ ++#define ELFOSABI_AROS 15 /* Amiga Research OS */ ++/* 64-255 Architecture-specific value range */ + #define ELFOSABI_ARM_AEABI 64 /* ARM EABI */ + #define ELFOSABI_ARM 97 /* ARM */ ++/* This is deprecated? It's not in the latest version anymore. */ + #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ + + #define EI_ABIVERSION 8 /* ABI version */ +@@ -205,7 +210,7 @@ typedef struct + #define EM_H8_300H 47 /* Hitachi H8/300H */ + #define EM_H8S 48 /* Hitachi H8S */ + #define EM_H8_500 49 /* Hitachi H8/500 */ +-#define EM_IA_64 50 /* Intel Merced */ ++#define EM_IA_64 50 /* Intel IA64 */ + #define EM_MIPS_X 51 /* Stanford MIPS-X */ + #define EM_COLDFIRE 52 /* Motorola Coldfire */ + #define EM_68HC12 53 /* Motorola M68HC12 */ +@@ -219,7 +224,8 @@ typedef struct + #define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/ + #define EM_X86_64 62 /* AMD x86-64 architecture */ + #define EM_PDSP 63 /* Sony DSP Processor */ +- ++#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */ ++#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */ + #define EM_FX66 66 /* Siemens FX66 microcontroller */ + #define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */ + #define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */ +@@ -249,6 +255,21 @@ typedef struct + #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ + #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ + #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ ++#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */ ++#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor */ ++#define EM_NS32K 97 /* National Semiconductor 32000 series */ ++#define EM_TPC 98 /* Tenor Network TPC processor */ ++#define EM_SNP1K 99 /* Trebia SNP 1000 processor */ ++#define EM_ST200 100 /* STMicroelectronics (www.st.com) ST200 microcontroller */ ++#define EM_IP2K 101 /* Ubicom IP2XXX microcontroller family */ ++#define EM_MAX 102 /* MAX Processor */ ++#define EM_CR 103 /* National Semiconductor CompactRISC */ ++#define EM_F2MC16 104 /* Fujitsu F2MC16 */ ++#define EM_MSP430 105 /* TI msp430 micro controller */ ++#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor */ ++#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors */ ++#define EM_SEP 108 /* Sharp embedded microprocessor */ ++#define EM_ARCA 109 /* Arca RISC Microprocessor */ + #define EM_TILEPRO 188 /* Tilera TILEPro */ + #define EM_TILEGX 191 /* Tilera TILE-Gx */ + #define EM_NUM 192 diff --git a/meta/recipes-devtools/elfutils/elfutils-0.155/elfutils-ar-c-fix-num-passed-to-memset.patch b/meta/recipes-devtools/elfutils/elfutils-0.155/elfutils-ar-c-fix-num-passed-to-memset.patch new file mode 100644 index 0000000000..dd4f06bcd4 --- /dev/null +++ b/meta/recipes-devtools/elfutils/elfutils-0.155/elfutils-ar-c-fix-num-passed-to-memset.patch @@ -0,0 +1,23 @@ +Upstream-Status: Backport + +ar.c (do_oper_delete): Fix num passed to memset +native build failed as following on Fedora18+: +ar.c: In function 'do_oper_delete': +ar.c:918:31: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess] + memset (found, '\0', sizeof (found)); + ^ +The original commit is http://git.fedorahosted.org/cgit/elfutils.git/commit/src/ar.c?id=1a4d0668d18bf1090c5c08cdb5cb3ba2b8eb5410 + +Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> + +--- elfutils-0.155/src/ar.c.org 2013-03-12 21:12:17.928281375 -0500 ++++ elfutils-0.155/src/ar.c 2013-03-12 21:15:30.053285271 -0500 +@@ -915,7 +915,7 @@ + long int instance) + { + bool *found = alloca (sizeof (bool) * argc); +- memset (found, '\0', sizeof (found)); ++ memset (found, '\0', sizeof (bool) * argc); + + /* List of the files we keep. */ + struct armem *to_copy = NULL; diff --git a/meta/recipes-devtools/elfutils/elfutils-0.155/elfutils-robustify.patch b/meta/recipes-devtools/elfutils/elfutils-0.155/elfutils-robustify.patch new file mode 100644 index 0000000000..9eee98412d --- /dev/null +++ b/meta/recipes-devtools/elfutils/elfutils-0.155/elfutils-robustify.patch @@ -0,0 +1,1756 @@ +--- elfutils/libdwfl/ChangeLog ++++ elfutils/libdwfl/ChangeLog +@@ -52,6 +52,11 @@ + * dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL. + Reported by Kurt Roeckx <kurt@roeckx.be>. + ++2011-03-23 Petr Machata <pmachata@redhat.com> ++ ++ * relocate.c (relocate_section): Use gelf_fsize instead of relying ++ on shdr->sh_entsize. ++ + 2011-02-11 Roland McGrath <roland@redhat.com> + + * linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz +--- elfutils/libdwfl/relocate.c ++++ elfutils/libdwfl/relocate.c +@@ -1,5 +1,5 @@ + /* Relocate debug information. +- Copyright (C) 2005-2010 Red Hat, Inc. ++ Copyright (C) 2005-2011 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify +@@ -457,7 +457,10 @@ relocate_section (Dwfl_Module *mod, Elf + } + } + +- size_t nrels = shdr->sh_size / shdr->sh_entsize; ++ size_t sh_entsize ++ = gelf_fsize (relocated, shdr->sh_type == SHT_REL ? ELF_T_REL : EL |
