Subversion Repositories Kolibri OS

Rev

Rev 5191 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5191 Rev 6324
Line 1... Line 1...
1
/* ELF support for BFD.
1
/* ELF support for BFD.
2
   Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002,
-
 
3
   2003, 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
2
   Copyright (C) 1991-2015 Free Software Foundation, Inc.
Line 4... Line 3...
4
 
3
 
5
   Written by Fred Fish @ Cygnus Support, from information published
4
   Written by Fred Fish @ Cygnus Support, from information published
6
   in "UNIX System V Release 4, Programmers Guide: ANSI C and
5
   in "UNIX System V Release 4, Programmers Guide: ANSI C and
Line 114... Line 113...
114
  /* The internal rep also has some cached info associated with it. */
113
  /* The internal rep also has some cached info associated with it. */
115
  asection *	bfd_section;		/* Associated BFD section.  */
114
  asection *	bfd_section;		/* Associated BFD section.  */
116
  unsigned char *contents;		/* Section contents.  */
115
  unsigned char *contents;		/* Section contents.  */
117
} Elf_Internal_Shdr;
116
} Elf_Internal_Shdr;
Line -... Line 117...
-
 
117
 
-
 
118
/* Compression header */
-
 
119
 
-
 
120
typedef struct elf_internal_chdr {
-
 
121
  unsigned int	ch_type;		/* Type of compression */
-
 
122
  bfd_size_type	ch_size;		/* Size of uncompressed data in bytes */
-
 
123
  bfd_vma	ch_addralign;		/* Alignment of uncompressed data */
-
 
124
} Elf_Internal_Chdr;
118
 
125
 
Line 119... Line 126...
119
/* Symbol table entry */
126
/* Symbol table entry */
120
 
127
 
121
struct elf_internal_sym {
128
struct elf_internal_sym {
Line 316... Line 323...
316
    /* PT_TLS segment contains only SHF_TLS sections, PT_PHDR no	\
323
    /* PT_TLS segment contains only SHF_TLS sections, PT_PHDR no	\
317
       sections at all.  */						\
324
       sections at all.  */						\
318
    || (((sec_hdr)->sh_flags & SHF_TLS) == 0				\
325
    || (((sec_hdr)->sh_flags & SHF_TLS) == 0				\
319
	&& (segment)->p_type != PT_TLS					\
326
	&& (segment)->p_type != PT_TLS					\
320
	&& (segment)->p_type != PT_PHDR))				\
327
	&& (segment)->p_type != PT_PHDR))				\
-
 
328
   /* PT_LOAD and similar segments only have SHF_ALLOC sections.  */	\
-
 
329
   && !(((sec_hdr)->sh_flags & SHF_ALLOC) == 0				\
-
 
330
	&& ((segment)->p_type == PT_LOAD				\
-
 
331
	    || (segment)->p_type == PT_DYNAMIC				\
-
 
332
	    || (segment)->p_type == PT_GNU_EH_FRAME			\
-
 
333
	    || (segment)->p_type == PT_GNU_RELRO			\
-
 
334
	    || (segment)->p_type == PT_GNU_STACK))			\
321
   /* Any section besides one of type SHT_NOBITS must have file		\
335
   /* Any section besides one of type SHT_NOBITS must have file		\
322
      offsets within the segment.  */					\
336
      offsets within the segment.  */					\
323
   && ((sec_hdr)->sh_type == SHT_NOBITS					\
337
   && ((sec_hdr)->sh_type == SHT_NOBITS					\
324
       || ((bfd_vma) (sec_hdr)->sh_offset >= (segment)->p_offset	\
338
       || ((bfd_vma) (sec_hdr)->sh_offset >= (segment)->p_offset	\
325
	   && (!(strict)						\
339
	   && (!(strict)						\