diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-01-10 21:02:48 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-01-10 21:02:48 +0000 |
commit | 27d501fdbf0c6932e6170e8dece4d178d912bf94 (patch) | |
tree | 054224e4ebe3ee638fb5b8d28e9873fbcd13c537 /ldso/ldso/dl-startup.c | |
parent | 1c778b7cfac9228aa6dbd3c7d3b1417887fc3031 (diff) |
simple optimizations and style fixes in dynamic loading
text data bss dec hex filename
- 16709 240 92 17041 4291 lib/ld-uClibc.so
+ 16634 236 92 16962 4242 lib/ld-uClibc.so
- 4602 344 4 4950 1356 lib/libdl-0.9.30-svn.so
+ 4571 328 4 4903 1327 lib/libdl-0.9.30-svn.so
- 4602 344 4 4950 1356 lib/libdl.so
+ 4571 328 4 4903 1327 lib/libdl.so
Diffstat (limited to 'ldso/ldso/dl-startup.c')
-rw-r--r-- | ldso/ldso/dl-startup.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ldso/ldso/dl-startup.c b/ldso/ldso/dl-startup.c index efd02da46..6b69c7498 100644 --- a/ldso/ldso/dl-startup.c +++ b/ldso/ldso/dl-startup.c @@ -176,11 +176,8 @@ DL_START(unsigned long args) /* Do not use an inline _dl_strncmp here or some arches * will blow chunks, i.e. those that need to relocate all * string constants... */ - || header->e_ident[EI_MAG0] != ELFMAG0 - || header->e_ident[EI_MAG1] != ELFMAG1 - || header->e_ident[EI_MAG2] != ELFMAG2 - || header->e_ident[EI_MAG3] != ELFMAG3) - { + || *((uint32_t*) &header->e_ident) != ELFMAG_U32 + ) { SEND_EARLY_STDERR("Invalid ELF header\n"); _dl_exit(0); } |