This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] BFD: Consider any section whose name starts with ".__abs" to be absolute.
- From: John Darrington <john at darrington dot wattle dot id dot au>
- To: binutils at sourceware dot org
- Cc: John Darrington <john at darrington dot wattle dot id dot au>
- Date: Sat, 23 Jun 2018 18:34:41 +0200
- Subject: [PATCH] BFD: Consider any section whose name starts with ".__abs" to be absolute.
- References: <1529771681-22770-1-git-send-email-john@darrington.wattle.id.au>
* bfd/section.c (bfd_is_abs_section): Consider the name of the section.
* bfd/bfd-in2.h: regen
---
bfd/bfd-in2.h | 4 +++-
bfd/section.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index f53dbb5e8c..7f7718e0e1 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1717,7 +1717,9 @@ extern asection _bfd_std_section[4];
#define bfd_ind_section_ptr (&_bfd_std_section[3])
#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
-#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
+#define bfd_is_abs_section(sec) \
+ (((sec) == bfd_abs_section_ptr) || \
+ (0 == strncmp (".__abs", sec->name, 6)))
#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
#define bfd_is_const_section(SEC) \
diff --git a/bfd/section.c b/bfd/section.c
index 7ee3f6915b..9517148032 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -597,7 +597,9 @@ CODE_FRAGMENT
.#define bfd_ind_section_ptr (&_bfd_std_section[3])
.
.#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
-.#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
+.#define bfd_is_abs_section(sec) \
+. (((sec) == bfd_abs_section_ptr) || \
+. (0 == strncmp (".__abs", sec->name, 6)))
.#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
.
.#define bfd_is_const_section(SEC) \
--
2.11.0