PERFORCE change 28622 for review
Peter Wemm
peter at FreeBSD.org
Tue Apr 8 23:51:50 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=28622
Change 28622 by peter at peter_daintree on 2003/04/08 23:51:44
Fix the 'symbol table is corrupt' stuff. Use Elf_Size instead
of 'long', since it just happens to be right for all the cases
I can think of, and is what we're actually uploading anyway -
sh_size is an Elf_Size..
Affected files ...
.. //depot/projects/hammer/sys/boot/common/load_elf.c#9 edit
Differences ...
==== //depot/projects/hammer/sys/boot/common/load_elf.c#9 (text+ko) ====
@@ -250,7 +250,7 @@
int ndp;
int symstrindex;
int symtabindex;
- long size;
+ Elf_Size size;
u_int fpcopy;
dp = NULL;
@@ -421,7 +421,7 @@
size = shdr[i].sh_size;
archsw.arch_copyin(&size, lastaddr, sizeof(size));
- lastaddr += sizeof(long);
+ lastaddr += sizeof(size);
#ifdef ELF_VERBOSE
printf("\n%s: 0x%lx at 0x%lx -> 0x%lx-0x%lx", secname,
@@ -430,7 +430,7 @@
#else
if (i == symstrindex)
printf("+");
- printf("0x%lx+0x%lx", (long)sizeof(size), size);
+ printf("0x%lx+0x%lx", (long)sizeof(size), (long)size);
#endif
if (lseek(ef->fd, (off_t)shdr[i].sh_offset, SEEK_SET) == -1) {
@@ -448,7 +448,7 @@
}
/* Reset offsets relative to ssym */
lastaddr += shdr[i].sh_size;
- lastaddr = roundup(lastaddr, sizeof(long));
+ lastaddr = roundup(lastaddr, sizeof(size));
if (i == symtabindex)
symtabindex = -1;
else if (i == symstrindex)
More information about the p4-projects
mailing list