aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-07-30 21:15:22 +0000
committerUlrich Drepper <drepper@redhat.com>2005-07-30 21:15:22 +0000
commit23e2554f5b50ab775a6ac1b02cd071f741ff8159 (patch)
treec0b3fdef05c74e3785c8bf2384324177e4e2d05c
parent1ce359b0fc6ee2f371be84f17e98cf99932c4eff (diff)
downloadglibc-23e2554f5b50ab775a6ac1b02cd071f741ff8159.zip
glibc-23e2554f5b50ab775a6ac1b02cd071f741ff8159.tar.gz
glibc-23e2554f5b50ab775a6ac1b02cd071f741ff8159.tar.bz2
* elf/dl-load.c [__WORDSIZE==64] (FILEBUF_SIZE): Adjust the value
up. We have more program header entries now and the note section was normally not loaded.
-rw-r--r--ChangeLog4
-rw-r--r--elf/dl-load.c14
2 files changed, 11 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index ebb1def..fb10486 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2005-07-30 Ulrich Drepper <drepper@redhat.com>
+ * elf/dl-load.c [__WORDSIZE==64] (FILEBUF_SIZE): Adjust the value
+ up. We have more program header entries now and the note section
+ was normally not loaded.
+
* nis/nis_subr.c: Some minor code cleanups.
2005-07-29 Ulrich Drepper <drepper@redhat.com>
diff --git a/elf/dl-load.c b/elf/dl-load.c
index d8b3a56..677174d 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -122,19 +122,19 @@ int __stack_prot attribute_hidden attribute_relro
question is how large are the ELF and program header combined. The
ELF header 32-bit files is 52 bytes long and in 64-bit files is 64
bytes long. Each program header entry is again 32 and 56 bytes
- long respectively. I.e., even with a file which has 7 program
- header entries we only have to read 512B. Add to this a bit of
- margin for program notes and reading 512B and 640B for 32-bit and
- 64-bit files respecitvely is enough. If this heuristic should
- really fail for some file the code in `_dl_map_object_from_fd'
- knows how to recover. */
+ long respectively. I.e., even with a file which has 10 program
+ header entries we only have to read 372B/624B respectively. Add to
+ this a bit of margin for program notes and reading 512B and 832B
+ for 32-bit and 64-bit files respecitvely is enough. If this
+ heuristic should really fail for some file the code in
+ `_dl_map_object_from_fd' knows how to recover. */
struct filebuf
{
ssize_t len;
#if __WORDSIZE == 32
# define FILEBUF_SIZE 512
#else
-# define FILEBUF_SIZE 640
+# define FILEBUF_SIZE 832
#endif
char buf[FILEBUF_SIZE] __attribute__ ((aligned (__alignof (ElfW(Ehdr)))));
};