Lines Matching refs:sec_hdr
263 #define ELF_SECTION_SIZE(sec_hdr, segment) \
264 (((sec_hdr->sh_flags & SHF_TLS) == 0 \
265 || sec_hdr->sh_type != SHT_NOBITS \
266 || segment->p_type == PT_TLS) ? sec_hdr->sh_size : 0)
268 /* Decide if the given sec_hdr is in the given segment. PT_TLS segment
271 #define ELF_IS_SECTION_IN_SEGMENT(sec_hdr, segment) \
272 (((((sec_hdr->sh_flags & SHF_TLS) != 0) \
275 || ((sec_hdr->sh_flags & SHF_TLS) == 0 \
279 && (sec_hdr->sh_flags & SHF_ALLOC \
280 ? (sec_hdr->sh_addr >= segment->p_vaddr \
281 && (sec_hdr->sh_addr \
282 + ELF_SECTION_SIZE(sec_hdr, segment) \
284 : ((bfd_vma) sec_hdr->sh_offset >= segment->p_offset \
285 && (sec_hdr->sh_offset \
286 + ELF_SECTION_SIZE(sec_hdr, segment) \
289 /* Decide if the given sec_hdr is in the given segment in file. */
290 #define ELF_IS_SECTION_IN_SEGMENT_FILE(sec_hdr, segment) \
291 (sec_hdr->sh_size > 0 \
292 && ELF_IS_SECTION_IN_SEGMENT (sec_hdr, segment))
294 /* Decide if the given sec_hdr is in the given segment in memory. */
295 #define ELF_IS_SECTION_IN_SEGMENT_MEMORY(sec_hdr, segment) \
296 (ELF_SECTION_SIZE(sec_hdr, segment) > 0 \
297 && ELF_IS_SECTION_IN_SEGMENT (sec_hdr, segment))