[PATCH 20/27] bfd/ELF: properly mark elf_read_notes() as private
Jan Beulich
jbeulich@suse.com
Mon Oct 27 14:21:11 GMT 2025
Add a _bfd_ prefix and make it hidden.
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -3129,7 +3129,8 @@ extern bool _bfd_elf_merge_unknown_attri
(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;
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -3483,8 +3483,8 @@ bfd_section_from_phdr (bfd *abfd, Elf_In
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, s
}
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;
--- 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
mailing list