binutils/binutils: do not fwd declare struct stat (2.22).
For canadian cross to host i686-mingw32 fwd declaring
struct stat is not possible.
Instead #include <sys/stat.h>
Signed-off-by: Titus von Boxberg <titus@v9g.de>
Message-Id: <417a15d4277913841ddd.1353100974@tschetwerikow.boxberg.lan>
Patchwork-Id: 199733
1 From 2911103dd4a03bbd3aad11eddfce524a5c9ba9b3 Mon Sep 17 00:00:00 2001
2 From: Khem Raj <raj.khem@gmail.com>
3 Date: Fri, 22 Jan 2010 13:00:20 +0100
4 Subject: [PATCH 03/15] Make use of macros from sys/asm.h in crt1.S
6 Needed for mips nptl to boot once again.
7 (cherry picked from commit 9c343fd4030dcd7a52616f365893177dded50346)
9 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 libc/sysdeps/linux/mips/crt1.S | 46 +++++++++++----------------------------
12 1 files changed, 13 insertions(+), 33 deletions(-)
14 diff --git a/libc/sysdeps/linux/mips/crt1.S b/libc/sysdeps/linux/mips/crt1.S
15 index e851d52..6a80412 100644
16 --- a/libc/sysdeps/linux/mips/crt1.S
17 +++ b/libc/sysdeps/linux/mips/crt1.S
22 -#if _MIPS_SIM == _MIPS_SIM_ABI32
25 - move $0, $31 /* Save old ra. */
26 - bal 10f /* Find addr of cpload. */
34 - move $0, $31; /* Save old ra. */
36 - bal 10f /* Find addr of .cpsetup. */
40 - .cpsetup $31, $25, 10b
46 - la $28, _gp /* Setup GP correctly if we're non-PIC. */
47 + PTR_LA $28, _gp /* Setup GP correctly if we're non-PIC. */
51 @@ -118,18 +99,18 @@ __start:
52 /* Allocate space on the stack for seven arguments and
53 * make sure the stack is aligned to double words (8 bytes) */
57 #if _MIPS_SIM == _MIPS_SIM_ABI32
60 - la $7, _init /* init */
62 - sw $8, 16($29) /* fini */
63 - sw $2, 20($29) /* rtld_fini */
64 - sw $29, 24($29) /* stack_end */
66 - and $29, -2 * PTRSIZE
69 PTR_LA $7, _init /* init */
70 - PTR_LA $8, _fini /* fini */
72 +#if _MIPS_SIM == _MIPS_SIM_ABI32
73 + PTR_S $8, 16($29) /* fini */
74 + PTR_S $2, 20($29) /* rtld_fini */
75 + PTR_S $29, 24($29) /* stack_end */
77 move $9, $2 /* rtld_fini */
78 move $10, $29 /* stack_end */
80 @@ -148,4 +129,3 @@ __data_start:
82 data_start = __data_start