ldlang.h

来自「基于4个mips核的noc设计」· C头文件 代码 · 共 480 行 · 第 1/2 页

H
480
字号
/* ldlang.h - linker command language support   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,   2001   Free Software Foundation, Inc.   This file is part of GLD, the Gnu Linker.   GLD is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 1, or (at your option)   any later version.   GLD is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.   You should have received a copy of the GNU General Public License   along with GLD; see the file COPYING.  If not, write to the Free   Software Foundation, 59 Temple Place - Suite 330, Boston, MA   02111-1307, USA.  */#ifndef LDLANG_H#define LDLANG_Htypedef enum {  lang_input_file_is_l_enum,  lang_input_file_is_symbols_only_enum,  lang_input_file_is_marker_enum,  lang_input_file_is_fake_enum,  lang_input_file_is_search_file_enum,  lang_input_file_is_file_enum} lang_input_file_enum_type;typedef unsigned int fill_type;typedef struct statement_list {  union lang_statement_union *head;  union lang_statement_union **tail;} lang_statement_list_type;typedef struct memory_region_struct {  char *name;  struct memory_region_struct *next;  bfd_vma origin;  bfd_size_type length;  bfd_vma current;  bfd_size_type old_length;  flagword flags;  flagword not_flags;  boolean had_full_message;} lang_memory_region_type;typedef struct lang_statement_header_struct {  union lang_statement_union *next;  enum statement_enum {    lang_output_section_statement_enum,    lang_assignment_statement_enum,    lang_input_statement_enum,    lang_address_statement_enum,    lang_wild_statement_enum,    lang_input_section_enum,    lang_object_symbols_statement_enum,    lang_fill_statement_enum,    lang_data_statement_enum,    lang_reloc_statement_enum,    lang_target_statement_enum,    lang_output_statement_enum,    lang_padding_statement_enum,    lang_group_statement_enum,    lang_afile_asection_pair_statement_enum,    lang_constructors_statement_enum  } type;} lang_statement_header_type;typedef struct {  lang_statement_header_type header;  union etree_union *exp;} lang_assignment_statement_type;typedef struct lang_target_statement_struct {  lang_statement_header_type header;  const char *target;} lang_target_statement_type;typedef struct lang_output_statement_struct {  lang_statement_header_type header;  const char *name;} lang_output_statement_type;/* Section types specified in a linker script.  */enum section_type {  normal_section,  dsect_section,  copy_section,  noload_section,  info_section,  overlay_section};/* This structure holds a list of program headers describing segments   in which this section should be placed.  */struct lang_output_section_phdr_list {  struct lang_output_section_phdr_list *next;  const char *name;  boolean used;};typedef struct lang_output_section_statement_struct {  lang_statement_header_type header;  union etree_union *addr_tree;  lang_statement_list_type children;  const char *memspec;  union lang_statement_union *next;  const char *name;  boolean processed;  asection *bfd_section;  flagword flags;		/* Or together of all input sections */  enum section_type sectype;  struct memory_region_struct *region;  struct memory_region_struct *lma_region;  size_t block_value;  fill_type fill;  int subsection_alignment;	/* alignment of components */  int section_alignment;	/* alignment of start of section */  union etree_union *load_base;  struct lang_output_section_phdr_list *phdrs;} lang_output_section_statement_type;typedef struct {  lang_statement_header_type header;} lang_common_statement_type;typedef struct {  lang_statement_header_type header;} lang_object_symbols_statement_type;typedef struct {  lang_statement_header_type header;  fill_type fill;  int size;  asection *output_section;} lang_fill_statement_type;typedef struct {  lang_statement_header_type header;  unsigned int type;  union etree_union *exp;  bfd_vma value;  asection *output_section;  bfd_vma output_vma;} lang_data_statement_type;/* Generate a reloc in the output file.  */typedef struct {  lang_statement_header_type header;  /* Reloc to generate.  */  bfd_reloc_code_real_type reloc;  /* Reloc howto structure.  */  reloc_howto_type *howto;  /* Section to generate reloc against.  Exactly one of section and     name must be NULL.  */  asection *section;  /* Name of symbol to generate reloc against.  Exactly one of section     and name must be NULL.  */  const char *name;  /* Expression for addend.  */  union etree_union *addend_exp;  /* Resolved addend.  */  bfd_vma addend_value;  /* Output section where reloc should be performed.  */  asection *output_section;  /* VMA within output section.  */  bfd_vma output_vma;} lang_reloc_statement_type;typedef struct lang_input_statement_struct {  lang_statement_header_type header;  /* Name of this file.  */  const char *filename;  /* Name to use for the symbol giving address of text start */  /* Usually the same as filename, but for a file spec'd with -l     this is the -l switch itself rather than the filename.  */  const char *local_sym_name;  bfd *the_bfd;  boolean closed;  file_ptr passive_position;  /* Symbol table of the file.  */  asymbol **asymbols;  unsigned int symbol_count;  /* Point to the next file - whatever it is, wanders up and down     archives */  union lang_statement_union *next;  /* Point to the next file, but skips archive contents */  union lang_statement_union *next_real_file;  boolean is_archive;  /* 1 means search a set of directories for this file.  */  boolean search_dirs_flag;  /* 1 means this is base file of incremental load.     Do not load this file's text or data.     Also default text_start to after this file's bss.  */  boolean just_syms_flag;  /* Whether to search for this entry as a dynamic archive.  */  boolean dynamic;  /* Whether to include the entire contents of an archive.  */  boolean whole_archive;  boolean loaded;#if 0  unsigned int globals_in_this_file;#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?