]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libdw: Make __libdw_fde_by_offset static in libdw/fde.c
authorMark Wielaard <mark@klomp.org>
Sat, 31 May 2025 22:16:51 +0000 (00:16 +0200)
committerMark Wielaard <mark@klomp.org>
Tue, 3 Jun 2025 12:16:40 +0000 (14:16 +0200)
__libdw_fde_by_offset is marked as an extern internal function in
libdw/cfi.h (a not public header file). But it is (now) only used in
libdw/fde.c, called from __libdw_find_fde. It was originally used for
dwarf_cfi_validate_fde, but that function was deleted and never made
public. So simplify things and make it static in libdw/fde.c.

* libdw/cfi.h (__libdw_fde_by_offset): Remove.
* libdw/fde.c (__libdw_fde_by_offset): Make static.

libdw/cfi.h
libdw/fde.c

index f0296de7371d81b756bbf8aef763b252be863f76..eb7652050a0d961eebe2b48103ec81bd90dd96cf 100644 (file)
@@ -213,11 +213,6 @@ extern struct dwarf_fde *__libdw_find_fde (Dwarf_CFI *cache,
                                           Dwarf_Addr address)
   __nonnull_attribute__ (1) internal_function;
 
-/* Look for an FDE by its offset in the section.  */
-extern struct dwarf_fde *__libdw_fde_by_offset (Dwarf_CFI *cache,
-                                               Dwarf_Off offset)
-  __nonnull_attribute__ (1) internal_function;
-
 /* Process the FDE that contains the given PC address,
    to yield the frame state when stopped there.
    The return value is a DWARF_E_* error code.  */
index 7f36c4a9202d188faebe2a1bbf977d01310127ec..12b5995f0ead50ccd22f1fc7857a0b9bb61048a4 100644 (file)
@@ -142,8 +142,9 @@ intern_fde (Dwarf_CFI *cache, const Dwarf_FDE *entry)
   return fde;
 }
 
-struct dwarf_fde *
-internal_function
+/* Look for an FDE by its offset in the section.
+   Should be called with cache->lock held.  */
+static struct dwarf_fde *
 __libdw_fde_by_offset (Dwarf_CFI *cache, Dwarf_Off offset)
 {
   Dwarf_CFI_Entry entry;