aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog9
-rw-r--r--bfd/bfd-in2.h12
-rw-r--r--bfd/ecoff.c6
-rw-r--r--bfd/section.c12
4 files changed, 33 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f252905..f8e7dfa 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,12 @@
+2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/25380
+ * bfd-in2.h: Regenerated.
+ * ecoff.c (bfd_debug_section): Add section_id.
+ * section.c (bfd_section): Add section_id.
+ (SEC_ASSEMBLER_SECTION_ID): New.
+ (BFD_FAKE_SECTION): Add section_id.
+
2020-02-01 Nick Clifton <nickc@redhat.com>
* config.bfd: Move the c30-aout and tic30-aout targets onto the
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 8144b16..c890520 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -795,6 +795,10 @@ typedef struct bfd_section
/* A unique sequence number. */
unsigned int id;
+ /* A unique section number which can be used by assembler to
+ distinguish different sections with the same section name. */
+ unsigned int section_id;
+
/* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
unsigned int index;
@@ -928,6 +932,10 @@ typedef struct bfd_section
else up the line will take care of it later. */
#define SEC_LINKER_CREATED 0x100000
+ /* This section contains a section ID to distinguish different
+ sections withe the same section name. */
+#define SEC_ASSEMBLER_SECTION_ID 0x100000
+
/* This section should not be subject to garbage collection.
Also set to inform the linker that this section should not be
listed in the link map as discarded. */
@@ -1329,8 +1337,8 @@ discarded_section (const asection *sec)
}
#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, id, section_id, index, next, prev, flags, user_set_vma, */ \
+ { NAME, IDX, 0, 0, NULL, NULL, FLAGS, 0, \
\
/* linker_mark, linker_has_input, gc_mark, decompress_status, */ \
0, 0, 1, 0, \
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index f271362..050fd7b 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -52,8 +52,10 @@
/* This stuff is somewhat copied from coffcode.h. */
static asection bfd_debug_section =
{
- /* name, id, index, next, prev, flags, user_set_vma, */
- "*DEBUG*", 0, 0, NULL, NULL, 0, 0,
+ /* name, id, section_id, index, next, prev, flags, */
+ "*DEBUG*", 0, 0, 0, NULL, NULL, 0,
+ /* user_set_vma, */
+ 0,
/* linker_mark, linker_has_input, gc_mark, compress_status, */
0, 0, 1, 0,
/* segment_mark, sec_info_type, use_rela_p, */
diff --git a/bfd/section.c b/bfd/section.c
index d42c2b4..161ed33 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -154,6 +154,10 @@ CODE_FRAGMENT
. {* A unique sequence number. *}
. unsigned int id;
.
+. {* A unique section number which can be used by assembler to
+. distinguish different sections with the same section name. *}
+. unsigned int section_id;
+.
. {* Which section in the bfd; 0..n-1 as sections are created in a bfd. *}
. unsigned int index;
.
@@ -287,6 +291,10 @@ CODE_FRAGMENT
. else up the line will take care of it later. *}
.#define SEC_LINKER_CREATED 0x100000
.
+. {* This section contains a section ID to distinguish different
+. sections withe the same section name. *}
+.#define SEC_ASSEMBLER_SECTION_ID 0x100000
+.
. {* This section should not be subject to garbage collection.
. Also set to inform the linker that this section should not be
. listed in the link map as discarded. *}
@@ -688,8 +696,8 @@ CODE_FRAGMENT
.}
.
.#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, id, section_id, index, next, prev, flags, user_set_vma, *} \
+. { NAME, IDX, 0, 0, NULL, NULL, FLAGS, 0, \
. \
. {* linker_mark, linker_has_input, gc_mark, decompress_status, *} \
. 0, 0, 1, 0, \