/* ld-emul.h - Linker emulation header file
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
- 2002, 2003, 2004, 2005, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU Binutils.
(void);
extern void ldemul_after_open
(void);
+extern void ldemul_after_check_relocs
+ (void);
extern void ldemul_after_allocation
(void);
extern void ldemul_before_allocation
(void);
extern void ldemul_create_output_section_statements
(void);
-extern bfd_boolean ldemul_place_orphan
- (asection *, const char *);
+extern lang_output_section_statement_type *ldemul_place_orphan
+ (asection *, const char *, int);
extern bfd_boolean ldemul_parse_args
(int, char **);
extern void ldemul_add_options
(void);
extern void after_open_default
(void);
+extern void after_check_relocs_default
+ (void);
extern void after_allocation_default
(void);
extern void before_allocation_default
(char *, struct lang_input_statement_struct *);
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 *);
typedef struct ld_emulation_xfer_struct {
/* Run before parsing the command line and script file.
/* Run after opening all input files, and loading the symbols. */
void (*after_open) (void);
+ /* Run after checking relocations. */
+ void (*after_check_relocs) (void);
+
/* Run after allocating output sections. */
void (*after_allocation) (void);
/* Place an orphan section. Return TRUE if it was placed, FALSE if
the default action should be taken. This field may be NULL, in
which case the default action will always be taken. */
- bfd_boolean (*place_orphan)
- (asection *, const char *);
+ lang_output_section_statement_type *(*place_orphan)
+ (asection *, const char *, int);
/* Run after assigning parsing with the args, but before
reading the script. Used to initialize symbols used in the script. */
struct bfd_elf_version_expr * (*new_vers_pattern)
(struct bfd_elf_version_expr *);
+ /* Called when printing the map file, in case there are
+ emulation-specific sections for it. */
+ void (*extra_map_file_text)
+ (bfd *, struct bfd_link_info *, FILE *);
+
} ld_emulation_xfer_type;
typedef enum {