[binutils-gdb] bfd/ELF: properly mark elf_read_notes() as private
Jan Beulich
jbeulich@sourceware.org
Fri Nov 7 13:59:51 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=85c8b58e2df93ce650e7f0ba07673184584aa6fb
commit 85c8b58e2df93ce650e7f0ba07673184584aa6fb
Author: Jan Beulich <jbeulich@suse.com>
Date: Fri Nov 7 14:57:16 2025 +0100
bfd/ELF: properly mark elf_read_notes() as private
Add a _bfd_ prefix and make it hidden.
Diff:
---
bfd/elf-bfd.h | 3 ++-
bfd/elf.c | 8 ++++----
bfd/elfcore.h | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 010a70edff8..8c3639f00eb 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -3134,7 +3134,8 @@ extern bool _bfd_elf_merge_unknown_attribute_list
(bfd *, bfd *) ATTRIBUTE_HIDDEN;
extern Elf_Internal_Shdr *_bfd_elf_single_rel_hdr
(asection *sec);
-extern bool elf_read_notes (bfd *, file_ptr, bfd_size_type, size_t);
+extern bool _bfd_elf_read_notes
+ (bfd *, file_ptr, bfd_size_type, size_t) ATTRIBUTE_HIDDEN;
extern bool _bfd_elf_parse_gnu_properties
(bfd *, Elf_Internal_Note *) ATTRIBUTE_HIDDEN;
diff --git a/bfd/elf.c b/bfd/elf.c
index 36bc2507b4a..5e3ec17003e 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -3483,8 +3483,8 @@ bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int hdr_index)
case PT_NOTE:
if (! _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "note"))
return false;
- if (! elf_read_notes (abfd, hdr->p_offset, hdr->p_filesz,
- hdr->p_align))
+ if (! _bfd_elf_read_notes (abfd, hdr->p_offset, hdr->p_filesz,
+ hdr->p_align))
return false;
return true;
@@ -13157,8 +13157,8 @@ elf_parse_notes (bfd *abfd, char *buf, size_t size, file_ptr offset,
}
bool
-elf_read_notes (bfd *abfd, file_ptr offset, bfd_size_type size,
- size_t align)
+_bfd_elf_read_notes (bfd *abfd, file_ptr offset, bfd_size_type size,
+ size_t align)
{
char *buf;
diff --git a/bfd/elfcore.h b/bfd/elfcore.h
index 6f1015e02e5..6eb354bdd1d 100644
--- a/bfd/elfcore.h
+++ b/bfd/elfcore.h
@@ -381,8 +381,8 @@ NAME(_bfd_elf, core_find_build_id)
if (i_phdr->p_type == PT_NOTE && i_phdr->p_filesz > 0)
{
- elf_read_notes (abfd, offset + i_phdr->p_offset,
- i_phdr->p_filesz, i_phdr->p_align);
+ _bfd_elf_read_notes (abfd, offset + i_phdr->p_offset,
+ i_phdr->p_filesz, i_phdr->p_align);
/* Make sure ABFD returns to processing the program headers. */
if (bfd_seek (abfd,
More information about the Binutils-cvs
mailing list