aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/archive.c8
-rw-r--r--bfd/bfd-in2.h10
-rw-r--r--bfd/bfd.c10
-rw-r--r--bfd/elfxx-aarch64.c2
-rw-r--r--bfd/version.h2
5 files changed, 24 insertions, 8 deletions
diff --git a/bfd/archive.c b/bfd/archive.c
index 6cda73c..8e20554 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -2399,12 +2399,8 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
map = new_map;
}
- if (syms[src_count]->name != NULL
- && syms[src_count]->name[0] == '_'
- && syms[src_count]->name[1] == '_'
- && strcmp (syms[src_count]->name
- + (syms[src_count]->name[2] == '_'),
- "__gnu_lto_slim") == 0
+ if (bfd_lto_slim_symbol_p (current,
+ syms[src_count]->name)
&& report_plugin_err)
{
report_plugin_err = false;
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index ec60f23..eca6d0c 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -2302,6 +2302,16 @@ bfd_get_lto_type (const bfd *abfd)
return abfd->lto_type;
}
+static inline bool
+bfd_lto_slim_symbol_p (const bfd *abfd, const char *name)
+{
+ return (bfd_get_lto_type (abfd) != lto_non_ir_object
+ && name != NULL
+ && name[0] == '_'
+ && name[1] == '_'
+ && strcmp (name + (name[2] == '_'), "__gnu_lto_slim") == 0);
+}
+
static inline flagword
bfd_get_file_flags (const bfd *abfd)
{
diff --git a/bfd/bfd.c b/bfd/bfd.c
index a8d1314..bb8ec43 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -470,6 +470,16 @@ EXTERNAL
. return abfd->lto_type;
.}
.
+.static inline bool
+.bfd_lto_slim_symbol_p (const bfd *abfd, const char *name)
+.{
+. return (bfd_get_lto_type (abfd) != lto_non_ir_object
+. && name != NULL
+. && name[0] == '_'
+. && name[1] == '_'
+. && strcmp (name + (name[2] == '_'), "__gnu_lto_slim") == 0);
+.}
+.
.static inline flagword
.bfd_get_file_flags (const bfd *abfd)
.{
diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c
index 68e004ef..551f74e 100644
--- a/bfd/elfxx-aarch64.c
+++ b/bfd/elfxx-aarch64.c
@@ -708,7 +708,7 @@ static inline bool
bfd_is_non_dynamic_elf_object (bfd *abfd, const struct elf_backend_data *out_be)
{
const struct elf_backend_data *in_be = get_elf_backend_data (abfd);
-
+
return bfd_get_flavour (abfd) == bfd_target_elf_flavour
&& bfd_count_sections (abfd) != 0
&& (abfd->flags & (DYNAMIC | BFD_PLUGIN | BFD_LINKER_CREATED)) == 0
diff --git a/bfd/version.h b/bfd/version.h
index f66dfdc..0367b80 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -16,7 +16,7 @@
In releases, the date is not included in either version strings or
sonames. */
-#define BFD_VERSION_DATE 20250509
+#define BFD_VERSION_DATE 20250516
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
#define REPORT_BUGS_TO @report_bugs_to@