aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd-in2.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-04-04 21:34:06 +0930
committerAlan Modra <amodra@gmail.com>2022-04-09 15:34:24 +0930
commit57594b6a7538bde26de2d807ff29b0f5e619be03 (patch)
tree2512939f4e4f82adfe0948e92356a295641a9163 /bfd/bfd-in2.h
parent480a4dd5f347e441a4e550285b300081152ad4e0 (diff)
downloadgdb-57594b6a7538bde26de2d807ff29b0f5e619be03.zip
gdb-57594b6a7538bde26de2d807ff29b0f5e619be03.tar.gz
gdb-57594b6a7538bde26de2d807ff29b0f5e619be03.tar.bz2
Rearrange struct bfd_section a little
For better packing on 64-bit hosts. * section.c (struct bfd_section): Move next and prev field earlier. Move alignment_power later. (BFD_FAKE_SECTION): Adjust to suit. * bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r--bfd/bfd-in2.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index eb3b79e..50e26fc 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -766,6 +766,12 @@ typedef struct bfd_section
the same as that passed to bfd_make_section. */
const char *name;
+ /* The next section in the list belonging to the BFD, or NULL. */
+ struct bfd_section *next;
+
+ /* The previous section in the list belonging to the BFD, or NULL. */
+ struct bfd_section *prev;
+
/* A unique sequence number. */
unsigned int id;
@@ -776,12 +782,6 @@ typedef struct bfd_section
/* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
unsigned int index;
- /* The next section in the list belonging to the BFD, or NULL. */
- struct bfd_section *next;
-
- /* The previous section in the list belonging to the BFD, or NULL. */
- struct bfd_section *prev;
-
/* The field flags contains attributes of the section. Some
flags are read in from the object file, and some are
synthesized from other information. */
@@ -1082,10 +1082,6 @@ typedef struct bfd_section
/* The output section through which to map on output. */
struct bfd_section *output_section;
- /* The alignment requirement of the section, as an exponent of 2 -
- e.g., 3 aligns to 2^3 (or 8). */
- unsigned int alignment_power;
-
/* If an input section, a pointer to a vector of relocation
records for the data in this section. */
struct reloc_cache_entry *relocation;
@@ -1097,6 +1093,10 @@ typedef struct bfd_section
/* The number of relocation records in one of the above. */
unsigned reloc_count;
+ /* The alignment requirement of the section, as an exponent of 2 -
+ e.g., 3 aligns to 2^3 (or 8). */
+ unsigned int alignment_power;
+
/* Information below is back end specific - and not always used
or updated. */
@@ -1306,8 +1306,8 @@ discarded_section (const asection *sec)
}
#define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS) \
- /* name, id, section_id, index, next, prev, flags, user_set_vma, */ \
- { NAME, IDX, 0, 0, NULL, NULL, FLAGS, 0, \
+ /* name, next, prev, id, section_id, index, flags, user_set_vma, */ \
+ { NAME, NULL, NULL, IDX, 0, 0, FLAGS, 0, \
\
/* linker_mark, linker_has_input, gc_mark, decompress_status, */ \
0, 0, 1, 0, \
@@ -1318,14 +1318,14 @@ discarded_section (const asection *sec)
/* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5, */ \
0, 0, 0, 0, 0, 0, \
\
- /* vma, lma, size, rawsize, compressed_size, */ \
+ /* vma, lma, size, rawsize, compressed_size, */ \
0, 0, 0, 0, 0, \
\
- /* output_offset, output_section, alignment_power, */ \
- 0, &SEC, 0, \
+ /* output_offset, output_section, relocation, orelocation, */ \
+ 0, &SEC, NULL, NULL, \
\
- /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
- NULL, NULL, 0, 0, 0, \
+ /* reloc_count, alignment_power, filepos, rel_filepos, */ \
+ 0, 0, 0, 0, \
\
/* line_filepos, userdata, contents, lineno, lineno_count, */ \
0, NULL, NULL, NULL, 0, \