From 29d6678fd546377459ef75cf54abeef5b969b5cf Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 27 Aug 2010 15:14:24 +0100 Subject: Major layout change to the packages directory Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie --- .../binutils/files/better_file_error.patch | 17 +++ .../binutils/files/ld_makefile.patch | 22 ++++ .../binutils/files/objdump_fix.patch | 134 +++++++++++++++++++++ .../binutils/files/plt32trunc.patch | 24 ++++ .../binutils/files/signed_char_fix.patch | 12 ++ 5 files changed, 209 insertions(+) create mode 100644 meta/recipes-devtools/binutils/files/better_file_error.patch create mode 100644 meta/recipes-devtools/binutils/files/ld_makefile.patch create mode 100644 meta/recipes-devtools/binutils/files/objdump_fix.patch create mode 100644 meta/recipes-devtools/binutils/files/plt32trunc.patch create mode 100644 meta/recipes-devtools/binutils/files/signed_char_fix.patch (limited to 'meta/recipes-devtools/binutils/files') diff --git a/meta/recipes-devtools/binutils/files/better_file_error.patch b/meta/recipes-devtools/binutils/files/better_file_error.patch new file mode 100644 index 0000000000..38ef52966e --- /dev/null +++ b/meta/recipes-devtools/binutils/files/better_file_error.patch @@ -0,0 +1,17 @@ +diff -urN binutils-2.11.92.0.5/bfd/opncls.c binutils-2.11.92.0.5.new/bfd/opncls.c +--- binutils-2.11.92.0.5/bfd/opncls.c Mon Oct 1 18:25:21 2001 ++++ binutils-2.11.92.0.5.new/bfd/opncls.c Sat Oct 13 11:26:59 2001 +@@ -127,6 +127,13 @@ + { + bfd *nbfd; + const bfd_target *target_vec; ++ struct stat s; ++ ++ if (stat (filename, &s) == 0) ++ if (S_ISDIR(s.st_mode)) { ++ bfd_set_error (bfd_error_file_not_recognized); ++ return NULL; ++ } + + nbfd = _bfd_new_bfd (); + if (nbfd == NULL) diff --git a/meta/recipes-devtools/binutils/files/ld_makefile.patch b/meta/recipes-devtools/binutils/files/ld_makefile.patch new file mode 100644 index 0000000000..c1d2ac1ece --- /dev/null +++ b/meta/recipes-devtools/binutils/files/ld_makefile.patch @@ -0,0 +1,22 @@ +--- binutils-2.11.90.0.19.orig/ld/Makefile.am ++++ binutils-2.11.90.0.19/ld/Makefile.am +@@ -19,7 +19,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +--- binutils-2.11.90.0.19.orig/ld/Makefile.in ++++ binutils-2.11.90.0.19/ld/Makefile.in +@@ -123,7 +123,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ diff --git a/meta/recipes-devtools/binutils/files/objdump_fix.patch b/meta/recipes-devtools/binutils/files/objdump_fix.patch new file mode 100644 index 0000000000..90ad732c06 --- /dev/null +++ b/meta/recipes-devtools/binutils/files/objdump_fix.patch @@ -0,0 +1,134 @@ +From binutils-return-38148-listarch-binutils=sources dot redhat dot com at sources dot redhat dot com Tue Feb 22 19:24:15 2005 +Return-Path: +Delivered-To: listarch-binutils at sources dot redhat dot com +Received: (qmail 4446 invoked by alias); 22 Feb 2005 19:24:15 -0000 +Mailing-List: contact binutils-help at sources dot redhat dot com; run by ezmlm +Precedence: bulk +List-Subscribe: +List-Archive: +List-Post: +List-Help: , +Sender: binutils-owner at sources dot redhat dot com +Delivered-To: mailing list binutils at sources dot redhat dot com +Received: (qmail 4401 invoked from network); 22 Feb 2005 19:24:08 -0000 +Received: from unknown (HELO bgo1smout1.broadpark.no) (217.13.4.94) + by sourceware dot org with SMTP; 22 Feb 2005 19:24:08 -0000 +Received: from bgo1sminn1.broadpark.no ([217.13.4.93]) + by bgo1smout1 dot broadpark dot no + (Sun Java System Messaging Server 6 dot 1 HotFix 0 dot 05 (built Oct 21 2004)) + with ESMTP id <0ICB007QZUZCC0C0 at bgo1smout1 dot broadpark dot no> for + binutils at sources dot redhat dot com; Tue, 22 Feb 2005 20:18:48 +0100 (CET) +Received: from [127.0.0.1] ([80.202.165.9]) by bgo1sminn1.broadpark.no + (Sun Java System Messaging Server 6 dot 1 HotFix 0 dot 05 (built Oct 21 2004)) + with ESMTP id <0ICB006NCVBVHE21 at bgo1sminn1 dot broadpark dot no> for + binutils at sources dot redhat dot com; Tue, 22 Feb 2005 20:26:20 +0100 (CET) +Date: Tue, 22 Feb 2005 20:24:08 +0100 +From: =?ISO-8859-1?Q?Stig_Petter_Olsr=F8d?= +Subject: [PATCH] objdump relocation fixes for ARM disassembly +To: binutils at sources dot redhat dot com +Message-id: <421B86D8.8080604@users.sourceforge.net> +MIME-version: 1.0 +Content-type: text/plain; charset=ISO-8859-1; format=flowed +Content-transfer-encoding: 7BIT +User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) + +Hello, + +objdump disassembly did not relocate correctly for the ARM processor. It seems +that the test for triggering the INSN_HAS_RELOC flag was void (one test killed the other, +since octets would always be zero) and all relocations would thus fail. I changed the test +so the flag is set when we are about to disassemble an insn that the current relocation +entry points to. I also changed objdump_print_addr to use the current relocation entry if +the insn has such an entry. This causes the symbol printed to be correct for both external +symbols (from the undefined section) and local symbols. + +This has only been tested for the ARM processor, but I don't think it should break other +DISASSEMBLER_NEEDS_RELOCS processors either. + + +binutils/ + +2005-02-22 Stig Petter Olsroed + + * objdump.c (disassemble_bytes): Fixed relocation check for + DISASSEMBLER_NEEDS_RELOCS platforms to properly trigger the + INSN_HAS_RELOC flag. Set the current relocation entry in + objdump_disasm_info to allow printing the proper symbol. + (objdump_print_addr): Use the relocation entry in + objdump_disasm_info to lookup the correct symbol for + DISASSEMBLER_NEEDS_RELOCS platforms. + +--- 1/binutils/objdump.c 2005-02-22 01:50:06.000000000 +0100 ++++ 2/binutils/objdump.c 2005-02-22 14:27:33.066960900 +0100 +@@ -128,6 +128,7 @@ + arelent ** dynrelbuf; + long dynrelcount; + disassembler_ftype disassemble_fn; ++ arelent * reloc; + }; + + /* Architecture to disassemble for, or default if NULL. */ +@@ -852,6 +853,8 @@ + { + struct objdump_disasm_info *aux; + asymbol *sym; ++ arelent *q; ++ int skip_find = 0; + + if (sorted_symcount < 1) + { +@@ -861,6 +864,22 @@ + } + + aux = (struct objdump_disasm_info *) info->application_data; ++ ++ q = aux->reloc; ++ if (q != NULL) ++ { ++ if (q->sym_ptr_ptr != NULL && *q->sym_ptr_ptr != NULL) ++ { ++ /* Adjust the vma to the reloc */ ++ vma += bfd_asymbol_value (*q->sym_ptr_ptr); ++ if (bfd_is_und_section (bfd_get_section (*q->sym_ptr_ptr))) ++ { ++ skip_find = 1; ++ sym = *q->sym_ptr_ptr; ++ } ++ } ++ } ++ if (!skip_find) + sym = find_symbol_for_address (vma, info, NULL); + objdump_print_addr_with_sym (aux->abfd, aux->sec, sym, vma, info, + skip_zeroes); +@@ -1350,16 +1369,22 @@ + info->bytes_per_chunk = 0; + + #ifdef DISASSEMBLER_NEEDS_RELOCS +- /* FIXME: This is wrong. It tests the number of octets +- in the last instruction, not the current one. */ +- if (*relppp < relppend +- && (**relppp)->address >= rel_offset + addr_offset +- && ((**relppp)->address +- < rel_offset + addr_offset + octets / opb)) ++ /* Check if the current relocation entry applies to the ++ instruction we are about to disassemble. ++ This works for ARM at least. ++ */ ++ if ((*relppp) < relppend ++ && ((**relppp)->address == rel_offset + addr_offset)) ++ { + info->flags = INSN_HAS_RELOC; ++ aux->reloc = **relppp; ++ } + else + #endif ++ { + info->flags = 0; ++ aux->reloc = NULL; ++ } + + octets = (*disassemble_fn) (section->vma + addr_offset, info); + info->fprintf_func = (fprintf_ftype) fprintf; + + + diff --git a/meta/recipes-devtools/binutils/files/plt32trunc.patch b/meta/recipes-devtools/binutils/files/plt32trunc.patch new file mode 100644 index 0000000000..4990f5dbb6 --- /dev/null +++ b/meta/recipes-devtools/binutils/files/plt32trunc.patch @@ -0,0 +1,24 @@ +--- binutils/bfd/elf32-arm.h.orig 2004-04-22 22:11:15.000000000 -0400 ++++ binutils/bfd/elf32-arm.h 2004-04-22 22:28:37.000000000 -0400 +@@ -2229,6 +2229,8 @@ elf32_arm_relocate_section (output_bfd, + case R_ARM_PC24: + case R_ARM_ABS32: + case R_ARM_THM_PC22: ++ case R_ARM_PLT32: ++ + if (info->shared + && ( + (!info->symbolic && h->dynindx != -1) +@@ -2262,11 +2264,6 @@ elf32_arm_relocate_section (output_bfd, + relocation = 0; + break; + +- case R_ARM_PLT32: +- if (h->plt.offset != (bfd_vma)-1) +- relocation = 0; +- break; +- + default: + if (unresolved_reloc) + _bfd_error_handler + diff --git a/meta/recipes-devtools/binutils/files/signed_char_fix.patch b/meta/recipes-devtools/binutils/files/signed_char_fix.patch new file mode 100644 index 0000000000..b3709dabed --- /dev/null +++ b/meta/recipes-devtools/binutils/files/signed_char_fix.patch @@ -0,0 +1,12 @@ +diff -urN binutils-2.11.92.0.12.3/opcodes/i386-dis.c binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c +--- binutils-2.11.92.0.12.3/opcodes/i386-dis.c Fri Nov 16 17:05:55 2001 ++++ binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c Mon Dec 31 15:55:04 2001 +@@ -1830,7 +1830,7 @@ + * The function returns the length of this instruction in bytes. + */ + +-static char intel_syntax; ++static signed char intel_syntax; + static char open_char; + static char close_char; + static char separator_char; -- cgit v1.2.3-54-g00ecf