nlist.c (2bbd7cf8204609d07c36511f2a57ca282f05b6f2) | nlist.c (757686b11510174fffffec96b816204c8d659fba) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 229 unchanged lines hidden (view full) --- 238 239int 240__elf_fdnlist(fd, list) 241 int fd; 242 struct nlist *list; 243{ 244 struct nlist *p; 245 Elf_Off symoff = 0, symstroff = 0; | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 229 unchanged lines hidden (view full) --- 238 239int 240__elf_fdnlist(fd, list) 241 int fd; 242 struct nlist *list; 243{ 244 struct nlist *p; 245 Elf_Off symoff = 0, symstroff = 0; |
246 Elf_Word symsize = 0, symstrsize = 0; 247 Elf_Sword cc, i; | 246 Elf_Size symsize = 0, symstrsize = 0; 247 Elf_Ssize cc, i; |
248 int nent = -1; 249 int errsave; 250 Elf_Sym sbuf[1024]; 251 Elf_Sym *s; 252 Elf_Ehdr ehdr; 253 char *strtab = NULL; 254 Elf_Shdr *shdr = NULL; | 248 int nent = -1; 249 int errsave; 250 Elf_Sym sbuf[1024]; 251 Elf_Sym *s; 252 Elf_Ehdr ehdr; 253 char *strtab = NULL; 254 Elf_Shdr *shdr = NULL; |
255 Elf_Word shdr_size; | 255 Elf_Size shdr_size; |
256 void *base; 257 struct stat st; 258 259 /* Make sure obj is OK */ 260 if (lseek(fd, (off_t)0, SEEK_SET) == -1 || 261 _read(fd, &ehdr, sizeof(Elf_Ehdr)) != sizeof(Elf_Ehdr) || 262 !__elf_is_okay__(&ehdr) || 263 _fstat(fd, &st) < 0) --- 153 unchanged lines hidden --- | 256 void *base; 257 struct stat st; 258 259 /* Make sure obj is OK */ 260 if (lseek(fd, (off_t)0, SEEK_SET) == -1 || 261 _read(fd, &ehdr, sizeof(Elf_Ehdr)) != sizeof(Elf_Ehdr) || 262 !__elf_is_okay__(&ehdr) || 263 _fstat(fd, &st) < 0) --- 153 unchanged lines hidden --- |