From 7068422324f2f25f99f878993fae55e4e2483a48 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Jul 24 2007 08:35:16 +0000 Subject: 2.17.50.0.17-4 --- diff --git a/binutils-2.17.50.0.17-build-id.patch b/binutils-2.17.50.0.17-build-id.patch index eadecac..88cd5f4 100644 --- a/binutils-2.17.50.0.17-build-id.patch +++ b/binutils-2.17.50.0.17-build-id.patch @@ -1,9 +1,70 @@ -Index: include/elf/common.h -=================================================================== -RCS file: /cvs/src/src/include/elf/common.h,v -retrieving revision 1.85 -retrieving revision 1.86 -diff -b -u -r1.85 -r1.86 +bfd/ +2007-07-13 Roland McGrath + + * elf-bfd.h (struct elf_obj_tdata): Revert last change. + Add after_write_object_contents, after_write_object_contents_info. + * elf.c (_bfd_elf_write_object_contents): Revert last change. + Instead, call after_write_object_contents if set. + +2007-07-09 Roland McGrath + + * elf-bfd.h (struct elf_obj_tdata): Add members + emit_note_gnu_build_id and note_gnu_build_id_sec. + * elf.c (_bfd_id_note_section_size): New global function. + (read_hex, _bfd_elf_write_build_id_section): New static functions. + (_bfd_elf_write_object_contents): Call _bfd_elf_write_build_id_section + if emit_note_gnu_build_id is set. + * Makefile.am (elf.lo): Update dependencies. + + * elf-bfd.h (struct elf_size_info): Add checksum_contents hook. + (bfd_elf32_checksum_contents, bfd_elf64_checksum_contents): Declare. + * elfcode.h (elf_checksum_contents): New macro and function. + (NAME(_bfd_elf,size_info)): Initialize checksum_contents hook. +include/ +2007-07-09 Roland McGrath + + * bfdlink.h (struct bfd_link_info): Add member emit_note_gnu_build_id. +include/elf/ +2007-07-09 Roland McGrath + + * common.h (NT_GNU_HWCAP, NT_GNU_BUILD_ID): New macros. +binutils/ +2007-07-09 Roland McGrath + + * readelf.c (get_gnu_elf_note_type): New function. + (process_note): Use it for "GNU" name. +ld/ +2007-07-18 Roland McGrath + + * emultempl/elf32.em (gld${EMULATION_NAME}_write_build_id_section): + Use ASEC->contents for CONTENTS when missing, and allocate + ASEC->size if needed. + +2007-07-13 Roland McGrath + + * emultempl/elf32.em (struct build_id_info): New type. + (gld${EMULATION_NAME}_id_note_section_size): New function. + (gld${EMULATION_NAME}_write_build_id_section): New function. + (gld${EMULATION_NAME}_after_open): Use them. + (DEFAULT_BUILD_ID_STYLE): Change to "sha1". + * ld.texinfo (Options): Mention --build-id=sha1. + + * sha1.h: New file (from gnulib). + * sha1.c: New file (from gnulib). + * Makefile.am (CFILES, HFILES, OFILES, ld_new_SOURCES): Add them. + (sha1.o): New target. + * Makefile.in: Regenerated. + +2007-07-09 Roland McGrath + + * emultempl/elf32.em (gld${EMULATION_NAME}_add_option): Add --build-id. + (gld${EMULATION_NAME}_handle_option): Handle --build-id. + (gld${EMULATION_NAME}_list_options): List --build-id. + (gld${EMULATION_NAME}_after_open): If --build-id was given, + synthesize a ".note.gnu.build-id" section and cache it in elf_tdata. + * ld.texinfo (Options): Describe --build-id. + * NEWS: Mention --build-id. + --- include/elf/common.h 29 Jun 2007 16:29:16 -0000 1.85 +++ include/elf/common.h 9 Jul 2007 21:17:42 -0000 1.86 @@ -413,9 +413,13 @@ @@ -21,12 +82,6 @@ diff -b -u -r1.85 -r1.86 #define GNU_ABI_TAG_LINUX 0 #define GNU_ABI_TAG_HURD 1 #define GNU_ABI_TAG_SOLARIS 2 -Index: binutils/readelf.c -=================================================================== -RCS file: /cvs/src/src/binutils/readelf.c,v -retrieving revision 1.369 -retrieving revision 1.370 -diff -b -u -r1.369 -r1.370 --- binutils/readelf.c 5 Jul 2007 16:54:45 -0000 1.369 +++ binutils/readelf.c 9 Jul 2007 21:19:51 -0000 1.370 @@ -9128,6 +9128,27 @@ @@ -68,12 +123,6 @@ diff -b -u -r1.369 -r1.370 else if (const_strneq (pnote->namedata, "NetBSD-CORE")) /* NetBSD-specific core file notes. */ nt = get_netbsd_elfcore_note_type (pnote->type); -Index: include/bfdlink.h -=================================================================== -RCS file: /cvs/src/src/include/bfdlink.h,v -retrieving revision 1.69 -retrieving revision 1.70 -diff -b -u -r1.69 -r1.70 --- include/bfdlink.h 6 Jul 2007 11:13:56 -0000 1.69 +++ include/bfdlink.h 9 Jul 2007 21:21:42 -0000 1.70 @@ -348,6 +348,9 @@ @@ -86,12 +135,6 @@ diff -b -u -r1.69 -r1.70 /* What to do with unresolved symbols in an object file. When producing executables the default is GENERATE_ERROR. When producing shared libraries the default is IGNORE. The -Index: bfd/elf-bfd.h -=================================================================== -RCS file: /cvs/src/src/bfd/elf-bfd.h,v -retrieving revision 1.235 -retrieving revision 1.237 -diff -b -u -r1.235 -r1.237 --- bfd/elf-bfd.h 3 Jul 2007 14:26:40 -0000 1.235 +++ bfd/elf-bfd.h 13 Jul 2007 10:44:12 -0000 1.237 @@ -447,6 +447,8 @@ struct elf_size_info { @@ -132,12 +175,6 @@ diff -b -u -r1.235 -r1.237 extern void bfd_elf64_write_relocs (bfd *, asection *, void *); extern bfd_boolean bfd_elf64_slurp_reloc_table -Index: bfd/elf.c -=================================================================== -RCS file: /cvs/src/src/bfd/elf.c,v -retrieving revision 1.396 -retrieving revision 1.398 -diff -b -u -r1.396 -r1.398 --- bfd/elf.c 3 Jul 2007 14:26:40 -0000 1.396 +++ bfd/elf.c 13 Jul 2007 10:44:12 -0000 1.398 @@ -5124,7 +5125,14 @@ @@ -156,12 +193,6 @@ diff -b -u -r1.396 -r1.398 } bfd_boolean -Index: bfd/elfcode.h -=================================================================== -RCS file: /cvs/src/src/bfd/elfcode.h,v -retrieving revision 1.83 -retrieving revision 1.84 -diff -b -u -r1.83 -r1.84 --- bfd/elfcode.h 3 Jul 2007 14:26:42 -0000 1.83 +++ bfd/elfcode.h 9 Jul 2007 21:23:37 -0000 1.84 @@ -122,6 +122,7 @@ @@ -234,12 +265,6 @@ diff -b -u -r1.83 -r1.84 elf_write_relocs, elf_swap_symbol_in, elf_swap_symbol_out, -Index: ld/Makefile.in -=================================================================== -RCS file: /cvs/src/src/ld/Makefile.in,v -retrieving revision 1.259 -retrieving revision 1.260 -diff -b -u -r1.259 -r1.260 --- ld/Makefile.in 2 Jul 2007 07:12:52 -0000 1.259 +++ ld/Makefile.in 13 Jul 2007 10:44:28 -0000 1.260 @@ -75,7 +75,7 @@ @@ -289,12 +314,6 @@ diff -b -u -r1.259 -r1.260 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. -Index: ld/emultempl/elf32.em -=================================================================== -RCS file: /cvs/src/src/ld/emultempl/elf32.em,v -retrieving revision 1.179 -retrieving revision 1.182 -diff -B -p -u -r1.179 -r1.182 --- ld/emultempl/elf32.em 6 Jul 2007 14:09:42 -0000 1.179 +++ ld/emultempl/elf32.em 18 Jul 2007 09:46:05 -0000 1.182 @@ -41,6 +41,9 @@ cat >e${EMULATION_NAME}.c <E += e; + } +} -Index: ld/sha1.h -=================================================================== -RCS file: ld/sha1.h -diff -N ld/sha1.h ---- /dev/null 1 Jan 1970 00:00:00 -0000 +--- ld/sha1.h 1 Jan 1970 00:00:00 -0000 +++ ld/sha1.h 13 Jul 2007 10:44:28 -0000 1.1 @@ -0,0 +1,87 @@ +/* Declarations of functions and data types used for SHA1 sum diff --git a/binutils-2.17.50.0.17-pt_note-coalescing.patch b/binutils-2.17.50.0.17-pt_note-coalescing.patch new file mode 100644 index 0000000..d500560 --- /dev/null +++ b/binutils-2.17.50.0.17-pt_note-coalescing.patch @@ -0,0 +1,81 @@ +2007-07-24 Jakub Jelinek + + * elf.c (get_program_header_size): Adjacent loadable .note* + sections need just one PT_NOTE segment. + (_bfd_elf_map_sections_to_segments): Likewise. + +--- bfd/elf.c 18 Jul 2007 11:23:37 -0000 1.399 ++++ bfd/elf.c 24 Jul 2007 08:24:11 -0000 +@@ -3696,6 +3696,19 @@ get_program_header_size (bfd *abfd, stru + { + /* We need a PT_NOTE segment. */ + ++segs; ++ /* Try to create just one PT_NOTE segment ++ for all adjacent loadable .note* sections. ++ gABI requires that within a PT_NOTE segment ++ (and also inside of each SHT_NOTE section) ++ each note is padded to a multiple of 4 size, ++ so we check whether the sections are correctly ++ aligned. */ ++ if (s->alignment_power == 2) ++ while (s->next != NULL ++ && s->next->alignment_power == 2 ++ && (s->next->flags & SEC_LOAD) != 0 ++ && CONST_STRNEQ (s->next->name, ".note")) ++ s = s->next; + } + } + +@@ -4070,25 +4083,44 @@ _bfd_elf_map_sections_to_segments (bfd * + pm = &m->next; + } + +- /* For each loadable .note section, add a PT_NOTE segment. We don't +- use bfd_get_section_by_name, because if we link together +- nonloadable .note sections and loadable .note sections, we will +- generate two .note sections in the output file. FIXME: Using +- names for section types is bogus anyhow. */ ++ /* For each batch of consecutive loadable .note sections, ++ add a PT_NOTE segment. We don't use bfd_get_section_by_name, ++ because if we link together nonloadable .note sections and ++ loadable .note sections, we will generate two .note sections ++ in the output file. FIXME: Using names for section types is ++ bogus anyhow. */ + for (s = abfd->sections; s != NULL; s = s->next) + { + if ((s->flags & SEC_LOAD) != 0 + && CONST_STRNEQ (s->name, ".note")) + { ++ asection *s2; ++ unsigned count = 1; + amt = sizeof (struct elf_segment_map); ++ if (s->alignment_power == 2) ++ for (s2 = s; s2->next != NULL; s2 = s2->next) ++ if (s2->next->alignment_power == 2 ++ && (s2->next->flags & SEC_LOAD) != 0 ++ && CONST_STRNEQ (s2->next->name, ".note") ++ && align_power (s2->vma + s2->size, 2) == s2->next->vma) ++ count++; ++ else ++ break; ++ amt += (count - 1) * sizeof (asection *); + m = bfd_zalloc (abfd, amt); + if (m == NULL) + goto error_return; + m->next = NULL; + m->p_type = PT_NOTE; +- m->count = 1; +- m->sections[0] = s; +- ++ m->count = count; ++ while (count > 1) ++ { ++ m->sections[m->count - count--] = s; ++ BFD_ASSERT ((s->flags & SEC_THREAD_LOCAL) == 0); ++ s = s->next; ++ } ++ m->sections[m->count - 1] = s; ++ BFD_ASSERT ((s->flags & SEC_THREAD_LOCAL) == 0); + *pm = m; + pm = &m->next; + } diff --git a/binutils.spec b/binutils.spec index e2ae684..da5b953 100644 --- a/binutils.spec +++ b/binutils.spec @@ -1,7 +1,7 @@ Summary: A GNU collection of binary utilities. Name: binutils Version: 2.17.50.0.17 -Release: 3 +Release: 4 License: GPL Group: Development/Tools URL: http://sources.redhat.com/binutils @@ -15,6 +15,7 @@ Patch6: binutils-2.17.50.0.17-build-fixes.patch Patch7: binutils-2.17.50.0.17-symbolic-envvar-revert.patch Patch8: binutils-2.17.50.0.17-version.patch Patch9: binutils-2.17.50.0.17-build-id.patch +Patch10: binutils-2.17.50.0.17-pt_note-coalescing.patch Buildroot: %{_tmppath}/binutils-root BuildRequires: texinfo >= 4.0, dejagnu, gettext, flex, bison @@ -24,7 +25,11 @@ Prereq: /sbin/install-info Obsoletes: gnupro %endif +# On ARM EABI systems, we do want -gnueabi to be part of the +# target triple. +%ifnarch %{arm} %define _gnu %{nil} +%endif %description Binutils is a collection of binary utilities, including ar (for @@ -65,6 +70,7 @@ to consider using libelf instead of BFD. %patch7 -p0 -b .symbolic-envvar-revert~ %patch8 -p0 -b .version~ %patch9 -p0 -b .build-id~ +%patch10 -p0 -b .pt_note-coalescing~ # On ppc64 we might use 64K pages sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*ppc.c @@ -215,10 +221,16 @@ fi %{_infodir}/bfd*info* %changelog -* Wed Jul 18 2007 Roland McGrath - 2.17.50.0.17-3 +* Tue Jul 25 2007 Jakub Jelinek 2.17.50.0.17-4 +- don't kill the %%{_gnu} part of target name on arm + (Lennert Buytenhek, #243516) +- create just one PT_NOTE segment header for all consecutive SHT_NOTE + sections + +* Wed Jul 18 2007 Roland McGrath 2.17.50.0.17-3 - fix for ld --build-id -* Sun Jul 15 2007 Roland McGrath - 2.17.50.0.17-2 +* Sun Jul 15 2007 Roland McGrath 2.17.50.0.17-2 - ld --build-id support * Wed Jun 27 2007 Jakub Jelinek 2.17.50.0.17-1