Summary: | emerge binutils 2.14.90.0.7-r4 - failed patch | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Filip Jirsák <Filip.Jirsak> |
Component: | [OLD] Core system | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Filip Jirsák
2004-01-28 03:34:40 UTC
Some problems with free space on device (but 3.3G free) on my computer. Looks like some hw problem. I'm experiencing a similar bug during installation from LiveCD: ---------------------------- emerge (34 of 86) sys-devel/binutils-2.14.90.0.7-r4 to / Failed Patch: binutils-2.14.90.0.7-tls-section-alignment.patch! Include in your bugreport the contents of: /var/tmp/portage/binutils-2.14.90.0.7-r4/temp/binutils-2.14.90.0.7-tls-section-alignment-patch-15964.out ERROR: sys-devel/binutils-2.14.90.0.7-r4 failed. Function epatch, Line 322, Exitcode 0 Failed Patch: binutils-2.14.90.0.7-tls-section-alignment.patch ---------------------------- From binutils-2.14.90.0.7-tls-section-alignment-patch-15964.out: ***** binutils-2.14.90.0.7-tls-section-alignment.patch ***** =============================================================== PATCH COMMAND: patch -g0 -p0 < /usr/portage/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-tls-section-alignment.patch =============================================================== patching file bfd/bfd-in.h patching file bfd/elf-bfd.h patching file bfd/elf.c patching file bfd/elflink.c Hunk #1 succeeded at 2530 (offset 11 lines). patching file bfd/elflink.h patching file bfd/elf32-i386.c patching file bfd/elf32-s390.c Hunk #1 succeeded at 2214 (offset -2 lines). Hunk #2 succeeded at 2228 (offset -2 lines). patching file bfd/elf32-sh.c patching file bfd/elf32-sparc.c patching file bfd/elf64-s390.c Hunk #1 succeeded at 2184 (offset -2 lines). patch: **** malformed patch at line 484: Ix86-64.c =============================================================== PATCH COMMAND: patch -g0 -p1 < /usr/portage/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-tls-section-alignment.patch =============================================================== can't find file to patch at input line 76 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |From: Alan Modra <amodra at bigpond dot net dot au> |To: binutils at sources dot redhat dot com |Subject: tls section alignment | |This testcase fails to return the expected status on powerpc-linux, |depending on optimization level (really on where .tdata starts, but that |often changes depending on optimization). | |__thread int a = 10; |__thread int b __attribute__ ((aligned (8))); | |int main (void) |{ | return a; |} | |What's happening is that the TLS segment, made up of .tdata and .tbss, |ends up with p_vaddr not a multiple of p_align. Under these |circumstances glibc rounds down the TLS segment start address, which |affects targets that set their thread pointer from the start of a TLS |block. In the powerpc-linux testcase, we end up accessing *(&a-1). | |I started off fixing this just for powerpc and powerpc64, then decided |to teach ld how to ensure that the TLS segment p_vaddr is aligned. | |bfd/ChangeLog | * bfd-in.h (_bfd_elf_tls_setup): Declare. | * bfd-in2.h: Regenerate. | * elf-bfd.h (struct elf_link_tls_segment): Delete. | (struct elf_link_hash_table): Add tls_sec and tls_size. | * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size. | * elflink.c (_bfd_elf_tls_setup): New function. | * elflink.h (struct elf_final_link_info): Remove first_tls_sec. | (elf_bfd_final_link): Don't set first_tls_sec here. Update code | saving tls segment info, round segment size up. | (elf_link_output_extsym): Adjust code using tls segment info. | (elf_link_input_bfd): Likewise. | * elf32-i386.c (dtpoff_base, tpoff): Likewise. | * elf32-s390.c (dtpoff_base, tpoff): Likewise. | * elf32-sh.c (dtpoff_base, tpoff): Likewise. | * elf32-sparc.c (dtpoff_base, tpoff): Likewise. | * elf64-s390.c (dtpoff_base, tpoff): Likewise. | * elf64-x86-64.c (dtpoff_base, tpoff): Likewise. | * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise. | (elfNN_ia64_dtprel_base): Likewise. | * elf64-alpha.c (alpha_get_dtprel_base): Likewise. | (alpha_get_tprel_base): Likewise. | (struct alpha_relax_info): Remove tls_segment. | (elf64_alpha_relax_got_load): Adjust invocation of | alpha_get_dtprel_base and alpha_get_tprel_base. | (elf64_alpha_relax_tls_get_addr): Likewise. | (elf64_alpha_relax_section): Likewise. | (elf64_alpha_relocate_section): Likewise. | (elf64_alpha_relax_find_tls_segment): Delete. | * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec. | (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section. | (ppc_elf_relocate_section): Adjust to use elf.tls_sec. | * elf32-ppc.h (ppc_elf_tls_setup): Update. | * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec. | (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section. | (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec. | (ppc64_elf_relocate_section): Likewise. | * elf64-ppc.h (ppc64_elf_tls_setup): Update. | |ld/ChangeLog | * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Call | _bfd_elf_tls_setup. | |Index: bfd/bfd-in.h |=================================================================== |RCS file: /cvs/src/src/bfd/bfd-in.h,v |retrieving revision 1.68 |diff -u -p -r1.68 bfd-in.h |--- bfd/bfd-in.h 31 Oct 2003 05:32:45 -0000 1.68 |+++ bfd/bfd-in.h 4 Nov 2003 05:33:50 -0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 93 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf-bfd.h |=================================================================== |RCS file: /cvs/src/src/bfd/elf-bfd.h,v |retrieving revision 1.116 |diff -u -p -r1.116 elf-bfd.h |--- bfd/elf-bfd.h 3 Nov 2003 15:17:38 -0000 1.116 |+++ bfd/elf-bfd.h 4 Nov 2003 05:33:53 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 127 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf.c,v |retrieving revision 1.205 |diff -u -p -r1.205 elf.c |--- bfd/elf.c 31 Oct 2003 05:32:45 -0000 1.205 |+++ bfd/elf.c 4 Nov 2003 05:34:00 -0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 144 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elflink.c |=================================================================== |RCS file: /cvs/src/src/bfd/elflink.c,v |retrieving revision 1.48 |diff -u -p -r1.48 elflink.c |--- bfd/elflink.c 30 Oct 2003 14:13:50 -0000 1.48 |+++ bfd/elflink.c 4 Nov 2003 05:34:00 -0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 183 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elflink.h |=================================================================== |RCS file: /cvs/src/src/bfd/elflink.h,v |retrieving revision 1.245 |diff -u -p -r1.245 elflink.h |--- bfd/elflink.h 24 Oct 2003 14:55:14 -0000 1.245 |+++ bfd/elflink.h 4 Nov 2003 05:34:02 -0000 -------------------------- No file to patch. Skipping patch. 6 out of 6 hunks ignored can't find file to patch at input line 295 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-i386.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-i386.c,v |retrieving revision 1.112 |diff -u -p -r1.112 elf32-i386.c |--- bfd/elf32-i386.c 3 Nov 2003 15:17:38 -0000 1.112 |+++ bfd/elf32-i386.c 4 Nov 2003 05:34:04 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 335 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-s390.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-s390.c,v |retrieving revision 1.49 |diff -u -p -r1.49 elf32-s390.c |--- bfd/elf32-s390.c 3 Nov 2003 15:17:39 -0000 1.49 |+++ bfd/elf32-s390.c 4 Nov 2003 05:34:06 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 375 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-sh.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-sh.c,v |retrieving revision 1.95 |diff -u -p -r1.95 elf32-sh.c |--- bfd/elf32-sh.c 3 Nov 2003 15:17:39 -0000 1.95 |+++ bfd/elf32-sh.c 4 Nov 2003 05:34:10 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 412 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-sparc.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-sparc.c,v |retrieving revision 1.57 |diff -u -p -r1.57 elf32-sparc.c |--- bfd/elf32-sparc.c 3 Nov 2003 15:17:39 -0000 1.57 |+++ bfd/elf32-sparc.c 4 Nov 2003 05:34:11 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 452 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf64-s390.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf64-s390.c,v |retrieving revision 1.50 |diff -u -p -r1.50 elf64-s390.c |--- bfd/elf64-s390.c 3 Nov 2003 15:17:39 -0000 1.50 |+++ bfd/elf64-s390.c 4 Nov 2003 05:34:13 -0000 -------------------------- No file to patch. Skipping patch. patch: **** malformed patch at line 484: Ix86-64.c =============================================================== PATCH COMMAND: patch -g0 -p2 < /usr/portage/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-tls-section-alignment.patch =============================================================== missing header for unified diff at line 76 of patch can't find file to patch at input line 76 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |From: Alan Modra <amodra at bigpond dot net dot au> |To: binutils at sources dot redhat dot com |Subject: tls section alignment | |This testcase fails to return the expected status on powerpc-linux, |depending on optimization level (really on where .tdata starts, but that |often changes depending on optimization). | |__thread int a = 10; |__thread int b __attribute__ ((aligned (8))); | |int main (void) |{ | return a; |} | |What's happening is that the TLS segment, made up of .tdata and .tbss, |ends up with p_vaddr not a multiple of p_align. Under these |circumstances glibc rounds down the TLS segment start address, which |affects targets that set their thread pointer from the start of a TLS |block. In the powerpc-linux testcase, we end up accessing *(&a-1). | |I started off fixing this just for powerpc and powerpc64, then decided |to teach ld how to ensure that the TLS segment p_vaddr is aligned. | |bfd/ChangeLog | * bfd-in.h (_bfd_elf_tls_setup): Declare. | * bfd-in2.h: Regenerate. | * elf-bfd.h (struct elf_link_tls_segment): Delete. | (struct elf_link_hash_table): Add tls_sec and tls_size. | * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size. | * elflink.c (_bfd_elf_tls_setup): New function. | * elflink.h (struct elf_final_link_info): Remove first_tls_sec. | (elf_bfd_final_link): Don't set first_tls_sec here. Update code | saving tls segment info, round segment size up. | (elf_link_output_extsym): Adjust code using tls segment info. | (elf_link_input_bfd): Likewise. | * elf32-i386.c (dtpoff_base, tpoff): Likewise. | * elf32-s390.c (dtpoff_base, tpoff): Likewise. | * elf32-sh.c (dtpoff_base, tpoff): Likewise. | * elf32-sparc.c (dtpoff_base, tpoff): Likewise. | * elf64-s390.c (dtpoff_base, tpoff): Likewise. | * elf64-x86-64.c (dtpoff_base, tpoff): Likewise. | * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise. | (elfNN_ia64_dtprel_base): Likewise. | * elf64-alpha.c (alpha_get_dtprel_base): Likewise. | (alpha_get_tprel_base): Likewise. | (struct alpha_relax_info): Remove tls_segment. | (elf64_alpha_relax_got_load): Adjust invocation of | alpha_get_dtprel_base and alpha_get_tprel_base. | (elf64_alpha_relax_tls_get_addr): Likewise. | (elf64_alpha_relax_section): Likewise. | (elf64_alpha_relocate_section): Likewise. | (elf64_alpha_relax_find_tls_segment): Delete. | * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec. | (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section. | (ppc_elf_relocate_section): Adjust to use elf.tls_sec. | * elf32-ppc.h (ppc_elf_tls_setup): Update. | * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec. | (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section. | (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec. | (ppc64_elf_relocate_section): Likewise. | * elf64-ppc.h (ppc64_elf_tls_setup): Update. | |ld/ChangeLog | * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Call | _bfd_elf_tls_setup. | |Index: bfd/bfd-in.h |=================================================================== |RCS file: /cvs/src/src/bfd/bfd-in.h,v |retrieving revision 1.68 |diff -u -p -r1.68 bfd-in.h |--- bfd/bfd-in.h 31 Oct 2003 05:32:45 -0000 1.68 |+++ bfd/bfd-in.h 4 Nov 2003 05:33:50 -0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored missing header for unified diff at line 93 of patch can't find file to patch at input line 93 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf-bfd.h |=================================================================== |RCS file: /cvs/src/src/bfd/elf-bfd.h,v |retrieving revision 1.116 |diff -u -p -r1.116 elf-bfd.h |--- bfd/elf-bfd.h 3 Nov 2003 15:17:38 -0000 1.116 |+++ bfd/elf-bfd.h 4 Nov 2003 05:33:53 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 127 of patch can't find file to patch at input line 127 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf.c,v |retrieving revision 1.205 |diff -u -p -r1.205 elf.c |--- bfd/elf.c 31 Oct 2003 05:32:45 -0000 1.205 |+++ bfd/elf.c 4 Nov 2003 05:34:00 -0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored missing header for unified diff at line 144 of patch can't find file to patch at input line 144 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elflink.c |=================================================================== |RCS file: /cvs/src/src/bfd/elflink.c,v |retrieving revision 1.48 |diff -u -p -r1.48 elflink.c |--- bfd/elflink.c 30 Oct 2003 14:13:50 -0000 1.48 |+++ bfd/elflink.c 4 Nov 2003 05:34:00 -0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored missing header for unified diff at line 183 of patch can't find file to patch at input line 183 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elflink.h |=================================================================== |RCS file: /cvs/src/src/bfd/elflink.h,v |retrieving revision 1.245 |diff -u -p -r1.245 elflink.h |--- bfd/elflink.h 24 Oct 2003 14:55:14 -0000 1.245 |+++ bfd/elflink.h 4 Nov 2003 05:34:02 -0000 -------------------------- No file to patch. Skipping patch. 6 out of 6 hunks ignored missing header for unified diff at line 295 of patch can't find file to patch at input line 295 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-i386.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-i386.c,v |retrieving revision 1.112 |diff -u -p -r1.112 elf32-i386.c |--- bfd/elf32-i386.c 3 Nov 2003 15:17:38 -0000 1.112 |+++ bfd/elf32-i386.c 4 Nov 2003 05:34:04 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 335 of patch can't find file to patch at input line 335 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-s390.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-s390.c,v |retrieving revision 1.49 |diff -u -p -r1.49 elf32-s390.c |--- bfd/elf32-s390.c 3 Nov 2003 15:17:39 -0000 1.49 |+++ bfd/elf32-s390.c 4 Nov 2003 05:34:06 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 375 of patch can't find file to patch at input line 375 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-sh.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-sh.c,v |retrieving revision 1.95 |diff -u -p -r1.95 elf32-sh.c |--- bfd/elf32-sh.c 3 Nov 2003 15:17:39 -0000 1.95 |+++ bfd/elf32-sh.c 4 Nov 2003 05:34:10 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 412 of patch can't find file to patch at input line 412 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-sparc.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-sparc.c,v |retrieving revision 1.57 |diff -u -p -r1.57 elf32-sparc.c |--- bfd/elf32-sparc.c 3 Nov 2003 15:17:39 -0000 1.57 |+++ bfd/elf32-sparc.c 4 Nov 2003 05:34:11 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 452 of patch can't find file to patch at input line 452 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf64-s390.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf64-s390.c,v |retrieving revision 1.50 |diff -u -p -r1.50 elf64-s390.c |--- bfd/elf64-s390.c 3 Nov 2003 15:17:39 -0000 1.50 |+++ bfd/elf64-s390.c 4 Nov 2003 05:34:13 -0000 -------------------------- No file to patch. Skipping patch. patch: **** malformed patch at line 484: Ix86-64.c =============================================================== PATCH COMMAND: patch -g0 -p3 < /usr/portage/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-tls-section-alignment.patch =============================================================== missing header for unified diff at line 76 of patch can't find file to patch at input line 76 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |From: Alan Modra <amodra at bigpond dot net dot au> |To: binutils at sources dot redhat dot com |Subject: tls section alignment | |This testcase fails to return the expected status on powerpc-linux, |depending on optimization level (really on where .tdata starts, but that |often changes depending on optimization). | |__thread int a = 10; |__thread int b __attribute__ ((aligned (8))); | |int main (void) |{ | return a; |} | |What's happening is that the TLS segment, made up of .tdata and .tbss, |ends up with p_vaddr not a multiple of p_align. Under these |circumstances glibc rounds down the TLS segment start address, which |affects targets that set their thread pointer from the start of a TLS |block. In the powerpc-linux testcase, we end up accessing *(&a-1). | |I started off fixing this just for powerpc and powerpc64, then decided |to teach ld how to ensure that the TLS segment p_vaddr is aligned. | |bfd/ChangeLog | * bfd-in.h (_bfd_elf_tls_setup): Declare. | * bfd-in2.h: Regenerate. | * elf-bfd.h (struct elf_link_tls_segment): Delete. | (struct elf_link_hash_table): Add tls_sec and tls_size. | * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size. | * elflink.c (_bfd_elf_tls_setup): New function. | * elflink.h (struct elf_final_link_info): Remove first_tls_sec. | (elf_bfd_final_link): Don't set first_tls_sec here. Update code | saving tls segment info, round segment size up. | (elf_link_output_extsym): Adjust code using tls segment info. | (elf_link_input_bfd): Likewise. | * elf32-i386.c (dtpoff_base, tpoff): Likewise. | * elf32-s390.c (dtpoff_base, tpoff): Likewise. | * elf32-sh.c (dtpoff_base, tpoff): Likewise. | * elf32-sparc.c (dtpoff_base, tpoff): Likewise. | * elf64-s390.c (dtpoff_base, tpoff): Likewise. | * elf64-x86-64.c (dtpoff_base, tpoff): Likewise. | * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise. | (elfNN_ia64_dtprel_base): Likewise. | * elf64-alpha.c (alpha_get_dtprel_base): Likewise. | (alpha_get_tprel_base): Likewise. | (struct alpha_relax_info): Remove tls_segment. | (elf64_alpha_relax_got_load): Adjust invocation of | alpha_get_dtprel_base and alpha_get_tprel_base. | (elf64_alpha_relax_tls_get_addr): Likewise. | (elf64_alpha_relax_section): Likewise. | (elf64_alpha_relocate_section): Likewise. | (elf64_alpha_relax_find_tls_segment): Delete. | * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec. | (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section. | (ppc_elf_relocate_section): Adjust to use elf.tls_sec. | * elf32-ppc.h (ppc_elf_tls_setup): Update. | * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec. | (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section. | (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec. | (ppc64_elf_relocate_section): Likewise. | * elf64-ppc.h (ppc64_elf_tls_setup): Update. | |ld/ChangeLog | * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Call | _bfd_elf_tls_setup. | |Index: bfd/bfd-in.h |=================================================================== |RCS file: /cvs/src/src/bfd/bfd-in.h,v |retrieving revision 1.68 |diff -u -p -r1.68 bfd-in.h |--- bfd/bfd-in.h 31 Oct 2003 05:32:45 -0000 1.68 |+++ bfd/bfd-in.h 4 Nov 2003 05:33:50 -0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored missing header for unified diff at line 93 of patch can't find file to patch at input line 93 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf-bfd.h |=================================================================== |RCS file: /cvs/src/src/bfd/elf-bfd.h,v |retrieving revision 1.116 |diff -u -p -r1.116 elf-bfd.h |--- bfd/elf-bfd.h 3 Nov 2003 15:17:38 -0000 1.116 |+++ bfd/elf-bfd.h 4 Nov 2003 05:33:53 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 127 of patch can't find file to patch at input line 127 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf.c,v |retrieving revision 1.205 |diff -u -p -r1.205 elf.c |--- bfd/elf.c 31 Oct 2003 05:32:45 -0000 1.205 |+++ bfd/elf.c 4 Nov 2003 05:34:00 -0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored missing header for unified diff at line 144 of patch can't find file to patch at input line 144 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elflink.c |=================================================================== |RCS file: /cvs/src/src/bfd/elflink.c,v |retrieving revision 1.48 |diff -u -p -r1.48 elflink.c |--- bfd/elflink.c 30 Oct 2003 14:13:50 -0000 1.48 |+++ bfd/elflink.c 4 Nov 2003 05:34:00 -0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored missing header for unified diff at line 183 of patch can't find file to patch at input line 183 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elflink.h |=================================================================== |RCS file: /cvs/src/src/bfd/elflink.h,v |retrieving revision 1.245 |diff -u -p -r1.245 elflink.h |--- bfd/elflink.h 24 Oct 2003 14:55:14 -0000 1.245 |+++ bfd/elflink.h 4 Nov 2003 05:34:02 -0000 -------------------------- No file to patch. Skipping patch. 6 out of 6 hunks ignored missing header for unified diff at line 295 of patch can't find file to patch at input line 295 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-i386.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-i386.c,v |retrieving revision 1.112 |diff -u -p -r1.112 elf32-i386.c |--- bfd/elf32-i386.c 3 Nov 2003 15:17:38 -0000 1.112 |+++ bfd/elf32-i386.c 4 Nov 2003 05:34:04 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 335 of patch can't find file to patch at input line 335 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-s390.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-s390.c,v |retrieving revision 1.49 |diff -u -p -r1.49 elf32-s390.c |--- bfd/elf32-s390.c 3 Nov 2003 15:17:39 -0000 1.49 |+++ bfd/elf32-s390.c 4 Nov 2003 05:34:06 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 375 of patch can't find file to patch at input line 375 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-sh.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-sh.c,v |retrieving revision 1.95 |diff -u -p -r1.95 elf32-sh.c |--- bfd/elf32-sh.c 3 Nov 2003 15:17:39 -0000 1.95 |+++ bfd/elf32-sh.c 4 Nov 2003 05:34:10 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 412 of patch can't find file to patch at input line 412 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-sparc.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-sparc.c,v |retrieving revision 1.57 |diff -u -p -r1.57 elf32-sparc.c |--- bfd/elf32-sparc.c 3 Nov 2003 15:17:39 -0000 1.57 |+++ bfd/elf32-sparc.c 4 Nov 2003 05:34:11 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 452 of patch can't find file to patch at input line 452 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf64-s390.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf64-s390.c,v |retrieving revision 1.50 |diff -u -p -r1.50 elf64-s390.c |--- bfd/elf64-s390.c 3 Nov 2003 15:17:39 -0000 1.50 |+++ bfd/elf64-s390.c 4 Nov 2003 05:34:13 -0000 -------------------------- No file to patch. Skipping patch. patch: **** malformed patch at line 484: Ix86-64.c =============================================================== PATCH COMMAND: patch -g0 -p4 < /usr/portage/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-tls-section-alignment.patch =============================================================== missing header for unified diff at line 76 of patch can't find file to patch at input line 76 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |From: Alan Modra <amodra at bigpond dot net dot au> |To: binutils at sources dot redhat dot com |Subject: tls section alignment | |This testcase fails to return the expected status on powerpc-linux, |depending on optimization level (really on where .tdata starts, but that |often changes depending on optimization). | |__thread int a = 10; |__thread int b __attribute__ ((aligned (8))); | |int main (void) |{ | return a; |} | |What's happening is that the TLS segment, made up of .tdata and .tbss, |ends up with p_vaddr not a multiple of p_align. Under these |circumstances glibc rounds down the TLS segment start address, which |affects targets that set their thread pointer from the start of a TLS |block. In the powerpc-linux testcase, we end up accessing *(&a-1). | |I started off fixing this just for powerpc and powerpc64, then decided |to teach ld how to ensure that the TLS segment p_vaddr is aligned. | |bfd/ChangeLog | * bfd-in.h (_bfd_elf_tls_setup): Declare. | * bfd-in2.h: Regenerate. | * elf-bfd.h (struct elf_link_tls_segment): Delete. | (struct elf_link_hash_table): Add tls_sec and tls_size. | * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size. | * elflink.c (_bfd_elf_tls_setup): New function. | * elflink.h (struct elf_final_link_info): Remove first_tls_sec. | (elf_bfd_final_link): Don't set first_tls_sec here. Update code | saving tls segment info, round segment size up. | (elf_link_output_extsym): Adjust code using tls segment info. | (elf_link_input_bfd): Likewise. | * elf32-i386.c (dtpoff_base, tpoff): Likewise. | * elf32-s390.c (dtpoff_base, tpoff): Likewise. | * elf32-sh.c (dtpoff_base, tpoff): Likewise. | * elf32-sparc.c (dtpoff_base, tpoff): Likewise. | * elf64-s390.c (dtpoff_base, tpoff): Likewise. | * elf64-x86-64.c (dtpoff_base, tpoff): Likewise. | * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise. | (elfNN_ia64_dtprel_base): Likewise. | * elf64-alpha.c (alpha_get_dtprel_base): Likewise. | (alpha_get_tprel_base): Likewise. | (struct alpha_relax_info): Remove tls_segment. | (elf64_alpha_relax_got_load): Adjust invocation of | alpha_get_dtprel_base and alpha_get_tprel_base. | (elf64_alpha_relax_tls_get_addr): Likewise. | (elf64_alpha_relax_section): Likewise. | (elf64_alpha_relocate_section): Likewise. | (elf64_alpha_relax_find_tls_segment): Delete. | * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec. | (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section. | (ppc_elf_relocate_section): Adjust to use elf.tls_sec. | * elf32-ppc.h (ppc_elf_tls_setup): Update. | * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec. | (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section. | (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec. | (ppc64_elf_relocate_section): Likewise. | * elf64-ppc.h (ppc64_elf_tls_setup): Update. | |ld/ChangeLog | * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Call | _bfd_elf_tls_setup. | |Index: bfd/bfd-in.h |=================================================================== |RCS file: /cvs/src/src/bfd/bfd-in.h,v |retrieving revision 1.68 |diff -u -p -r1.68 bfd-in.h |--- bfd/bfd-in.h 31 Oct 2003 05:32:45 -0000 1.68 |+++ bfd/bfd-in.h 4 Nov 2003 05:33:50 -0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored missing header for unified diff at line 93 of patch can't find file to patch at input line 93 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf-bfd.h |=================================================================== |RCS file: /cvs/src/src/bfd/elf-bfd.h,v |retrieving revision 1.116 |diff -u -p -r1.116 elf-bfd.h |--- bfd/elf-bfd.h 3 Nov 2003 15:17:38 -0000 1.116 |+++ bfd/elf-bfd.h 4 Nov 2003 05:33:53 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 127 of patch can't find file to patch at input line 127 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf.c,v |retrieving revision 1.205 |diff -u -p -r1.205 elf.c |--- bfd/elf.c 31 Oct 2003 05:32:45 -0000 1.205 |+++ bfd/elf.c 4 Nov 2003 05:34:00 -0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored missing header for unified diff at line 144 of patch can't find file to patch at input line 144 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elflink.c |=================================================================== |RCS file: /cvs/src/src/bfd/elflink.c,v |retrieving revision 1.48 |diff -u -p -r1.48 elflink.c |--- bfd/elflink.c 30 Oct 2003 14:13:50 -0000 1.48 |+++ bfd/elflink.c 4 Nov 2003 05:34:00 -0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored missing header for unified diff at line 183 of patch can't find file to patch at input line 183 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elflink.h |=================================================================== |RCS file: /cvs/src/src/bfd/elflink.h,v |retrieving revision 1.245 |diff -u -p -r1.245 elflink.h |--- bfd/elflink.h 24 Oct 2003 14:55:14 -0000 1.245 |+++ bfd/elflink.h 4 Nov 2003 05:34:02 -0000 -------------------------- No file to patch. Skipping patch. 6 out of 6 hunks ignored missing header for unified diff at line 295 of patch can't find file to patch at input line 295 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-i386.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-i386.c,v |retrieving revision 1.112 |diff -u -p -r1.112 elf32-i386.c |--- bfd/elf32-i386.c 3 Nov 2003 15:17:38 -0000 1.112 |+++ bfd/elf32-i386.c 4 Nov 2003 05:34:04 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 335 of patch can't find file to patch at input line 335 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-s390.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-s390.c,v |retrieving revision 1.49 |diff -u -p -r1.49 elf32-s390.c |--- bfd/elf32-s390.c 3 Nov 2003 15:17:39 -0000 1.49 |+++ bfd/elf32-s390.c 4 Nov 2003 05:34:06 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 375 of patch can't find file to patch at input line 375 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-sh.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-sh.c,v |retrieving revision 1.95 |diff -u -p -r1.95 elf32-sh.c |--- bfd/elf32-sh.c 3 Nov 2003 15:17:39 -0000 1.95 |+++ bfd/elf32-sh.c 4 Nov 2003 05:34:10 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 412 of patch can't find file to patch at input line 412 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf32-sparc.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf32-sparc.c,v |retrieving revision 1.57 |diff -u -p -r1.57 elf32-sparc.c |--- bfd/elf32-sparc.c 3 Nov 2003 15:17:39 -0000 1.57 |+++ bfd/elf32-sparc.c 4 Nov 2003 05:34:11 -0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 452 of patch can't find file to patch at input line 452 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: bfd/elf64-s390.c |=================================================================== |RCS file: /cvs/src/src/bfd/elf64-s390.c,v |retrieving revision 1.50 |diff -u -p -r1.50 elf64-s390.c |--- bfd/elf64-s390.c 3 Nov 2003 15:17:39 -0000 1.50 |+++ bfd/elf64-s390.c 4 Nov 2003 05:34:13 -0000 -------------------------- No file to patch. Skipping patch. patch: **** malformed patch at line 484: Ix86-64.c |