aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-03 19:08:31 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-03 19:08:31 +0000
commitca97fb53255da0a01195a1b43c0d9138a4b44f49 (patch)
tree8150833a374cefd7d618d72969176e66393e9736
parent1739d268365514afbebc6b08d31173f4df7ba8fb (diff)
downloadglibc-ca97fb53255da0a01195a1b43c0d9138a4b44f49.tar
glibc-ca97fb53255da0a01195a1b43c0d9138a4b44f49.tar.gz
glibc-ca97fb53255da0a01195a1b43c0d9138a4b44f49.tar.bz2
glibc-ca97fb53255da0a01195a1b43c0d9138a4b44f49.zip
Update.
* elf/dl-load.c (struct filebuf): For 64-bit platforms use 640 byte filebuf size.
-rw-r--r--ChangeLog3
-rw-r--r--elf/dl-load.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fd2c88f9c7..6945433eaf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2003-03-03 Ulrich Drepper <drepper@redhat.com>
+ * elf/dl-load.c (struct filebuf): For 64-bit platforms use 640
+ byte filebuf size.
+
* libio/fileops.c (_IO_new_file_fopen): Close stillborn descriptor
if ccs parameter isn't valid. Reported by Andreas Schwab.
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 71a2ded832..4559c08c05 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -26,6 +26,7 @@
#include <string.h>
#include <unistd.h>
#include <ldsodefs.h>
+#include <bits/wordsize.h>
#include <sys/mman.h>
#include <sys/param.h>
#include <sys/stat.h>
@@ -109,6 +110,11 @@ ELF_PREFERRED_ADDRESS_DATA;
struct filebuf
{
ssize_t len;
+#ifdef __WORDSIZE == 32
+# define FILEBUF_SIZE 512
+#else
+# define FILEBUF_SIZE 640
+#endif
char buf[512] __attribute__ ((aligned (__alignof (ElfW(Ehdr)))));
};