tools/perf/util/libbfd.h
Source file repositories/reference/linux-study-clean/tools/perf/util/libbfd.h
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/libbfd.h- Extension
.h- Size
- 2150 bytes
- Lines
- 83
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/compiler.hlinux/types.hstdbool.hstddef.hannotate.h
Detected Declarations
struct annotate_argsstruct build_idstruct dsostruct inline_nodestruct symbolfunction libbfd__addr2linefunction dso__free_a2l_libbfdfunction libbfd__read_build_idfunction libbfd_filename__read_debuglinkfunction symbol__disassemble_bpf_libbfd
Annotated Snippet
#ifndef __PERF_LIBBFD_H
#define __PERF_LIBBFD_H
#include <linux/compiler.h>
#include <linux/types.h>
#include <stdbool.h>
#include <stddef.h>
struct annotate_args;
struct build_id;
struct dso;
struct inline_node;
struct symbol;
#ifdef HAVE_LIBBFD_SUPPORT
int libbfd__addr2line(const char *dso_name, u64 addr,
char **file, unsigned int *line, struct dso *dso,
bool unwind_inlines, struct inline_node *node,
struct symbol *sym);
void dso__free_a2l_libbfd(struct dso *dso);
int symbol__disassemble_libbfd(const char *filename, struct symbol *sym,
struct annotate_args *args);
int libbfd__read_build_id(const char *filename, struct build_id *bid);
int libbfd_filename__read_debuglink(const char *filename, char *debuglink, size_t size);
int symbol__disassemble_bpf_libbfd(struct symbol *sym, struct annotate_args *args);
#else // !defined(HAVE_LIBBFD_SUPPORT)
#include "annotate.h"
static inline int libbfd__addr2line(const char *dso_name __always_unused,
u64 addr __always_unused,
char **file __always_unused,
unsigned int *line __always_unused,
struct dso *dso __always_unused,
bool unwind_inlines __always_unused,
struct inline_node *node __always_unused,
struct symbol *sym __always_unused)
{
return -1;
}
static inline void dso__free_a2l_libbfd(struct dso *dso __always_unused)
{
}
static inline int symbol__disassemble_libbfd(const char *filename __always_unused,
struct symbol *sym __always_unused,
struct annotate_args *args __always_unused)
{
return -1;
}
static inline int libbfd__read_build_id(const char *filename __always_unused,
struct build_id *bid __always_unused)
{
return -1;
}
static inline int libbfd_filename__read_debuglink(const char *filename __always_unused,
char *debuglink __always_unused,
size_t size __always_unused)
{
return -1;
}
static inline int symbol__disassemble_bpf_libbfd(struct symbol *sym __always_unused,
struct annotate_args *args __always_unused)
{
return SYMBOL_ANNOTATE_ERRNO__NO_LIBOPCODES_FOR_BPF;
}
#endif // defined(HAVE_LIBBFD_SUPPORT)
#endif /* __PERF_LIBBFD_H */
Annotation
- Immediate include surface: `linux/compiler.h`, `linux/types.h`, `stdbool.h`, `stddef.h`, `annotate.h`.
- Detected declarations: `struct annotate_args`, `struct build_id`, `struct dso`, `struct inline_node`, `struct symbol`, `function libbfd__addr2line`, `function dso__free_a2l_libbfd`, `function libbfd__read_build_id`, `function libbfd_filename__read_debuglink`, `function symbol__disassemble_bpf_libbfd`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.