GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
/tmp/gdb-13.1/gdb/elfread.c File Reference
#include "defs.h"
#include "bfd.h"
#include "elf-bfd.h"
#include "elf/common.h"
#include "elf/internal.h"
#include "elf/mips.h"
#include "symtab.h"
#include "symfile.h"
#include "objfiles.h"
#include "stabsread.h"
#include "demangle.h"
#include "psympriv.h"
#include "filenames.h"
#include "probe.h"
#include "arch-utils.h"
#include "gdbtypes.h"
#include "value.h"
#include "infcall.h"
#include "gdbthread.h"
#include "inferior.h"
#include "regcache.h"
#include "bcache.h"
#include "gdb_bfd.h"
#include "build-id.h"
#include "location.h"
#include "auxv.h"
#include "mdebugread.h"
#include "ctfread.h"
#include "gdbsupport/gdb_string_view.h"
#include "gdbsupport/scoped_fd.h"
#include "debuginfod-support.h"
#include "dwarf2/public.h"

Go to the source code of this file.

Classes

struct  elfinfo
 
struct  elf_gnu_ifunc_cache
 

Macros

#define SYMBOL_GOT_PLT_SUFFIX   "@got.plt"
 
#define ST_REGULAR   0
 
#define ST_DYNAMIC   1
 
#define ST_SYNTHETIC   2
 

Typedefs

typedef std::vector< std::unique_ptr< probe > > elfread_data
 

Functions

static symfile_segment_data_up elf_symfile_segments (bfd *abfd)
 
static void elf_locate_sections (asection *sectp, struct elfinfo *ei)
 
static struct minimal_symbolrecord_minimal_symbol (minimal_symbol_reader &reader, gdb::string_view name, bool copy_name, CORE_ADDR address, enum minimal_symbol_type ms_type, asection *bfd_section, struct objfile *objfile)
 
static void elf_symtab_read (minimal_symbol_reader &reader, struct objfile *objfile, int type, long number_of_symbols, asymbol **symbol_table, bool copy_names)
 
static void elf_rel_plt_read (minimal_symbol_reader &reader, struct objfile *objfile, asymbol **dyn_symbol_table)
 
static hashval_t elf_gnu_ifunc_cache_hash (const void *a_voidp)
 
static int elf_gnu_ifunc_cache_eq (const void *a_voidp, const void *b_voidp)
 
static int elf_gnu_ifunc_record_cache (const char *name, CORE_ADDR addr)
 
static int elf_gnu_ifunc_resolve_by_cache (const char *name, CORE_ADDR *addr_p)
 
static int elf_gnu_ifunc_resolve_by_got (const char *name, CORE_ADDR *addr_p)
 
static bool elf_gnu_ifunc_resolve_name (const char *name, CORE_ADDR *addr_p)
 
static CORE_ADDR elf_gnu_ifunc_resolve_addr (struct gdbarch *gdbarch, CORE_ADDR pc)
 
static void elf_gnu_ifunc_resolver_stop (code_breakpoint *b)
 
static void elf_gnu_ifunc_resolver_return_stop (code_breakpoint *b)
 
static void elf_read_minimal_symbols (struct objfile *objfile, int symfile_flags, const struct elfinfo *ei)
 
static bool elf_symfile_read_dwarf2 (struct objfile *objfile, symfile_add_flags symfile_flags)
 
static void elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
 
static void elf_new_init (struct objfile *ignore)
 
static void elf_symfile_finish (struct objfile *objfile)
 
static void elf_symfile_init (struct objfile *objfile)
 
static const elfread_dataelf_get_probes (struct objfile *objfile)
 
void _initialize_elfread ()
 

Variables

static const registry< bfd >::key< elfread_dataprobe_key
 
static const registry< objfile >::key< htab, htab_deleter > elf_objfile_gnu_ifunc_cache_data
 
static const struct sym_probe_fns elf_probe_fns
 
static const struct sym_fns elf_sym_fns
 
static const struct gnu_ifunc_fns elf_gnu_ifunc_fns
 

Macro Definition Documentation

◆ ST_DYNAMIC

#define ST_DYNAMIC   1

Definition at line 238 of file elfread.c.

◆ ST_REGULAR

#define ST_REGULAR   0

Definition at line 237 of file elfread.c.

◆ ST_SYNTHETIC

#define ST_SYNTHETIC   2

Definition at line 239 of file elfread.c.

◆ SYMBOL_GOT_PLT_SUFFIX

#define SYMBOL_GOT_PLT_SUFFIX   "@got.plt"

Definition at line 79 of file elfread.c.

Typedef Documentation

◆ elfread_data

typedef std::vector<std::unique_ptr<probe> > elfread_data

Definition at line 68 of file elfread.c.

Function Documentation

◆ _initialize_elfread()

void _initialize_elfread ( )

Definition at line 1438 of file elfread.c.

Referenced by initialize_all_files().

◆ elf_get_probes()

static const elfread_data & elf_get_probes ( struct objfile objfile)
static

Definition at line 1385 of file elfread.c.

References all_static_probe_ops, registry< T >::get(), objfile::obfd, and probe_key.

◆ elf_gnu_ifunc_cache_eq()

static int elf_gnu_ifunc_cache_eq ( const void *  a_voidp,
const void *  b_voidp 
)
static

Definition at line 676 of file elfread.c.

References elf_gnu_ifunc_cache::name.

Referenced by elf_gnu_ifunc_record_cache().

◆ elf_gnu_ifunc_cache_hash()

static hashval_t elf_gnu_ifunc_cache_hash ( const void *  a_voidp)
static

Definition at line 665 of file elfread.c.

References elf_gnu_ifunc_cache::name.

Referenced by elf_gnu_ifunc_record_cache().

◆ elf_gnu_ifunc_record_cache()

static int elf_gnu_ifunc_record_cache ( const char *  name,
CORE_ADDR  addr 
)
static

◆ elf_gnu_ifunc_resolve_addr()

static CORE_ADDR elf_gnu_ifunc_resolve_addr ( struct gdbarch gdbarch,
CORE_ADDR  pc 
)
static

◆ elf_gnu_ifunc_resolve_by_cache()

static int elf_gnu_ifunc_resolve_by_cache ( const char *  name,
CORE_ADDR *  addr_p 
)
static

◆ elf_gnu_ifunc_resolve_by_got()

static int elf_gnu_ifunc_resolve_by_got ( const char *  name,
CORE_ADDR *  addr_p 
)
static

◆ elf_gnu_ifunc_resolve_name()

static bool elf_gnu_ifunc_resolve_name ( const char *  name,
CORE_ADDR *  addr_p 
)
static

◆ elf_gnu_ifunc_resolver_return_stop()

static void elf_gnu_ifunc_resolver_return_stop ( code_breakpoint b)
static

◆ elf_gnu_ifunc_resolver_stop()

static void elf_gnu_ifunc_resolver_stop ( code_breakpoint b)
static

◆ elf_locate_sections()

static void elf_locate_sections ( asection *  sectp,
struct elfinfo ei 
)
static

Definition at line 179 of file elfread.c.

References elfinfo::ctfsect, elfinfo::mdebugsect, and elfinfo::stabsect.

Referenced by elf_symfile_read().

◆ elf_new_init()

static void elf_new_init ( struct objfile ignore)
static

Definition at line 1357 of file elfread.c.

◆ elf_read_minimal_symbols()

static void elf_read_minimal_symbols ( struct objfile objfile,
int  symfile_flags,
const struct elfinfo ei 
)
static

◆ elf_rel_plt_read()

static void elf_rel_plt_read ( minimal_symbol_reader reader,
struct objfile objfile,
asymbol **  dyn_symbol_table 
)
static

◆ elf_symfile_finish()

static void elf_symfile_finish ( struct objfile objfile)
static

Definition at line 1367 of file elfread.c.

◆ elf_symfile_init()

static void elf_symfile_init ( struct objfile objfile)
static

Definition at line 1374 of file elfread.c.

References objfile::flags, and OBJF_REORDERED.

◆ elf_symfile_read()

static void elf_symfile_read ( struct objfile objfile,
symfile_add_flags  symfile_flags 
)
static

◆ elf_symfile_read_dwarf2()

static bool elf_symfile_read_dwarf2 ( struct objfile objfile,
symfile_add_flags  symfile_flags 
)
static

◆ elf_symfile_segments()

static symfile_segment_data_up elf_symfile_segments ( bfd *  abfd)
static

Definition at line 84 of file elfread.c.

◆ elf_symtab_read()

static void elf_symtab_read ( minimal_symbol_reader reader,
struct objfile objfile,
int  type,
long  number_of_symbols,
asymbol **  symbol_table,
bool  copy_names 
)
static

◆ record_minimal_symbol()

static struct minimal_symbol * record_minimal_symbol ( minimal_symbol_reader reader,
gdb::string_view  name,
bool  copy_name,
CORE_ADDR  address,
enum minimal_symbol_type  ms_type,
asection *  bfd_section,
struct objfile objfile 
)
static

Variable Documentation

◆ elf_gnu_ifunc_fns

const struct gnu_ifunc_fns elf_gnu_ifunc_fns
static
Initial value:
=
{
}
static void elf_gnu_ifunc_resolver_stop(code_breakpoint *b)
Definition: elfread.c:951
static CORE_ADDR elf_gnu_ifunc_resolve_addr(struct gdbarch *gdbarch, CORE_ADDR pc)
Definition: elfread.c:905
static void elf_gnu_ifunc_resolver_return_stop(code_breakpoint *b)
Definition: elfread.c:1002
static bool elf_gnu_ifunc_resolve_name(const char *name, CORE_ADDR *addr_p)
Definition: elfread.c:888

Definition at line 1428 of file elfread.c.

◆ elf_objfile_gnu_ifunc_cache_data

const registry<objfile>::key<htab, htab_deleter> elf_objfile_gnu_ifunc_cache_data
static

Definition at line 650 of file elfread.c.

Referenced by elf_gnu_ifunc_record_cache(), and elf_gnu_ifunc_resolve_by_cache().

◆ elf_probe_fns

const struct sym_probe_fns elf_probe_fns
static
Initial value:
=
{
}
static const elfread_data & elf_get_probes(struct objfile *objfile)
Definition: elfread.c:1385

Definition at line 1406 of file elfread.c.

◆ elf_sym_fns

const struct sym_fns elf_sym_fns
static
Initial value:
=
{
NULL,
}
static void elf_new_init(struct objfile *ignore)
Definition: elfread.c:1357
static void elf_symfile_init(struct objfile *objfile)
Definition: elfread.c:1374
static symfile_segment_data_up elf_symfile_segments(bfd *abfd)
Definition: elfread.c:84
static void elf_symfile_finish(struct objfile *objfile)
Definition: elfread.c:1367
static void elf_symfile_read(struct objfile *objfile, symfile_add_flags symfile_flags)
Definition: elfread.c:1291
static const struct sym_probe_fns elf_probe_fns
Definition: elfread.c:1406
void default_symfile_offsets(struct objfile *objfile, const section_addr_info &addrs)
Definition: symfile.c:627
bfd_byte * default_symfile_relocate(struct objfile *objfile, asection *sectp, bfd_byte *buf)
Definition: symfile.c:3561

Definition at line 1413 of file elfread.c.

◆ probe_key

const registry<bfd>::key<elfread_data> probe_key
static

Definition at line 72 of file elfread.c.

Referenced by elf_get_probes().