From 233c504cd940d9802226b6a3a092368b86978f5e Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 4 May 2011 10:01:24 +0200 Subject: */crt?.S: remove .size directives sed -i -e '/\.size[[:space:]]/d' $(grep -l "\.size" libc/sysdeps/linux/*/crt*.[sSc]) Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/i386/crt1.S | 1 - libc/sysdeps/linux/i386/crtn.S | 2 -- 2 files changed, 3 deletions(-) (limited to 'libc/sysdeps/linux/i386') diff --git a/libc/sysdeps/linux/i386/crt1.S b/libc/sysdeps/linux/i386/crt1.S index a133cb9e0..7dfeaf1a5 100644 --- a/libc/sysdeps/linux/i386/crt1.S +++ b/libc/sysdeps/linux/i386/crt1.S @@ -129,7 +129,6 @@ _start: #endif hlt /* Crash if somehow `exit' does return. */ -.size _start,.-_start /* Define a symbol for the first piece of initialized data. */ .data diff --git a/libc/sysdeps/linux/i386/crtn.S b/libc/sysdeps/linux/i386/crtn.S index 191250487..34d5b38e2 100644 --- a/libc/sysdeps/linux/i386/crtn.S +++ b/libc/sysdeps/linux/i386/crtn.S @@ -6,7 +6,6 @@ popl %ebx popl %ebp ret -.size _init,.-_init @@ -16,7 +15,6 @@ popl %ebx popl %ebp ret -.size _fini,.-_fini -- cgit v1.2.3 From 07464c3e7156f4c8dfcac673c74f19b700b1b3b5 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 5 May 2011 09:19:16 +0200 Subject: Revert "*/crt?.S: remove .size directives" Removing them generally was not a good idea This reverts commit 233c504cd940d9802226b6a3a092368b86978f5e. --- libc/sysdeps/linux/i386/crt1.S | 1 + libc/sysdeps/linux/i386/crtn.S | 2 ++ 2 files changed, 3 insertions(+) (limited to 'libc/sysdeps/linux/i386') diff --git a/libc/sysdeps/linux/i386/crt1.S b/libc/sysdeps/linux/i386/crt1.S index 7dfeaf1a5..a133cb9e0 100644 --- a/libc/sysdeps/linux/i386/crt1.S +++ b/libc/sysdeps/linux/i386/crt1.S @@ -129,6 +129,7 @@ _start: #endif hlt /* Crash if somehow `exit' does return. */ +.size _start,.-_start /* Define a symbol for the first piece of initialized data. */ .data diff --git a/libc/sysdeps/linux/i386/crtn.S b/libc/sysdeps/linux/i386/crtn.S index 34d5b38e2..191250487 100644 --- a/libc/sysdeps/linux/i386/crtn.S +++ b/libc/sysdeps/linux/i386/crtn.S @@ -6,6 +6,7 @@ popl %ebx popl %ebp ret +.size _init,.-_init @@ -15,6 +16,7 @@ popl %ebx popl %ebp ret +.size _fini,.-_fini -- cgit v1.2.3 From 5cf382c0f98d1943bcf51ffa8bde6103e1f102ab Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 5 May 2011 09:33:14 +0200 Subject: i386: fix .size of _init/_fini binutils-2.21 barf on .size that do not evaluate to const, so use the section size and not a function that is not visible here. Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/i386/crtn.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/sysdeps/linux/i386') diff --git a/libc/sysdeps/linux/i386/crtn.S b/libc/sysdeps/linux/i386/crtn.S index 191250487..ce2608383 100644 --- a/libc/sysdeps/linux/i386/crtn.S +++ b/libc/sysdeps/linux/i386/crtn.S @@ -6,7 +6,7 @@ popl %ebx popl %ebp ret -.size _init,.-_init +.size _init,.-.init @@ -16,7 +16,7 @@ popl %ebx popl %ebp ret -.size _fini,.-_fini +.size _fini,.-.fini -- cgit v1.2.3 From 074930dd7f2a18a7013cdb72cc38136f3be39c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Wed, 20 Apr 2011 13:59:15 +0300 Subject: posix_fadvise64: fix x86 implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 73d59554144f429b1cf0d4d7fa7de42bdf59ad92 completely broke the x86 implementation of posix_fadvise64. It moved the first the assembly code retn instruction gets missing depending on the Technically the file has two implementaions for posix_fadvise64, one when __NR_fadvise64_64 is available, and second one if only __NR_fadvise64 is there. Fix the #ifdef's to be proper for that. Signed-off-by: Timo Teräs Signed-off-by: Khem Raj --- libc/sysdeps/linux/i386/posix_fadvise64.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libc/sysdeps/linux/i386') diff --git a/libc/sysdeps/linux/i386/posix_fadvise64.S b/libc/sysdeps/linux/i386/posix_fadvise64.S index b4aeff1f4..8a8947d7b 100644 --- a/libc/sysdeps/linux/i386/posix_fadvise64.S +++ b/libc/sysdeps/linux/i386/posix_fadvise64.S @@ -22,7 +22,7 @@ #include #include -#if defined __NR_fadvise64_64 +#if defined __NR_fadvise64_64 || defined __NR_fadvise64 /* Was named __libc_posix_fadvise64 for some inexplicable reason. ** google says only uclibc has *__libc*_posix_fadviseXXX, @@ -35,6 +35,7 @@ .global posix_fadvise64 .type posix_fadvise64,%function posix_fadvise64: +#if defined __NR_fadvise64_64 /* Save regs */ pushl %ebp pushl %ebx @@ -91,6 +92,7 @@ overflow: /* Returns 0 on success, else an error code. */ negl %eax +#endif /* Successful; return the syscall's value. */ ret -- cgit v1.2.3 From 3e68c52b941636714d2599ea8adda9520ec2de23 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 10 May 2011 10:03:58 +0200 Subject: */crtn.S: Remove .size directive for _init and _fini These are split across objects so setting size does not (and never did) work since the expression cannot be computed at assembly time. This avoids errors from recent (> 2.21) gas. Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/i386/crtn.S | 2 -- 1 file changed, 2 deletions(-) (limited to 'libc/sysdeps/linux/i386') diff --git a/libc/sysdeps/linux/i386/crtn.S b/libc/sysdeps/linux/i386/crtn.S index ce2608383..34d5b38e2 100644 --- a/libc/sysdeps/linux/i386/crtn.S +++ b/libc/sysdeps/linux/i386/crtn.S @@ -6,7 +6,6 @@ popl %ebx popl %ebp ret -.size _init,.-.init @@ -16,7 +15,6 @@ popl %ebx popl %ebp ret -.size _fini,.-.fini -- cgit v1.2.3