Changeset 609 for branches/GNU/src/binutils/ld/ldlang.h
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/ld/ldlang.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 1 /* ldlang.h - linker command language support 2 2 Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 3 2001 3 2001, 2002, 2003 4 4 Free Software Foundation, Inc. 5 5 … … 8 8 GLD is free software; you can redistribute it and/or modify 9 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; either version 1, or (at your option)10 the Free Software Foundation; either version 2, or (at your option) 11 11 any later version. 12 12 … … 33 33 } lang_input_file_enum_type; 34 34 35 typedef unsigned int fill_type; 35 struct _fill_type { 36 size_t size; 37 unsigned char data[1]; 38 }; 36 39 37 40 typedef struct statement_list { … … 49 52 flagword flags; 50 53 flagword not_flags; 51 b oolean had_full_message;54 bfd_boolean had_full_message; 52 55 } lang_memory_region_type; 53 56 … … 107 110 struct lang_output_section_phdr_list *next; 108 111 const char *name; 109 b oolean used;112 bfd_boolean used; 110 113 }; 111 114 … … 118 121 const char *name; 119 122 120 b oolean processed;123 bfd_boolean processed; 121 124 122 125 asection *bfd_section; … … 126 129 struct memory_region_struct *lma_region; 127 130 size_t block_value; 128 fill_type fill;131 fill_type *fill; 129 132 130 133 int subsection_alignment; /* alignment of components */ … … 133 136 union etree_union *load_base; 134 137 138 /* If non-null, an expression to evaluate after setting the section's 139 size. The expression is evaluated inside REGION (above) with '.' 140 set to the end of the section. Used in the last overlay section 141 to move '.' past all the overlaid sections. */ 142 union etree_union *update_dot_tree; 143 135 144 struct lang_output_section_phdr_list *phdrs; 136 145 } lang_output_section_statement_type; … … 146 155 typedef struct { 147 156 lang_statement_header_type header; 148 fill_type fill;157 fill_type *fill; 149 158 int size; 150 159 asection *output_section; … … 203 212 bfd *the_bfd; 204 213 205 b oolean closed;214 bfd_boolean closed; 206 215 file_ptr passive_position; 207 216 … … 217 226 union lang_statement_union *next_real_file; 218 227 219 b oolean is_archive;228 bfd_boolean is_archive; 220 229 221 230 /* 1 means search a set of directories for this file. */ 222 boolean search_dirs_flag; 231 bfd_boolean search_dirs_flag; 232 233 /* 1 means this was found in a search directory marked as sysrooted, 234 if search_dirs_flag is false, otherwise, that it should be 235 searched in ld_sysroot before any other location, as long as it 236 starts with a slash. */ 237 bfd_boolean sysrooted; 223 238 224 239 /* 1 means this is base file of incremental load. … … 226 241 Also default text_start to after this file's bss. */ 227 242 228 b oolean just_syms_flag;243 bfd_boolean just_syms_flag; 229 244 230 245 /* Whether to search for this entry as a dynamic archive. */ 231 b oolean dynamic;246 bfd_boolean dynamic; 232 247 233 248 /* Whether to include the entire contents of an archive. */ 234 b oolean whole_archive;235 236 b oolean loaded;249 bfd_boolean whole_archive; 250 251 bfd_boolean loaded; 237 252 238 253 #if 0 … … 240 255 #endif 241 256 const char *target; 242 b oolean real;257 bfd_boolean real; 243 258 } lang_input_statement_type; 244 259 … … 258 273 typedef struct lang_wild_statement_struct { 259 274 lang_statement_header_type header; 260 const char *section_name;261 boolean sections_sorted;262 275 const char *filename; 263 b oolean filenames_sorted;264 boolean keep_sections;265 struct name_list *exclude_filename_list;276 bfd_boolean filenames_sorted; 277 struct wildcard_list *section_list; 278 bfd_boolean keep_sections; 266 279 lang_statement_list_type children; 267 280 } lang_wild_statement_type; … … 278 291 size_t size; 279 292 asection *output_section; 280 fill_type fill;293 fill_type *fill; 281 294 } lang_padding_statement_type; 282 295 … … 293 306 typedef union lang_statement_union { 294 307 lang_statement_header_type header; 295 union lang_statement_union *next;296 308 lang_wild_statement_type wild_statement; 297 309 lang_data_statement_type data_statement; … … 319 331 const char *name; 320 332 unsigned long type; 321 b oolean filehdr;322 b oolean phdrs;333 bfd_boolean filehdr; 334 bfd_boolean phdrs; 323 335 etree_type *at; 324 336 etree_type *flags; … … 354 366 extern lang_output_section_statement_type *abs_output_section; 355 367 extern lang_statement_list_type lang_output_section_statement; 356 extern b oolean lang_has_input_file;368 extern bfd_boolean lang_has_input_file; 357 369 extern etree_type *base; 358 370 extern lang_statement_list_type *stat_ptr; 359 extern boolean delete_output_file_on_failure; 360 361 extern const char *entry_symbol; 362 extern boolean entry_from_cmdline; 371 extern bfd_boolean delete_output_file_on_failure; 372 373 extern struct bfd_sym_chain entry_symbol; 374 extern const char *entry_section; 375 extern bfd_boolean entry_from_cmdline; 363 376 extern lang_statement_list_type file_chain; 364 377 365 extern void lang_init PARAMS ((void)); 378 extern void lang_init 379 PARAMS ((void)); 366 380 extern struct memory_region_struct *lang_memory_region_lookup 367 381 PARAMS ((const char *const)); 368 382 extern struct memory_region_struct *lang_memory_region_default 369 383 PARAMS ((asection *)); 370 extern void lang_map PARAMS ((void)); 371 extern void lang_set_flags PARAMS ((lang_memory_region_type *, const char *, 372 int)); 373 extern void lang_add_output PARAMS ((const char *, int from_script)); 384 extern void lang_map 385 PARAMS ((void)); 386 extern void lang_set_flags 387 PARAMS ((lang_memory_region_type *, const char *, int)); 388 extern void lang_add_output 389 PARAMS ((const char *, int from_script)); 374 390 extern lang_output_section_statement_type *lang_enter_output_section_statement 375 391 PARAMS ((const char *output_section_statement_name, 376 etree_type * 392 etree_type *address_exp, 377 393 enum section_type sectype, 378 394 bfd_vma block_value, … … 380 396 etree_type *subalign, 381 397 etree_type *)); 382 extern void lang_final PARAMS ((void)); 383 extern void lang_process PARAMS ((void)); 384 extern void lang_section_start PARAMS ((const char *, union etree_union *)); 385 extern void lang_add_entry PARAMS ((const char *, boolean)); 386 extern void lang_add_target PARAMS ((const char *)); 398 extern void lang_final 399 PARAMS ((void)); 400 extern void lang_process 401 PARAMS ((void)); 402 extern void lang_section_start 403 PARAMS ((const char *, union etree_union *)); 404 extern void lang_add_entry 405 PARAMS ((const char *, bfd_boolean)); 406 extern void lang_add_target 407 PARAMS ((const char *)); 387 408 extern void lang_add_wild 388 PARAMS ((const char *, boolean, const char *, boolean, boolean, name_list *)); 389 extern void lang_add_map PARAMS ((const char *)); 390 extern void lang_add_fill PARAMS ((int)); 391 extern lang_assignment_statement_type * lang_add_assignment PARAMS ((union etree_union *)); 392 extern void lang_add_attribute PARAMS ((enum statement_enum)); 393 extern void lang_startup PARAMS ((const char *)); 394 extern void lang_float PARAMS ((enum bfd_boolean)); 409 PARAMS ((struct wildcard_spec *, struct wildcard_list *, bfd_boolean)); 410 extern void lang_add_map 411 PARAMS ((const char *)); 412 extern void lang_add_fill 413 PARAMS ((fill_type *)); 414 extern lang_assignment_statement_type * lang_add_assignment 415 PARAMS ((union etree_union *)); 416 extern void lang_add_attribute 417 PARAMS ((enum statement_enum)); 418 extern void lang_startup 419 PARAMS ((const char *)); 420 extern void lang_float 421 PARAMS ((bfd_boolean)); 395 422 extern void lang_leave_output_section_statement 396 PARAMS (( bfd_vma, const char *, struct lang_output_section_phdr_list *,423 PARAMS ((fill_type *, const char *, struct lang_output_section_phdr_list *, 397 424 const char *)); 398 extern void lang_abs_symbol_at_end_of PARAMS ((const char *, const char *)); 399 extern void lang_abs_symbol_at_beginning_of PARAMS ((const char *, 400 const char *)); 401 extern void lang_statement_append PARAMS ((struct statement_list *, 402 union lang_statement_union *, 403 union lang_statement_union **)); 425 extern void lang_abs_symbol_at_end_of 426 PARAMS ((const char *, const char *)); 427 extern void lang_abs_symbol_at_beginning_of 428 PARAMS ((const char *, const char *)); 429 extern void lang_statement_append 430 PARAMS ((struct statement_list *, union lang_statement_union *, 431 union lang_statement_union **)); 404 432 extern void lang_for_each_input_file 405 433 PARAMS ((void (*dothis) (lang_input_statement_type *))); 406 434 extern void lang_for_each_file 407 435 PARAMS ((void (*dothis) (lang_input_statement_type *))); 436 extern void lang_reset_memory_regions 437 PARAMS ((void)); 408 438 extern bfd_vma lang_do_assignments 409 439 PARAMS ((lang_statement_union_type * s, 410 440 lang_output_section_statement_type *output_section_statement, 411 fill_type fill,441 fill_type *fill, 412 442 bfd_vma dot)); 413 443 414 #define LANG_FOR_EACH_INPUT_STATEMENT(statement) \ 415 lang_input_statement_type *statement; \ 416 for (statement = (lang_input_statement_type *)file_chain.head;\ 417 statement != (lang_input_statement_type *)NULL; \ 418 statement = (lang_input_statement_type *)statement->next)\ 419 420 extern void lang_process PARAMS ((void)); 421 extern void ldlang_add_file PARAMS ((lang_input_statement_type *)); 444 #define LANG_FOR_EACH_INPUT_STATEMENT(statement) \ 445 lang_input_statement_type *statement; \ 446 for (statement = (lang_input_statement_type *) file_chain.head; \ 447 statement != (lang_input_statement_type *) NULL; \ 448 statement = (lang_input_statement_type *) statement->next) \ 449 450 extern void lang_process 451 PARAMS ((void)); 452 extern void ldlang_add_file 453 PARAMS ((lang_input_statement_type *)); 422 454 extern lang_output_section_statement_type *lang_output_section_find 423 455 PARAMS ((const char * const)); … … 425 457 PARAMS ((const char *name, lang_input_file_enum_type file_type, 426 458 const char *target)); 427 extern void lang_add_keepsyms_file PARAMS ((const char *filename)); 459 extern void lang_add_keepsyms_file 460 PARAMS ((const char *filename)); 428 461 extern lang_output_section_statement_type * 429 lang_output_section_statement_lookup PARAMS ((const char * const name)); 430 extern void ldlang_add_undef PARAMS ((const char *const name)); 431 extern void lang_add_output_format PARAMS ((const char *, const char *, 432 const char *, int from_script)); 433 extern void lang_list_init PARAMS ((lang_statement_list_type*)); 434 extern void lang_add_data PARAMS ((int type, union etree_union *)); 462 lang_output_section_statement_lookup 463 PARAMS ((const char * const name)); 464 extern void ldlang_add_undef 465 PARAMS ((const char *const name)); 466 extern void lang_add_output_format 467 PARAMS ((const char *, const char *, const char *, int from_script)); 468 extern void lang_list_init 469 PARAMS ((lang_statement_list_type*)); 470 extern void lang_add_data 471 PARAMS ((int type, union etree_union *)); 435 472 extern void lang_add_reloc 436 473 PARAMS ((bfd_reloc_code_real_type reloc, reloc_howto_type *howto, … … 438 475 extern void lang_for_each_statement 439 476 PARAMS ((void (*func) (lang_statement_union_type *))); 440 extern PTR stat_alloc PARAMS ((size_t size)); 441 extern void dprint_statement PARAMS ((lang_statement_union_type *, int)); 477 extern PTR stat_alloc 478 PARAMS ((size_t size)); 479 extern void dprint_statement 480 PARAMS ((lang_statement_union_type *, int)); 442 481 extern bfd_vma lang_size_sections 443 482 PARAMS ((lang_statement_union_type *s, 444 483 lang_output_section_statement_type *output_section_statement, 445 lang_statement_union_type **prev, fill_type fill, 446 bfd_vma dot, boolean relax)); 447 extern void lang_enter_group PARAMS ((void)); 448 extern void lang_leave_group PARAMS ((void)); 449 extern void wild_doit 484 lang_statement_union_type **prev, fill_type *fill, 485 bfd_vma dot, bfd_boolean *relax, bfd_boolean check_regions)); 486 extern void lang_enter_group 487 PARAMS ((void)); 488 extern void lang_leave_group 489 PARAMS ((void)); 490 extern void lang_add_section 450 491 PARAMS ((lang_statement_list_type *ptr, asection *section, 451 492 lang_output_section_statement_type *output, 452 493 lang_input_statement_type *file)); 453 494 extern void lang_new_phdr 454 PARAMS ((const char *, etree_type *, b oolean,boolean, etree_type *,495 PARAMS ((const char *, etree_type *, bfd_boolean, bfd_boolean, etree_type *, 455 496 etree_type *)); 456 extern void lang_add_nocrossref PARAMS ((struct lang_nocrossref *)); 457 extern void lang_enter_overlay PARAMS ((etree_type *, etree_type *, int)); 458 extern void lang_enter_overlay_section PARAMS ((const char *)); 497 extern void lang_add_nocrossref 498 PARAMS ((struct lang_nocrossref *)); 499 extern void lang_enter_overlay 500 PARAMS ((etree_type *)); 501 extern void lang_enter_overlay_section 502 PARAMS ((const char *)); 459 503 extern void lang_leave_overlay_section 460 PARAMS (( bfd_vma, struct lang_output_section_phdr_list *));504 PARAMS ((fill_type *, struct lang_output_section_phdr_list *)); 461 505 extern void lang_leave_overlay 462 PARAMS (( bfd_vma, const char *, struct lang_output_section_phdr_list*,463 506 PARAMS ((etree_type *, int, fill_type *, const char *, 507 struct lang_output_section_phdr_list *, const char *)); 464 508 465 509 extern struct bfd_elf_version_tree *lang_elf_version_info; 466 510 467 extern struct bfd_elf_version_expr *lang_new_vers_ regex511 extern struct bfd_elf_version_expr *lang_new_vers_pattern 468 512 PARAMS ((struct bfd_elf_version_expr *, const char *, const char *)); 469 513 extern struct bfd_elf_version_tree *lang_new_vers_node … … 474 518 PARAMS ((const char *, struct bfd_elf_version_tree *, 475 519 struct bfd_elf_version_deps *)); 476 boolean unique_section_p PARAMS ((const char *)); 477 extern void lang_add_unique PARAMS ((const char *)); 520 bfd_boolean unique_section_p 521 PARAMS ((const char *)); 522 extern void lang_add_unique 523 PARAMS ((const char *)); 524 extern const char *lang_get_output_target 525 PARAMS ((void)); 478 526 479 527 #endif -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.