diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/elf/ChangeLog | 8 | ||||
-rw-r--r-- | include/elf/internal.h | 10 |
2 files changed, 16 insertions, 2 deletions
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index 939c371..dd354e8 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,11 @@ +2007-09-17 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/3281 + PR binutils/5037 + * internal.h (elf_segment_map): Add p_size and p_size_valid. + (ELF_IS_SECTION_IN_SEGMENT): Allow SHF_TLS sections in + PT_GNU_RELRO segments. + 2007-09-11 Nathan Sidwell <nathan@codesourcery.com> * m68k.h (EF_M68K_CF_ISA_C_NODIV): New. diff --git a/include/elf/internal.h b/include/elf/internal.h index 1521711..f5380b8 100644 --- a/include/elf/internal.h +++ b/include/elf/internal.h @@ -239,6 +239,8 @@ struct elf_segment_map bfd_vma p_vaddr_offset; /* Program segment alignment. */ bfd_vma p_align; + /* Segment size in file and memory */ + bfd_vma p_size; /* Whether the p_flags field is valid; if not, the flags are based on the section flags. */ unsigned int p_flags_valid : 1; @@ -248,6 +250,9 @@ struct elf_segment_map /* Whether the p_align field is valid; if not, PT_LOAD segment alignment is based on the default maximum page size. */ unsigned int p_align_valid : 1; + /* Whether the p_size field is valid; if not, the size are based + on the section sizes. */ + unsigned int p_size_valid : 1; /* Whether this segment includes the file header. */ unsigned int includes_filehdr : 1; /* Whether this segment includes the program headers. */ @@ -266,11 +271,12 @@ struct elf_segment_map || segment->p_type == PT_TLS) ? sec_hdr->sh_size : 0) /* Decide if the given sec_hdr is in the given segment. PT_TLS segment - contains only SHF_TLS sections. Only PT_LOAD and PT_TLS segments - can contain SHF_TLS sections. */ + contains only SHF_TLS sections. Only PT_LOAD, PT_GNU_RELRO and + and PT_TLS segments can contain SHF_TLS sections. */ #define ELF_IS_SECTION_IN_SEGMENT(sec_hdr, segment) \ (((((sec_hdr->sh_flags & SHF_TLS) != 0) \ && (segment->p_type == PT_TLS \ + || segment->p_type == PT_GNU_RELRO \ || segment->p_type == PT_LOAD)) \ || ((sec_hdr->sh_flags & SHF_TLS) == 0 \ && segment->p_type != PT_TLS)) \ |