BFD_FAKE_SECTION macro params
authorAlan Modra <amodra@gmail.com>
Tue, 11 Oct 2016 23:11:33 +0000 (09:41 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 11 Oct 2016 23:11:33 +0000 (09:41 +1030)
Order NAME, IDX, FLAGS as per STD_SECTION macro.

* section.c (BFD_FAKE_SECTION): Reorder parameters.  Formatting.
(STD_SECTION): Adjust to suit.
* elf.c (_bfd_elf_large_com_section): Likewise.
* bfd-in2.h: Regenerate.

bfd/bfd-in2.h
bfd/elf.c
bfd/section.c

index 31b95846f92a6cb555dc309f940d19ca2eb8680d..3c0ff9d8eaf352d624f1aa687579daef3daf4829 100644 (file)
@@ -1794,9 +1794,9 @@ extern asection _bfd_std_section[4];
 #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, NAME, IDX)                   \
+#define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS)                   \
   /* name, id,  index, next, prev, flags, user_set_vma,            */  \
-  { NAME,  IDX, 0,     NULL, NULL, FLAGS, 0,                           \
+  {  NAME, IDX, 0,     NULL, NULL, FLAGS, 0,                           \
                                                                        \
   /* linker_mark, linker_has_input, gc_mark, decompress_status,    */  \
      0,           0,                1,       0,                        \
index c0961914d19be43a8125369f37da0352e11eadd2..a85498d2ced69ec128658c00c28fed719de4b751 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -11034,10 +11034,12 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd,
   return n;
 }
 
-/* It is only used by x86-64 so far.  */
+/* It is only used by x86-64 so far.
+   ??? This repeats *COM* id of zero.  sec->id is supposed to be unique,
+   but current usage would allow all of _bfd_std_section to be zero.  t*/
 asection _bfd_elf_large_com_section
-  = BFD_FAKE_SECTION (_bfd_elf_large_com_section,
-                     SEC_IS_COMMON, NULL, "LARGE_COMMON", 0);
+  = BFD_FAKE_SECTION (_bfd_elf_large_com_section, NULL,
+                     "LARGE_COMMON", 0, SEC_IS_COMMON);
 
 void
 _bfd_elf_post_process_headers (bfd * abfd,
index 70cb267910a07c34435689f7f0a361637627efd1..8df9891f6f4f404bbf8f30df72f1e14d5645872d 100644 (file)
@@ -700,9 +700,9 @@ 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, NAME, IDX)                  \
+.#define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS)                  \
 .  {* name, id,  index, next, prev, flags, user_set_vma,            *} \
-.  { NAME,  IDX, 0,     NULL, NULL, FLAGS, 0,                          \
+.  {  NAME, IDX, 0,     NULL, NULL, FLAGS, 0,                          \
 .                                                                      \
 .  {* linker_mark, linker_has_input, gc_mark, decompress_status,    *} \
 .     0,           0,                1,       0,                       \
@@ -764,7 +764,7 @@ static const asymbol global_syms[] =
 };
 
 #define STD_SECTION(NAME, IDX, FLAGS) \
-  BFD_FAKE_SECTION(_bfd_std_section[IDX], FLAGS, &global_syms[IDX], NAME, IDX)
+  BFD_FAKE_SECTION(_bfd_std_section[IDX], &global_syms[IDX], NAME, IDX, FLAGS)
 
 asection _bfd_std_section[] = {
   STD_SECTION (BFD_COM_SECTION_NAME, 0, SEC_IS_COMMON),
This page took 0.034628 seconds and 4 git commands to generate.