Lines Matching defs:shdr
212 GElf_Shdr shdr;
213 if (gelf_getshdr (scn, &shdr) == NULL)
215 printf ("couldn't get shdr: %s\n", elf_errmsg (-1));
221 offs[last_off] = shdr.sh_offset;
224 && last_shdr.sh_addralign == shdr.sh_addralign
225 && shdr.sh_addralign == 1
227 && shdr.sh_type != SHT_NOBITS
228 && last_shdr.sh_offset + last_shdr.sh_size == shdr.sh_offset
230 || ((shdr.sh_flags & SHF_ALLOC) == 0
236 offs[last_off - 1] = off + shdr.sh_size;
242 last_shdr = shdr;
243 offs[last_off] = shdr.sh_offset;
256 if (gelf_update_shdr (new_scn, &shdr) == 0)
258 printf ("couldn't update shdr: %s\n", elf_errmsg (-1));
283 GElf_Shdr shdr;
284 if (gelf_getshdr (scn, &shdr) == NULL)
286 printf ("couldn't get shdr for updating: %s\n", elf_errmsg (-1));
290 shdr.sh_offset = offs[last_off++];
292 if (gelf_update_shdr (scn, &shdr) == 0)
294 printf ("couldn't update shdr sh_off: %s\n", elf_errmsg (-1));