mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
2000-05-26 Andreas Jaeger <aj@suse.de> * elf/ldconfig.h: Update parameter list for process_elf_file. * sysdeps/unix/sysv/linux/sparc/readelflib.c (process_elf_file): Add parameter file_length and pass it ot process_elf*file. * sysdeps/generic/readelflib.c (check_ptr): New. (process_elf_file): Use check_ptr to check all accesses to the mmapped file. Add parameter file_length. * elf/readlib.c (known_libs): Use <gnu/lib-names.h> to specify library names. * sunrpc/xdr_intXX_t.c (xdr_uint8_t): Fix conversion. Closes PR libc/1573, reported by Bradley White <bww@laurelnetworks.com>.
This commit is contained in:
@ -20,23 +20,27 @@
|
||||
|
||||
|
||||
int process_elf32_file (const char *file_name, const char *lib, int *flag,
|
||||
char **soname, void *file_contents);
|
||||
char **soname, void *file_contents,
|
||||
size_t file_length);
|
||||
int process_elf64_file (const char *file_name, const char *lib, int *flag,
|
||||
char **soname, void *file_contents);
|
||||
char **soname, void *file_contents,
|
||||
size_t file_length);
|
||||
|
||||
/* Returns 0 if everything is ok, != 0 in case of error. */
|
||||
int
|
||||
process_elf_file (const char *file_name, const char *lib, int *flag,
|
||||
char **soname, void *file_contents)
|
||||
char **soname, void *file_contents, size_t file_length)
|
||||
{
|
||||
ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
|
||||
int ret;
|
||||
|
||||
if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
|
||||
return process_elf32_file (file_name, lib, flag, soname, file_contents);
|
||||
return process_elf32_file (file_name, lib, flag, soname, file_contents,
|
||||
file_length);
|
||||
else
|
||||
{
|
||||
ret = process_elf64_file (file_name, lib, flag, soname, file_contents);
|
||||
ret = process_elf64_file (file_name, lib, flag, soname, file_contents,
|
||||
file_length);
|
||||
/* Sparc 64bit libraries are always libc.so.6+. */
|
||||
if (!ret)
|
||||
*flag = FLAG_SPARC_LIB64|FLAG_ELF_LIBC6;
|
||||
|
Reference in New Issue
Block a user