Lines Matching defs:size
42 write_file (Elf *elf, int64_t size, int change_bo, size_t shnum)
54 /* Adjust the size in any case. We do this even if we use `write'.
61 || (size_t) size > elf->maximum_size)
62 && unlikely (ftruncate (elf->fildes, size) != 0))
71 elf->map_address = mmap (NULL, size, PROT_READ | PROT_WRITE,
94 || (size_t) size > elf->maximum_size))
96 if (unlikely (posix_fallocate (elf->fildes, 0, size) != 0))
105 && (size_t) size > elf->maximum_size)
109 size, 0) == MAP_FAILED)
115 elf->maximum_size = size;
125 size = -1;
134 size = -1;
137 /* Reduce the file size if necessary. */
138 if (size != -1
141 && (size_t) size < elf->maximum_size
142 && unlikely (ftruncate (elf->fildes, size) != 0))
145 size = -1;
151 if (size != -1
157 size = -1;
160 if (size != -1 && elf->parent == NULL)
161 elf->maximum_size = size;
163 return size;
171 int64_t size;
197 size = -1;
207 will come right after the ELF header. The count the size of all
209 size = (elf->class == ELFCLASS32
212 if (likely (size != -1)
222 size = -1;
228 size = -1;
231 size = write_file (elf, size, change_bo, shnum);
237 return size;