X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Fldemul.h;h=bc12b3e277061b39f21774403b9b3f7bb4fdf3d2;hb=0b8dbf3f1c359e26b25ce0e48634c83befd60994;hp=631a038767fd1b996ba5b22b77bb891d7abe0149;hpb=5c3261b0e834647cf9eb555320e20871b7854f98;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/ldemul.h b/ld/ldemul.h index 631a038767..bc12b3e277 100644 --- a/ld/ldemul.h +++ b/ld/ldemul.h @@ -1,5 +1,5 @@ /* ld-emul.h - Linker emulation header file - Copyright (C) 1991-2017 Free Software Foundation, Inc. + Copyright (C) 1991-2019 Free Software Foundation, Inc. This file is part of the GNU Binutils. @@ -100,6 +100,14 @@ extern struct bfd_elf_version_expr *ldemul_new_vers_pattern (struct bfd_elf_version_expr *); extern void ldemul_extra_map_file_text (bfd *, struct bfd_link_info *, FILE *); +/* Return 1 if we are emitting CTF early, and 0 if ldemul_examine_strtab_for_ctf + will be called by the target. */ +extern int ldemul_emit_ctf_early + (void); +/* Called from per-target code to examine the strtab and symtab. */ +extern void ldemul_examine_strtab_for_ctf + (struct ctf_file *, struct elf_sym_strtab *, bfd_size_type, + struct elf_strtab_hash *); typedef struct ld_emulation_xfer_struct { /* Run before parsing the command line and script file. @@ -208,6 +216,19 @@ typedef struct ld_emulation_xfer_struct { void (*extra_map_file_text) (bfd *, struct bfd_link_info *, FILE *); + /* If this returns true, we emit CTF as early as possible: if false, we emit + CTF once the strtab and symtab are laid out. */ + int (*emit_ctf_early) + (void); + + /* Called to examine the string and symbol table late enough in linking that + they are finally laid out. If emit_ctf_early returns true, this is not + called and ldemul_maybe_emit_ctf() emits CTF in 'early' mode: otherwise, it + waits until 'late'. (Late mode needs explicit support at per-target link + time to get called at all). If set, called by ld when the examine_strtab + bfd_link_callback is invoked by per-target code. */ + void (*examine_strtab_for_ctf) (struct ctf_file *, struct elf_sym_strtab *, + bfd_size_type, struct elf_strtab_hash *); } ld_emulation_xfer_type; typedef enum {