Lines Matching refs:segment
87 unsigned long p_type; /* Identifies program segment type. */
88 unsigned long p_flags; /* Segment flags. */
89 bfd_vma p_offset; /* Segment file offset in octets. */
90 bfd_vma p_vaddr; /* Segment virtual address in octets. */
91 bfd_vma p_paddr; /* Segment physical address in octets. */
92 bfd_vma p_filesz; /* Segment size in file in octets. */
93 bfd_vma p_memsz; /* Segment size in memory in octets. */
94 bfd_vma p_align; /* Segment alignment in bytes, file
264 /* Next program segment. */
266 /* Program segment type. */
268 /* Program segment flags. */
270 /* Program segment physical address in octets. */
272 /* Program segment virtual address offset from section vma in bytes. */
274 /* Program segment alignment. */
276 /* Segment size in file and memory in octets. */
284 /* Whether the p_align field is valid; if not, PT_LOAD segment
290 /* Whether this segment includes the file header. */
292 /* Whether this segment includes the program headers. */
309 #define ELF_TBSS_SPECIAL(sec_hdr, segment) \
312 && (segment)->p_type != PT_TLS)
314 #define ELF_SECTION_SIZE(sec_hdr, segment) \
315 (ELF_TBSS_SPECIAL(sec_hdr, segment) ? 0 : (sec_hdr)->sh_size)
317 /* Decide if the section SEC_HDR is in SEGMENT. If CHECK_VMA, then
319 section won't match at the end of a segment, unless the segment
323 #define ELF_SECTION_IN_SEGMENT_1(sec_hdr, segment, check_vma, strict) \
327 && ((segment)->p_type == PT_TLS \
328 || (segment)->p_type == PT_GNU_RELRO \
329 || (segment)->p_type == PT_LOAD)) \
330 /* PT_TLS segment contains only SHF_TLS sections, PT_PHDR no \
333 && (segment)->p_type != PT_TLS \
334 && (segment)->p_type != PT_PHDR)) \
337 && ((segment)->p_type == PT_LOAD \
338 || (segment)->p_type == PT_DYNAMIC \
339 || (segment)->p_type == PT_GNU_EH_FRAME \
340 || (segment)->p_type == PT_GNU_STACK \
341 || (segment)->p_type == PT_GNU_RELRO \
342 || (segment)->p_type == PT_GNU_SFRAME \
343 || ((segment)->p_type >= PT_GNU_MBIND_LO \
344 && (segment)->p_type <= PT_GNU_MBIND_HI))) \
346 offsets within the segment. */ \
348 || ((bfd_vma) (sec_hdr)->sh_offset >= (segment)->p_offset \
350 || ((sec_hdr)->sh_offset - (segment)->p_offset \
351 <= (segment)->p_filesz - 1)) \
352 && (((sec_hdr)->sh_offset - (segment)->p_offset \
353 + ELF_SECTION_SIZE(sec_hdr, segment)) \
354 <= (segment)->p_filesz))) \
355 /* SHF_ALLOC sections must have VMAs within the segment. */ \
358 || ((sec_hdr)->sh_addr >= (segment)->p_vaddr \
360 || ((sec_hdr)->sh_addr - (segment)->p_vaddr \
361 <= (segment)->p_memsz - 1)) \
362 && (((sec_hdr)->sh_addr - (segment)->p_vaddr \
363 + ELF_SECTION_SIZE(sec_hdr, segment)) \
364 <= (segment)->p_memsz))) \
367 && (((segment)->p_type != PT_DYNAMIC \
368 && (segment)->p_type != PT_NOTE) \
370 || (segment)->p_memsz == 0 \
372 || ((bfd_vma) (sec_hdr)->sh_offset > (segment)->p_offset \
373 && ((sec_hdr)->sh_offset - (segment)->p_offset \
374 < (segment)->p_filesz))) \
376 || ((sec_hdr)->sh_addr > (segment)->p_vaddr \
377 && ((sec_hdr)->sh_addr - (segment)->p_vaddr \
378 < (segment)->p_memsz))))))
380 #define ELF_SECTION_IN_SEGMENT(sec_hdr, segment) \
381 (ELF_SECTION_IN_SEGMENT_1 (sec_hdr, segment, 1, 0))
383 #define ELF_SECTION_IN_SEGMENT_STRICT(sec_hdr, segment) \
384 (ELF_SECTION_IN_SEGMENT_1 (sec_hdr, segment, 1, 1))