* elf32-hppa.c (elf32_hppa_size_dynamic_sections): Use info->executable
[deliverable/binutils-gdb.git] / bfd / section.c
index aeb63a67425aa4be93a55a843ede13d47401c106..42554b9a63e788a44f3225660cee435303a937c2 100644 (file)
@@ -635,6 +635,47 @@ CODE_FRAGMENT
 .#define bfd_section_removed_from_list(ABFD, S) \
 .  ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
 .
+.#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, SYM_PTR, NAME, IDX)         \
+.  {* name, id,  index, next, prev, flags, user_set_vma,            *} \
+.  { NAME,  IDX, 0,     NULL, NULL, FLAGS, 0,                          \
+.                                                                      \
+.  {* linker_mark, linker_has_input, gc_mark, gc_mark_from_eh,      *} \
+.     0,           0,                1,       0,                       \
+.                                                                      \
+.  {* segment_mark, sec_info_type, use_rela_p, has_tls_reloc,       *} \
+.     0,            0,             0,          0,                      \
+.                                                                      \
+.  {* has_gp_reloc, need_finalize_relax, reloc_done,                *} \
+.     0,            0,                   0,                            \
+.                                                                      \
+.  {* vma, lma, size, rawsize                                       *} \
+.     0,   0,   0,    0,                                               \
+.                                                                      \
+.  {* output_offset, output_section,              alignment_power,  *} \
+.     0,             (struct bfd_section *) &SEC, 0,                   \
+.                                                                      \
+.  {* relocation, orelocation, reloc_count, filepos, rel_filepos,   *} \
+.     NULL,       NULL,        0,           0,       0,                        \
+.                                                                      \
+.  {* line_filepos, userdata, contents, lineno, lineno_count,       *} \
+.     0,            NULL,     NULL,     NULL,   0,                     \
+.                                                                      \
+.  {* entsize, kept_section, moving_line_filepos,                   *} \
+.     0,       NULL,         0,                                        \
+.                                                                      \
+.  {* target_index, used_by_bfd, constructor_chain, owner,          *} \
+.     0,            NULL,        NULL,              NULL,              \
+.                                                                      \
+.  {* symbol,                                                       *} \
+.     (struct bfd_symbol *) SYM,                                       \
+.                                                                      \
+.  {* symbol_ptr_ptr,                                               *} \
+.     (struct bfd_symbol **) SYM_PTR,                                  \
+.                                                                      \
+.  {* map_head, map_tail                                            *} \
+.     { NULL }, { NULL }                                               \
+.    }
+.
 */
 
 /* We use a macro to initialize the static asymbol structures because
@@ -662,46 +703,8 @@ static const asymbol global_syms[] =
 
 #define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX)                                \
   const asymbol * const SYM = (asymbol *) &global_syms[IDX];           \
-  asection SEC =                                                       \
-    /* name, id,  index, next, prev, flags, user_set_vma,            */        \
-    { NAME,  IDX, 0,     NULL, NULL, FLAGS, 0,                         \
-                                                                       \
-    /* linker_mark, linker_has_input, gc_mark, gc_mark_from_eh,      */        \
-       0,           0,                1,       0,                      \
-                                                                       \
-    /* segment_mark, sec_info_type, use_rela_p, has_tls_reloc,       */        \
-       0,            0,             0,          0,                     \
-                                                                       \
-    /* has_gp_reloc, need_finalize_relax, reloc_done,                */        \
-       0,            0,                   0,                           \
-                                                                       \
-    /* vma, lma, size, rawsize                                       */        \
-       0,   0,   0,    0,                                              \
-                                                                       \
-    /* output_offset, output_section,              alignment_power,  */        \
-       0,             (struct bfd_section *) &SEC, 0,                  \
-                                                                       \
-    /* relocation, orelocation, reloc_count, filepos, rel_filepos,   */        \
-       NULL,       NULL,        0,           0,       0,               \
-                                                                       \
-    /* line_filepos, userdata, contents, lineno, lineno_count,       */        \
-       0,            NULL,     NULL,     NULL,   0,                    \
-                                                                       \
-    /* entsize, kept_section, moving_line_filepos,                   */        \
-       0,       NULL,         0,                                       \
-                                                                       \
-    /* target_index, used_by_bfd, constructor_chain, owner,          */        \
-       0,            NULL,        NULL,              NULL,             \
-                                                                       \
-    /* symbol,                                                       */        \
-       (struct bfd_symbol *) &global_syms[IDX],                                \
-                                                                       \
-    /* symbol_ptr_ptr,                                               */        \
-       (struct bfd_symbol **) &SYM,                                    \
-                                                                       \
-    /* map_head, map_tail                                            */        \
-       { NULL }, { NULL }                                              \
-    }
+  asection SEC = BFD_FAKE_SECTION(SEC, FLAGS, &global_syms[IDX], &SYM, \
+                                 NAME, IDX)
 
 STD_SECTION (bfd_com_section, SEC_IS_COMMON, bfd_com_symbol,
             BFD_COM_SECTION_NAME, 0);
This page took 0.025457 seconds and 4 git commands to generate.