Detabified.

committer: mfx <mfx> 1089685145 +0000
This commit is contained in:
Markus F.X.J. Oberhumer
2004-07-13 02:19:05 +00:00
parent f41edf9e21
commit befaa3c501
2 changed files with 18 additions and 18 deletions
+9 -9
View File
@@ -186,18 +186,18 @@ static unsigned long // returns relocation constant
__attribute__((regparm(3), stdcall))
xfind_pages(unsigned mflags, Elf32_Phdr const *phdr, int phnum)
{
size_t lo= ~0, hi= 0, szlo= 0;
size_t lo= ~0, hi= 0, szlo= 0;
char *addr;
mflags += MAP_PRIVATE | MAP_ANONYMOUS; // '+' can optimize better than '|'
for (; --phnum>=0; ++phdr) if (PT_LOAD==phdr->p_type) {
if (phdr->p_vaddr < lo) {
lo = phdr->p_vaddr;
for (; --phnum>=0; ++phdr) if (PT_LOAD==phdr->p_type) {
if (phdr->p_vaddr < lo) {
lo = phdr->p_vaddr;
szlo = phdr->p_filesz;
}
if (hi < (phdr->p_memsz + phdr->p_vaddr)) {
hi = phdr->p_memsz + phdr->p_vaddr;
}
}
}
if (hi < (phdr->p_memsz + phdr->p_vaddr)) {
hi = phdr->p_memsz + phdr->p_vaddr;
}
}
if (MAP_FIXED & mflags) { // the "shell", and not the PT_INTERP
// This is a dirty hack to set the proper value for brk(0) as seen by
// the "shell" which we will mmap() soon, upon return to do_xmap().