From: Jan Beulich Date: Fri, 7 Nov 2025 13:57:16 +0000 (+0100) Subject: bfd/ELF: properly mark elf_read_notes() as private X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85c8b58e2df93ce650e7f0ba07673184584aa6fb;p=thirdparty%2Fbinutils-gdb.git bfd/ELF: properly mark elf_read_notes() as private Add a _bfd_ prefix and make it hidden. --- 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,