gdb/testsuite/
[deliverable/binutils-gdb.git] / bfd / section.c
index bff8adfb0784f62bfca35b111e8acad6555a18de..7c1f75048318f5df7b99e4ae829365a1c150f4f7 100644 (file)
@@ -1,6 +1,6 @@
 /* Object file "section" support for the BFD library.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -327,6 +327,11 @@ CODE_FRAGMENT
 .     sections.  *}
 .#define SEC_COFF_SHARED_LIBRARY 0x4000000
 .
+.  {* This input section should be copied to output in reverse order
+.     as an array of pointers.  This is for ELF linker internal use
+.     only.  *}
+.#define SEC_ELF_REVERSE_COPY 0x4000000
+.
 .  {* This section contains data which may be shared with other
 .     executables or shared objects. This is for COFF only.  *}
 .#define SEC_COFF_SHARED 0x8000000
@@ -511,6 +516,9 @@ CODE_FRAGMENT
 .  {* The BFD which owns the section.  *}
 .  bfd *owner;
 .
+.  {* INPUT_SECTION_FLAGS if specified in the linker script.  *}
+.  struct flag_info *section_flag_info;
+.
 .  {* A symbol which points at this section only.  *}
 .  struct bfd_symbol *symbol;
 .  struct bfd_symbol **symbol_ptr_ptr;
@@ -689,6 +697,9 @@ CODE_FRAGMENT
 .  {* target_index, used_by_bfd, constructor_chain, owner,          *} \
 .     0,            NULL,        NULL,              NULL,              \
 .                                                                      \
+.  {* flag_info,                                                   *}  \
+.     NULL,                                                            \
+.                                                                      \
 .  {* symbol,                    symbol_ptr_ptr,                    *} \
 .     (struct bfd_symbol *) SYM, &SEC.symbol,                          \
 .                                                                      \
@@ -1456,7 +1467,10 @@ bfd_get_section_contents (bfd *abfd,
       return TRUE;
     }
 
-  sz = section->rawsize ? section->rawsize : section->size;
+  if (abfd->direction != write_direction && section->rawsize != 0)
+    sz = section->rawsize;
+  else
+    sz = section->size;
   if ((bfd_size_type) offset > sz
       || count > sz
       || offset + count > sz
This page took 0.024286 seconds and 4 git commands to generate.