aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-12-09 01:39:16 +0000
committerUlrich Drepper <drepper@redhat.com>1999-12-09 01:39:16 +0000
commitaf1680f1f9926a0662fc35a53c491d2eec1ab262 (patch)
treeae7d3277c18194231c558f8ef146ff5d8628c684
parentd587d83bd9825c431456774321bfd0d5eabe7fee (diff)
downloadglibc-af1680f1f9926a0662fc35a53c491d2eec1ab262.tar
glibc-af1680f1f9926a0662fc35a53c491d2eec1ab262.tar.gz
glibc-af1680f1f9926a0662fc35a53c491d2eec1ab262.tar.bz2
glibc-af1680f1f9926a0662fc35a53c491d2eec1ab262.zip
Update.
* elf/readlib.c: Include a.out.h last since the Linux/Alpha headers are not clean enough.
-rw-r--r--ChangeLog3
-rw-r--r--elf/readlib.c7
-rw-r--r--sysdeps/unix/sysv/linux/ftruncate64.c5
-rw-r--r--sysdeps/unix/sysv/linux/i386/mmap64.S12
-rw-r--r--sysdeps/unix/sysv/linux/truncate64.c5
5 files changed, 19 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index e98be9ae49..a7a4aaed45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
1999-12-08 Ulrich Drepper <drepper@cygnus.com>
+ * elf/readlib.c: Include a.out.h last since the Linux/Alpha
+ headers are not clean enough.
+
* sysdeps/unix/sysv/linux/getrlimit.c: Remove K&R compatibility.
* sysdeps/unix/sysv/linux/kernel-features.h: Define
diff --git a/elf/readlib.c b/elf/readlib.c
index e6d0619091..abd380b9b7 100644
--- a/elf/readlib.c
+++ b/elf/readlib.c
@@ -24,7 +24,6 @@
modified to read some other file formats. */
-#include <a.out.h>
#include <elf.h>
#include <error.h>
#include <link.h>
@@ -32,6 +31,7 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#include <a.out.h>
#include <sys/mman.h>
#include <sys/stat.h>
@@ -71,7 +71,7 @@ process_file (const char *file_name, const char *lib, int *flag, char **soname,
struct stat statbuf;
void *file_contents;
int ret;
-
+
ElfW(Ehdr) *elf_header;
struct exec *aout_header;
@@ -123,7 +123,7 @@ process_file (const char *file_name, const char *lib, int *flag, char **soname,
*flag = FLAG_LIBC4;
goto done;
}
-
+
elf_header = (ElfW(Ehdr) *) file_contents;
if (elf_header->e_ident [EI_MAG0] != ELFMAG0
|| elf_header->e_ident [EI_MAG1] != ELFMAG1
@@ -157,4 +157,3 @@ process_file (const char *file_name, const char *lib, int *flag, char **soname,
/* Get architecture specific version of process_elf_file. */
#include "readelflib.c"
-
diff --git a/sysdeps/unix/sysv/linux/ftruncate64.c b/sysdeps/unix/sysv/linux/ftruncate64.c
index 17a5ab0288..6644b0523c 100644
--- a/sysdeps/unix/sysv/linux/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/ftruncate64.c
@@ -41,8 +41,9 @@ ftruncate64 (fd, length)
if (! have_no_ftruncate64)
#endif
{
- int result = INLINE_SYSCALL (ftruncate64, 3, fd, length >> 32,
- length & 0xffffffff);
+ unsigned int low = length & 0xffffffff;
+ unsigned int high = length >> 32;
+ int result = INLINE_SYSCALL (ftruncate64, 3, fd, low, high);
#ifndef __ASSUME_TRUNCATE64_SYSCALL
if (result != -1 || errno != ENOSYS)
diff --git a/sysdeps/unix/sysv/linux/i386/mmap64.S b/sysdeps/unix/sysv/linux/i386/mmap64.S
index 075c3f3345..916149a78a 100644
--- a/sysdeps/unix/sysv/linux/i386/mmap64.S
+++ b/sysdeps/unix/sysv/linux/i386/mmap64.S
@@ -21,6 +21,7 @@
#include "kernel-features.h"
#define EINVAL 22
+#define ENOSYS 38
.text
@@ -36,11 +37,12 @@ ENTRY (__mmap64)
movl $SYS_ify(mmap2), %eax /* System call number in %eax. */
- movl 40(%esp), %ebp
+ movl 40(%esp), %edx
movl 44(%esp), %ecx
- shrld $12, %ecx, %ebp /* mmap2 takes the offset in pages. */
+ shrdl $12, %ecx, %edx /* mmap2 takes the offset in pages. */
shrl $12, %ecx
jne L(einval)
+ movl %edx, %ebp
movl 20(%esp), %ebx
movl 24(%esp), %ecx
@@ -68,8 +70,8 @@ L(pseudo_end):
#ifndef __ASSUME_MMAP2_SYSCALL
2:
- cmp $-EINVAL, %eax
- je 2f
+ cmp $-ENOSYS, %eax
+ je 3f
#endif
/* This means the offset value is too large. */
@@ -88,7 +90,7 @@ L(einval):
/* Save registers. */
movl %ebx, %edx
# endif
-
+3:
cmpl $0, 44(%esp)
jne L(einval)
diff --git a/sysdeps/unix/sysv/linux/truncate64.c b/sysdeps/unix/sysv/linux/truncate64.c
index 0a20547789..42b72731a9 100644
--- a/sysdeps/unix/sysv/linux/truncate64.c
+++ b/sysdeps/unix/sysv/linux/truncate64.c
@@ -41,8 +41,9 @@ truncate64 (path, length)
if (! have_no_truncate64)
#endif
{
- int result = INLINE_SYSCALL (truncate64, 3, path, length >> 32,
- length & 0xffffffff);
+ unsigned int low = length & 0xffffffff;
+ unsigned int high = length >> 32;
+ int result = INLINE_SYSCALL (truncate64, 3, path, low, high);
#ifndef __ASSUME_TRUNCATE64_SYSCALL
if (result != -1 || errno != ENOSYS)