1 This is bfd.info, produced by makeinfo version 4.8 from 2 /tmp/android-build-b1a4f38d56038d5f3847fea7c8c86b90/src/build/../gdb/gdb-7.1.x/bfd/doc/bfd.texinfo. 3 4 START-INFO-DIR-ENTRY 5 * Bfd: (bfd). The Binary File Descriptor library. 6 END-INFO-DIR-ENTRY 7 8 This file documents the BFD library. 9 10 Copyright (C) 1991, 2000, 2001, 2003, 2006, 2007, 2008 Free Software 11 Foundation, Inc. 12 13 Permission is granted to copy, distribute and/or modify this document 14 under the terms of the GNU Free Documentation License, Version 1.3 or 15 any later version published by the Free Software Foundation; with the 16 Invariant Sections being "GNU General Public License" and "Funding Free 17 Software", the Front-Cover texts being (a) (see below), and with the 18 Back-Cover Texts being (b) (see below). A copy of the license is 19 included in the section entitled "GNU Free Documentation License". 20 21 (a) The FSF's Front-Cover Text is: 22 23 A GNU Manual 24 25 (b) The FSF's Back-Cover Text is: 26 27 You have freedom to copy and modify this GNU Manual, like GNU 28 software. Copies published by the Free Software Foundation raise 29 funds for GNU development. 30 31 32 File: bfd.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir) 33 34 This file documents the binary file descriptor library libbfd. 35 36 * Menu: 37 38 * Overview:: Overview of BFD 39 * BFD front end:: BFD front end 40 * BFD back ends:: BFD back ends 41 * GNU Free Documentation License:: GNU Free Documentation License 42 * BFD Index:: BFD Index 43 44 45 File: bfd.info, Node: Overview, Next: BFD front end, Prev: Top, Up: Top 46 47 1 Introduction 48 ************** 49 50 BFD is a package which allows applications to use the same routines to 51 operate on object files whatever the object file format. A new object 52 file format can be supported simply by creating a new BFD back end and 53 adding it to the library. 54 55 BFD is split into two parts: the front end, and the back ends (one 56 for each object file format). 57 * The front end of BFD provides the interface to the user. It manages 58 memory and various canonical data structures. The front end also 59 decides which back end to use and when to call back end routines. 60 61 * The back ends provide BFD its view of the real world. Each back 62 end provides a set of calls which the BFD front end can use to 63 maintain its canonical form. The back ends also may keep around 64 information for their own use, for greater efficiency. 65 66 * Menu: 67 68 * History:: History 69 * How It Works:: How It Works 70 * What BFD Version 2 Can Do:: What BFD Version 2 Can Do 71 72 73 File: bfd.info, Node: History, Next: How It Works, Prev: Overview, Up: Overview 74 75 1.1 History 76 =========== 77 78 One spur behind BFD was the desire, on the part of the GNU 960 team at 79 Intel Oregon, for interoperability of applications on their COFF and 80 b.out file formats. Cygnus was providing GNU support for the team, and 81 was contracted to provide the required functionality. 82 83 The name came from a conversation David Wallace was having with 84 Richard Stallman about the library: RMS said that it would be quite 85 hard--David said "BFD". Stallman was right, but the name stuck. 86 87 At the same time, Ready Systems wanted much the same thing, but for 88 different object file formats: IEEE-695, Oasys, Srecords, a.out and 68k 89 coff. 90 91 BFD was first implemented by members of Cygnus Support; Steve 92 Chamberlain (`sac (a] cygnus.com'), John Gilmore (`gnu (a] cygnus.com'), K. 93 Richard Pixley (`rich (a] cygnus.com') and David Henkel-Wallace 94 (`gumby (a] cygnus.com'). 95 96 97 File: bfd.info, Node: How It Works, Next: What BFD Version 2 Can Do, Prev: History, Up: Overview 98 99 1.2 How To Use BFD 100 ================== 101 102 To use the library, include `bfd.h' and link with `libbfd.a'. 103 104 BFD provides a common interface to the parts of an object file for a 105 calling application. 106 107 When an application successfully opens a target file (object, 108 archive, or whatever), a pointer to an internal structure is returned. 109 This pointer points to a structure called `bfd', described in `bfd.h'. 110 Our convention is to call this pointer a BFD, and instances of it 111 within code `abfd'. All operations on the target object file are 112 applied as methods to the BFD. The mapping is defined within `bfd.h' 113 in a set of macros, all beginning with `bfd_' to reduce namespace 114 pollution. 115 116 For example, this sequence does what you would probably expect: 117 return the number of sections in an object file attached to a BFD 118 `abfd'. 119 120 #include "bfd.h" 121 122 unsigned int number_of_sections (abfd) 123 bfd *abfd; 124 { 125 return bfd_count_sections (abfd); 126 } 127 128 The abstraction used within BFD is that an object file has: 129 130 * a header, 131 132 * a number of sections containing raw data (*note Sections::), 133 134 * a set of relocations (*note Relocations::), and 135 136 * some symbol information (*note Symbols::). 137 Also, BFDs opened for archives have the additional attribute of an 138 index and contain subordinate BFDs. This approach is fine for a.out and 139 coff, but loses efficiency when applied to formats such as S-records and 140 IEEE-695. 141 142 143 File: bfd.info, Node: What BFD Version 2 Can Do, Prev: How It Works, Up: Overview 144 145 1.3 What BFD Version 2 Can Do 146 ============================= 147 148 When an object file is opened, BFD subroutines automatically determine 149 the format of the input object file. They then build a descriptor in 150 memory with pointers to routines that will be used to access elements of 151 the object file's data structures. 152 153 As different information from the object files is required, BFD 154 reads from different sections of the file and processes them. For 155 example, a very common operation for the linker is processing symbol 156 tables. Each BFD back end provides a routine for converting between 157 the object file's representation of symbols and an internal canonical 158 format. When the linker asks for the symbol table of an object file, it 159 calls through a memory pointer to the routine from the relevant BFD 160 back end which reads and converts the table into a canonical form. The 161 linker then operates upon the canonical form. When the link is finished 162 and the linker writes the output file's symbol table, another BFD back 163 end routine is called to take the newly created symbol table and 164 convert it into the chosen output format. 165 166 * Menu: 167 168 * BFD information loss:: Information Loss 169 * Canonical format:: The BFD canonical object-file format 170 171 172 File: bfd.info, Node: BFD information loss, Next: Canonical format, Up: What BFD Version 2 Can Do 173 174 1.3.1 Information Loss 175 ---------------------- 176 177 _Information can be lost during output._ The output formats supported 178 by BFD do not provide identical facilities, and information which can 179 be described in one form has nowhere to go in another format. One 180 example of this is alignment information in `b.out'. There is nowhere 181 in an `a.out' format file to store alignment information on the 182 contained data, so when a file is linked from `b.out' and an `a.out' 183 image is produced, alignment information will not propagate to the 184 output file. (The linker will still use the alignment information 185 internally, so the link is performed correctly). 186 187 Another example is COFF section names. COFF files may contain an 188 unlimited number of sections, each one with a textual section name. If 189 the target of the link is a format which does not have many sections 190 (e.g., `a.out') or has sections without names (e.g., the Oasys format), 191 the link cannot be done simply. You can circumvent this problem by 192 describing the desired input-to-output section mapping with the linker 193 command language. 194 195 _Information can be lost during canonicalization._ The BFD internal 196 canonical form of the external formats is not exhaustive; there are 197 structures in input formats for which there is no direct representation 198 internally. This means that the BFD back ends cannot maintain all 199 possible data richness through the transformation between external to 200 internal and back to external formats. 201 202 This limitation is only a problem when an application reads one 203 format and writes another. Each BFD back end is responsible for 204 maintaining as much data as possible, and the internal BFD canonical 205 form has structures which are opaque to the BFD core, and exported only 206 to the back ends. When a file is read in one format, the canonical form 207 is generated for BFD and the application. At the same time, the back 208 end saves away any information which may otherwise be lost. If the data 209 is then written back in the same format, the back end routine will be 210 able to use the canonical form provided by the BFD core as well as the 211 information it prepared earlier. Since there is a great deal of 212 commonality between back ends, there is no information lost when 213 linking or copying big endian COFF to little endian COFF, or `a.out' to 214 `b.out'. When a mixture of formats is linked, the information is only 215 lost from the files whose format differs from the destination. 216 217 218 File: bfd.info, Node: Canonical format, Prev: BFD information loss, Up: What BFD Version 2 Can Do 219 220 1.3.2 The BFD canonical object-file format 221 ------------------------------------------ 222 223 The greatest potential for loss of information occurs when there is the 224 least overlap between the information provided by the source format, 225 that stored by the canonical format, and that needed by the destination 226 format. A brief description of the canonical form may help you 227 understand which kinds of data you can count on preserving across 228 conversions. 229 230 _files_ 231 Information stored on a per-file basis includes target machine 232 architecture, particular implementation format type, a demand 233 pageable bit, and a write protected bit. Information like Unix 234 magic numbers is not stored here--only the magic numbers' meaning, 235 so a `ZMAGIC' file would have both the demand pageable bit and the 236 write protected text bit set. The byte order of the target is 237 stored on a per-file basis, so that big- and little-endian object 238 files may be used with one another. 239 240 _sections_ 241 Each section in the input file contains the name of the section, 242 the section's original address in the object file, size and 243 alignment information, various flags, and pointers into other BFD 244 data structures. 245 246 _symbols_ 247 Each symbol contains a pointer to the information for the object 248 file which originally defined it, its name, its value, and various 249 flag bits. When a BFD back end reads in a symbol table, it 250 relocates all symbols to make them relative to the base of the 251 section where they were defined. Doing this ensures that each 252 symbol points to its containing section. Each symbol also has a 253 varying amount of hidden private data for the BFD back end. Since 254 the symbol points to the original file, the private data format 255 for that symbol is accessible. `ld' can operate on a collection 256 of symbols of wildly different formats without problems. 257 258 Normal global and simple local symbols are maintained on output, 259 so an output file (no matter its format) will retain symbols 260 pointing to functions and to global, static, and common variables. 261 Some symbol information is not worth retaining; in `a.out', type 262 information is stored in the symbol table as long symbol names. 263 This information would be useless to most COFF debuggers; the 264 linker has command line switches to allow users to throw it away. 265 266 There is one word of type information within the symbol, so if the 267 format supports symbol type information within symbols (for 268 example, COFF, IEEE, Oasys) and the type is simple enough to fit 269 within one word (nearly everything but aggregates), the 270 information will be preserved. 271 272 _relocation level_ 273 Each canonical BFD relocation record contains a pointer to the 274 symbol to relocate to, the offset of the data to relocate, the 275 section the data is in, and a pointer to a relocation type 276 descriptor. Relocation is performed by passing messages through 277 the relocation type descriptor and the symbol pointer. Therefore, 278 relocations can be performed on output data using a relocation 279 method that is only available in one of the input formats. For 280 instance, Oasys provides a byte relocation format. A relocation 281 record requesting this relocation type would point indirectly to a 282 routine to perform this, so the relocation may be performed on a 283 byte being written to a 68k COFF file, even though 68k COFF has no 284 such relocation type. 285 286 _line numbers_ 287 Object formats can contain, for debugging purposes, some form of 288 mapping between symbols, source line numbers, and addresses in the 289 output file. These addresses have to be relocated along with the 290 symbol information. Each symbol with an associated list of line 291 number records points to the first record of the list. The head 292 of a line number list consists of a pointer to the symbol, which 293 allows finding out the address of the function whose line number 294 is being described. The rest of the list is made up of pairs: 295 offsets into the section and line numbers. Any format which can 296 simply derive this information can pass it successfully between 297 formats (COFF, IEEE and Oasys). 298 299 300 File: bfd.info, Node: BFD front end, Next: BFD back ends, Prev: Overview, Up: Top 301 302 2 BFD Front End 303 *************** 304 305 2.1 `typedef bfd' 306 ================= 307 308 A BFD has type `bfd'; objects of this type are the cornerstone of any 309 application using BFD. Using BFD consists of making references though 310 the BFD and to data in the BFD. 311 312 Here is the structure that defines the type `bfd'. It contains the 313 major data about the file and pointers to the rest of the data. 314 315 316 enum bfd_direction 317 { 318 no_direction = 0, 319 read_direction = 1, 320 write_direction = 2, 321 both_direction = 3 322 }; 323 324 struct bfd 325 { 326 /* A unique identifier of the BFD */ 327 unsigned int id; 328 329 /* The filename the application opened the BFD with. */ 330 const char *filename; 331 332 /* A pointer to the target jump table. */ 333 const struct bfd_target *xvec; 334 335 /* The IOSTREAM, and corresponding IO vector that provide access 336 to the file backing the BFD. */ 337 void *iostream; 338 const struct bfd_iovec *iovec; 339 340 /* The caching routines use these to maintain a 341 least-recently-used list of BFDs. */ 342 struct bfd *lru_prev, *lru_next; 343 344 /* When a file is closed by the caching routines, BFD retains 345 state information on the file here... */ 346 ufile_ptr where; 347 348 /* File modified time, if mtime_set is TRUE. */ 349 long mtime; 350 351 /* Reserved for an unimplemented file locking extension. */ 352 int ifd; 353 354 /* The format which belongs to the BFD. (object, core, etc.) */ 355 bfd_format format; 356 357 /* The direction with which the BFD was opened. */ 358 enum bfd_direction direction; 359 360 /* Format_specific flags. */ 361 flagword flags; 362 363 /* Values that may appear in the flags field of a BFD. These also 364 appear in the object_flags field of the bfd_target structure, where 365 they indicate the set of flags used by that backend (not all flags 366 are meaningful for all object file formats) (FIXME: at the moment, 367 the object_flags values have mostly just been copied from backend 368 to another, and are not necessarily correct). */ 369 370 #define BFD_NO_FLAGS 0x00 371 372 /* BFD contains relocation entries. */ 373 #define HAS_RELOC 0x01 374 375 /* BFD is directly executable. */ 376 #define EXEC_P 0x02 377 378 /* BFD has line number information (basically used for F_LNNO in a 379 COFF header). */ 380 #define HAS_LINENO 0x04 381 382 /* BFD has debugging information. */ 383 #define HAS_DEBUG 0x08 384 385 /* BFD has symbols. */ 386 #define HAS_SYMS 0x10 387 388 /* BFD has local symbols (basically used for F_LSYMS in a COFF 389 header). */ 390 #define HAS_LOCALS 0x20 391 392 /* BFD is a dynamic object. */ 393 #define DYNAMIC 0x40 394 395 /* Text section is write protected (if D_PAGED is not set, this is 396 like an a.out NMAGIC file) (the linker sets this by default, but 397 clears it for -r or -N). */ 398 #define WP_TEXT 0x80 399 400 /* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the 401 linker sets this by default, but clears it for -r or -n or -N). */ 402 #define D_PAGED 0x100 403 404 /* BFD is relaxable (this means that bfd_relax_section may be able to 405 do something) (sometimes bfd_relax_section can do something even if 406 this is not set). */ 407 #define BFD_IS_RELAXABLE 0x200 408 409 /* This may be set before writing out a BFD to request using a 410 traditional format. For example, this is used to request that when 411 writing out an a.out object the symbols not be hashed to eliminate 412 duplicates. */ 413 #define BFD_TRADITIONAL_FORMAT 0x400 414 415 /* This flag indicates that the BFD contents are actually cached 416 in memory. If this is set, iostream points to a bfd_in_memory 417 struct. */ 418 #define BFD_IN_MEMORY 0x800 419 420 /* The sections in this BFD specify a memory page. */ 421 #define HAS_LOAD_PAGE 0x1000 422 423 /* This BFD has been created by the linker and doesn't correspond 424 to any input file. */ 425 #define BFD_LINKER_CREATED 0x2000 426 427 /* This may be set before writing out a BFD to request that it 428 be written using values for UIDs, GIDs, timestamps, etc. that 429 will be consistent from run to run. */ 430 #define BFD_DETERMINISTIC_OUTPUT 0x4000 431 432 /* Currently my_archive is tested before adding origin to 433 anything. I believe that this can become always an add of 434 origin, with origin set to 0 for non archive files. */ 435 ufile_ptr origin; 436 437 /* The origin in the archive of the proxy entry. This will 438 normally be the same as origin, except for thin archives, 439 when it will contain the current offset of the proxy in the 440 thin archive rather than the offset of the bfd in its actual 441 container. */ 442 ufile_ptr proxy_origin; 443 444 /* A hash table for section names. */ 445 struct bfd_hash_table section_htab; 446 447 /* Pointer to linked list of sections. */ 448 struct bfd_section *sections; 449 450 /* The last section on the section list. */ 451 struct bfd_section *section_last; 452 453 /* The number of sections. */ 454 unsigned int section_count; 455 456 /* Stuff only useful for object files: 457 The start address. */ 458 bfd_vma start_address; 459 460 /* Used for input and output. */ 461 unsigned int symcount; 462 463 /* Symbol table for output BFD (with symcount entries). 464 Also used by the linker to cache input BFD symbols. */ 465 struct bfd_symbol **outsymbols; 466 467 /* Used for slurped dynamic symbol tables. */ 468 unsigned int dynsymcount; 469 470 /* Pointer to structure which contains architecture information. */ 471 const struct bfd_arch_info *arch_info; 472 473 /* Stuff only useful for archives. */ 474 void *arelt_data; 475 struct bfd *my_archive; /* The containing archive BFD. */ 476 struct bfd *archive_next; /* The next BFD in the archive. */ 477 struct bfd *archive_head; /* The first BFD in the archive. */ 478 struct bfd *nested_archives; /* List of nested archive in a flattened 479 thin archive. */ 480 481 /* A chain of BFD structures involved in a link. */ 482 struct bfd *link_next; 483 484 /* A field used by _bfd_generic_link_add_archive_symbols. This will 485 be used only for archive elements. */ 486 int archive_pass; 487 488 /* Used by the back end to hold private data. */ 489 union 490 { 491 struct aout_data_struct *aout_data; 492 struct artdata *aout_ar_data; 493 struct _oasys_data *oasys_obj_data; 494 struct _oasys_ar_data *oasys_ar_data; 495 struct coff_tdata *coff_obj_data; 496 struct pe_tdata *pe_obj_data; 497 struct xcoff_tdata *xcoff_obj_data; 498 struct ecoff_tdata *ecoff_obj_data; 499 struct ieee_data_struct *ieee_data; 500 struct ieee_ar_data_struct *ieee_ar_data; 501 struct srec_data_struct *srec_data; 502 struct verilog_data_struct *verilog_data; 503 struct ihex_data_struct *ihex_data; 504 struct tekhex_data_struct *tekhex_data; 505 struct elf_obj_tdata *elf_obj_data; 506 struct nlm_obj_tdata *nlm_obj_data; 507 struct bout_data_struct *bout_data; 508 struct mmo_data_struct *mmo_data; 509 struct sun_core_struct *sun_core_data; 510 struct sco5_core_struct *sco5_core_data; 511 struct trad_core_struct *trad_core_data; 512 struct som_data_struct *som_data; 513 struct hpux_core_struct *hpux_core_data; 514 struct hppabsd_core_struct *hppabsd_core_data; 515 struct sgi_core_struct *sgi_core_data; 516 struct lynx_core_struct *lynx_core_data; 517 struct osf_core_struct *osf_core_data; 518 struct cisco_core_struct *cisco_core_data; 519 struct versados_data_struct *versados_data; 520 struct netbsd_core_struct *netbsd_core_data; 521 struct mach_o_data_struct *mach_o_data; 522 struct mach_o_fat_data_struct *mach_o_fat_data; 523 struct plugin_data_struct *plugin_data; 524 struct bfd_pef_data_struct *pef_data; 525 struct bfd_pef_xlib_data_struct *pef_xlib_data; 526 struct bfd_sym_data_struct *sym_data; 527 void *any; 528 } 529 tdata; 530 531 /* Used by the application to hold private data. */ 532 void *usrdata; 533 534 /* Where all the allocated stuff under this BFD goes. This is a 535 struct objalloc *, but we use void * to avoid requiring the inclusion 536 of objalloc.h. */ 537 void *memory; 538 539 /* Is the file descriptor being cached? That is, can it be closed as 540 needed, and re-opened when accessed later? */ 541 unsigned int cacheable : 1; 542 543 /* Marks whether there was a default target specified when the 544 BFD was opened. This is used to select which matching algorithm 545 to use to choose the back end. */ 546 unsigned int target_defaulted : 1; 547 548 /* ... and here: (``once'' means at least once). */ 549 unsigned int opened_once : 1; 550 551 /* Set if we have a locally maintained mtime value, rather than 552 getting it from the file each time. */ 553 unsigned int mtime_set : 1; 554 555 /* Flag set if symbols from this BFD should not be exported. */ 556 unsigned int no_export : 1; 557 558 /* Remember when output has begun, to stop strange things 559 from happening. */ 560 unsigned int output_has_begun : 1; 561 562 /* Have archive map. */ 563 unsigned int has_armap : 1; 564 565 /* Set if this is a thin archive. */ 566 unsigned int is_thin_archive : 1; 567 }; 568 569 2.2 Error reporting 570 =================== 571 572 Most BFD functions return nonzero on success (check their individual 573 documentation for precise semantics). On an error, they call 574 `bfd_set_error' to set an error condition that callers can check by 575 calling `bfd_get_error'. If that returns `bfd_error_system_call', then 576 check `errno'. 577 578 The easiest way to report a BFD error to the user is to use 579 `bfd_perror'. 580 581 2.2.1 Type `bfd_error_type' 582 --------------------------- 583 584 The values returned by `bfd_get_error' are defined by the enumerated 585 type `bfd_error_type'. 586 587 588 typedef enum bfd_error 589 { 590 bfd_error_no_error = 0, 591 bfd_error_system_call, 592 bfd_error_invalid_target, 593 bfd_error_wrong_format, 594 bfd_error_wrong_object_format, 595 bfd_error_invalid_operation, 596 bfd_error_no_memory, 597 bfd_error_no_symbols, 598 bfd_error_no_armap, 599 bfd_error_no_more_archived_files, 600 bfd_error_malformed_archive, 601 bfd_error_file_not_recognized, 602 bfd_error_file_ambiguously_recognized, 603 bfd_error_no_contents, 604 bfd_error_nonrepresentable_section, 605 bfd_error_no_debug_section, 606 bfd_error_bad_value, 607 bfd_error_file_truncated, 608 bfd_error_file_too_big, 609 bfd_error_on_input, 610 bfd_error_invalid_error_code 611 } 612 bfd_error_type; 613 614 2.2.1.1 `bfd_get_error' 615 ....................... 616 617 *Synopsis* 618 bfd_error_type bfd_get_error (void); 619 *Description* 620 Return the current BFD error condition. 621 622 2.2.1.2 `bfd_set_error' 623 ....................... 624 625 *Synopsis* 626 void bfd_set_error (bfd_error_type error_tag, ...); 627 *Description* 628 Set the BFD error condition to be ERROR_TAG. If ERROR_TAG is 629 bfd_error_on_input, then this function takes two more parameters, the 630 input bfd where the error occurred, and the bfd_error_type error. 631 632 2.2.1.3 `bfd_errmsg' 633 .................... 634 635 *Synopsis* 636 const char *bfd_errmsg (bfd_error_type error_tag); 637 *Description* 638 Return a string describing the error ERROR_TAG, or the system error if 639 ERROR_TAG is `bfd_error_system_call'. 640 641 2.2.1.4 `bfd_perror' 642 .................... 643 644 *Synopsis* 645 void bfd_perror (const char *message); 646 *Description* 647 Print to the standard error stream a string describing the last BFD 648 error that occurred, or the last system error if the last BFD error was 649 a system call failure. If MESSAGE is non-NULL and non-empty, the error 650 string printed is preceded by MESSAGE, a colon, and a space. It is 651 followed by a newline. 652 653 2.2.2 BFD error handler 654 ----------------------- 655 656 Some BFD functions want to print messages describing the problem. They 657 call a BFD error handler function. This function may be overridden by 658 the program. 659 660 The BFD error handler acts like printf. 661 662 663 typedef void (*bfd_error_handler_type) (const char *, ...); 664 665 2.2.2.1 `bfd_set_error_handler' 666 ............................... 667 668 *Synopsis* 669 bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); 670 *Description* 671 Set the BFD error handler function. Returns the previous function. 672 673 2.2.2.2 `bfd_set_error_program_name' 674 .................................... 675 676 *Synopsis* 677 void bfd_set_error_program_name (const char *); 678 *Description* 679 Set the program name to use when printing a BFD error. This is printed 680 before the error message followed by a colon and space. The string 681 must not be changed after it is passed to this function. 682 683 2.2.2.3 `bfd_get_error_handler' 684 ............................... 685 686 *Synopsis* 687 bfd_error_handler_type bfd_get_error_handler (void); 688 *Description* 689 Return the BFD error handler function. 690 691 2.3 Miscellaneous 692 ================= 693 694 2.3.1 Miscellaneous functions 695 ----------------------------- 696 697 2.3.1.1 `bfd_get_reloc_upper_bound' 698 ................................... 699 700 *Synopsis* 701 long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); 702 *Description* 703 Return the number of bytes required to store the relocation information 704 associated with section SECT attached to bfd ABFD. If an error occurs, 705 return -1. 706 707 2.3.1.2 `bfd_canonicalize_reloc' 708 ................................ 709 710 *Synopsis* 711 long bfd_canonicalize_reloc 712 (bfd *abfd, asection *sec, arelent **loc, asymbol **syms); 713 *Description* 714 Call the back end associated with the open BFD ABFD and translate the 715 external form of the relocation information attached to SEC into the 716 internal canonical form. Place the table into memory at LOC, which has 717 been preallocated, usually by a call to `bfd_get_reloc_upper_bound'. 718 Returns the number of relocs, or -1 on error. 719 720 The SYMS table is also needed for horrible internal magic reasons. 721 722 2.3.1.3 `bfd_set_reloc' 723 ....................... 724 725 *Synopsis* 726 void bfd_set_reloc 727 (bfd *abfd, asection *sec, arelent **rel, unsigned int count); 728 *Description* 729 Set the relocation pointer and count within section SEC to the values 730 REL and COUNT. The argument ABFD is ignored. 731 732 2.3.1.4 `bfd_set_file_flags' 733 ............................ 734 735 *Synopsis* 736 bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); 737 *Description* 738 Set the flag word in the BFD ABFD to the value FLAGS. 739 740 Possible errors are: 741 * `bfd_error_wrong_format' - The target bfd was not of object format. 742 743 * `bfd_error_invalid_operation' - The target bfd was open for 744 reading. 745 746 * `bfd_error_invalid_operation' - The flag word contained a bit 747 which was not applicable to the type of file. E.g., an attempt 748 was made to set the `D_PAGED' bit on a BFD format which does not 749 support demand paging. 750 751 2.3.1.5 `bfd_get_arch_size' 752 ........................... 753 754 *Synopsis* 755 int bfd_get_arch_size (bfd *abfd); 756 *Description* 757 Returns the architecture address size, in bits, as determined by the 758 object file's format. For ELF, this information is included in the 759 header. 760 761 *Returns* 762 Returns the arch size in bits if known, `-1' otherwise. 763 764 2.3.1.6 `bfd_get_sign_extend_vma' 765 ................................. 766 767 *Synopsis* 768 int bfd_get_sign_extend_vma (bfd *abfd); 769 *Description* 770 Indicates if the target architecture "naturally" sign extends an 771 address. Some architectures implicitly sign extend address values when 772 they are converted to types larger than the size of an address. For 773 instance, bfd_get_start_address() will return an address sign extended 774 to fill a bfd_vma when this is the case. 775 776 *Returns* 777 Returns `1' if the target architecture is known to sign extend 778 addresses, `0' if the target architecture is known to not sign extend 779 addresses, and `-1' otherwise. 780 781 2.3.1.7 `bfd_set_start_address' 782 ............................... 783 784 *Synopsis* 785 bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma); 786 *Description* 787 Make VMA the entry point of output BFD ABFD. 788 789 *Returns* 790 Returns `TRUE' on success, `FALSE' otherwise. 791 792 2.3.1.8 `bfd_get_gp_size' 793 ......................... 794 795 *Synopsis* 796 unsigned int bfd_get_gp_size (bfd *abfd); 797 *Description* 798 Return the maximum size of objects to be optimized using the GP 799 register under MIPS ECOFF. This is typically set by the `-G' argument 800 to the compiler, assembler or linker. 801 802 2.3.1.9 `bfd_set_gp_size' 803 ......................... 804 805 *Synopsis* 806 void bfd_set_gp_size (bfd *abfd, unsigned int i); 807 *Description* 808 Set the maximum size of objects to be optimized using the GP register 809 under ECOFF or MIPS ELF. This is typically set by the `-G' argument to 810 the compiler, assembler or linker. 811 812 2.3.1.10 `bfd_scan_vma' 813 ....................... 814 815 *Synopsis* 816 bfd_vma bfd_scan_vma (const char *string, const char **end, int base); 817 *Description* 818 Convert, like `strtoul', a numerical expression STRING into a `bfd_vma' 819 integer, and return that integer. (Though without as many bells and 820 whistles as `strtoul'.) The expression is assumed to be unsigned 821 (i.e., positive). If given a BASE, it is used as the base for 822 conversion. A base of 0 causes the function to interpret the string in 823 hex if a leading "0x" or "0X" is found, otherwise in octal if a leading 824 zero is found, otherwise in decimal. 825 826 If the value would overflow, the maximum `bfd_vma' value is returned. 827 828 2.3.1.11 `bfd_copy_private_header_data' 829 ....................................... 830 831 *Synopsis* 832 bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); 833 *Description* 834 Copy private BFD header information from the BFD IBFD to the the BFD 835 OBFD. This copies information that may require sections to exist, but 836 does not require symbol tables. Return `true' on success, `false' on 837 error. Possible error returns are: 838 839 * `bfd_error_no_memory' - Not enough memory exists to create private 840 data for OBFD. 841 842 #define bfd_copy_private_header_data(ibfd, obfd) \ 843 BFD_SEND (obfd, _bfd_copy_private_header_data, \ 844 (ibfd, obfd)) 845 846 2.3.1.12 `bfd_copy_private_bfd_data' 847 .................................... 848 849 *Synopsis* 850 bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); 851 *Description* 852 Copy private BFD information from the BFD IBFD to the the BFD OBFD. 853 Return `TRUE' on success, `FALSE' on error. Possible error returns are: 854 855 * `bfd_error_no_memory' - Not enough memory exists to create private 856 data for OBFD. 857 858 #define bfd_copy_private_bfd_data(ibfd, obfd) \ 859 BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ 860 (ibfd, obfd)) 861 862 2.3.1.13 `bfd_merge_private_bfd_data' 863 ..................................... 864 865 *Synopsis* 866 bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); 867 *Description* 868 Merge private BFD information from the BFD IBFD to the the output file 869 BFD OBFD when linking. Return `TRUE' on success, `FALSE' on error. 870 Possible error returns are: 871 872 * `bfd_error_no_memory' - Not enough memory exists to create private 873 data for OBFD. 874 875 #define bfd_merge_private_bfd_data(ibfd, obfd) \ 876 BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ 877 (ibfd, obfd)) 878 879 2.3.1.14 `bfd_set_private_flags' 880 ................................ 881 882 *Synopsis* 883 bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); 884 *Description* 885 Set private BFD flag information in the BFD ABFD. Return `TRUE' on 886 success, `FALSE' on error. Possible error returns are: 887 888 * `bfd_error_no_memory' - Not enough memory exists to create private 889 data for OBFD. 890 891 #define bfd_set_private_flags(abfd, flags) \ 892 BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags)) 893 894 2.3.1.15 `Other functions' 895 .......................... 896 897 *Description* 898 The following functions exist but have not yet been documented. 899 #define bfd_sizeof_headers(abfd, info) \ 900 BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info)) 901 902 #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ 903 BFD_SEND (abfd, _bfd_find_nearest_line, \ 904 (abfd, sec, syms, off, file, func, line)) 905 906 #define bfd_find_line(abfd, syms, sym, file, line) \ 907 BFD_SEND (abfd, _bfd_find_line, \ 908 (abfd, syms, sym, file, line)) 909 910 #define bfd_find_inliner_info(abfd, file, func, line) \ 911 BFD_SEND (abfd, _bfd_find_inliner_info, \ 912 (abfd, file, func, line)) 913 914 #define bfd_debug_info_start(abfd) \ 915 BFD_SEND (abfd, _bfd_debug_info_start, (abfd)) 916 917 #define bfd_debug_info_end(abfd) \ 918 BFD_SEND (abfd, _bfd_debug_info_end, (abfd)) 919 920 #define bfd_debug_info_accumulate(abfd, section) \ 921 BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section)) 922 923 #define bfd_stat_arch_elt(abfd, stat) \ 924 BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat)) 925 926 #define bfd_update_armap_timestamp(abfd) \ 927 BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd)) 928 929 #define bfd_set_arch_mach(abfd, arch, mach)\ 930 BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach)) 931 932 #define bfd_relax_section(abfd, section, link_info, again) \ 933 BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again)) 934 935 #define bfd_gc_sections(abfd, link_info) \ 936 BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info)) 937 938 #define bfd_merge_sections(abfd, link_info) \ 939 BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info)) 940 941 #define bfd_is_group_section(abfd, sec) \ 942 BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec)) 943 944 #define bfd_discard_group(abfd, sec) \ 945 BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) 946 947 #define bfd_link_hash_table_create(abfd) \ 948 BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) 949 950 #define bfd_link_hash_table_free(abfd, hash) \ 951 BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) 952 953 #define bfd_link_add_symbols(abfd, info) \ 954 BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) 955 956 #define bfd_link_just_syms(abfd, sec, info) \ 957 BFD_SEND (abfd, _bfd_link_just_syms, (sec, info)) 958 959 #define bfd_final_link(abfd, info) \ 960 BFD_SEND (abfd, _bfd_final_link, (abfd, info)) 961 962 #define bfd_free_cached_info(abfd) \ 963 BFD_SEND (abfd, _bfd_free_cached_info, (abfd)) 964 965 #define bfd_get_dynamic_symtab_upper_bound(abfd) \ 966 BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd)) 967 968 #define bfd_print_private_bfd_data(abfd, file)\ 969 BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file)) 970 971 #define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \ 972 BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols)) 973 974 #define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \ 975 BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \ 976 dyncount, dynsyms, ret)) 977 978 #define bfd_get_dynamic_reloc_upper_bound(abfd) \ 979 BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd)) 980 981 #define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \ 982 BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms)) 983 984 extern bfd_byte *bfd_get_relocated_section_contents 985 (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, 986 bfd_boolean, asymbol **); 987 988 2.3.1.16 `bfd_alt_mach_code' 989 ............................ 990 991 *Synopsis* 992 bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); 993 *Description* 994 When more than one machine code number is available for the same 995 machine type, this function can be used to switch between the preferred 996 one (alternative == 0) and any others. Currently, only ELF supports 997 this feature, with up to two alternate machine codes. 998 999 struct bfd_preserve 1000 { 1001 void *marker; 1002 void *tdata; 1003 flagword flags; 1004 const struct bfd_arch_info *arch_info; 1005 struct bfd_section *sections; 1006 struct bfd_section *section_last; 1007 unsigned int section_count; 1008 struct bfd_hash_table section_htab; 1009 }; 1010 1011 2.3.1.17 `bfd_preserve_save' 1012 ............................ 1013 1014 *Synopsis* 1015 bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); 1016 *Description* 1017 When testing an object for compatibility with a particular target 1018 back-end, the back-end object_p function needs to set up certain fields 1019 in the bfd on successfully recognizing the object. This typically 1020 happens in a piecemeal fashion, with failures possible at many points. 1021 On failure, the bfd is supposed to be restored to its initial state, 1022 which is virtually impossible. However, restoring a subset of the bfd 1023 state works in practice. This function stores the subset and 1024 reinitializes the bfd. 1025 1026 2.3.1.18 `bfd_preserve_restore' 1027 ............................... 1028 1029 *Synopsis* 1030 void bfd_preserve_restore (bfd *, struct bfd_preserve *); 1031 *Description* 1032 This function restores bfd state saved by bfd_preserve_save. If MARKER 1033 is non-NULL in struct bfd_preserve then that block and all subsequently 1034 bfd_alloc'd memory is freed. 1035 1036 2.3.1.19 `bfd_preserve_finish' 1037 .............................. 1038 1039 *Synopsis* 1040 void bfd_preserve_finish (bfd *, struct bfd_preserve *); 1041 *Description* 1042 This function should be called when the bfd state saved by 1043 bfd_preserve_save is no longer needed. ie. when the back-end object_p 1044 function returns with success. 1045 1046 2.3.1.20 `bfd_emul_get_maxpagesize' 1047 ................................... 1048 1049 *Synopsis* 1050 bfd_vma bfd_emul_get_maxpagesize (const char *); 1051 *Description* 1052 Returns the maximum page size, in bytes, as determined by emulation. 1053 1054 *Returns* 1055 Returns the maximum page size in bytes for ELF, 0 otherwise. 1056 1057 2.3.1.21 `bfd_emul_set_maxpagesize' 1058 ................................... 1059 1060 *Synopsis* 1061 void bfd_emul_set_maxpagesize (const char *, bfd_vma); 1062 *Description* 1063 For ELF, set the maximum page size for the emulation. It is a no-op 1064 for other formats. 1065 1066 2.3.1.22 `bfd_emul_get_commonpagesize' 1067 ...................................... 1068 1069 *Synopsis* 1070 bfd_vma bfd_emul_get_commonpagesize (const char *); 1071 *Description* 1072 Returns the common page size, in bytes, as determined by emulation. 1073 1074 *Returns* 1075 Returns the common page size in bytes for ELF, 0 otherwise. 1076 1077 2.3.1.23 `bfd_emul_set_commonpagesize' 1078 ...................................... 1079 1080 *Synopsis* 1081 void bfd_emul_set_commonpagesize (const char *, bfd_vma); 1082 *Description* 1083 For ELF, set the common page size for the emulation. It is a no-op for 1084 other formats. 1085 1086 2.3.1.24 `bfd_demangle' 1087 ....................... 1088 1089 *Synopsis* 1090 char *bfd_demangle (bfd *, const char *, int); 1091 *Description* 1092 Wrapper around cplus_demangle. Strips leading underscores and other 1093 such chars that would otherwise confuse the demangler. If passed a g++ 1094 v3 ABI mangled name, returns a buffer allocated with malloc holding the 1095 demangled name. Returns NULL otherwise and on memory alloc failure. 1096 1097 2.3.1.25 `struct bfd_iovec' 1098 ........................... 1099 1100 *Description* 1101 The `struct bfd_iovec' contains the internal file I/O class. Each 1102 `BFD' has an instance of this class and all file I/O is routed through 1103 it (it is assumed that the instance implements all methods listed 1104 below). 1105 struct bfd_iovec 1106 { 1107 /* To avoid problems with macros, a "b" rather than "f" 1108 prefix is prepended to each method name. */ 1109 /* Attempt to read/write NBYTES on ABFD's IOSTREAM storing/fetching 1110 bytes starting at PTR. Return the number of bytes actually 1111 transfered (a read past end-of-file returns less than NBYTES), 1112 or -1 (setting `bfd_error') if an error occurs. */ 1113 file_ptr (*bread) (struct bfd *abfd, void *ptr, file_ptr nbytes); 1114 file_ptr (*bwrite) (struct bfd *abfd, const void *ptr, 1115 file_ptr nbytes); 1116 /* Return the current IOSTREAM file offset, or -1 (setting `bfd_error' 1117 if an error occurs. */ 1118 file_ptr (*btell) (struct bfd *abfd); 1119 /* For the following, on successful completion a value of 0 is returned. 1120 Otherwise, a value of -1 is returned (and `bfd_error' is set). */ 1121 int (*bseek) (struct bfd *abfd, file_ptr offset, int whence); 1122 int (*bclose) (struct bfd *abfd); 1123 int (*bflush) (struct bfd *abfd); 1124 int (*bstat) (struct bfd *abfd, struct stat *sb); 1125 /* Just like mmap: (void*)-1 on failure, mmapped address on success. */ 1126 void *(*bmmap) (struct bfd *abfd, void *addr, bfd_size_type len, 1127 int prot, int flags, file_ptr offset); 1128 }; 1129 1130 2.3.1.26 `bfd_get_mtime' 1131 ........................ 1132 1133 *Synopsis* 1134 long bfd_get_mtime (bfd *abfd); 1135 *Description* 1136 Return the file modification time (as read from the file system, or 1137 from the archive header for archive members). 1138 1139 2.3.1.27 `bfd_get_size' 1140 ....................... 1141 1142 *Synopsis* 1143 file_ptr bfd_get_size (bfd *abfd); 1144 *Description* 1145 Return the file size (as read from file system) for the file associated 1146 with BFD ABFD. 1147 1148 The initial motivation for, and use of, this routine is not so we 1149 can get the exact size of the object the BFD applies to, since that 1150 might not be generally possible (archive members for example). It 1151 would be ideal if someone could eventually modify it so that such 1152 results were guaranteed. 1153 1154 Instead, we want to ask questions like "is this NNN byte sized 1155 object I'm about to try read from file offset YYY reasonable?" As as 1156 example of where we might do this, some object formats use string 1157 tables for which the first `sizeof (long)' bytes of the table contain 1158 the size of the table itself, including the size bytes. If an 1159 application tries to read what it thinks is one of these string tables, 1160 without some way to validate the size, and for some reason the size is 1161 wrong (byte swapping error, wrong location for the string table, etc.), 1162 the only clue is likely to be a read error when it tries to read the 1163 table, or a "virtual memory exhausted" error when it tries to allocate 1164 15 bazillon bytes of space for the 15 bazillon byte table it is about 1165 to read. This function at least allows us to answer the question, "is 1166 the size reasonable?". 1167 1168 2.3.1.28 `bfd_mmap' 1169 ................... 1170 1171 *Synopsis* 1172 void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, 1173 int prot, int flags, file_ptr offset); 1174 *Description* 1175 Return mmap()ed region of the file, if possible and implemented. 1176 1177 * Menu: 1178 1179 * Memory Usage:: 1180 * Initialization:: 1181 * Sections:: 1182 * Symbols:: 1183 * Archives:: 1184 * Formats:: 1185 * Relocations:: 1186 * Core Files:: 1187 * Targets:: 1188 * Architectures:: 1189 * Opening and Closing:: 1190 * Internal:: 1191 * File Caching:: 1192 * Linker Functions:: 1193 * Hash Tables:: 1194 1195 1196 File: bfd.info, Node: Memory Usage, Next: Initialization, Prev: BFD front end, Up: BFD front end 1197 1198 2.4 Memory Usage 1199 ================ 1200 1201 BFD keeps all of its internal structures in obstacks. There is one 1202 obstack per open BFD file, into which the current state is stored. When 1203 a BFD is closed, the obstack is deleted, and so everything which has 1204 been allocated by BFD for the closing file is thrown away. 1205 1206 BFD does not free anything created by an application, but pointers 1207 into `bfd' structures become invalid on a `bfd_close'; for example, 1208 after a `bfd_close' the vector passed to `bfd_canonicalize_symtab' is 1209 still around, since it has been allocated by the application, but the 1210 data that it pointed to are lost. 1211 1212 The general rule is to not close a BFD until all operations dependent 1213 upon data from the BFD have been completed, or all the data from within 1214 the file has been copied. To help with the management of memory, there 1215 is a function (`bfd_alloc_size') which returns the number of bytes in 1216 obstacks associated with the supplied BFD. This could be used to select 1217 the greediest open BFD, close it to reclaim the memory, perform some 1218 operation and reopen the BFD again, to get a fresh copy of the data 1219 structures. 1220 1221 1222 File: bfd.info, Node: Initialization, Next: Sections, Prev: Memory Usage, Up: BFD front end 1223 1224 2.5 Initialization 1225 ================== 1226 1227 2.5.1 Initialization functions 1228 ------------------------------ 1229 1230 These are the functions that handle initializing a BFD. 1231 1232 2.5.1.1 `bfd_init' 1233 .................. 1234 1235 *Synopsis* 1236 void bfd_init (void); 1237 *Description* 1238 This routine must be called before any other BFD function to initialize 1239 magical internal data structures. 1240 1241 1242 File: bfd.info, Node: Sections, Next: Symbols, Prev: Initialization, Up: BFD front end 1243 1244 2.6 Sections 1245 ============ 1246 1247 The raw data contained within a BFD is maintained through the section 1248 abstraction. A single BFD may have any number of sections. It keeps 1249 hold of them by pointing to the first; each one points to the next in 1250 the list. 1251 1252 Sections are supported in BFD in `section.c'. 1253 1254 * Menu: 1255 1256 * Section Input:: 1257 * Section Output:: 1258 * typedef asection:: 1259 * section prototypes:: 1260 1261 1262 File: bfd.info, Node: Section Input, Next: Section Output, Prev: Sections, Up: Sections 1263 1264 2.6.1 Section input 1265 ------------------- 1266 1267 When a BFD is opened for reading, the section structures are created 1268 and attached to the BFD. 1269 1270 Each section has a name which describes the section in the outside 1271 world--for example, `a.out' would contain at least three sections, 1272 called `.text', `.data' and `.bss'. 1273 1274 Names need not be unique; for example a COFF file may have several 1275 sections named `.data'. 1276 1277 Sometimes a BFD will contain more than the "natural" number of 1278 sections. A back end may attach other sections containing constructor 1279 data, or an application may add a section (using `bfd_make_section') to 1280 the sections attached to an already open BFD. For example, the linker 1281 creates an extra section `COMMON' for each input file's BFD to hold 1282 information about common storage. 1283 1284 The raw data is not necessarily read in when the section descriptor 1285 is created. Some targets may leave the data in place until a 1286 `bfd_get_section_contents' call is made. Other back ends may read in 1287 all the data at once. For example, an S-record file has to be read 1288 once to determine the size of the data. An IEEE-695 file doesn't 1289 contain raw data in sections, but data and relocation expressions 1290 intermixed, so the data area has to be parsed to get out the data and 1291 relocations. 1292 1293 1294 File: bfd.info, Node: Section Output, Next: typedef asection, Prev: Section Input, Up: Sections 1295 1296 2.6.2 Section output 1297 -------------------- 1298 1299 To write a new object style BFD, the various sections to be written 1300 have to be created. They are attached to the BFD in the same way as 1301 input sections; data is written to the sections using 1302 `bfd_set_section_contents'. 1303 1304 Any program that creates or combines sections (e.g., the assembler 1305 and linker) must use the `asection' fields `output_section' and 1306 `output_offset' to indicate the file sections to which each section 1307 must be written. (If the section is being created from scratch, 1308 `output_section' should probably point to the section itself and 1309 `output_offset' should probably be zero.) 1310 1311 The data to be written comes from input sections attached (via 1312 `output_section' pointers) to the output sections. The output section 1313 structure can be considered a filter for the input section: the output 1314 section determines the vma of the output data and the name, but the 1315 input section determines the offset into the output section of the data 1316 to be written. 1317 1318 E.g., to create a section "O", starting at 0x100, 0x123 long, 1319 containing two subsections, "A" at offset 0x0 (i.e., at vma 0x100) and 1320 "B" at offset 0x20 (i.e., at vma 0x120) the `asection' structures would 1321 look like: 1322 1323 section name "A" 1324 output_offset 0x00 1325 size 0x20 1326 output_section -----------> section name "O" 1327 | vma 0x100 1328 section name "B" | size 0x123 1329 output_offset 0x20 | 1330 size 0x103 | 1331 output_section --------| 1332 1333 2.6.3 Link orders 1334 ----------------- 1335 1336 The data within a section is stored in a "link_order". These are much 1337 like the fixups in `gas'. The link_order abstraction allows a section 1338 to grow and shrink within itself. 1339 1340 A link_order knows how big it is, and which is the next link_order 1341 and where the raw data for it is; it also points to a list of 1342 relocations which apply to it. 1343 1344 The link_order is used by the linker to perform relaxing on final 1345 code. The compiler creates code which is as big as necessary to make 1346 it work without relaxing, and the user can select whether to relax. 1347 Sometimes relaxing takes a lot of time. The linker runs around the 1348 relocations to see if any are attached to data which can be shrunk, if 1349 so it does it on a link_order by link_order basis. 1350 1351 1352 File: bfd.info, Node: typedef asection, Next: section prototypes, Prev: Section Output, Up: Sections 1353 1354 2.6.4 typedef asection 1355 ---------------------- 1356 1357 Here is the section structure: 1358 1359 1360 typedef struct bfd_section 1361 { 1362 /* The name of the section; the name isn't a copy, the pointer is 1363 the same as that passed to bfd_make_section. */ 1364 const char *name; 1365 1366 /* A unique sequence number. */ 1367 int id; 1368 1369 /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ 1370 int index; 1371 1372 /* The next section in the list belonging to the BFD, or NULL. */ 1373 struct bfd_section *next; 1374 1375 /* The previous section in the list belonging to the BFD, or NULL. */ 1376 struct bfd_section *prev; 1377 1378 /* The field flags contains attributes of the section. Some 1379 flags are read in from the object file, and some are 1380 synthesized from other information. */ 1381 flagword flags; 1382 1383 #define SEC_NO_FLAGS 0x000 1384 1385 /* Tells the OS to allocate space for this section when loading. 1386 This is clear for a section containing debug information only. */ 1387 #define SEC_ALLOC 0x001 1388 1389 /* Tells the OS to load the section from the file when loading. 1390 This is clear for a .bss section. */ 1391 #define SEC_LOAD 0x002 1392 1393 /* The section contains data still to be relocated, so there is 1394 some relocation information too. */ 1395 #define SEC_RELOC 0x004 1396 1397 /* A signal to the OS that the section contains read only data. */ 1398 #define SEC_READONLY 0x008 1399 1400 /* The section contains code only. */ 1401 #define SEC_CODE 0x010 1402 1403 /* The section contains data only. */ 1404 #define SEC_DATA 0x020 1405 1406 /* The section will reside in ROM. */ 1407 #define SEC_ROM 0x040 1408 1409 /* The section contains constructor information. This section 1410 type is used by the linker to create lists of constructors and 1411 destructors used by `g++'. When a back end sees a symbol 1412 which should be used in a constructor list, it creates a new 1413 section for the type of name (e.g., `__CTOR_LIST__'), attaches 1414 the symbol to it, and builds a relocation. To build the lists 1415 of constructors, all the linker has to do is catenate all the 1416 sections called `__CTOR_LIST__' and relocate the data 1417 contained within - exactly the operations it would peform on 1418 standard data. */ 1419 #define SEC_CONSTRUCTOR 0x080 1420 1421 /* The section has contents - a data section could be 1422 `SEC_ALLOC' | `SEC_HAS_CONTENTS'; a debug section could be 1423 `SEC_HAS_CONTENTS' */ 1424 #define SEC_HAS_CONTENTS 0x100 1425 1426 /* An instruction to the linker to not output the section 1427 even if it has information which would normally be written. */ 1428 #define SEC_NEVER_LOAD 0x200 1429 1430 /* The section contains thread local data. */ 1431 #define SEC_THREAD_LOCAL 0x400 1432 1433 /* The section has GOT references. This flag is only for the 1434 linker, and is currently only used by the elf32-hppa back end. 1435 It will be set if global offset table references were detected 1436 in this section, which indicate to the linker that the section 1437 contains PIC code, and must be handled specially when doing a 1438 static link. */ 1439 #define SEC_HAS_GOT_REF 0x800 1440 1441 /* The section contains common symbols (symbols may be defined 1442 multiple times, the value of a symbol is the amount of 1443 space it requires, and the largest symbol value is the one 1444 used). Most targets have exactly one of these (which we 1445 translate to bfd_com_section_ptr), but ECOFF has two. */ 1446 #define SEC_IS_COMMON 0x1000 1447 1448 /* The section contains only debugging information. For 1449 example, this is set for ELF .debug and .stab sections. 1450 strip tests this flag to see if a section can be 1451 discarded. */ 1452 #define SEC_DEBUGGING 0x2000 1453 1454 /* The contents of this section are held in memory pointed to 1455 by the contents field. This is checked by bfd_get_section_contents, 1456 and the data is retrieved from memory if appropriate. */ 1457 #define SEC_IN_MEMORY 0x4000 1458 1459 /* The contents of this section are to be excluded by the 1460 linker for executable and shared objects unless those 1461 objects are to be further relocated. */ 1462 #define SEC_EXCLUDE 0x8000 1463 1464 /* The contents of this section are to be sorted based on the sum of 1465 the symbol and addend values specified by the associated relocation 1466 entries. Entries without associated relocation entries will be 1467 appended to the end of the section in an unspecified order. */ 1468 #define SEC_SORT_ENTRIES 0x10000 1469 1470 /* When linking, duplicate sections of the same name should be 1471 discarded, rather than being combined into a single section as 1472 is usually done. This is similar to how common symbols are 1473 handled. See SEC_LINK_DUPLICATES below. */ 1474 #define SEC_LINK_ONCE 0x20000 1475 1476 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker 1477 should handle duplicate sections. */ 1478 #define SEC_LINK_DUPLICATES 0xc0000 1479 1480 /* This value for SEC_LINK_DUPLICATES means that duplicate 1481 sections with the same name should simply be discarded. */ 1482 #define SEC_LINK_DUPLICATES_DISCARD 0x0 1483 1484 /* This value for SEC_LINK_DUPLICATES means that the linker 1485 should warn if there are any duplicate sections, although 1486 it should still only link one copy. */ 1487 #define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 1488 1489 /* This value for SEC_LINK_DUPLICATES means that the linker 1490 should warn if any duplicate sections are a different size. */ 1491 #define SEC_LINK_DUPLICATES_SAME_SIZE 0x80000 1492 1493 /* This value for SEC_LINK_DUPLICATES means that the linker 1494 should warn if any duplicate sections contain different 1495 contents. */ 1496 #define SEC_LINK_DUPLICATES_SAME_CONTENTS \ 1497 (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE) 1498 1499 /* This section was created by the linker as part of dynamic 1500 relocation or other arcane processing. It is skipped when 1501 going through the first-pass output, trusting that someone 1502 else up the line will take care of it later. */ 1503 #define SEC_LINKER_CREATED 0x100000 1504 1505 /* This section should not be subject to garbage collection. 1506 Also set to inform the linker that this section should not be 1507 listed in the link map as discarded. */ 1508 #define SEC_KEEP 0x200000 1509 1510 /* This section contains "short" data, and should be placed 1511 "near" the GP. */ 1512 #define SEC_SMALL_DATA 0x400000 1513 1514 /* Attempt to merge identical entities in the section. 1515 Entity size is given in the entsize field. */ 1516 #define SEC_MERGE 0x800000 1517 1518 /* If given with SEC_MERGE, entities to merge are zero terminated 1519 strings where entsize specifies character size instead of fixed 1520 size entries. */ 1521 #define SEC_STRINGS 0x1000000 1522 1523 /* This section contains data about section groups. */ 1524 #define SEC_GROUP 0x2000000 1525 1526 /* The section is a COFF shared library section. This flag is 1527 only for the linker. If this type of section appears in 1528 the input file, the linker must copy it to the output file 1529 without changing the vma or size. FIXME: Although this 1530 was originally intended to be general, it really is COFF 1531 specific (and the flag was renamed to indicate this). It 1532 might be cleaner to have some more general mechanism to 1533 allow the back end to control what the linker does with 1534 sections. */ 1535 #define SEC_COFF_SHARED_LIBRARY 0x4000000 1536 1537 /* This section contains data which may be shared with other 1538 executables or shared objects. This is for COFF only. */ 1539 #define SEC_COFF_SHARED 0x8000000 1540 1541 /* When a section with this flag is being linked, then if the size of 1542 the input section is less than a page, it should not cross a page 1543 boundary. If the size of the input section is one page or more, 1544 it should be aligned on a page boundary. This is for TI 1545 TMS320C54X only. */ 1546 #define SEC_TIC54X_BLOCK 0x10000000 1547 1548 /* Conditionally link this section; do not link if there are no 1549 references found to any symbol in the section. This is for TI 1550 TMS320C54X only. */ 1551 #define SEC_TIC54X_CLINK 0x20000000 1552 1553 /* Indicate that section has the no read flag set. This happens 1554 when memory read flag isn't set. */ 1555 #define SEC_COFF_NOREAD 0x40000000 1556 1557 /* End of section flags. */ 1558 1559 /* Some internal packed boolean fields. */ 1560 1561 /* See the vma field. */ 1562 unsigned int user_set_vma : 1; 1563 1564 /* A mark flag used by some of the linker backends. */ 1565 unsigned int linker_mark : 1; 1566 1567 /* Another mark flag used by some of the linker backends. Set for 1568 output sections that have an input section. */ 1569 unsigned int linker_has_input : 1; 1570 1571 /* Mark flag used by some linker backends for garbage collection. */ 1572 unsigned int gc_mark : 1; 1573 1574 /* The following flags are used by the ELF linker. */ 1575 1576 /* Mark sections which have been allocated to segments. */ 1577 unsigned int segment_mark : 1; 1578 1579 /* Type of sec_info information. */ 1580 unsigned int sec_info_type:3; 1581 #define ELF_INFO_TYPE_NONE 0 1582 #define ELF_INFO_TYPE_STABS 1 1583 #define ELF_INFO_TYPE_MERGE 2 1584 #define ELF_INFO_TYPE_EH_FRAME 3 1585 #define ELF_INFO_TYPE_JUST_SYMS 4 1586 1587 /* Nonzero if this section uses RELA relocations, rather than REL. */ 1588 unsigned int use_rela_p:1; 1589 1590 /* Bits used by various backends. The generic code doesn't touch 1591 these fields. */ 1592 1593 unsigned int sec_flg0:1; 1594 unsigned int sec_flg1:1; 1595 unsigned int sec_flg2:1; 1596 unsigned int sec_flg3:1; 1597 unsigned int sec_flg4:1; 1598 unsigned int sec_flg5:1; 1599 1600 /* End of internal packed boolean fields. */ 1601 1602 /* The virtual memory address of the section - where it will be 1603 at run time. The symbols are relocated against this. The 1604 user_set_vma flag is maintained by bfd; if it's not set, the 1605 backend can assign addresses (for example, in `a.out', where 1606 the default address for `.data' is dependent on the specific 1607 target and various flags). */ 1608 bfd_vma vma; 1609 1610 /* The load address of the section - where it would be in a 1611 rom image; really only used for writing section header 1612 information. */ 1613 bfd_vma lma; 1614 1615 /* The size of the section in octets, as it will be output. 1616 Contains a value even if the section has no contents (e.g., the 1617 size of `.bss'). */ 1618 bfd_size_type size; 1619 1620 /* For input sections, the original size on disk of the section, in 1621 octets. This field should be set for any section whose size is 1622 changed by linker relaxation. It is required for sections where 1623 the linker relaxation scheme doesn't cache altered section and 1624 reloc contents (stabs, eh_frame, SEC_MERGE, some coff relaxing 1625 targets), and thus the original size needs to be kept to read the 1626 section multiple times. For output sections, rawsize holds the 1627 section size calculated on a previous linker relaxation pass. */ 1628 bfd_size_type rawsize; 1629 1630 /* Relaxation table. */ 1631 struct relax_table *relax; 1632 1633 /* Count of used relaxation table entries. */ 1634 int relax_count; 1635 1636 1637 /* If this section is going to be output, then this value is the 1638 offset in *bytes* into the output section of the first byte in the 1639 input section (byte ==> smallest addressable unit on the 1640 target). In most cases, if this was going to start at the 1641 100th octet (8-bit quantity) in the output section, this value 1642 would be 100. However, if the target byte size is 16 bits 1643 (bfd_octets_per_byte is "2"), this value would be 50. */ 1644 bfd_vma output_offset; 1645 1646 /* The output section through which to map on output. */ 1647 struct bfd_section *output_section; 1648 1649 /* The alignment requirement of the section, as an exponent of 2 - 1650 e.g., 3 aligns to 2^3 (or 8). */ 1651 unsigned int alignment_power; 1652 1653 /* If an input section, a pointer to a vector of relocation 1654 records for the data in this section. */ 1655 struct reloc_cache_entry *relocation; 1656 1657 /* If an output section, a pointer to a vector of pointers to 1658 relocation records for the data in this section. */ 1659 struct reloc_cache_entry **orelocation; 1660 1661 /* The number of relocation records in one of the above. */ 1662 unsigned reloc_count; 1663 1664 /* Information below is back end specific - and not always used 1665 or updated. */ 1666 1667 /* File position of section data. */ 1668 file_ptr filepos; 1669 1670 /* File position of relocation info. */ 1671 file_ptr rel_filepos; 1672 1673 /* File position of line data. */ 1674 file_ptr line_filepos; 1675 1676 /* Pointer to data for applications. */ 1677 void *userdata; 1678 1679 /* If the SEC_IN_MEMORY flag is set, this points to the actual 1680 contents. */ 1681 unsigned char *contents; 1682 1683 /* Attached line number information. */ 1684 alent *lineno; 1685 1686 /* Number of line number records. */ 1687 unsigned int lineno_count; 1688 1689 /* Entity size for merging purposes. */ 1690 unsigned int entsize; 1691 1692 /* Points to the kept section if this section is a link-once section, 1693 and is discarded. */ 1694 struct bfd_section *kept_section; 1695 1696 /* When a section is being output, this value changes as more 1697 linenumbers are written out. */ 1698 file_ptr moving_line_filepos; 1699 1700 /* What the section number is in the target world. */ 1701 int target_index; 1702 1703 void *used_by_bfd; 1704 1705 /* If this is a constructor section then here is a list of the 1706 relocations created to relocate items within it. */ 1707 struct relent_chain *constructor_chain; 1708 1709 /* The BFD which owns the section. */ 1710 bfd *owner; 1711 1712 /* A symbol which points at this section only. */ 1713 struct bfd_symbol *symbol; 1714 struct bfd_symbol **symbol_ptr_ptr; 1715 1716 /* Early in the link process, map_head and map_tail are used to build 1717 a list of input sections attached to an output section. Later, 1718 output sections use these fields for a list of bfd_link_order 1719 structs. */ 1720 union { 1721 struct bfd_link_order *link_order; 1722 struct bfd_section *s; 1723 } map_head, map_tail; 1724 } asection; 1725 1726 /* Relax table contains information about instructions which can 1727 be removed by relaxation -- replacing a long address with a 1728 short address. */ 1729 struct relax_table { 1730 /* Address where bytes may be deleted. */ 1731 bfd_vma addr; 1732 1733 /* Number of bytes to be deleted. */ 1734 int size; 1735 }; 1736 1737 /* These sections are global, and are managed by BFD. The application 1738 and target back end are not permitted to change the values in 1739 these sections. New code should use the section_ptr macros rather 1740 than referring directly to the const sections. The const sections 1741 may eventually vanish. */ 1742 #define BFD_ABS_SECTION_NAME "*ABS*" 1743 #define BFD_UND_SECTION_NAME "*UND*" 1744 #define BFD_COM_SECTION_NAME "*COM*" 1745 #define BFD_IND_SECTION_NAME "*IND*" 1746 1747 /* The absolute section. */ 1748 extern asection bfd_abs_section; 1749 #define bfd_abs_section_ptr ((asection *) &bfd_abs_section) 1750 #define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) 1751 /* Pointer to the undefined section. */ 1752 extern asection bfd_und_section; 1753 #define bfd_und_section_ptr ((asection *) &bfd_und_section) 1754 #define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) 1755 /* Pointer to the common section. */ 1756 extern asection bfd_com_section; 1757 #define bfd_com_section_ptr ((asection *) &bfd_com_section) 1758 /* Pointer to the indirect section. */ 1759 extern asection bfd_ind_section; 1760 #define bfd_ind_section_ptr ((asection *) &bfd_ind_section) 1761 #define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) 1762 1763 #define bfd_is_const_section(SEC) \ 1764 ( ((SEC) == bfd_abs_section_ptr) \ 1765 || ((SEC) == bfd_und_section_ptr) \ 1766 || ((SEC) == bfd_com_section_ptr) \ 1767 || ((SEC) == bfd_ind_section_ptr)) 1768 1769 /* Macros to handle insertion and deletion of a bfd's sections. These 1770 only handle the list pointers, ie. do not adjust section_count, 1771 target_index etc. */ 1772 #define bfd_section_list_remove(ABFD, S) \ 1773 do \ 1774 { \ 1775 asection *_s = S; \ 1776 asection *_next = _s->next; \ 1777 asection *_prev = _s->prev; \ 1778 if (_prev) \ 1779 _prev->next = _next; \ 1780 else \ 1781 (ABFD)->sections = _next; \ 1782 if (_next) \ 1783 _next->prev = _prev; \ 1784 else \ 1785 (ABFD)->section_last = _prev; \ 1786 } \ 1787 while (0) 1788 #define bfd_section_list_append(ABFD, S) \ 1789 do \ 1790 { \ 1791 asection *_s = S; \ 1792 bfd *_abfd = ABFD; \ 1793 _s->next = NULL; \ 1794 if (_abfd->section_last) \ 1795 { \ 1796 _s->prev = _abfd->section_last; \ 1797 _abfd->section_last->next = _s; \ 1798 } \ 1799 else \ 1800 { \ 1801 _s->prev = NULL; \ 1802 _abfd->sections = _s; \ 1803 } \ 1804 _abfd->section_last = _s; \ 1805 } \ 1806 while (0) 1807 #define bfd_section_list_prepend(ABFD, S) \ 1808 do \ 1809 { \ 1810 asection *_s = S; \ 1811 bfd *_abfd = ABFD; \ 1812 _s->prev = NULL; \ 1813 if (_abfd->sections) \ 1814 { \ 1815 _s->next = _abfd->sections; \ 1816 _abfd->sections->prev = _s; \ 1817 } \ 1818 else \ 1819 { \ 1820 _s->next = NULL; \ 1821 _abfd->section_last = _s; \ 1822 } \ 1823 _abfd->sections = _s; \ 1824 } \ 1825 while (0) 1826 #define bfd_section_list_insert_after(ABFD, A, S) \ 1827 do \ 1828 { \ 1829 asection *_a = A; \ 1830 asection *_s = S; \ 1831 asection *_next = _a->next; \ 1832 _s->next = _next; \ 1833 _s->prev = _a; \ 1834 _a->next = _s; \ 1835 if (_next) \ 1836 _next->prev = _s; \ 1837 else \ 1838 (ABFD)->section_last = _s; \ 1839 } \ 1840 while (0) 1841 #define bfd_section_list_insert_before(ABFD, B, S) \ 1842 do \ 1843 { \ 1844 asection *_b = B; \ 1845 asection *_s = S; \ 1846 asection *_prev = _b->prev; \ 1847 _s->prev = _prev; \ 1848 _s->next = _b; \ 1849 _b->prev = _s; \ 1850 if (_prev) \ 1851 _prev->next = _s; \ 1852 else \ 1853 (ABFD)->sections = _s; \ 1854 } \ 1855 while (0) 1856 #define bfd_section_removed_from_list(ABFD, S) \ 1857 ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) 1858 1859 #define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ 1860 /* name, id, index, next, prev, flags, user_set_vma, */ \ 1861 { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ 1862 \ 1863 /* linker_mark, linker_has_input, gc_mark, segment_mark, */ \ 1864 0, 0, 1, 0, \ 1865 \ 1866 /* sec_info_type, use_rela_p, */ \ 1867 0, 0, \ 1868 \ 1869 /* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5, */ \ 1870 0, 0, 0, 0, 0, 0, \ 1871 \ 1872 /* vma, lma, size, rawsize, relax, relax_count, */ \ 1873 0, 0, 0, 0, 0, 0, \ 1874 \ 1875 /* output_offset, output_section, alignment_power, */ \ 1876 0, (struct bfd_section *) &SEC, 0, \ 1877 \ 1878 /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \ 1879 NULL, NULL, 0, 0, 0, \ 1880 \ 1881 /* line_filepos, userdata, contents, lineno, lineno_count, */ \ 1882 0, NULL, NULL, NULL, 0, \ 1883 \ 1884 /* entsize, kept_section, moving_line_filepos, */ \ 1885 0, NULL, 0, \ 1886 \ 1887 /* target_index, used_by_bfd, constructor_chain, owner, */ \ 1888 0, NULL, NULL, NULL, \ 1889 \ 1890 /* symbol, symbol_ptr_ptr, */ \ 1891 (struct bfd_symbol *) SYM, &SEC.symbol, \ 1892 \ 1893 /* map_head, map_tail */ \ 1894 { NULL }, { NULL } \ 1895 } 1896 1897 1898 File: bfd.info, Node: section prototypes, Prev: typedef asection, Up: Sections 1899 1900 2.6.5 Section prototypes 1901 ------------------------ 1902 1903 These are the functions exported by the section handling part of BFD. 1904 1905 2.6.5.1 `bfd_section_list_clear' 1906 ................................ 1907 1908 *Synopsis* 1909 void bfd_section_list_clear (bfd *); 1910 *Description* 1911 Clears the section list, and also resets the section count and hash 1912 table entries. 1913 1914 2.6.5.2 `bfd_get_section_by_name' 1915 ................................. 1916 1917 *Synopsis* 1918 asection *bfd_get_section_by_name (bfd *abfd, const char *name); 1919 *Description* 1920 Run through ABFD and return the one of the `asection's whose name 1921 matches NAME, otherwise `NULL'. *Note Sections::, for more information. 1922 1923 This should only be used in special cases; the normal way to process 1924 all sections of a given name is to use `bfd_map_over_sections' and 1925 `strcmp' on the name (or better yet, base it on the section flags or 1926 something else) for each section. 1927 1928 2.6.5.3 `bfd_get_section_by_name_if' 1929 .................................... 1930 1931 *Synopsis* 1932 asection *bfd_get_section_by_name_if 1933 (bfd *abfd, 1934 const char *name, 1935 bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj), 1936 void *obj); 1937 *Description* 1938 Call the provided function FUNC for each section attached to the BFD 1939 ABFD whose name matches NAME, passing OBJ as an argument. The function 1940 will be called as if by 1941 1942 func (abfd, the_section, obj); 1943 1944 It returns the first section for which FUNC returns true, otherwise 1945 `NULL'. 1946 1947 2.6.5.4 `bfd_get_unique_section_name' 1948 ..................................... 1949 1950 *Synopsis* 1951 char *bfd_get_unique_section_name 1952 (bfd *abfd, const char *templat, int *count); 1953 *Description* 1954 Invent a section name that is unique in ABFD by tacking a dot and a 1955 digit suffix onto the original TEMPLAT. If COUNT is non-NULL, then it 1956 specifies the first number tried as a suffix to generate a unique name. 1957 The value pointed to by COUNT will be incremented in this case. 1958 1959 2.6.5.5 `bfd_make_section_old_way' 1960 .................................. 1961 1962 *Synopsis* 1963 asection *bfd_make_section_old_way (bfd *abfd, const char *name); 1964 *Description* 1965 Create a new empty section called NAME and attach it to the end of the 1966 chain of sections for the BFD ABFD. An attempt to create a section with 1967 a name which is already in use returns its pointer without changing the 1968 section chain. 1969 1970 It has the funny name since this is the way it used to be before it 1971 was rewritten.... 1972 1973 Possible errors are: 1974 * `bfd_error_invalid_operation' - If output has already started for 1975 this BFD. 1976 1977 * `bfd_error_no_memory' - If memory allocation fails. 1978 1979 2.6.5.6 `bfd_make_section_anyway_with_flags' 1980 ............................................ 1981 1982 *Synopsis* 1983 asection *bfd_make_section_anyway_with_flags 1984 (bfd *abfd, const char *name, flagword flags); 1985 *Description* 1986 Create a new empty section called NAME and attach it to the end of the 1987 chain of sections for ABFD. Create a new section even if there is 1988 already a section with that name. Also set the attributes of the new 1989 section to the value FLAGS. 1990 1991 Return `NULL' and set `bfd_error' on error; possible errors are: 1992 * `bfd_error_invalid_operation' - If output has already started for 1993 ABFD. 1994 1995 * `bfd_error_no_memory' - If memory allocation fails. 1996 1997 2.6.5.7 `bfd_make_section_anyway' 1998 ................................. 1999 2000 *Synopsis* 2001 asection *bfd_make_section_anyway (bfd *abfd, const char *name); 2002 *Description* 2003 Create a new empty section called NAME and attach it to the end of the 2004 chain of sections for ABFD. Create a new section even if there is 2005 already a section with that name. 2006 2007 Return `NULL' and set `bfd_error' on error; possible errors are: 2008 * `bfd_error_invalid_operation' - If output has already started for 2009 ABFD. 2010 2011 * `bfd_error_no_memory' - If memory allocation fails. 2012 2013 2.6.5.8 `bfd_make_section_with_flags' 2014 ..................................... 2015 2016 *Synopsis* 2017 asection *bfd_make_section_with_flags 2018 (bfd *, const char *name, flagword flags); 2019 *Description* 2020 Like `bfd_make_section_anyway', but return `NULL' (without calling 2021 bfd_set_error ()) without changing the section chain if there is 2022 already a section named NAME. Also set the attributes of the new 2023 section to the value FLAGS. If there is an error, return `NULL' and set 2024 `bfd_error'. 2025 2026 2.6.5.9 `bfd_make_section' 2027 .......................... 2028 2029 *Synopsis* 2030 asection *bfd_make_section (bfd *, const char *name); 2031 *Description* 2032 Like `bfd_make_section_anyway', but return `NULL' (without calling 2033 bfd_set_error ()) without changing the section chain if there is 2034 already a section named NAME. If there is an error, return `NULL' and 2035 set `bfd_error'. 2036 2037 2.6.5.10 `bfd_set_section_flags' 2038 ................................ 2039 2040 *Synopsis* 2041 bfd_boolean bfd_set_section_flags 2042 (bfd *abfd, asection *sec, flagword flags); 2043 *Description* 2044 Set the attributes of the section SEC in the BFD ABFD to the value 2045 FLAGS. Return `TRUE' on success, `FALSE' on error. Possible error 2046 returns are: 2047 2048 * `bfd_error_invalid_operation' - The section cannot have one or 2049 more of the attributes requested. For example, a .bss section in 2050 `a.out' may not have the `SEC_HAS_CONTENTS' field set. 2051 2052 2.6.5.11 `bfd_map_over_sections' 2053 ................................ 2054 2055 *Synopsis* 2056 void bfd_map_over_sections 2057 (bfd *abfd, 2058 void (*func) (bfd *abfd, asection *sect, void *obj), 2059 void *obj); 2060 *Description* 2061 Call the provided function FUNC for each section attached to the BFD 2062 ABFD, passing OBJ as an argument. The function will be called as if by 2063 2064 func (abfd, the_section, obj); 2065 2066 This is the preferred method for iterating over sections; an 2067 alternative would be to use a loop: 2068 2069 section *p; 2070 for (p = abfd->sections; p != NULL; p = p->next) 2071 func (abfd, p, ...) 2072 2073 2.6.5.12 `bfd_sections_find_if' 2074 ............................... 2075 2076 *Synopsis* 2077 asection *bfd_sections_find_if 2078 (bfd *abfd, 2079 bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), 2080 void *obj); 2081 *Description* 2082 Call the provided function OPERATION for each section attached to the 2083 BFD ABFD, passing OBJ as an argument. The function will be called as if 2084 by 2085 2086 operation (abfd, the_section, obj); 2087 2088 It returns the first section for which OPERATION returns true. 2089 2090 2.6.5.13 `bfd_set_section_size' 2091 ............................... 2092 2093 *Synopsis* 2094 bfd_boolean bfd_set_section_size 2095 (bfd *abfd, asection *sec, bfd_size_type val); 2096 *Description* 2097 Set SEC to the size VAL. If the operation is ok, then `TRUE' is 2098 returned, else `FALSE'. 2099 2100 Possible error returns: 2101 * `bfd_error_invalid_operation' - Writing has started to the BFD, so 2102 setting the size is invalid. 2103 2104 2.6.5.14 `bfd_set_section_contents' 2105 ................................... 2106 2107 *Synopsis* 2108 bfd_boolean bfd_set_section_contents 2109 (bfd *abfd, asection *section, const void *data, 2110 file_ptr offset, bfd_size_type count); 2111 *Description* 2112 Sets the contents of the section SECTION in BFD ABFD to the data 2113 starting in memory at DATA. The data is written to the output section 2114 starting at offset OFFSET for COUNT octets. 2115 2116 Normally `TRUE' is returned, else `FALSE'. Possible error returns 2117 are: 2118 * `bfd_error_no_contents' - The output section does not have the 2119 `SEC_HAS_CONTENTS' attribute, so nothing can be written to it. 2120 2121 * and some more too 2122 This routine is front end to the back end function 2123 `_bfd_set_section_contents'. 2124 2125 2.6.5.15 `bfd_get_section_contents' 2126 ................................... 2127 2128 *Synopsis* 2129 bfd_boolean bfd_get_section_contents 2130 (bfd *abfd, asection *section, void *location, file_ptr offset, 2131 bfd_size_type count); 2132 *Description* 2133 Read data from SECTION in BFD ABFD into memory starting at LOCATION. 2134 The data is read at an offset of OFFSET from the start of the input 2135 section, and is read for COUNT bytes. 2136 2137 If the contents of a constructor with the `SEC_CONSTRUCTOR' flag set 2138 are requested or if the section does not have the `SEC_HAS_CONTENTS' 2139 flag set, then the LOCATION is filled with zeroes. If no errors occur, 2140 `TRUE' is returned, else `FALSE'. 2141 2142 2.6.5.16 `bfd_malloc_and_get_section' 2143 ..................................... 2144 2145 *Synopsis* 2146 bfd_boolean bfd_malloc_and_get_section 2147 (bfd *abfd, asection *section, bfd_byte **buf); 2148 *Description* 2149 Read all data from SECTION in BFD ABFD into a buffer, *BUF, malloc'd by 2150 this function. 2151 2152 2.6.5.17 `bfd_copy_private_section_data' 2153 ........................................ 2154 2155 *Synopsis* 2156 bfd_boolean bfd_copy_private_section_data 2157 (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); 2158 *Description* 2159 Copy private section information from ISEC in the BFD IBFD to the 2160 section OSEC in the BFD OBFD. Return `TRUE' on success, `FALSE' on 2161 error. Possible error returns are: 2162 2163 * `bfd_error_no_memory' - Not enough memory exists to create private 2164 data for OSEC. 2165 2166 #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ 2167 BFD_SEND (obfd, _bfd_copy_private_section_data, \ 2168 (ibfd, isection, obfd, osection)) 2169 2170 2.6.5.18 `bfd_generic_is_group_section' 2171 ....................................... 2172 2173 *Synopsis* 2174 bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); 2175 *Description* 2176 Returns TRUE if SEC is a member of a group. 2177 2178 2.6.5.19 `bfd_generic_discard_group' 2179 .................................... 2180 2181 *Synopsis* 2182 bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); 2183 *Description* 2184 Remove all members of GROUP from the output. 2185 2186 2187 File: bfd.info, Node: Symbols, Next: Archives, Prev: Sections, Up: BFD front end 2188 2189 2.7 Symbols 2190 =========== 2191 2192 BFD tries to maintain as much symbol information as it can when it 2193 moves information from file to file. BFD passes information to 2194 applications though the `asymbol' structure. When the application 2195 requests the symbol table, BFD reads the table in the native form and 2196 translates parts of it into the internal format. To maintain more than 2197 the information passed to applications, some targets keep some 2198 information "behind the scenes" in a structure only the particular back 2199 end knows about. For example, the coff back end keeps the original 2200 symbol table structure as well as the canonical structure when a BFD is 2201 read in. On output, the coff back end can reconstruct the output symbol 2202 table so that no information is lost, even information unique to coff 2203 which BFD doesn't know or understand. If a coff symbol table were read, 2204 but were written through an a.out back end, all the coff specific 2205 information would be lost. The symbol table of a BFD is not necessarily 2206 read in until a canonicalize request is made. Then the BFD back end 2207 fills in a table provided by the application with pointers to the 2208 canonical information. To output symbols, the application provides BFD 2209 with a table of pointers to pointers to `asymbol's. This allows 2210 applications like the linker to output a symbol as it was read, since 2211 the "behind the scenes" information will be still available. 2212 2213 * Menu: 2214 2215 * Reading Symbols:: 2216 * Writing Symbols:: 2217 * Mini Symbols:: 2218 * typedef asymbol:: 2219 * symbol handling functions:: 2220 2221 2222 File: bfd.info, Node: Reading Symbols, Next: Writing Symbols, Prev: Symbols, Up: Symbols 2223 2224 2.7.1 Reading symbols 2225 --------------------- 2226 2227 There are two stages to reading a symbol table from a BFD: allocating 2228 storage, and the actual reading process. This is an excerpt from an 2229 application which reads the symbol table: 2230 2231 long storage_needed; 2232 asymbol **symbol_table; 2233 long number_of_symbols; 2234 long i; 2235 2236 storage_needed = bfd_get_symtab_upper_bound (abfd); 2237 2238 if (storage_needed < 0) 2239 FAIL 2240 2241 if (storage_needed == 0) 2242 return; 2243 2244 symbol_table = xmalloc (storage_needed); 2245 ... 2246 number_of_symbols = 2247 bfd_canonicalize_symtab (abfd, symbol_table); 2248 2249 if (number_of_symbols < 0) 2250 FAIL 2251 2252 for (i = 0; i < number_of_symbols; i++) 2253 process_symbol (symbol_table[i]); 2254 2255 All storage for the symbols themselves is in an objalloc connected 2256 to the BFD; it is freed when the BFD is closed. 2257 2258 2259 File: bfd.info, Node: Writing Symbols, Next: Mini Symbols, Prev: Reading Symbols, Up: Symbols 2260 2261 2.7.2 Writing symbols 2262 --------------------- 2263 2264 Writing of a symbol table is automatic when a BFD open for writing is 2265 closed. The application attaches a vector of pointers to pointers to 2266 symbols to the BFD being written, and fills in the symbol count. The 2267 close and cleanup code reads through the table provided and performs 2268 all the necessary operations. The BFD output code must always be 2269 provided with an "owned" symbol: one which has come from another BFD, 2270 or one which has been created using `bfd_make_empty_symbol'. Here is an 2271 example showing the creation of a symbol table with only one element: 2272 2273 #include "bfd.h" 2274 int main (void) 2275 { 2276 bfd *abfd; 2277 asymbol *ptrs[2]; 2278 asymbol *new; 2279 2280 abfd = bfd_openw ("foo","a.out-sunos-big"); 2281 bfd_set_format (abfd, bfd_object); 2282 new = bfd_make_empty_symbol (abfd); 2283 new->name = "dummy_symbol"; 2284 new->section = bfd_make_section_old_way (abfd, ".text"); 2285 new->flags = BSF_GLOBAL; 2286 new->value = 0x12345; 2287 2288 ptrs[0] = new; 2289 ptrs[1] = 0; 2290 2291 bfd_set_symtab (abfd, ptrs, 1); 2292 bfd_close (abfd); 2293 return 0; 2294 } 2295 2296 ./makesym 2297 nm foo 2298 00012345 A dummy_symbol 2299 2300 Many formats cannot represent arbitrary symbol information; for 2301 instance, the `a.out' object format does not allow an arbitrary number 2302 of sections. A symbol pointing to a section which is not one of 2303 `.text', `.data' or `.bss' cannot be described. 2304 2305 2306 File: bfd.info, Node: Mini Symbols, Next: typedef asymbol, Prev: Writing Symbols, Up: Symbols 2307 2308 2.7.3 Mini Symbols 2309 ------------------ 2310 2311 Mini symbols provide read-only access to the symbol table. They use 2312 less memory space, but require more time to access. They can be useful 2313 for tools like nm or objdump, which may have to handle symbol tables of 2314 extremely large executables. 2315 2316 The `bfd_read_minisymbols' function will read the symbols into 2317 memory in an internal form. It will return a `void *' pointer to a 2318 block of memory, a symbol count, and the size of each symbol. The 2319 pointer is allocated using `malloc', and should be freed by the caller 2320 when it is no longer needed. 2321 2322 The function `bfd_minisymbol_to_symbol' will take a pointer to a 2323 minisymbol, and a pointer to a structure returned by 2324 `bfd_make_empty_symbol', and return a `asymbol' structure. The return 2325 value may or may not be the same as the value from 2326 `bfd_make_empty_symbol' which was passed in. 2327 2328 2329 File: bfd.info, Node: typedef asymbol, Next: symbol handling functions, Prev: Mini Symbols, Up: Symbols 2330 2331 2.7.4 typedef asymbol 2332 --------------------- 2333 2334 An `asymbol' has the form: 2335 2336 2337 typedef struct bfd_symbol 2338 { 2339 /* A pointer to the BFD which owns the symbol. This information 2340 is necessary so that a back end can work out what additional 2341 information (invisible to the application writer) is carried 2342 with the symbol. 2343 2344 This field is *almost* redundant, since you can use section->owner 2345 instead, except that some symbols point to the global sections 2346 bfd_{abs,com,und}_section. This could be fixed by making 2347 these globals be per-bfd (or per-target-flavor). FIXME. */ 2348 struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */ 2349 2350 /* The text of the symbol. The name is left alone, and not copied; the 2351 application may not alter it. */ 2352 const char *name; 2353 2354 /* The value of the symbol. This really should be a union of a 2355 numeric value with a pointer, since some flags indicate that 2356 a pointer to another symbol is stored here. */ 2357 symvalue value; 2358 2359 /* Attributes of a symbol. */ 2360 #define BSF_NO_FLAGS 0x00 2361 2362 /* The symbol has local scope; `static' in `C'. The value 2363 is the offset into the section of the data. */ 2364 #define BSF_LOCAL (1 << 0) 2365 2366 /* The symbol has global scope; initialized data in `C'. The 2367 value is the offset into the section of the data. */ 2368 #define BSF_GLOBAL (1 << 1) 2369 2370 /* The symbol has global scope and is exported. The value is 2371 the offset into the section of the data. */ 2372 #define BSF_EXPORT BSF_GLOBAL /* No real difference. */ 2373 2374 /* A normal C symbol would be one of: 2375 `BSF_LOCAL', `BSF_COMMON', `BSF_UNDEFINED' or 2376 `BSF_GLOBAL'. */ 2377 2378 /* The symbol is a debugging record. The value has an arbitrary 2379 meaning, unless BSF_DEBUGGING_RELOC is also set. */ 2380 #define BSF_DEBUGGING (1 << 2) 2381 2382 /* The symbol denotes a function entry point. Used in ELF, 2383 perhaps others someday. */ 2384 #define BSF_FUNCTION (1 << 3) 2385 2386 /* Used by the linker. */ 2387 #define BSF_KEEP (1 << 5) 2388 #define BSF_KEEP_G (1 << 6) 2389 2390 /* A weak global symbol, overridable without warnings by 2391 a regular global symbol of the same name. */ 2392 #define BSF_WEAK (1 << 7) 2393 2394 /* This symbol was created to point to a section, e.g. ELF's 2395 STT_SECTION symbols. */ 2396 #define BSF_SECTION_SYM (1 << 8) 2397 2398 /* The symbol used to be a common symbol, but now it is 2399 allocated. */ 2400 #define BSF_OLD_COMMON (1 << 9) 2401 2402 /* In some files the type of a symbol sometimes alters its 2403 location in an output file - ie in coff a `ISFCN' symbol 2404 which is also `C_EXT' symbol appears where it was 2405 declared and not at the end of a section. This bit is set 2406 by the target BFD part to convey this information. */ 2407 #define BSF_NOT_AT_END (1 << 10) 2408 2409 /* Signal that the symbol is the label of constructor section. */ 2410 #define BSF_CONSTRUCTOR (1 << 11) 2411 2412 /* Signal that the symbol is a warning symbol. The name is a 2413 warning. The name of the next symbol is the one to warn about; 2414 if a reference is made to a symbol with the same name as the next 2415 symbol, a warning is issued by the linker. */ 2416 #define BSF_WARNING (1 << 12) 2417 2418 /* Signal that the symbol is indirect. This symbol is an indirect 2419 pointer to the symbol with the same name as the next symbol. */ 2420 #define BSF_INDIRECT (1 << 13) 2421 2422 /* BSF_FILE marks symbols that contain a file name. This is used 2423 for ELF STT_FILE symbols. */ 2424 #define BSF_FILE (1 << 14) 2425 2426 /* Symbol is from dynamic linking information. */ 2427 #define BSF_DYNAMIC (1 << 15) 2428 2429 /* The symbol denotes a data object. Used in ELF, and perhaps 2430 others someday. */ 2431 #define BSF_OBJECT (1 << 16) 2432 2433 /* This symbol is a debugging symbol. The value is the offset 2434 into the section of the data. BSF_DEBUGGING should be set 2435 as well. */ 2436 #define BSF_DEBUGGING_RELOC (1 << 17) 2437 2438 /* This symbol is thread local. Used in ELF. */ 2439 #define BSF_THREAD_LOCAL (1 << 18) 2440 2441 /* This symbol represents a complex relocation expression, 2442 with the expression tree serialized in the symbol name. */ 2443 #define BSF_RELC (1 << 19) 2444 2445 /* This symbol represents a signed complex relocation expression, 2446 with the expression tree serialized in the symbol name. */ 2447 #define BSF_SRELC (1 << 20) 2448 2449 /* This symbol was created by bfd_get_synthetic_symtab. */ 2450 #define BSF_SYNTHETIC (1 << 21) 2451 2452 /* This symbol is an indirect code object. Unrelated to BSF_INDIRECT. 2453 The dynamic linker will compute the value of this symbol by 2454 calling the function that it points to. BSF_FUNCTION must 2455 also be also set. */ 2456 #define BSF_GNU_INDIRECT_FUNCTION (1 << 22) 2457 /* This symbol is a globally unique data object. The dynamic linker 2458 will make sure that in the entire process there is just one symbol 2459 with this name and type in use. BSF_OBJECT must also be set. */ 2460 #define BSF_GNU_UNIQUE (1 << 23) 2461 2462 flagword flags; 2463 2464 /* A pointer to the section to which this symbol is 2465 relative. This will always be non NULL, there are special 2466 sections for undefined and absolute symbols. */ 2467 struct bfd_section *section; 2468 2469 /* Back end special data. */ 2470 union 2471 { 2472 void *p; 2473 bfd_vma i; 2474 } 2475 udata; 2476 } 2477 asymbol; 2478 2479 2480 File: bfd.info, Node: symbol handling functions, Prev: typedef asymbol, Up: Symbols 2481 2482 2.7.5 Symbol handling functions 2483 ------------------------------- 2484 2485 2.7.5.1 `bfd_get_symtab_upper_bound' 2486 .................................... 2487 2488 *Description* 2489 Return the number of bytes required to store a vector of pointers to 2490 `asymbols' for all the symbols in the BFD ABFD, including a terminal 2491 NULL pointer. If there are no symbols in the BFD, then return 0. If an 2492 error occurs, return -1. 2493 #define bfd_get_symtab_upper_bound(abfd) \ 2494 BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) 2495 2496 2.7.5.2 `bfd_is_local_label' 2497 ............................ 2498 2499 *Synopsis* 2500 bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); 2501 *Description* 2502 Return TRUE if the given symbol SYM in the BFD ABFD is a compiler 2503 generated local label, else return FALSE. 2504 2505 2.7.5.3 `bfd_is_local_label_name' 2506 ................................. 2507 2508 *Synopsis* 2509 bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); 2510 *Description* 2511 Return TRUE if a symbol with the name NAME in the BFD ABFD is a 2512 compiler generated local label, else return FALSE. This just checks 2513 whether the name has the form of a local label. 2514 #define bfd_is_local_label_name(abfd, name) \ 2515 BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) 2516 2517 2.7.5.4 `bfd_is_target_special_symbol' 2518 ...................................... 2519 2520 *Synopsis* 2521 bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym); 2522 *Description* 2523 Return TRUE iff a symbol SYM in the BFD ABFD is something special to 2524 the particular target represented by the BFD. Such symbols should 2525 normally not be mentioned to the user. 2526 #define bfd_is_target_special_symbol(abfd, sym) \ 2527 BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) 2528 2529 2.7.5.5 `bfd_canonicalize_symtab' 2530 ................................. 2531 2532 *Description* 2533 Read the symbols from the BFD ABFD, and fills in the vector LOCATION 2534 with pointers to the symbols and a trailing NULL. Return the actual 2535 number of symbol pointers, not including the NULL. 2536 #define bfd_canonicalize_symtab(abfd, location) \ 2537 BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) 2538 2539 2.7.5.6 `bfd_set_symtab' 2540 ........................ 2541 2542 *Synopsis* 2543 bfd_boolean bfd_set_symtab 2544 (bfd *abfd, asymbol **location, unsigned int count); 2545 *Description* 2546 Arrange that when the output BFD ABFD is closed, the table LOCATION of 2547 COUNT pointers to symbols will be written. 2548 2549 2.7.5.7 `bfd_print_symbol_vandf' 2550 ................................ 2551 2552 *Synopsis* 2553 void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol); 2554 *Description* 2555 Print the value and flags of the SYMBOL supplied to the stream FILE. 2556 2557 2.7.5.8 `bfd_make_empty_symbol' 2558 ............................... 2559 2560 *Description* 2561 Create a new `asymbol' structure for the BFD ABFD and return a pointer 2562 to it. 2563 2564 This routine is necessary because each back end has private 2565 information surrounding the `asymbol'. Building your own `asymbol' and 2566 pointing to it will not create the private information, and will cause 2567 problems later on. 2568 #define bfd_make_empty_symbol(abfd) \ 2569 BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) 2570 2571 2.7.5.9 `_bfd_generic_make_empty_symbol' 2572 ........................................ 2573 2574 *Synopsis* 2575 asymbol *_bfd_generic_make_empty_symbol (bfd *); 2576 *Description* 2577 Create a new `asymbol' structure for the BFD ABFD and return a pointer 2578 to it. Used by core file routines, binary back-end and anywhere else 2579 where no private info is needed. 2580 2581 2.7.5.10 `bfd_make_debug_symbol' 2582 ................................ 2583 2584 *Description* 2585 Create a new `asymbol' structure for the BFD ABFD, to be used as a 2586 debugging symbol. Further details of its use have yet to be worked out. 2587 #define bfd_make_debug_symbol(abfd,ptr,size) \ 2588 BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) 2589 2590 2.7.5.11 `bfd_decode_symclass' 2591 .............................. 2592 2593 *Description* 2594 Return a character corresponding to the symbol class of SYMBOL, or '?' 2595 for an unknown class. 2596 2597 *Synopsis* 2598 int bfd_decode_symclass (asymbol *symbol); 2599 2600 2.7.5.12 `bfd_is_undefined_symclass' 2601 .................................... 2602 2603 *Description* 2604 Returns non-zero if the class symbol returned by bfd_decode_symclass 2605 represents an undefined symbol. Returns zero otherwise. 2606 2607 *Synopsis* 2608 bfd_boolean bfd_is_undefined_symclass (int symclass); 2609 2610 2.7.5.13 `bfd_symbol_info' 2611 .......................... 2612 2613 *Description* 2614 Fill in the basic info about symbol that nm needs. Additional info may 2615 be added by the back-ends after calling this function. 2616 2617 *Synopsis* 2618 void bfd_symbol_info (asymbol *symbol, symbol_info *ret); 2619 2620 2.7.5.14 `bfd_copy_private_symbol_data' 2621 ....................................... 2622 2623 *Synopsis* 2624 bfd_boolean bfd_copy_private_symbol_data 2625 (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym); 2626 *Description* 2627 Copy private symbol information from ISYM in the BFD IBFD to the symbol 2628 OSYM in the BFD OBFD. Return `TRUE' on success, `FALSE' on error. 2629 Possible error returns are: 2630 2631 * `bfd_error_no_memory' - Not enough memory exists to create private 2632 data for OSEC. 2633 2634 #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \ 2635 BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ 2636 (ibfd, isymbol, obfd, osymbol)) 2637 2638 2639 File: bfd.info, Node: Archives, Next: Formats, Prev: Symbols, Up: BFD front end 2640 2641 2.8 Archives 2642 ============ 2643 2644 *Description* 2645 An archive (or library) is just another BFD. It has a symbol table, 2646 although there's not much a user program will do with it. 2647 2648 The big difference between an archive BFD and an ordinary BFD is 2649 that the archive doesn't have sections. Instead it has a chain of BFDs 2650 that are considered its contents. These BFDs can be manipulated like 2651 any other. The BFDs contained in an archive opened for reading will 2652 all be opened for reading. You may put either input or output BFDs 2653 into an archive opened for output; they will be handled correctly when 2654 the archive is closed. 2655 2656 Use `bfd_openr_next_archived_file' to step through the contents of 2657 an archive opened for input. You don't have to read the entire archive 2658 if you don't want to! Read it until you find what you want. 2659 2660 Archive contents of output BFDs are chained through the `next' 2661 pointer in a BFD. The first one is findable through the `archive_head' 2662 slot of the archive. Set it with `bfd_set_archive_head' (q.v.). A 2663 given BFD may be in only one open output archive at a time. 2664 2665 As expected, the BFD archive code is more general than the archive 2666 code of any given environment. BFD archives may contain files of 2667 different formats (e.g., a.out and coff) and even different 2668 architectures. You may even place archives recursively into archives! 2669 2670 This can cause unexpected confusion, since some archive formats are 2671 more expressive than others. For instance, Intel COFF archives can 2672 preserve long filenames; SunOS a.out archives cannot. If you move a 2673 file from the first to the second format and back again, the filename 2674 may be truncated. Likewise, different a.out environments have different 2675 conventions as to how they truncate filenames, whether they preserve 2676 directory names in filenames, etc. When interoperating with native 2677 tools, be sure your files are homogeneous. 2678 2679 Beware: most of these formats do not react well to the presence of 2680 spaces in filenames. We do the best we can, but can't always handle 2681 this case due to restrictions in the format of archives. Many Unix 2682 utilities are braindead in regards to spaces and such in filenames 2683 anyway, so this shouldn't be much of a restriction. 2684 2685 Archives are supported in BFD in `archive.c'. 2686 2687 2.8.1 Archive functions 2688 ----------------------- 2689 2690 2.8.1.1 `bfd_get_next_mapent' 2691 ............................. 2692 2693 *Synopsis* 2694 symindex bfd_get_next_mapent 2695 (bfd *abfd, symindex previous, carsym **sym); 2696 *Description* 2697 Step through archive ABFD's symbol table (if it has one). Successively 2698 update SYM with the next symbol's information, returning that symbol's 2699 (internal) index into the symbol table. 2700 2701 Supply `BFD_NO_MORE_SYMBOLS' as the PREVIOUS entry to get the first 2702 one; returns `BFD_NO_MORE_SYMBOLS' when you've already got the last one. 2703 2704 A `carsym' is a canonical archive symbol. The only user-visible 2705 element is its name, a null-terminated string. 2706 2707 2.8.1.2 `bfd_set_archive_head' 2708 .............................. 2709 2710 *Synopsis* 2711 bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head); 2712 *Description* 2713 Set the head of the chain of BFDs contained in the archive OUTPUT to 2714 NEW_HEAD. 2715 2716 2.8.1.3 `bfd_openr_next_archived_file' 2717 ...................................... 2718 2719 *Synopsis* 2720 bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous); 2721 *Description* 2722 Provided a BFD, ARCHIVE, containing an archive and NULL, open an input 2723 BFD on the first contained element and returns that. Subsequent calls 2724 should pass the archive and the previous return value to return a 2725 created BFD to the next contained element. NULL is returned when there 2726 are no more. 2727 2728 2729 File: bfd.info, Node: Formats, Next: Relocations, Prev: Archives, Up: BFD front end 2730 2731 2.9 File formats 2732 ================ 2733 2734 A format is a BFD concept of high level file contents type. The formats 2735 supported by BFD are: 2736 2737 * `bfd_object' 2738 The BFD may contain data, symbols, relocations and debug info. 2739 2740 * `bfd_archive' 2741 The BFD contains other BFDs and an optional index. 2742 2743 * `bfd_core' 2744 The BFD contains the result of an executable core dump. 2745 2746 2.9.1 File format functions 2747 --------------------------- 2748 2749 2.9.1.1 `bfd_check_format' 2750 .......................... 2751 2752 *Synopsis* 2753 bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); 2754 *Description* 2755 Verify if the file attached to the BFD ABFD is compatible with the 2756 format FORMAT (i.e., one of `bfd_object', `bfd_archive' or `bfd_core'). 2757 2758 If the BFD has been set to a specific target before the call, only 2759 the named target and format combination is checked. If the target has 2760 not been set, or has been set to `default', then all the known target 2761 backends is interrogated to determine a match. If the default target 2762 matches, it is used. If not, exactly one target must recognize the 2763 file, or an error results. 2764 2765 The function returns `TRUE' on success, otherwise `FALSE' with one 2766 of the following error codes: 2767 2768 * `bfd_error_invalid_operation' - if `format' is not one of 2769 `bfd_object', `bfd_archive' or `bfd_core'. 2770 2771 * `bfd_error_system_call' - if an error occured during a read - even 2772 some file mismatches can cause bfd_error_system_calls. 2773 2774 * `file_not_recognised' - none of the backends recognised the file 2775 format. 2776 2777 * `bfd_error_file_ambiguously_recognized' - more than one backend 2778 recognised the file format. 2779 2780 2.9.1.2 `bfd_check_format_matches' 2781 .................................. 2782 2783 *Synopsis* 2784 bfd_boolean bfd_check_format_matches 2785 (bfd *abfd, bfd_format format, char ***matching); 2786 *Description* 2787 Like `bfd_check_format', except when it returns FALSE with `bfd_errno' 2788 set to `bfd_error_file_ambiguously_recognized'. In that case, if 2789 MATCHING is not NULL, it will be filled in with a NULL-terminated list 2790 of the names of the formats that matched, allocated with `malloc'. 2791 Then the user may choose a format and try again. 2792 2793 When done with the list that MATCHING points to, the caller should 2794 free it. 2795 2796 2.9.1.3 `bfd_set_format' 2797 ........................ 2798 2799 *Synopsis* 2800 bfd_boolean bfd_set_format (bfd *abfd, bfd_format format); 2801 *Description* 2802 This function sets the file format of the BFD ABFD to the format 2803 FORMAT. If the target set in the BFD does not support the format 2804 requested, the format is invalid, or the BFD is not open for writing, 2805 then an error occurs. 2806 2807 2.9.1.4 `bfd_format_string' 2808 ........................... 2809 2810 *Synopsis* 2811 const char *bfd_format_string (bfd_format format); 2812 *Description* 2813 Return a pointer to a const string `invalid', `object', `archive', 2814 `core', or `unknown', depending upon the value of FORMAT. 2815 2816 2817 File: bfd.info, Node: Relocations, Next: Core Files, Prev: Formats, Up: BFD front end 2818 2819 2.10 Relocations 2820 ================ 2821 2822 BFD maintains relocations in much the same way it maintains symbols: 2823 they are left alone until required, then read in en-masse and 2824 translated into an internal form. A common routine 2825 `bfd_perform_relocation' acts upon the canonical form to do the fixup. 2826 2827 Relocations are maintained on a per section basis, while symbols are 2828 maintained on a per BFD basis. 2829 2830 All that a back end has to do to fit the BFD interface is to create 2831 a `struct reloc_cache_entry' for each relocation in a particular 2832 section, and fill in the right bits of the structures. 2833 2834 * Menu: 2835 2836 * typedef arelent:: 2837 * howto manager:: 2838 2839 2840 File: bfd.info, Node: typedef arelent, Next: howto manager, Prev: Relocations, Up: Relocations 2841 2842 2.10.1 typedef arelent 2843 ---------------------- 2844 2845 This is the structure of a relocation entry: 2846 2847 2848 typedef enum bfd_reloc_status 2849 { 2850 /* No errors detected. */ 2851 bfd_reloc_ok, 2852 2853 /* The relocation was performed, but there was an overflow. */ 2854 bfd_reloc_overflow, 2855 2856 /* The address to relocate was not within the section supplied. */ 2857 bfd_reloc_outofrange, 2858 2859 /* Used by special functions. */ 2860 bfd_reloc_continue, 2861 2862 /* Unsupported relocation size requested. */ 2863 bfd_reloc_notsupported, 2864 2865 /* Unused. */ 2866 bfd_reloc_other, 2867 2868 /* The symbol to relocate against was undefined. */ 2869 bfd_reloc_undefined, 2870 2871 /* The relocation was performed, but may not be ok - presently 2872 generated only when linking i960 coff files with i960 b.out 2873 symbols. If this type is returned, the error_message argument 2874 to bfd_perform_relocation will be set. */ 2875 bfd_reloc_dangerous 2876 } 2877 bfd_reloc_status_type; 2878 2879 2880 typedef struct reloc_cache_entry 2881 { 2882 /* A pointer into the canonical table of pointers. */ 2883 struct bfd_symbol **sym_ptr_ptr; 2884 2885 /* offset in section. */ 2886 bfd_size_type address; 2887 2888 /* addend for relocation value. */ 2889 bfd_vma addend; 2890 2891 /* Pointer to how to perform the required relocation. */ 2892 reloc_howto_type *howto; 2893 2894 } 2895 arelent; 2896 *Description* 2897 Here is a description of each of the fields within an `arelent': 2898 2899 * `sym_ptr_ptr' 2900 The symbol table pointer points to a pointer to the symbol 2901 associated with the relocation request. It is the pointer into the 2902 table returned by the back end's `canonicalize_symtab' action. *Note 2903 Symbols::. The symbol is referenced through a pointer to a pointer so 2904 that tools like the linker can fix up all the symbols of the same name 2905 by modifying only one pointer. The relocation routine looks in the 2906 symbol and uses the base of the section the symbol is attached to and 2907 the value of the symbol as the initial relocation offset. If the symbol 2908 pointer is zero, then the section provided is looked up. 2909 2910 * `address' 2911 The `address' field gives the offset in bytes from the base of the 2912 section data which owns the relocation record to the first byte of 2913 relocatable information. The actual data relocated will be relative to 2914 this point; for example, a relocation type which modifies the bottom 2915 two bytes of a four byte word would not touch the first byte pointed to 2916 in a big endian world. 2917 2918 * `addend' 2919 The `addend' is a value provided by the back end to be added (!) to 2920 the relocation offset. Its interpretation is dependent upon the howto. 2921 For example, on the 68k the code: 2922 2923 char foo[]; 2924 main() 2925 { 2926 return foo[0x12345678]; 2927 } 2928 2929 Could be compiled into: 2930 2931 linkw fp,#-4 2932 moveb @#12345678,d0 2933 extbl d0 2934 unlk fp 2935 rts 2936 2937 This could create a reloc pointing to `foo', but leave the offset in 2938 the data, something like: 2939 2940 RELOCATION RECORDS FOR [.text]: 2941 offset type value 2942 00000006 32 _foo 2943 2944 00000000 4e56 fffc ; linkw fp,#-4 2945 00000004 1039 1234 5678 ; moveb @#12345678,d0 2946 0000000a 49c0 ; extbl d0 2947 0000000c 4e5e ; unlk fp 2948 0000000e 4e75 ; rts 2949 2950 Using coff and an 88k, some instructions don't have enough space in 2951 them to represent the full address range, and pointers have to be 2952 loaded in two parts. So you'd get something like: 2953 2954 or.u r13,r0,hi16(_foo+0x12345678) 2955 ld.b r2,r13,lo16(_foo+0x12345678) 2956 jmp r1 2957 2958 This should create two relocs, both pointing to `_foo', and with 2959 0x12340000 in their addend field. The data would consist of: 2960 2961 RELOCATION RECORDS FOR [.text]: 2962 offset type value 2963 00000002 HVRT16 _foo+0x12340000 2964 00000006 LVRT16 _foo+0x12340000 2965 2966 00000000 5da05678 ; or.u r13,r0,0x5678 2967 00000004 1c4d5678 ; ld.b r2,r13,0x5678 2968 00000008 f400c001 ; jmp r1 2969 2970 The relocation routine digs out the value from the data, adds it to 2971 the addend to get the original offset, and then adds the value of 2972 `_foo'. Note that all 32 bits have to be kept around somewhere, to cope 2973 with carry from bit 15 to bit 16. 2974 2975 One further example is the sparc and the a.out format. The sparc has 2976 a similar problem to the 88k, in that some instructions don't have room 2977 for an entire offset, but on the sparc the parts are created in odd 2978 sized lumps. The designers of the a.out format chose to not use the 2979 data within the section for storing part of the offset; all the offset 2980 is kept within the reloc. Anything in the data should be ignored. 2981 2982 save %sp,-112,%sp 2983 sethi %hi(_foo+0x12345678),%g2 2984 ldsb [%g2+%lo(_foo+0x12345678)],%i0 2985 ret 2986 restore 2987 2988 Both relocs contain a pointer to `foo', and the offsets contain junk. 2989 2990 RELOCATION RECORDS FOR [.text]: 2991 offset type value 2992 00000004 HI22 _foo+0x12345678 2993 00000008 LO10 _foo+0x12345678 2994 2995 00000000 9de3bf90 ; save %sp,-112,%sp 2996 00000004 05000000 ; sethi %hi(_foo+0),%g2 2997 00000008 f048a000 ; ldsb [%g2+%lo(_foo+0)],%i0 2998 0000000c 81c7e008 ; ret 2999 00000010 81e80000 ; restore 3000 3001 * `howto' 3002 The `howto' field can be imagined as a relocation instruction. It is 3003 a pointer to a structure which contains information on what to do with 3004 all of the other information in the reloc record and data section. A 3005 back end would normally have a relocation instruction set and turn 3006 relocations into pointers to the correct structure on input - but it 3007 would be possible to create each howto field on demand. 3008 3009 2.10.1.1 `enum complain_overflow' 3010 ................................. 3011 3012 Indicates what sort of overflow checking should be done when performing 3013 a relocation. 3014 3015 3016 enum complain_overflow 3017 { 3018 /* Do not complain on overflow. */ 3019 complain_overflow_dont, 3020 3021 /* Complain if the value overflows when considered as a signed 3022 number one bit larger than the field. ie. A bitfield of N bits 3023 is allowed to represent -2**n to 2**n-1. */ 3024 complain_overflow_bitfield, 3025 3026 /* Complain if the value overflows when considered as a signed 3027 number. */ 3028 complain_overflow_signed, 3029 3030 /* Complain if the value overflows when considered as an 3031 unsigned number. */ 3032 complain_overflow_unsigned 3033 }; 3034 3035 2.10.1.2 `reloc_howto_type' 3036 ........................... 3037 3038 The `reloc_howto_type' is a structure which contains all the 3039 information that libbfd needs to know to tie up a back end's data. 3040 3041 struct bfd_symbol; /* Forward declaration. */ 3042 3043 struct reloc_howto_struct 3044 { 3045 /* The type field has mainly a documentary use - the back end can 3046 do what it wants with it, though normally the back end's 3047 external idea of what a reloc number is stored 3048 in this field. For example, a PC relative word relocation 3049 in a coff environment has the type 023 - because that's 3050 what the outside world calls a R_PCRWORD reloc. */ 3051 unsigned int type; 3052 3053 /* The value the final relocation is shifted right by. This drops 3054 unwanted data from the relocation. */ 3055 unsigned int rightshift; 3056 3057 /* The size of the item to be relocated. This is *not* a 3058 power-of-two measure. To get the number of bytes operated 3059 on by a type of relocation, use bfd_get_reloc_size. */ 3060 int size; 3061 3062 /* The number of bits in the item to be relocated. This is used 3063 when doing overflow checking. */ 3064 unsigned int bitsize; 3065 3066 /* Notes that the relocation is relative to the location in the 3067 data section of the addend. The relocation function will 3068 subtract from the relocation value the address of the location 3069 being relocated. */ 3070 bfd_boolean pc_relative; 3071 3072 /* The bit position of the reloc value in the destination. 3073 The relocated value is left shifted by this amount. */ 3074 unsigned int bitpos; 3075 3076 /* What type of overflow error should be checked for when 3077 relocating. */ 3078 enum complain_overflow complain_on_overflow; 3079 3080 /* If this field is non null, then the supplied function is 3081 called rather than the normal function. This allows really 3082 strange relocation methods to be accommodated (e.g., i960 callj 3083 instructions). */ 3084 bfd_reloc_status_type (*special_function) 3085 (bfd *, arelent *, struct bfd_symbol *, void *, asection *, 3086 bfd *, char **); 3087 3088 /* The textual name of the relocation type. */ 3089 char *name; 3090 3091 /* Some formats record a relocation addend in the section contents 3092 rather than with the relocation. For ELF formats this is the 3093 distinction between USE_REL and USE_RELA (though the code checks 3094 for USE_REL == 1/0). The value of this field is TRUE if the 3095 addend is recorded with the section contents; when performing a 3096 partial link (ld -r) the section contents (the data) will be 3097 modified. The value of this field is FALSE if addends are 3098 recorded with the relocation (in arelent.addend); when performing 3099 a partial link the relocation will be modified. 3100 All relocations for all ELF USE_RELA targets should set this field 3101 to FALSE (values of TRUE should be looked on with suspicion). 3102 However, the converse is not true: not all relocations of all ELF 3103 USE_REL targets set this field to TRUE. Why this is so is peculiar 3104 to each particular target. For relocs that aren't used in partial 3105 links (e.g. GOT stuff) it doesn't matter what this is set to. */ 3106 bfd_boolean partial_inplace; 3107 3108 /* src_mask selects the part of the instruction (or data) to be used 3109 in the relocation sum. If the target relocations don't have an 3110 addend in the reloc, eg. ELF USE_REL, src_mask will normally equal 3111 dst_mask to extract the addend from the section contents. If 3112 relocations do have an addend in the reloc, eg. ELF USE_RELA, this 3113 field should be zero. Non-zero values for ELF USE_RELA targets are 3114 bogus as in those cases the value in the dst_mask part of the 3115 section contents should be treated as garbage. */ 3116 bfd_vma src_mask; 3117 3118 /* dst_mask selects which parts of the instruction (or data) are 3119 replaced with a relocated value. */ 3120 bfd_vma dst_mask; 3121 3122 /* When some formats create PC relative instructions, they leave 3123 the value of the pc of the place being relocated in the offset 3124 slot of the instruction, so that a PC relative relocation can 3125 be made just by adding in an ordinary offset (e.g., sun3 a.out). 3126 Some formats leave the displacement part of an instruction 3127 empty (e.g., m88k bcs); this flag signals the fact. */ 3128 bfd_boolean pcrel_offset; 3129 }; 3130 3131 2.10.1.3 `The HOWTO Macro' 3132 .......................... 3133 3134 *Description* 3135 The HOWTO define is horrible and will go away. 3136 #define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ 3137 { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } 3138 3139 *Description* 3140 And will be replaced with the totally magic way. But for the moment, we 3141 are compatible, so do it this way. 3142 #define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ 3143 HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ 3144 NAME, FALSE, 0, 0, IN) 3145 3146 *Description* 3147 This is used to fill in an empty howto entry in an array. 3148 #define EMPTY_HOWTO(C) \ 3149 HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ 3150 NULL, FALSE, 0, 0, FALSE) 3151 3152 *Description* 3153 Helper routine to turn a symbol into a relocation value. 3154 #define HOWTO_PREPARE(relocation, symbol) \ 3155 { \ 3156 if (symbol != NULL) \ 3157 { \ 3158 if (bfd_is_com_section (symbol->section)) \ 3159 { \ 3160 relocation = 0; \ 3161 } \ 3162 else \ 3163 { \ 3164 relocation = symbol->value; \ 3165 } \ 3166 } \ 3167 } 3168 3169 2.10.1.4 `bfd_get_reloc_size' 3170 ............................. 3171 3172 *Synopsis* 3173 unsigned int bfd_get_reloc_size (reloc_howto_type *); 3174 *Description* 3175 For a reloc_howto_type that operates on a fixed number of bytes, this 3176 returns the number of bytes operated on. 3177 3178 2.10.1.5 `arelent_chain' 3179 ........................ 3180 3181 *Description* 3182 How relocs are tied together in an `asection': 3183 typedef struct relent_chain 3184 { 3185 arelent relent; 3186 struct relent_chain *next; 3187 } 3188 arelent_chain; 3189 3190 2.10.1.6 `bfd_check_overflow' 3191 ............................. 3192 3193 *Synopsis* 3194 bfd_reloc_status_type bfd_check_overflow 3195 (enum complain_overflow how, 3196 unsigned int bitsize, 3197 unsigned int rightshift, 3198 unsigned int addrsize, 3199 bfd_vma relocation); 3200 *Description* 3201 Perform overflow checking on RELOCATION which has BITSIZE significant 3202 bits and will be shifted right by RIGHTSHIFT bits, on a machine with 3203 addresses containing ADDRSIZE significant bits. The result is either of 3204 `bfd_reloc_ok' or `bfd_reloc_overflow'. 3205 3206 2.10.1.7 `bfd_perform_relocation' 3207 ................................. 3208 3209 *Synopsis* 3210 bfd_reloc_status_type bfd_perform_relocation 3211 (bfd *abfd, 3212 arelent *reloc_entry, 3213 void *data, 3214 asection *input_section, 3215 bfd *output_bfd, 3216 char **error_message); 3217 *Description* 3218 If OUTPUT_BFD is supplied to this function, the generated image will be 3219 relocatable; the relocations are copied to the output file after they 3220 have been changed to reflect the new state of the world. There are two 3221 ways of reflecting the results of partial linkage in an output file: by 3222 modifying the output data in place, and by modifying the relocation 3223 record. Some native formats (e.g., basic a.out and basic coff) have no 3224 way of specifying an addend in the relocation type, so the addend has 3225 to go in the output data. This is no big deal since in these formats 3226 the output data slot will always be big enough for the addend. Complex 3227 reloc types with addends were invented to solve just this problem. The 3228 ERROR_MESSAGE argument is set to an error message if this return 3229 `bfd_reloc_dangerous'. 3230 3231 2.10.1.8 `bfd_install_relocation' 3232 ................................. 3233 3234 *Synopsis* 3235 bfd_reloc_status_type bfd_install_relocation 3236 (bfd *abfd, 3237 arelent *reloc_entry, 3238 void *data, bfd_vma data_start, 3239 asection *input_section, 3240 char **error_message); 3241 *Description* 3242 This looks remarkably like `bfd_perform_relocation', except it does not 3243 expect that the section contents have been filled in. I.e., it's 3244 suitable for use when creating, rather than applying a relocation. 3245 3246 For now, this function should be considered reserved for the 3247 assembler. 3248 3249 3250 File: bfd.info, Node: howto manager, Prev: typedef arelent, Up: Relocations 3251 3252 2.10.2 The howto manager 3253 ------------------------ 3254 3255 When an application wants to create a relocation, but doesn't know what 3256 the target machine might call it, it can find out by using this bit of 3257 code. 3258 3259 2.10.2.1 `bfd_reloc_code_type' 3260 .............................. 3261 3262 *Description* 3263 The insides of a reloc code. The idea is that, eventually, there will 3264 be one enumerator for every type of relocation we ever do. Pass one of 3265 these values to `bfd_reloc_type_lookup', and it'll return a howto 3266 pointer. 3267 3268 This does mean that the application must determine the correct 3269 enumerator value; you can't get a howto pointer from a random set of 3270 attributes. 3271 3272 Here are the possible values for `enum bfd_reloc_code_real': 3273 3274 -- : BFD_RELOC_64 3275 -- : BFD_RELOC_32 3276 -- : BFD_RELOC_26 3277 -- : BFD_RELOC_24 3278 -- : BFD_RELOC_16 3279 -- : BFD_RELOC_14 3280 -- : BFD_RELOC_8 3281 Basic absolute relocations of N bits. 3282 3283 -- : BFD_RELOC_64_PCREL 3284 -- : BFD_RELOC_32_PCREL 3285 -- : BFD_RELOC_24_PCREL 3286 -- : BFD_RELOC_16_PCREL 3287 -- : BFD_RELOC_12_PCREL 3288 -- : BFD_RELOC_8_PCREL 3289 PC-relative relocations. Sometimes these are relative to the 3290 address of the relocation itself; sometimes they are relative to 3291 the start of the section containing the relocation. It depends on 3292 the specific target. 3293 3294 The 24-bit relocation is used in some Intel 960 configurations. 3295 3296 -- : BFD_RELOC_32_SECREL 3297 Section relative relocations. Some targets need this for DWARF2. 3298 3299 -- : BFD_RELOC_32_GOT_PCREL 3300 -- : BFD_RELOC_16_GOT_PCREL 3301 -- : BFD_RELOC_8_GOT_PCREL 3302 -- : BFD_RELOC_32_GOTOFF 3303 -- : BFD_RELOC_16_GOTOFF 3304 -- : BFD_RELOC_LO16_GOTOFF 3305 -- : BFD_RELOC_HI16_GOTOFF 3306 -- : BFD_RELOC_HI16_S_GOTOFF 3307 -- : BFD_RELOC_8_GOTOFF 3308 -- : BFD_RELOC_64_PLT_PCREL 3309 -- : BFD_RELOC_32_PLT_PCREL 3310 -- : BFD_RELOC_24_PLT_PCREL 3311 -- : BFD_RELOC_16_PLT_PCREL 3312 -- : BFD_RELOC_8_PLT_PCREL 3313 -- : BFD_RELOC_64_PLTOFF 3314 -- : BFD_RELOC_32_PLTOFF 3315 -- : BFD_RELOC_16_PLTOFF 3316 -- : BFD_RELOC_LO16_PLTOFF 3317 -- : BFD_RELOC_HI16_PLTOFF 3318 -- : BFD_RELOC_HI16_S_PLTOFF 3319 -- : BFD_RELOC_8_PLTOFF 3320 For ELF. 3321 3322 -- : BFD_RELOC_68K_GLOB_DAT 3323 -- : BFD_RELOC_68K_JMP_SLOT 3324 -- : BFD_RELOC_68K_RELATIVE 3325 -- : BFD_RELOC_68K_TLS_GD32 3326 -- : BFD_RELOC_68K_TLS_GD16 3327 -- : BFD_RELOC_68K_TLS_GD8 3328 -- : BFD_RELOC_68K_TLS_LDM32 3329 -- : BFD_RELOC_68K_TLS_LDM16 3330 -- : BFD_RELOC_68K_TLS_LDM8 3331 -- : BFD_RELOC_68K_TLS_LDO32 3332 -- : BFD_RELOC_68K_TLS_LDO16 3333 -- : BFD_RELOC_68K_TLS_LDO8 3334 -- : BFD_RELOC_68K_TLS_IE32 3335 -- : BFD_RELOC_68K_TLS_IE16 3336 -- : BFD_RELOC_68K_TLS_IE8 3337 -- : BFD_RELOC_68K_TLS_LE32 3338 -- : BFD_RELOC_68K_TLS_LE16 3339 -- : BFD_RELOC_68K_TLS_LE8 3340 Relocations used by 68K ELF. 3341 3342 -- : BFD_RELOC_32_BASEREL 3343 -- : BFD_RELOC_16_BASEREL 3344 -- : BFD_RELOC_LO16_BASEREL 3345 -- : BFD_RELOC_HI16_BASEREL 3346 -- : BFD_RELOC_HI16_S_BASEREL 3347 -- : BFD_RELOC_8_BASEREL 3348 -- : BFD_RELOC_RVA 3349 Linkage-table relative. 3350 3351 -- : BFD_RELOC_8_FFnn 3352 Absolute 8-bit relocation, but used to form an address like 0xFFnn. 3353 3354 -- : BFD_RELOC_32_PCREL_S2 3355 -- : BFD_RELOC_16_PCREL_S2 3356 -- : BFD_RELOC_23_PCREL_S2 3357 These PC-relative relocations are stored as word displacements - 3358 i.e., byte displacements shifted right two bits. The 30-bit word 3359 displacement (<<32_PCREL_S2>> - 32 bits, shifted 2) is used on the 3360 SPARC. (SPARC tools generally refer to this as <<WDISP30>>.) The 3361 signed 16-bit displacement is used on the MIPS, and the 23-bit 3362 displacement is used on the Alpha. 3363 3364 -- : BFD_RELOC_HI22 3365 -- : BFD_RELOC_LO10 3366 High 22 bits and low 10 bits of 32-bit value, placed into lower 3367 bits of the target word. These are used on the SPARC. 3368 3369 -- : BFD_RELOC_GPREL16 3370 -- : BFD_RELOC_GPREL32 3371 For systems that allocate a Global Pointer register, these are 3372 displacements off that register. These relocation types are 3373 handled specially, because the value the register will have is 3374 decided relatively late. 3375 3376 -- : BFD_RELOC_I960_CALLJ 3377 Reloc types used for i960/b.out. 3378 3379 -- : BFD_RELOC_NONE 3380 -- : BFD_RELOC_SPARC_WDISP22 3381 -- : BFD_RELOC_SPARC22 3382 -- : BFD_RELOC_SPARC13 3383 -- : BFD_RELOC_SPARC_GOT10 3384 -- : BFD_RELOC_SPARC_GOT13 3385 -- : BFD_RELOC_SPARC_GOT22 3386 -- : BFD_RELOC_SPARC_PC10 3387 -- : BFD_RELOC_SPARC_PC22 3388 -- : BFD_RELOC_SPARC_WPLT30 3389 -- : BFD_RELOC_SPARC_COPY 3390 -- : BFD_RELOC_SPARC_GLOB_DAT 3391 -- : BFD_RELOC_SPARC_JMP_SLOT 3392 -- : BFD_RELOC_SPARC_RELATIVE 3393 -- : BFD_RELOC_SPARC_UA16 3394 -- : BFD_RELOC_SPARC_UA32 3395 -- : BFD_RELOC_SPARC_UA64 3396 -- : BFD_RELOC_SPARC_GOTDATA_HIX22 3397 -- : BFD_RELOC_SPARC_GOTDATA_LOX10 3398 -- : BFD_RELOC_SPARC_GOTDATA_OP_HIX22 3399 -- : BFD_RELOC_SPARC_GOTDATA_OP_LOX10 3400 -- : BFD_RELOC_SPARC_GOTDATA_OP 3401 -- : BFD_RELOC_SPARC_JMP_IREL 3402 -- : BFD_RELOC_SPARC_IRELATIVE 3403 SPARC ELF relocations. There is probably some overlap with other 3404 relocation types already defined. 3405 3406 -- : BFD_RELOC_SPARC_BASE13 3407 -- : BFD_RELOC_SPARC_BASE22 3408 I think these are specific to SPARC a.out (e.g., Sun 4). 3409 3410 -- : BFD_RELOC_SPARC_64 3411 -- : BFD_RELOC_SPARC_10 3412 -- : BFD_RELOC_SPARC_11 3413 -- : BFD_RELOC_SPARC_OLO10 3414 -- : BFD_RELOC_SPARC_HH22 3415 -- : BFD_RELOC_SPARC_HM10 3416 -- : BFD_RELOC_SPARC_LM22 3417 -- : BFD_RELOC_SPARC_PC_HH22 3418 -- : BFD_RELOC_SPARC_PC_HM10 3419 -- : BFD_RELOC_SPARC_PC_LM22 3420 -- : BFD_RELOC_SPARC_WDISP16 3421 -- : BFD_RELOC_SPARC_WDISP19 3422 -- : BFD_RELOC_SPARC_7 3423 -- : BFD_RELOC_SPARC_6 3424 -- : BFD_RELOC_SPARC_5 3425 -- : BFD_RELOC_SPARC_DISP64 3426 -- : BFD_RELOC_SPARC_PLT32 3427 -- : BFD_RELOC_SPARC_PLT64 3428 -- : BFD_RELOC_SPARC_HIX22 3429 -- : BFD_RELOC_SPARC_LOX10 3430 -- : BFD_RELOC_SPARC_H44 3431 -- : BFD_RELOC_SPARC_M44 3432 -- : BFD_RELOC_SPARC_L44 3433 -- : BFD_RELOC_SPARC_REGISTER 3434 SPARC64 relocations 3435 3436 -- : BFD_RELOC_SPARC_REV32 3437 SPARC little endian relocation 3438 3439 -- : BFD_RELOC_SPARC_TLS_GD_HI22 3440 -- : BFD_RELOC_SPARC_TLS_GD_LO10 3441 -- : BFD_RELOC_SPARC_TLS_GD_ADD 3442 -- : BFD_RELOC_SPARC_TLS_GD_CALL 3443 -- : BFD_RELOC_SPARC_TLS_LDM_HI22 3444 -- : BFD_RELOC_SPARC_TLS_LDM_LO10 3445 -- : BFD_RELOC_SPARC_TLS_LDM_ADD 3446 -- : BFD_RELOC_SPARC_TLS_LDM_CALL 3447 -- : BFD_RELOC_SPARC_TLS_LDO_HIX22 3448 -- : BFD_RELOC_SPARC_TLS_LDO_LOX10 3449 -- : BFD_RELOC_SPARC_TLS_LDO_ADD 3450 -- : BFD_RELOC_SPARC_TLS_IE_HI22 3451 -- : BFD_RELOC_SPARC_TLS_IE_LO10 3452 -- : BFD_RELOC_SPARC_TLS_IE_LD 3453 -- : BFD_RELOC_SPARC_TLS_IE_LDX 3454 -- : BFD_RELOC_SPARC_TLS_IE_ADD 3455 -- : BFD_RELOC_SPARC_TLS_LE_HIX22 3456 -- : BFD_RELOC_SPARC_TLS_LE_LOX10 3457 -- : BFD_RELOC_SPARC_TLS_DTPMOD32 3458 -- : BFD_RELOC_SPARC_TLS_DTPMOD64 3459 -- : BFD_RELOC_SPARC_TLS_DTPOFF32 3460 -- : BFD_RELOC_SPARC_TLS_DTPOFF64 3461 -- : BFD_RELOC_SPARC_TLS_TPOFF32 3462 -- : BFD_RELOC_SPARC_TLS_TPOFF64 3463 SPARC TLS relocations 3464 3465 -- : BFD_RELOC_SPU_IMM7 3466 -- : BFD_RELOC_SPU_IMM8 3467 -- : BFD_RELOC_SPU_IMM10 3468 -- : BFD_RELOC_SPU_IMM10W 3469 -- : BFD_RELOC_SPU_IMM16 3470 -- : BFD_RELOC_SPU_IMM16W 3471 -- : BFD_RELOC_SPU_IMM18 3472 -- : BFD_RELOC_SPU_PCREL9a 3473 -- : BFD_RELOC_SPU_PCREL9b 3474 -- : BFD_RELOC_SPU_PCREL16 3475 -- : BFD_RELOC_SPU_LO16 3476 -- : BFD_RELOC_SPU_HI16 3477 -- : BFD_RELOC_SPU_PPU32 3478 -- : BFD_RELOC_SPU_PPU64 3479 -- : BFD_RELOC_SPU_ADD_PIC 3480 SPU Relocations. 3481 3482 -- : BFD_RELOC_ALPHA_GPDISP_HI16 3483 Alpha ECOFF and ELF relocations. Some of these treat the symbol or 3484 "addend" in some special way. For GPDISP_HI16 ("gpdisp") 3485 relocations, the symbol is ignored when writing; when reading, it 3486 will be the absolute section symbol. The addend is the 3487 displacement in bytes of the "lda" instruction from the "ldah" 3488 instruction (which is at the address of this reloc). 3489 3490 -- : BFD_RELOC_ALPHA_GPDISP_LO16 3491 For GPDISP_LO16 ("ignore") relocations, the symbol is handled as 3492 with GPDISP_HI16 relocs. The addend is ignored when writing the 3493 relocations out, and is filled in with the file's GP value on 3494 reading, for convenience. 3495 3496 -- : BFD_RELOC_ALPHA_GPDISP 3497 The ELF GPDISP relocation is exactly the same as the GPDISP_HI16 3498 relocation except that there is no accompanying GPDISP_LO16 3499 relocation. 3500 3501 -- : BFD_RELOC_ALPHA_LITERAL 3502 -- : BFD_RELOC_ALPHA_ELF_LITERAL 3503 -- : BFD_RELOC_ALPHA_LITUSE 3504 The Alpha LITERAL/LITUSE relocs are produced by a symbol reference; 3505 the assembler turns it into a LDQ instruction to load the address 3506 of the symbol, and then fills in a register in the real 3507 instruction. 3508 3509 The LITERAL reloc, at the LDQ instruction, refers to the .lita 3510 section symbol. The addend is ignored when writing, but is filled 3511 in with the file's GP value on reading, for convenience, as with 3512 the GPDISP_LO16 reloc. 3513 3514 The ELF_LITERAL reloc is somewhere between 16_GOTOFF and 3515 GPDISP_LO16. It should refer to the symbol to be referenced, as 3516 with 16_GOTOFF, but it generates output not based on the position 3517 within the .got section, but relative to the GP value chosen for 3518 the file during the final link stage. 3519 3520 The LITUSE reloc, on the instruction using the loaded address, 3521 gives information to the linker that it might be able to use to 3522 optimize away some literal section references. The symbol is 3523 ignored (read as the absolute section symbol), and the "addend" 3524 indicates the type of instruction using the register: 1 - "memory" 3525 fmt insn 2 - byte-manipulation (byte offset reg) 3 - jsr (target 3526 of branch) 3527 3528 -- : BFD_RELOC_ALPHA_HINT 3529 The HINT relocation indicates a value that should be filled into 3530 the "hint" field of a jmp/jsr/ret instruction, for possible branch- 3531 prediction logic which may be provided on some processors. 3532 3533 -- : BFD_RELOC_ALPHA_LINKAGE 3534 The LINKAGE relocation outputs a linkage pair in the object file, 3535 which is filled by the linker. 3536 3537 -- : BFD_RELOC_ALPHA_CODEADDR 3538 The CODEADDR relocation outputs a STO_CA in the object file, which 3539 is filled by the linker. 3540 3541 -- : BFD_RELOC_ALPHA_GPREL_HI16 3542 -- : BFD_RELOC_ALPHA_GPREL_LO16 3543 The GPREL_HI/LO relocations together form a 32-bit offset from the 3544 GP register. 3545 3546 -- : BFD_RELOC_ALPHA_BRSGP 3547 Like BFD_RELOC_23_PCREL_S2, except that the source and target must 3548 share a common GP, and the target address is adjusted for 3549 STO_ALPHA_STD_GPLOAD. 3550 3551 -- : BFD_RELOC_ALPHA_NOP 3552 The NOP relocation outputs a NOP if the longword displacement 3553 between two procedure entry points is < 2^21. 3554 3555 -- : BFD_RELOC_ALPHA_BSR 3556 The BSR relocation outputs a BSR if the longword displacement 3557 between two procedure entry points is < 2^21. 3558 3559 -- : BFD_RELOC_ALPHA_LDA 3560 The LDA relocation outputs a LDA if the longword displacement 3561 between two procedure entry points is < 2^16. 3562 3563 -- : BFD_RELOC_ALPHA_BOH 3564 The BOH relocation outputs a BSR if the longword displacement 3565 between two procedure entry points is < 2^21, or else a hint. 3566 3567 -- : BFD_RELOC_ALPHA_TLSGD 3568 -- : BFD_RELOC_ALPHA_TLSLDM 3569 -- : BFD_RELOC_ALPHA_DTPMOD64 3570 -- : BFD_RELOC_ALPHA_GOTDTPREL16 3571 -- : BFD_RELOC_ALPHA_DTPREL64 3572 -- : BFD_RELOC_ALPHA_DTPREL_HI16 3573 -- : BFD_RELOC_ALPHA_DTPREL_LO16 3574 -- : BFD_RELOC_ALPHA_DTPREL16 3575 -- : BFD_RELOC_ALPHA_GOTTPREL16 3576 -- : BFD_RELOC_ALPHA_TPREL64 3577 -- : BFD_RELOC_ALPHA_TPREL_HI16 3578 -- : BFD_RELOC_ALPHA_TPREL_LO16 3579 -- : BFD_RELOC_ALPHA_TPREL16 3580 Alpha thread-local storage relocations. 3581 3582 -- : BFD_RELOC_MIPS_JMP 3583 Bits 27..2 of the relocation address shifted right 2 bits; simple 3584 reloc otherwise. 3585 3586 -- : BFD_RELOC_MIPS16_JMP 3587 The MIPS16 jump instruction. 3588 3589 -- : BFD_RELOC_MIPS16_GPREL 3590 MIPS16 GP relative reloc. 3591 3592 -- : BFD_RELOC_HI16 3593 High 16 bits of 32-bit value; simple reloc. 3594 3595 -- : BFD_RELOC_HI16_S 3596 High 16 bits of 32-bit value but the low 16 bits will be sign 3597 extended and added to form the final result. If the low 16 bits 3598 form a negative number, we need to add one to the high value to 3599 compensate for the borrow when the low bits are added. 3600 3601 -- : BFD_RELOC_LO16 3602 Low 16 bits. 3603 3604 -- : BFD_RELOC_HI16_PCREL 3605 High 16 bits of 32-bit pc-relative value 3606 3607 -- : BFD_RELOC_HI16_S_PCREL 3608 High 16 bits of 32-bit pc-relative value, adjusted 3609 3610 -- : BFD_RELOC_LO16_PCREL 3611 Low 16 bits of pc-relative value 3612 3613 -- : BFD_RELOC_MIPS16_GOT16 3614 -- : BFD_RELOC_MIPS16_CALL16 3615 Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of 3616 16-bit immediate fields 3617 3618 -- : BFD_RELOC_MIPS16_HI16 3619 MIPS16 high 16 bits of 32-bit value. 3620 3621 -- : BFD_RELOC_MIPS16_HI16_S 3622 MIPS16 high 16 bits of 32-bit value but the low 16 bits will be 3623 sign extended and added to form the final result. If the low 16 3624 bits form a negative number, we need to add one to the high value 3625 to compensate for the borrow when the low bits are added. 3626 3627 -- : BFD_RELOC_MIPS16_LO16 3628 MIPS16 low 16 bits. 3629 3630 -- : BFD_RELOC_MIPS_LITERAL 3631 Relocation against a MIPS literal section. 3632 3633 -- : BFD_RELOC_MIPS_GOT16 3634 -- : BFD_RELOC_MIPS_CALL16 3635 -- : BFD_RELOC_MIPS_GOT_HI16 3636 -- : BFD_RELOC_MIPS_GOT_LO16 3637 -- : BFD_RELOC_MIPS_CALL_HI16 3638 -- : BFD_RELOC_MIPS_CALL_LO16 3639 -- : BFD_RELOC_MIPS_SUB 3640 -- : BFD_RELOC_MIPS_GOT_PAGE 3641 -- : BFD_RELOC_MIPS_GOT_OFST 3642 -- : BFD_RELOC_MIPS_GOT_DISP 3643 -- : BFD_RELOC_MIPS_SHIFT5 3644 -- : BFD_RELOC_MIPS_SHIFT6 3645 -- : BFD_RELOC_MIPS_INSERT_A 3646 -- : BFD_RELOC_MIPS_INSERT_B 3647 -- : BFD_RELOC_MIPS_DELETE 3648 -- : BFD_RELOC_MIPS_HIGHEST 3649 -- : BFD_RELOC_MIPS_HIGHER 3650 -- : BFD_RELOC_MIPS_SCN_DISP 3651 -- : BFD_RELOC_MIPS_REL16 3652 -- : BFD_RELOC_MIPS_RELGOT 3653 -- : BFD_RELOC_MIPS_JALR 3654 -- : BFD_RELOC_MIPS_TLS_DTPMOD32 3655 -- : BFD_RELOC_MIPS_TLS_DTPREL32 3656 -- : BFD_RELOC_MIPS_TLS_DTPMOD64 3657 -- : BFD_RELOC_MIPS_TLS_DTPREL64 3658 -- : BFD_RELOC_MIPS_TLS_GD 3659 -- : BFD_RELOC_MIPS_TLS_LDM 3660 -- : BFD_RELOC_MIPS_TLS_DTPREL_HI16 3661 -- : BFD_RELOC_MIPS_TLS_DTPREL_LO16 3662 -- : BFD_RELOC_MIPS_TLS_GOTTPREL 3663 -- : BFD_RELOC_MIPS_TLS_TPREL32 3664 -- : BFD_RELOC_MIPS_TLS_TPREL64 3665 -- : BFD_RELOC_MIPS_TLS_TPREL_HI16 3666 -- : BFD_RELOC_MIPS_TLS_TPREL_LO16 3667 MIPS ELF relocations. 3668 3669 -- : BFD_RELOC_MIPS_COPY 3670 -- : BFD_RELOC_MIPS_JUMP_SLOT 3671 MIPS ELF relocations (VxWorks and PLT extensions). 3672 3673 -- : BFD_RELOC_MOXIE_10_PCREL 3674 Moxie ELF relocations. 3675 3676 -- : BFD_RELOC_FRV_LABEL16 3677 -- : BFD_RELOC_FRV_LABEL24 3678 -- : BFD_RELOC_FRV_LO16 3679 -- : BFD_RELOC_FRV_HI16 3680 -- : BFD_RELOC_FRV_GPREL12 3681 -- : BFD_RELOC_FRV_GPRELU12 3682 -- : BFD_RELOC_FRV_GPREL32 3683 -- : BFD_RELOC_FRV_GPRELHI 3684 -- : BFD_RELOC_FRV_GPRELLO 3685 -- : BFD_RELOC_FRV_GOT12 3686 -- : BFD_RELOC_FRV_GOTHI 3687 -- : BFD_RELOC_FRV_GOTLO 3688 -- : BFD_RELOC_FRV_FUNCDESC 3689 -- : BFD_RELOC_FRV_FUNCDESC_GOT12 3690 -- : BFD_RELOC_FRV_FUNCDESC_GOTHI 3691 -- : BFD_RELOC_FRV_FUNCDESC_GOTLO 3692 -- : BFD_RELOC_FRV_FUNCDESC_VALUE 3693 -- : BFD_RELOC_FRV_FUNCDESC_GOTOFF12 3694 -- : BFD_RELOC_FRV_FUNCDESC_GOTOFFHI 3695 -- : BFD_RELOC_FRV_FUNCDESC_GOTOFFLO 3696 -- : BFD_RELOC_FRV_GOTOFF12 3697 -- : BFD_RELOC_FRV_GOTOFFHI 3698 -- : BFD_RELOC_FRV_GOTOFFLO 3699 -- : BFD_RELOC_FRV_GETTLSOFF 3700 -- : BFD_RELOC_FRV_TLSDESC_VALUE 3701 -- : BFD_RELOC_FRV_GOTTLSDESC12 3702 -- : BFD_RELOC_FRV_GOTTLSDESCHI 3703 -- : BFD_RELOC_FRV_GOTTLSDESCLO 3704 -- : BFD_RELOC_FRV_TLSMOFF12 3705 -- : BFD_RELOC_FRV_TLSMOFFHI 3706 -- : BFD_RELOC_FRV_TLSMOFFLO 3707 -- : BFD_RELOC_FRV_GOTTLSOFF12 3708 -- : BFD_RELOC_FRV_GOTTLSOFFHI 3709 -- : BFD_RELOC_FRV_GOTTLSOFFLO 3710 -- : BFD_RELOC_FRV_TLSOFF 3711 -- : BFD_RELOC_FRV_TLSDESC_RELAX 3712 -- : BFD_RELOC_FRV_GETTLSOFF_RELAX 3713 -- : BFD_RELOC_FRV_TLSOFF_RELAX 3714 -- : BFD_RELOC_FRV_TLSMOFF 3715 Fujitsu Frv Relocations. 3716 3717 -- : BFD_RELOC_MN10300_GOTOFF24 3718 This is a 24bit GOT-relative reloc for the mn10300. 3719 3720 -- : BFD_RELOC_MN10300_GOT32 3721 This is a 32bit GOT-relative reloc for the mn10300, offset by two 3722 bytes in the instruction. 3723 3724 -- : BFD_RELOC_MN10300_GOT24 3725 This is a 24bit GOT-relative reloc for the mn10300, offset by two 3726 bytes in the instruction. 3727 3728 -- : BFD_RELOC_MN10300_GOT16 3729 This is a 16bit GOT-relative reloc for the mn10300, offset by two 3730 bytes in the instruction. 3731 3732 -- : BFD_RELOC_MN10300_COPY 3733 Copy symbol at runtime. 3734 3735 -- : BFD_RELOC_MN10300_GLOB_DAT 3736 Create GOT entry. 3737 3738 -- : BFD_RELOC_MN10300_JMP_SLOT 3739 Create PLT entry. 3740 3741 -- : BFD_RELOC_MN10300_RELATIVE 3742 Adjust by program base. 3743 3744 -- : BFD_RELOC_MN10300_SYM_DIFF 3745 Together with another reloc targeted at the same location, allows 3746 for a value that is the difference of two symbols in the same 3747 section. 3748 3749 -- : BFD_RELOC_MN10300_ALIGN 3750 The addend of this reloc is an alignment power that must be 3751 honoured at the offset's location, regardless of linker relaxation. 3752 3753 -- : BFD_RELOC_386_GOT32 3754 -- : BFD_RELOC_386_PLT32 3755 -- : BFD_RELOC_386_COPY 3756 -- : BFD_RELOC_386_GLOB_DAT 3757 -- : BFD_RELOC_386_JUMP_SLOT 3758 -- : BFD_RELOC_386_RELATIVE 3759 -- : BFD_RELOC_386_GOTOFF 3760 -- : BFD_RELOC_386_GOTPC 3761 -- : BFD_RELOC_386_TLS_TPOFF 3762 -- : BFD_RELOC_386_TLS_IE 3763 -- : BFD_RELOC_386_TLS_GOTIE 3764 -- : BFD_RELOC_386_TLS_LE 3765 -- : BFD_RELOC_386_TLS_GD 3766 -- : BFD_RELOC_386_TLS_LDM 3767 -- : BFD_RELOC_386_TLS_LDO_32 3768 -- : BFD_RELOC_386_TLS_IE_32 3769 -- : BFD_RELOC_386_TLS_LE_32 3770 -- : BFD_RELOC_386_TLS_DTPMOD32 3771 -- : BFD_RELOC_386_TLS_DTPOFF32 3772 -- : BFD_RELOC_386_TLS_TPOFF32 3773 -- : BFD_RELOC_386_TLS_GOTDESC 3774 -- : BFD_RELOC_386_TLS_DESC_CALL 3775 -- : BFD_RELOC_386_TLS_DESC 3776 -- : BFD_RELOC_386_IRELATIVE 3777 i386/elf relocations 3778 3779 -- : BFD_RELOC_X86_64_GOT32 3780 -- : BFD_RELOC_X86_64_PLT32 3781 -- : BFD_RELOC_X86_64_COPY 3782 -- : BFD_RELOC_X86_64_GLOB_DAT 3783 -- : BFD_RELOC_X86_64_JUMP_SLOT 3784 -- : BFD_RELOC_X86_64_RELATIVE 3785 -- : BFD_RELOC_X86_64_GOTPCREL 3786 -- : BFD_RELOC_X86_64_32S 3787 -- : BFD_RELOC_X86_64_DTPMOD64 3788 -- : BFD_RELOC_X86_64_DTPOFF64 3789 -- : BFD_RELOC_X86_64_TPOFF64 3790 -- : BFD_RELOC_X86_64_TLSGD 3791 -- : BFD_RELOC_X86_64_TLSLD 3792 -- : BFD_RELOC_X86_64_DTPOFF32 3793 -- : BFD_RELOC_X86_64_GOTTPOFF 3794 -- : BFD_RELOC_X86_64_TPOFF32 3795 -- : BFD_RELOC_X86_64_GOTOFF64 3796 -- : BFD_RELOC_X86_64_GOTPC32 3797 -- : BFD_RELOC_X86_64_GOT64 3798 -- : BFD_RELOC_X86_64_GOTPCREL64 3799 -- : BFD_RELOC_X86_64_GOTPC64 3800 -- : BFD_RELOC_X86_64_GOTPLT64 3801 -- : BFD_RELOC_X86_64_PLTOFF64 3802 -- : BFD_RELOC_X86_64_GOTPC32_TLSDESC 3803 -- : BFD_RELOC_X86_64_TLSDESC_CALL 3804 -- : BFD_RELOC_X86_64_TLSDESC 3805 -- : BFD_RELOC_X86_64_IRELATIVE 3806 x86-64/elf relocations 3807 3808 -- : BFD_RELOC_NS32K_IMM_8 3809 -- : BFD_RELOC_NS32K_IMM_16 3810 -- : BFD_RELOC_NS32K_IMM_32 3811 -- : BFD_RELOC_NS32K_IMM_8_PCREL 3812 -- : BFD_RELOC_NS32K_IMM_16_PCREL 3813 -- : BFD_RELOC_NS32K_IMM_32_PCREL 3814 -- : BFD_RELOC_NS32K_DISP_8 3815 -- : BFD_RELOC_NS32K_DISP_16 3816 -- : BFD_RELOC_NS32K_DISP_32 3817 -- : BFD_RELOC_NS32K_DISP_8_PCREL 3818 -- : BFD_RELOC_NS32K_DISP_16_PCREL 3819 -- : BFD_RELOC_NS32K_DISP_32_PCREL 3820 ns32k relocations 3821 3822 -- : BFD_RELOC_PDP11_DISP_8_PCREL 3823 -- : BFD_RELOC_PDP11_DISP_6_PCREL 3824 PDP11 relocations 3825 3826 -- : BFD_RELOC_PJ_CODE_HI16 3827 -- : BFD_RELOC_PJ_CODE_LO16 3828 -- : BFD_RELOC_PJ_CODE_DIR16 3829 -- : BFD_RELOC_PJ_CODE_DIR32 3830 -- : BFD_RELOC_PJ_CODE_REL16 3831 -- : BFD_RELOC_PJ_CODE_REL32 3832 Picojava relocs. Not all of these appear in object files. 3833 3834 -- : BFD_RELOC_PPC_B26 3835 -- : BFD_RELOC_PPC_BA26 3836 -- : BFD_RELOC_PPC_TOC16 3837 -- : BFD_RELOC_PPC_B16 3838 -- : BFD_RELOC_PPC_B16_BRTAKEN 3839 -- : BFD_RELOC_PPC_B16_BRNTAKEN 3840 -- : BFD_RELOC_PPC_BA16 3841 -- : BFD_RELOC_PPC_BA16_BRTAKEN 3842 -- : BFD_RELOC_PPC_BA16_BRNTAKEN 3843 -- : BFD_RELOC_PPC_COPY 3844 -- : BFD_RELOC_PPC_GLOB_DAT 3845 -- : BFD_RELOC_PPC_JMP_SLOT 3846 -- : BFD_RELOC_PPC_RELATIVE 3847 -- : BFD_RELOC_PPC_LOCAL24PC 3848 -- : BFD_RELOC_PPC_EMB_NADDR32 3849 -- : BFD_RELOC_PPC_EMB_NADDR16 3850 -- : BFD_RELOC_PPC_EMB_NADDR16_LO 3851 -- : BFD_RELOC_PPC_EMB_NADDR16_HI 3852 -- : BFD_RELOC_PPC_EMB_NADDR16_HA 3853 -- : BFD_RELOC_PPC_EMB_SDAI16 3854 -- : BFD_RELOC_PPC_EMB_SDA2I16 3855 -- : BFD_RELOC_PPC_EMB_SDA2REL 3856 -- : BFD_RELOC_PPC_EMB_SDA21 3857 -- : BFD_RELOC_PPC_EMB_MRKREF 3858 -- : BFD_RELOC_PPC_EMB_RELSEC16 3859 -- : BFD_RELOC_PPC_EMB_RELST_LO 3860 -- : BFD_RELOC_PPC_EMB_RELST_HI 3861 -- : BFD_RELOC_PPC_EMB_RELST_HA 3862 -- : BFD_RELOC_PPC_EMB_BIT_FLD 3863 -- : BFD_RELOC_PPC_EMB_RELSDA 3864 -- : BFD_RELOC_PPC64_HIGHER 3865 -- : BFD_RELOC_PPC64_HIGHER_S 3866 -- : BFD_RELOC_PPC64_HIGHEST 3867 -- : BFD_RELOC_PPC64_HIGHEST_S 3868 -- : BFD_RELOC_PPC64_TOC16_LO 3869 -- : BFD_RELOC_PPC64_TOC16_HI 3870 -- : BFD_RELOC_PPC64_TOC16_HA 3871 -- : BFD_RELOC_PPC64_TOC 3872 -- : BFD_RELOC_PPC64_PLTGOT16 3873 -- : BFD_RELOC_PPC64_PLTGOT16_LO 3874 -- : BFD_RELOC_PPC64_PLTGOT16_HI 3875 -- : BFD_RELOC_PPC64_PLTGOT16_HA 3876 -- : BFD_RELOC_PPC64_ADDR16_DS 3877 -- : BFD_RELOC_PPC64_ADDR16_LO_DS 3878 -- : BFD_RELOC_PPC64_GOT16_DS 3879 -- : BFD_RELOC_PPC64_GOT16_LO_DS 3880 -- : BFD_RELOC_PPC64_PLT16_LO_DS 3881 -- : BFD_RELOC_PPC64_SECTOFF_DS 3882 -- : BFD_RELOC_PPC64_SECTOFF_LO_DS 3883 -- : BFD_RELOC_PPC64_TOC16_DS 3884 -- : BFD_RELOC_PPC64_TOC16_LO_DS 3885 -- : BFD_RELOC_PPC64_PLTGOT16_DS 3886 -- : BFD_RELOC_PPC64_PLTGOT16_LO_DS 3887 Power(rs6000) and PowerPC relocations. 3888 3889 -- : BFD_RELOC_PPC_TLS 3890 -- : BFD_RELOC_PPC_TLSGD 3891 -- : BFD_RELOC_PPC_TLSLD 3892 -- : BFD_RELOC_PPC_DTPMOD 3893 -- : BFD_RELOC_PPC_TPREL16 3894 -- : BFD_RELOC_PPC_TPREL16_LO 3895 -- : BFD_RELOC_PPC_TPREL16_HI 3896 -- : BFD_RELOC_PPC_TPREL16_HA 3897 -- : BFD_RELOC_PPC_TPREL 3898 -- : BFD_RELOC_PPC_DTPREL16 3899 -- : BFD_RELOC_PPC_DTPREL16_LO 3900 -- : BFD_RELOC_PPC_DTPREL16_HI 3901 -- : BFD_RELOC_PPC_DTPREL16_HA 3902 -- : BFD_RELOC_PPC_DTPREL 3903 -- : BFD_RELOC_PPC_GOT_TLSGD16 3904 -- : BFD_RELOC_PPC_GOT_TLSGD16_LO 3905 -- : BFD_RELOC_PPC_GOT_TLSGD16_HI 3906 -- : BFD_RELOC_PPC_GOT_TLSGD16_HA 3907 -- : BFD_RELOC_PPC_GOT_TLSLD16 3908 -- : BFD_RELOC_PPC_GOT_TLSLD16_LO 3909 -- : BFD_RELOC_PPC_GOT_TLSLD16_HI 3910 -- : BFD_RELOC_PPC_GOT_TLSLD16_HA 3911 -- : BFD_RELOC_PPC_GOT_TPREL16 3912 -- : BFD_RELOC_PPC_GOT_TPREL16_LO 3913 -- : BFD_RELOC_PPC_GOT_TPREL16_HI 3914 -- : BFD_RELOC_PPC_GOT_TPREL16_HA 3915 -- : BFD_RELOC_PPC_GOT_DTPREL16 3916 -- : BFD_RELOC_PPC_GOT_DTPREL16_LO 3917 -- : BFD_RELOC_PPC_GOT_DTPREL16_HI 3918 -- : BFD_RELOC_PPC_GOT_DTPREL16_HA 3919 -- : BFD_RELOC_PPC64_TPREL16_DS 3920 -- : BFD_RELOC_PPC64_TPREL16_LO_DS 3921 -- : BFD_RELOC_PPC64_TPREL16_HIGHER 3922 -- : BFD_RELOC_PPC64_TPREL16_HIGHERA 3923 -- : BFD_RELOC_PPC64_TPREL16_HIGHEST 3924 -- : BFD_RELOC_PPC64_TPREL16_HIGHESTA 3925 -- : BFD_RELOC_PPC64_DTPREL16_DS 3926 -- : BFD_RELOC_PPC64_DTPREL16_LO_DS 3927 -- : BFD_RELOC_PPC64_DTPREL16_HIGHER 3928 -- : BFD_RELOC_PPC64_DTPREL16_HIGHERA 3929 -- : BFD_RELOC_PPC64_DTPREL16_HIGHEST 3930 -- : BFD_RELOC_PPC64_DTPREL16_HIGHESTA 3931 PowerPC and PowerPC64 thread-local storage relocations. 3932 3933 -- : BFD_RELOC_I370_D12 3934 IBM 370/390 relocations 3935 3936 -- : BFD_RELOC_CTOR 3937 The type of reloc used to build a constructor table - at the moment 3938 probably a 32 bit wide absolute relocation, but the target can 3939 choose. It generally does map to one of the other relocation 3940 types. 3941 3942 -- : BFD_RELOC_ARM_PCREL_BRANCH 3943 ARM 26 bit pc-relative branch. The lowest two bits must be zero 3944 and are not stored in the instruction. 3945 3946 -- : BFD_RELOC_ARM_PCREL_BLX 3947 ARM 26 bit pc-relative branch. The lowest bit must be zero and is 3948 not stored in the instruction. The 2nd lowest bit comes from a 1 3949 bit field in the instruction. 3950 3951 -- : BFD_RELOC_THUMB_PCREL_BLX 3952 Thumb 22 bit pc-relative branch. The lowest bit must be zero and 3953 is not stored in the instruction. The 2nd lowest bit comes from a 3954 1 bit field in the instruction. 3955 3956 -- : BFD_RELOC_ARM_PCREL_CALL 3957 ARM 26-bit pc-relative branch for an unconditional BL or BLX 3958 instruction. 3959 3960 -- : BFD_RELOC_ARM_PCREL_JUMP 3961 ARM 26-bit pc-relative branch for B or conditional BL instruction. 3962 3963 -- : BFD_RELOC_THUMB_PCREL_BRANCH7 3964 -- : BFD_RELOC_THUMB_PCREL_BRANCH9 3965 -- : BFD_RELOC_THUMB_PCREL_BRANCH12 3966 -- : BFD_RELOC_THUMB_PCREL_BRANCH20 3967 -- : BFD_RELOC_THUMB_PCREL_BRANCH23 3968 -- : BFD_RELOC_THUMB_PCREL_BRANCH25 3969 Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches. The 3970 lowest bit must be zero and is not stored in the instruction. 3971 Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an 3972 "nn" one smaller in all cases. Note further that BRANCH23 3973 corresponds to R_ARM_THM_CALL. 3974 3975 -- : BFD_RELOC_ARM_OFFSET_IMM 3976 12-bit immediate offset, used in ARM-format ldr and str 3977 instructions. 3978 3979 -- : BFD_RELOC_ARM_THUMB_OFFSET 3980 5-bit immediate offset, used in Thumb-format ldr and str 3981 instructions. 3982 3983 -- : BFD_RELOC_ARM_TARGET1 3984 Pc-relative or absolute relocation depending on target. Used for 3985 entries in .init_array sections. 3986 3987 -- : BFD_RELOC_ARM_ROSEGREL32 3988 Read-only segment base relative address. 3989 3990 -- : BFD_RELOC_ARM_SBREL32 3991 Data segment base relative address. 3992 3993 -- : BFD_RELOC_ARM_TARGET2 3994 This reloc is used for references to RTTI data from exception 3995 handling tables. The actual definition depends on the target. It 3996 may be a pc-relative or some form of GOT-indirect relocation. 3997 3998 -- : BFD_RELOC_ARM_PREL31 3999 31-bit PC relative address. 4000 4001 -- : BFD_RELOC_ARM_MOVW 4002 -- : BFD_RELOC_ARM_MOVT 4003 -- : BFD_RELOC_ARM_MOVW_PCREL 4004 -- : BFD_RELOC_ARM_MOVT_PCREL 4005 -- : BFD_RELOC_ARM_THUMB_MOVW 4006 -- : BFD_RELOC_ARM_THUMB_MOVT 4007 -- : BFD_RELOC_ARM_THUMB_MOVW_PCREL 4008 -- : BFD_RELOC_ARM_THUMB_MOVT_PCREL 4009 Low and High halfword relocations for MOVW and MOVT instructions. 4010 4011 -- : BFD_RELOC_ARM_JUMP_SLOT 4012 -- : BFD_RELOC_ARM_GLOB_DAT 4013 -- : BFD_RELOC_ARM_GOT32 4014 -- : BFD_RELOC_ARM_PLT32 4015 -- : BFD_RELOC_ARM_RELATIVE 4016 -- : BFD_RELOC_ARM_GOTOFF 4017 -- : BFD_RELOC_ARM_GOTPC 4018 Relocations for setting up GOTs and PLTs for shared libraries. 4019 4020 -- : BFD_RELOC_ARM_TLS_GD32 4021 -- : BFD_RELOC_ARM_TLS_LDO32 4022 -- : BFD_RELOC_ARM_TLS_LDM32 4023 -- : BFD_RELOC_ARM_TLS_DTPOFF32 4024 -- : BFD_RELOC_ARM_TLS_DTPMOD32 4025 -- : BFD_RELOC_ARM_TLS_TPOFF32 4026 -- : BFD_RELOC_ARM_TLS_IE32 4027 -- : BFD_RELOC_ARM_TLS_LE32 4028 ARM thread-local storage relocations. 4029 4030 -- : BFD_RELOC_ARM_ALU_PC_G0_NC 4031 -- : BFD_RELOC_ARM_ALU_PC_G0 4032 -- : BFD_RELOC_ARM_ALU_PC_G1_NC 4033 -- : BFD_RELOC_ARM_ALU_PC_G1 4034 -- : BFD_RELOC_ARM_ALU_PC_G2 4035 -- : BFD_RELOC_ARM_LDR_PC_G0 4036 -- : BFD_RELOC_ARM_LDR_PC_G1 4037 -- : BFD_RELOC_ARM_LDR_PC_G2 4038 -- : BFD_RELOC_ARM_LDRS_PC_G0 4039 -- : BFD_RELOC_ARM_LDRS_PC_G1 4040 -- : BFD_RELOC_ARM_LDRS_PC_G2 4041 -- : BFD_RELOC_ARM_LDC_PC_G0 4042 -- : BFD_RELOC_ARM_LDC_PC_G1 4043 -- : BFD_RELOC_ARM_LDC_PC_G2 4044 -- : BFD_RELOC_ARM_ALU_SB_G0_NC 4045 -- : BFD_RELOC_ARM_ALU_SB_G0 4046 -- : BFD_RELOC_ARM_ALU_SB_G1_NC 4047 -- : BFD_RELOC_ARM_ALU_SB_G1 4048 -- : BFD_RELOC_ARM_ALU_SB_G2 4049 -- : BFD_RELOC_ARM_LDR_SB_G0 4050 -- : BFD_RELOC_ARM_LDR_SB_G1 4051 -- : BFD_RELOC_ARM_LDR_SB_G2 4052 -- : BFD_RELOC_ARM_LDRS_SB_G0 4053 -- : BFD_RELOC_ARM_LDRS_SB_G1 4054 -- : BFD_RELOC_ARM_LDRS_SB_G2 4055 -- : BFD_RELOC_ARM_LDC_SB_G0 4056 -- : BFD_RELOC_ARM_LDC_SB_G1 4057 -- : BFD_RELOC_ARM_LDC_SB_G2 4058 ARM group relocations. 4059 4060 -- : BFD_RELOC_ARM_V4BX 4061 Annotation of BX instructions. 4062 4063 -- : BFD_RELOC_ARM_IMMEDIATE 4064 -- : BFD_RELOC_ARM_ADRL_IMMEDIATE 4065 -- : BFD_RELOC_ARM_T32_IMMEDIATE 4066 -- : BFD_RELOC_ARM_T32_ADD_IMM 4067 -- : BFD_RELOC_ARM_T32_IMM12 4068 -- : BFD_RELOC_ARM_T32_ADD_PC12 4069 -- : BFD_RELOC_ARM_SHIFT_IMM 4070 -- : BFD_RELOC_ARM_SMC 4071 -- : BFD_RELOC_ARM_SWI 4072 -- : BFD_RELOC_ARM_MULTI 4073 -- : BFD_RELOC_ARM_CP_OFF_IMM 4074 -- : BFD_RELOC_ARM_CP_OFF_IMM_S2 4075 -- : BFD_RELOC_ARM_T32_CP_OFF_IMM 4076 -- : BFD_RELOC_ARM_T32_CP_OFF_IMM_S2 4077 -- : BFD_RELOC_ARM_ADR_IMM 4078 -- : BFD_RELOC_ARM_LDR_IMM 4079 -- : BFD_RELOC_ARM_LITERAL 4080 -- : BFD_RELOC_ARM_IN_POOL 4081 -- : BFD_RELOC_ARM_OFFSET_IMM8 4082 -- : BFD_RELOC_ARM_T32_OFFSET_U8 4083 -- : BFD_RELOC_ARM_T32_OFFSET_IMM 4084 -- : BFD_RELOC_ARM_HWLITERAL 4085 -- : BFD_RELOC_ARM_THUMB_ADD 4086 -- : BFD_RELOC_ARM_THUMB_IMM 4087 -- : BFD_RELOC_ARM_THUMB_SHIFT 4088 These relocs are only used within the ARM assembler. They are not 4089 (at present) written to any object files. 4090 4091 -- : BFD_RELOC_SH_PCDISP8BY2 4092 -- : BFD_RELOC_SH_PCDISP12BY2 4093 -- : BFD_RELOC_SH_IMM3 4094 -- : BFD_RELOC_SH_IMM3U 4095 -- : BFD_RELOC_SH_DISP12 4096 -- : BFD_RELOC_SH_DISP12BY2 4097 -- : BFD_RELOC_SH_DISP12BY4 4098 -- : BFD_RELOC_SH_DISP12BY8 4099 -- : BFD_RELOC_SH_DISP20 4100 -- : BFD_RELOC_SH_DISP20BY8 4101 -- : BFD_RELOC_SH_IMM4 4102 -- : BFD_RELOC_SH_IMM4BY2 4103 -- : BFD_RELOC_SH_IMM4BY4 4104 -- : BFD_RELOC_SH_IMM8 4105 -- : BFD_RELOC_SH_IMM8BY2 4106 -- : BFD_RELOC_SH_IMM8BY4 4107 -- : BFD_RELOC_SH_PCRELIMM8BY2 4108 -- : BFD_RELOC_SH_PCRELIMM8BY4 4109 -- : BFD_RELOC_SH_SWITCH16 4110 -- : BFD_RELOC_SH_SWITCH32 4111 -- : BFD_RELOC_SH_USES 4112 -- : BFD_RELOC_SH_COUNT 4113 -- : BFD_RELOC_SH_ALIGN 4114 -- : BFD_RELOC_SH_CODE 4115 -- : BFD_RELOC_SH_DATA 4116 -- : BFD_RELOC_SH_LABEL 4117 -- : BFD_RELOC_SH_LOOP_START 4118 -- : BFD_RELOC_SH_LOOP_END 4119 -- : BFD_RELOC_SH_COPY 4120 -- : BFD_RELOC_SH_GLOB_DAT 4121 -- : BFD_RELOC_SH_JMP_SLOT 4122 -- : BFD_RELOC_SH_RELATIVE 4123 -- : BFD_RELOC_SH_GOTPC 4124 -- : BFD_RELOC_SH_GOT_LOW16 4125 -- : BFD_RELOC_SH_GOT_MEDLOW16 4126 -- : BFD_RELOC_SH_GOT_MEDHI16 4127 -- : BFD_RELOC_SH_GOT_HI16 4128 -- : BFD_RELOC_SH_GOTPLT_LOW16 4129 -- : BFD_RELOC_SH_GOTPLT_MEDLOW16 4130 -- : BFD_RELOC_SH_GOTPLT_MEDHI16 4131 -- : BFD_RELOC_SH_GOTPLT_HI16 4132 -- : BFD_RELOC_SH_PLT_LOW16 4133 -- : BFD_RELOC_SH_PLT_MEDLOW16 4134 -- : BFD_RELOC_SH_PLT_MEDHI16 4135 -- : BFD_RELOC_SH_PLT_HI16 4136 -- : BFD_RELOC_SH_GOTOFF_LOW16 4137 -- : BFD_RELOC_SH_GOTOFF_MEDLOW16 4138 -- : BFD_RELOC_SH_GOTOFF_MEDHI16 4139 -- : BFD_RELOC_SH_GOTOFF_HI16 4140 -- : BFD_RELOC_SH_GOTPC_LOW16 4141 -- : BFD_RELOC_SH_GOTPC_MEDLOW16 4142 -- : BFD_RELOC_SH_GOTPC_MEDHI16 4143 -- : BFD_RELOC_SH_GOTPC_HI16 4144 -- : BFD_RELOC_SH_COPY64 4145 -- : BFD_RELOC_SH_GLOB_DAT64 4146 -- : BFD_RELOC_SH_JMP_SLOT64 4147 -- : BFD_RELOC_SH_RELATIVE64 4148 -- : BFD_RELOC_SH_GOT10BY4 4149 -- : BFD_RELOC_SH_GOT10BY8 4150 -- : BFD_RELOC_SH_GOTPLT10BY4 4151 -- : BFD_RELOC_SH_GOTPLT10BY8 4152 -- : BFD_RELOC_SH_GOTPLT32 4153 -- : BFD_RELOC_SH_SHMEDIA_CODE 4154 -- : BFD_RELOC_SH_IMMU5 4155 -- : BFD_RELOC_SH_IMMS6 4156 -- : BFD_RELOC_SH_IMMS6BY32 4157 -- : BFD_RELOC_SH_IMMU6 4158 -- : BFD_RELOC_SH_IMMS10 4159 -- : BFD_RELOC_SH_IMMS10BY2 4160 -- : BFD_RELOC_SH_IMMS10BY4 4161 -- : BFD_RELOC_SH_IMMS10BY8 4162 -- : BFD_RELOC_SH_IMMS16 4163 -- : BFD_RELOC_SH_IMMU16 4164 -- : BFD_RELOC_SH_IMM_LOW16 4165 -- : BFD_RELOC_SH_IMM_LOW16_PCREL 4166 -- : BFD_RELOC_SH_IMM_MEDLOW16 4167 -- : BFD_RELOC_SH_IMM_MEDLOW16_PCREL 4168 -- : BFD_RELOC_SH_IMM_MEDHI16 4169 -- : BFD_RELOC_SH_IMM_MEDHI16_PCREL 4170 -- : BFD_RELOC_SH_IMM_HI16 4171 -- : BFD_RELOC_SH_IMM_HI16_PCREL 4172 -- : BFD_RELOC_SH_PT_16 4173 -- : BFD_RELOC_SH_TLS_GD_32 4174 -- : BFD_RELOC_SH_TLS_LD_32 4175 -- : BFD_RELOC_SH_TLS_LDO_32 4176 -- : BFD_RELOC_SH_TLS_IE_32 4177 -- : BFD_RELOC_SH_TLS_LE_32 4178 -- : BFD_RELOC_SH_TLS_DTPMOD32 4179 -- : BFD_RELOC_SH_TLS_DTPOFF32 4180 -- : BFD_RELOC_SH_TLS_TPOFF32 4181 Renesas / SuperH SH relocs. Not all of these appear in object 4182 files. 4183 4184 -- : BFD_RELOC_ARC_B22_PCREL 4185 ARC Cores relocs. ARC 22 bit pc-relative branch. The lowest two 4186 bits must be zero and are not stored in the instruction. The high 4187 20 bits are installed in bits 26 through 7 of the instruction. 4188 4189 -- : BFD_RELOC_ARC_B26 4190 ARC 26 bit absolute branch. The lowest two bits must be zero and 4191 are not stored in the instruction. The high 24 bits are installed 4192 in bits 23 through 0. 4193 4194 -- : BFD_RELOC_BFIN_16_IMM 4195 ADI Blackfin 16 bit immediate absolute reloc. 4196 4197 -- : BFD_RELOC_BFIN_16_HIGH 4198 ADI Blackfin 16 bit immediate absolute reloc higher 16 bits. 4199 4200 -- : BFD_RELOC_BFIN_4_PCREL 4201 ADI Blackfin 'a' part of LSETUP. 4202 4203 -- : BFD_RELOC_BFIN_5_PCREL 4204 ADI Blackfin. 4205 4206 -- : BFD_RELOC_BFIN_16_LOW 4207 ADI Blackfin 16 bit immediate absolute reloc lower 16 bits. 4208 4209 -- : BFD_RELOC_BFIN_10_PCREL 4210 ADI Blackfin. 4211 4212 -- : BFD_RELOC_BFIN_11_PCREL 4213 ADI Blackfin 'b' part of LSETUP. 4214 4215 -- : BFD_RELOC_BFIN_12_PCREL_JUMP 4216 ADI Blackfin. 4217 4218 -- : BFD_RELOC_BFIN_12_PCREL_JUMP_S 4219 ADI Blackfin Short jump, pcrel. 4220 4221 -- : BFD_RELOC_BFIN_24_PCREL_CALL_X 4222 ADI Blackfin Call.x not implemented. 4223 4224 -- : BFD_RELOC_BFIN_24_PCREL_JUMP_L 4225 ADI Blackfin Long Jump pcrel. 4226 4227 -- : BFD_RELOC_BFIN_GOT17M4 4228 -- : BFD_RELOC_BFIN_GOTHI 4229 -- : BFD_RELOC_BFIN_GOTLO 4230 -- : BFD_RELOC_BFIN_FUNCDESC 4231 -- : BFD_RELOC_BFIN_FUNCDESC_GOT17M4 4232 -- : BFD_RELOC_BFIN_FUNCDESC_GOTHI 4233 -- : BFD_RELOC_BFIN_FUNCDESC_GOTLO 4234 -- : BFD_RELOC_BFIN_FUNCDESC_VALUE 4235 -- : BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4 4236 -- : BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI 4237 -- : BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO 4238 -- : BFD_RELOC_BFIN_GOTOFF17M4 4239 -- : BFD_RELOC_BFIN_GOTOFFHI 4240 -- : BFD_RELOC_BFIN_GOTOFFLO 4241 ADI Blackfin FD-PIC relocations. 4242 4243 -- : BFD_RELOC_BFIN_GOT 4244 ADI Blackfin GOT relocation. 4245 4246 -- : BFD_RELOC_BFIN_PLTPC 4247 ADI Blackfin PLTPC relocation. 4248 4249 -- : BFD_ARELOC_BFIN_PUSH 4250 ADI Blackfin arithmetic relocation. 4251 4252 -- : BFD_ARELOC_BFIN_CONST 4253 ADI Blackfin arithmetic relocation. 4254 4255 -- : BFD_ARELOC_BFIN_ADD 4256 ADI Blackfin arithmetic relocation. 4257 4258 -- : BFD_ARELOC_BFIN_SUB 4259 ADI Blackfin arithmetic relocation. 4260 4261 -- : BFD_ARELOC_BFIN_MULT 4262 ADI Blackfin arithmetic relocation. 4263 4264 -- : BFD_ARELOC_BFIN_DIV 4265 ADI Blackfin arithmetic relocation. 4266 4267 -- : BFD_ARELOC_BFIN_MOD 4268 ADI Blackfin arithmetic relocation. 4269 4270 -- : BFD_ARELOC_BFIN_LSHIFT 4271 ADI Blackfin arithmetic relocation. 4272 4273 -- : BFD_ARELOC_BFIN_RSHIFT 4274 ADI Blackfin arithmetic relocation. 4275 4276 -- : BFD_ARELOC_BFIN_AND 4277 ADI Blackfin arithmetic relocation. 4278 4279 -- : BFD_ARELOC_BFIN_OR 4280 ADI Blackfin arithmetic relocation. 4281 4282 -- : BFD_ARELOC_BFIN_XOR 4283 ADI Blackfin arithmetic relocation. 4284 4285 -- : BFD_ARELOC_BFIN_LAND 4286 ADI Blackfin arithmetic relocation. 4287 4288 -- : BFD_ARELOC_BFIN_LOR 4289 ADI Blackfin arithmetic relocation. 4290 4291 -- : BFD_ARELOC_BFIN_LEN 4292 ADI Blackfin arithmetic relocation. 4293 4294 -- : BFD_ARELOC_BFIN_NEG 4295 ADI Blackfin arithmetic relocation. 4296 4297 -- : BFD_ARELOC_BFIN_COMP 4298 ADI Blackfin arithmetic relocation. 4299 4300 -- : BFD_ARELOC_BFIN_PAGE 4301 ADI Blackfin arithmetic relocation. 4302 4303 -- : BFD_ARELOC_BFIN_HWPAGE 4304 ADI Blackfin arithmetic relocation. 4305 4306 -- : BFD_ARELOC_BFIN_ADDR 4307 ADI Blackfin arithmetic relocation. 4308 4309 -- : BFD_RELOC_D10V_10_PCREL_R 4310 Mitsubishi D10V relocs. This is a 10-bit reloc with the right 2 4311 bits assumed to be 0. 4312 4313 -- : BFD_RELOC_D10V_10_PCREL_L 4314 Mitsubishi D10V relocs. This is a 10-bit reloc with the right 2 4315 bits assumed to be 0. This is the same as the previous reloc 4316 except it is in the left container, i.e., shifted left 15 bits. 4317 4318 -- : BFD_RELOC_D10V_18 4319 This is an 18-bit reloc with the right 2 bits assumed to be 0. 4320 4321 -- : BFD_RELOC_D10V_18_PCREL 4322 This is an 18-bit reloc with the right 2 bits assumed to be 0. 4323 4324 -- : BFD_RELOC_D30V_6 4325 Mitsubishi D30V relocs. This is a 6-bit absolute reloc. 4326 4327 -- : BFD_RELOC_D30V_9_PCREL 4328 This is a 6-bit pc-relative reloc with the right 3 bits assumed to 4329 be 0. 4330 4331 -- : BFD_RELOC_D30V_9_PCREL_R 4332 This is a 6-bit pc-relative reloc with the right 3 bits assumed to 4333 be 0. Same as the previous reloc but on the right side of the 4334 container. 4335 4336 -- : BFD_RELOC_D30V_15 4337 This is a 12-bit absolute reloc with the right 3 bitsassumed to be 4338 0. 4339 4340 -- : BFD_RELOC_D30V_15_PCREL 4341 This is a 12-bit pc-relative reloc with the right 3 bits assumed 4342 to be 0. 4343 4344 -- : BFD_RELOC_D30V_15_PCREL_R 4345 This is a 12-bit pc-relative reloc with the right 3 bits assumed 4346 to be 0. Same as the previous reloc but on the right side of the 4347 container. 4348 4349 -- : BFD_RELOC_D30V_21 4350 This is an 18-bit absolute reloc with the right 3 bits assumed to 4351 be 0. 4352 4353 -- : BFD_RELOC_D30V_21_PCREL 4354 This is an 18-bit pc-relative reloc with the right 3 bits assumed 4355 to be 0. 4356 4357 -- : BFD_RELOC_D30V_21_PCREL_R 4358 This is an 18-bit pc-relative reloc with the right 3 bits assumed 4359 to be 0. Same as the previous reloc but on the right side of the 4360 container. 4361 4362 -- : BFD_RELOC_D30V_32 4363 This is a 32-bit absolute reloc. 4364 4365 -- : BFD_RELOC_D30V_32_PCREL 4366 This is a 32-bit pc-relative reloc. 4367 4368 -- : BFD_RELOC_DLX_HI16_S 4369 DLX relocs 4370 4371 -- : BFD_RELOC_DLX_LO16 4372 DLX relocs 4373 4374 -- : BFD_RELOC_DLX_JMP26 4375 DLX relocs 4376 4377 -- : BFD_RELOC_M32C_HI8 4378 -- : BFD_RELOC_M32C_RL_JUMP 4379 -- : BFD_RELOC_M32C_RL_1ADDR 4380 -- : BFD_RELOC_M32C_RL_2ADDR 4381 Renesas M16C/M32C Relocations. 4382 4383 -- : BFD_RELOC_M32R_24 4384 Renesas M32R (formerly Mitsubishi M32R) relocs. This is a 24 bit 4385 absolute address. 4386 4387 -- : BFD_RELOC_M32R_10_PCREL 4388 This is a 10-bit pc-relative reloc with the right 2 bits assumed 4389 to be 0. 4390 4391 -- : BFD_RELOC_M32R_18_PCREL 4392 This is an 18-bit reloc with the right 2 bits assumed to be 0. 4393 4394 -- : BFD_RELOC_M32R_26_PCREL 4395 This is a 26-bit reloc with the right 2 bits assumed to be 0. 4396 4397 -- : BFD_RELOC_M32R_HI16_ULO 4398 This is a 16-bit reloc containing the high 16 bits of an address 4399 used when the lower 16 bits are treated as unsigned. 4400 4401 -- : BFD_RELOC_M32R_HI16_SLO 4402 This is a 16-bit reloc containing the high 16 bits of an address 4403 used when the lower 16 bits are treated as signed. 4404 4405 -- : BFD_RELOC_M32R_LO16 4406 This is a 16-bit reloc containing the lower 16 bits of an address. 4407 4408 -- : BFD_RELOC_M32R_SDA16 4409 This is a 16-bit reloc containing the small data area offset for 4410 use in add3, load, and store instructions. 4411 4412 -- : BFD_RELOC_M32R_GOT24 4413 -- : BFD_RELOC_M32R_26_PLTREL 4414 -- : BFD_RELOC_M32R_COPY 4415 -- : BFD_RELOC_M32R_GLOB_DAT 4416 -- : BFD_RELOC_M32R_JMP_SLOT 4417 -- : BFD_RELOC_M32R_RELATIVE 4418 -- : BFD_RELOC_M32R_GOTOFF 4419 -- : BFD_RELOC_M32R_GOTOFF_HI_ULO 4420 -- : BFD_RELOC_M32R_GOTOFF_HI_SLO 4421 -- : BFD_RELOC_M32R_GOTOFF_LO 4422 -- : BFD_RELOC_M32R_GOTPC24 4423 -- : BFD_RELOC_M32R_GOT16_HI_ULO 4424 -- : BFD_RELOC_M32R_GOT16_HI_SLO 4425 -- : BFD_RELOC_M32R_GOT16_LO 4426 -- : BFD_RELOC_M32R_GOTPC_HI_ULO 4427 -- : BFD_RELOC_M32R_GOTPC_HI_SLO 4428 -- : BFD_RELOC_M32R_GOTPC_LO 4429 For PIC. 4430 4431 -- : BFD_RELOC_V850_9_PCREL 4432 This is a 9-bit reloc 4433 4434 -- : BFD_RELOC_V850_22_PCREL 4435 This is a 22-bit reloc 4436 4437 -- : BFD_RELOC_V850_SDA_16_16_OFFSET 4438 This is a 16 bit offset from the short data area pointer. 4439 4440 -- : BFD_RELOC_V850_SDA_15_16_OFFSET 4441 This is a 16 bit offset (of which only 15 bits are used) from the 4442 short data area pointer. 4443 4444 -- : BFD_RELOC_V850_ZDA_16_16_OFFSET 4445 This is a 16 bit offset from the zero data area pointer. 4446 4447 -- : BFD_RELOC_V850_ZDA_15_16_OFFSET 4448 This is a 16 bit offset (of which only 15 bits are used) from the 4449 zero data area pointer. 4450 4451 -- : BFD_RELOC_V850_TDA_6_8_OFFSET 4452 This is an 8 bit offset (of which only 6 bits are used) from the 4453 tiny data area pointer. 4454 4455 -- : BFD_RELOC_V850_TDA_7_8_OFFSET 4456 This is an 8bit offset (of which only 7 bits are used) from the 4457 tiny data area pointer. 4458 4459 -- : BFD_RELOC_V850_TDA_7_7_OFFSET 4460 This is a 7 bit offset from the tiny data area pointer. 4461 4462 -- : BFD_RELOC_V850_TDA_16_16_OFFSET 4463 This is a 16 bit offset from the tiny data area pointer. 4464 4465 -- : BFD_RELOC_V850_TDA_4_5_OFFSET 4466 This is a 5 bit offset (of which only 4 bits are used) from the 4467 tiny data area pointer. 4468 4469 -- : BFD_RELOC_V850_TDA_4_4_OFFSET 4470 This is a 4 bit offset from the tiny data area pointer. 4471 4472 -- : BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET 4473 This is a 16 bit offset from the short data area pointer, with the 4474 bits placed non-contiguously in the instruction. 4475 4476 -- : BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET 4477 This is a 16 bit offset from the zero data area pointer, with the 4478 bits placed non-contiguously in the instruction. 4479 4480 -- : BFD_RELOC_V850_CALLT_6_7_OFFSET 4481 This is a 6 bit offset from the call table base pointer. 4482 4483 -- : BFD_RELOC_V850_CALLT_16_16_OFFSET 4484 This is a 16 bit offset from the call table base pointer. 4485 4486 -- : BFD_RELOC_V850_LONGCALL 4487 Used for relaxing indirect function calls. 4488 4489 -- : BFD_RELOC_V850_LONGJUMP 4490 Used for relaxing indirect jumps. 4491 4492 -- : BFD_RELOC_V850_ALIGN 4493 Used to maintain alignment whilst relaxing. 4494 4495 -- : BFD_RELOC_V850_LO16_SPLIT_OFFSET 4496 This is a variation of BFD_RELOC_LO16 that can be used in v850e 4497 ld.bu instructions. 4498 4499 -- : BFD_RELOC_MN10300_32_PCREL 4500 This is a 32bit pcrel reloc for the mn10300, offset by two bytes 4501 in the instruction. 4502 4503 -- : BFD_RELOC_MN10300_16_PCREL 4504 This is a 16bit pcrel reloc for the mn10300, offset by two bytes 4505 in the instruction. 4506 4507 -- : BFD_RELOC_TIC30_LDP 4508 This is a 8bit DP reloc for the tms320c30, where the most 4509 significant 8 bits of a 24 bit word are placed into the least 4510 significant 8 bits of the opcode. 4511 4512 -- : BFD_RELOC_TIC54X_PARTLS7 4513 This is a 7bit reloc for the tms320c54x, where the least 4514 significant 7 bits of a 16 bit word are placed into the least 4515 significant 7 bits of the opcode. 4516 4517 -- : BFD_RELOC_TIC54X_PARTMS9 4518 This is a 9bit DP reloc for the tms320c54x, where the most 4519 significant 9 bits of a 16 bit word are placed into the least 4520 significant 9 bits of the opcode. 4521 4522 -- : BFD_RELOC_TIC54X_23 4523 This is an extended address 23-bit reloc for the tms320c54x. 4524 4525 -- : BFD_RELOC_TIC54X_16_OF_23 4526 This is a 16-bit reloc for the tms320c54x, where the least 4527 significant 16 bits of a 23-bit extended address are placed into 4528 the opcode. 4529 4530 -- : BFD_RELOC_TIC54X_MS7_OF_23 4531 This is a reloc for the tms320c54x, where the most significant 7 4532 bits of a 23-bit extended address are placed into the opcode. 4533 4534 -- : BFD_RELOC_FR30_48 4535 This is a 48 bit reloc for the FR30 that stores 32 bits. 4536 4537 -- : BFD_RELOC_FR30_20 4538 This is a 32 bit reloc for the FR30 that stores 20 bits split up 4539 into two sections. 4540 4541 -- : BFD_RELOC_FR30_6_IN_4 4542 This is a 16 bit reloc for the FR30 that stores a 6 bit word 4543 offset in 4 bits. 4544 4545 -- : BFD_RELOC_FR30_8_IN_8 4546 This is a 16 bit reloc for the FR30 that stores an 8 bit byte 4547 offset into 8 bits. 4548 4549 -- : BFD_RELOC_FR30_9_IN_8 4550 This is a 16 bit reloc for the FR30 that stores a 9 bit short 4551 offset into 8 bits. 4552 4553 -- : BFD_RELOC_FR30_10_IN_8 4554 This is a 16 bit reloc for the FR30 that stores a 10 bit word 4555 offset into 8 bits. 4556 4557 -- : BFD_RELOC_FR30_9_PCREL 4558 This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative 4559 short offset into 8 bits. 4560 4561 -- : BFD_RELOC_FR30_12_PCREL 4562 This is a 16 bit reloc for the FR30 that stores a 12 bit pc 4563 relative short offset into 11 bits. 4564 4565 -- : BFD_RELOC_MCORE_PCREL_IMM8BY4 4566 -- : BFD_RELOC_MCORE_PCREL_IMM11BY2 4567 -- : BFD_RELOC_MCORE_PCREL_IMM4BY2 4568 -- : BFD_RELOC_MCORE_PCREL_32 4569 -- : BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2 4570 -- : BFD_RELOC_MCORE_RVA 4571 Motorola Mcore relocations. 4572 4573 -- : BFD_RELOC_MEP_8 4574 -- : BFD_RELOC_MEP_16 4575 -- : BFD_RELOC_MEP_32 4576 -- : BFD_RELOC_MEP_PCREL8A2 4577 -- : BFD_RELOC_MEP_PCREL12A2 4578 -- : BFD_RELOC_MEP_PCREL17A2 4579 -- : BFD_RELOC_MEP_PCREL24A2 4580 -- : BFD_RELOC_MEP_PCABS24A2 4581 -- : BFD_RELOC_MEP_LOW16 4582 -- : BFD_RELOC_MEP_HI16U 4583 -- : BFD_RELOC_MEP_HI16S 4584 -- : BFD_RELOC_MEP_GPREL 4585 -- : BFD_RELOC_MEP_TPREL 4586 -- : BFD_RELOC_MEP_TPREL7 4587 -- : BFD_RELOC_MEP_TPREL7A2 4588 -- : BFD_RELOC_MEP_TPREL7A4 4589 -- : BFD_RELOC_MEP_UIMM24 4590 -- : BFD_RELOC_MEP_ADDR24A4 4591 -- : BFD_RELOC_MEP_GNU_VTINHERIT 4592 -- : BFD_RELOC_MEP_GNU_VTENTRY 4593 Toshiba Media Processor Relocations. 4594 4595 -- : BFD_RELOC_MMIX_GETA 4596 -- : BFD_RELOC_MMIX_GETA_1 4597 -- : BFD_RELOC_MMIX_GETA_2 4598 -- : BFD_RELOC_MMIX_GETA_3 4599 These are relocations for the GETA instruction. 4600 4601 -- : BFD_RELOC_MMIX_CBRANCH 4602 -- : BFD_RELOC_MMIX_CBRANCH_J 4603 -- : BFD_RELOC_MMIX_CBRANCH_1 4604 -- : BFD_RELOC_MMIX_CBRANCH_2 4605 -- : BFD_RELOC_MMIX_CBRANCH_3 4606 These are relocations for a conditional branch instruction. 4607 4608 -- : BFD_RELOC_MMIX_PUSHJ 4609 -- : BFD_RELOC_MMIX_PUSHJ_1 4610 -- : BFD_RELOC_MMIX_PUSHJ_2 4611 -- : BFD_RELOC_MMIX_PUSHJ_3 4612 -- : BFD_RELOC_MMIX_PUSHJ_STUBBABLE 4613 These are relocations for the PUSHJ instruction. 4614 4615 -- : BFD_RELOC_MMIX_JMP 4616 -- : BFD_RELOC_MMIX_JMP_1 4617 -- : BFD_RELOC_MMIX_JMP_2 4618 -- : BFD_RELOC_MMIX_JMP_3 4619 These are relocations for the JMP instruction. 4620 4621 -- : BFD_RELOC_MMIX_ADDR19 4622 This is a relocation for a relative address as in a GETA 4623 instruction or a branch. 4624 4625 -- : BFD_RELOC_MMIX_ADDR27 4626 This is a relocation for a relative address as in a JMP 4627 instruction. 4628 4629 -- : BFD_RELOC_MMIX_REG_OR_BYTE 4630 This is a relocation for an instruction field that may be a general 4631 register or a value 0..255. 4632 4633 -- : BFD_RELOC_MMIX_REG 4634 This is a relocation for an instruction field that may be a general 4635 register. 4636 4637 -- : BFD_RELOC_MMIX_BASE_PLUS_OFFSET 4638 This is a relocation for two instruction fields holding a register 4639 and an offset, the equivalent of the relocation. 4640 4641 -- : BFD_RELOC_MMIX_LOCAL 4642 This relocation is an assertion that the expression is not 4643 allocated as a global register. It does not modify contents. 4644 4645 -- : BFD_RELOC_AVR_7_PCREL 4646 This is a 16 bit reloc for the AVR that stores 8 bit pc relative 4647 short offset into 7 bits. 4648 4649 -- : BFD_RELOC_AVR_13_PCREL 4650 This is a 16 bit reloc for the AVR that stores 13 bit pc relative 4651 short offset into 12 bits. 4652 4653 -- : BFD_RELOC_AVR_16_PM 4654 This is a 16 bit reloc for the AVR that stores 17 bit value 4655 (usually program memory address) into 16 bits. 4656 4657 -- : BFD_RELOC_AVR_LO8_LDI 4658 This is a 16 bit reloc for the AVR that stores 8 bit value (usually 4659 data memory address) into 8 bit immediate value of LDI insn. 4660 4661 -- : BFD_RELOC_AVR_HI8_LDI 4662 This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 4663 bit of data memory address) into 8 bit immediate value of LDI insn. 4664 4665 -- : BFD_RELOC_AVR_HH8_LDI 4666 This is a 16 bit reloc for the AVR that stores 8 bit value (most 4667 high 8 bit of program memory address) into 8 bit immediate value 4668 of LDI insn. 4669 4670 -- : BFD_RELOC_AVR_MS8_LDI 4671 This is a 16 bit reloc for the AVR that stores 8 bit value (most 4672 high 8 bit of 32 bit value) into 8 bit immediate value of LDI insn. 4673 4674 -- : BFD_RELOC_AVR_LO8_LDI_NEG 4675 This is a 16 bit reloc for the AVR that stores negated 8 bit value 4676 (usually data memory address) into 8 bit immediate value of SUBI 4677 insn. 4678 4679 -- : BFD_RELOC_AVR_HI8_LDI_NEG 4680 This is a 16 bit reloc for the AVR that stores negated 8 bit value 4681 (high 8 bit of data memory address) into 8 bit immediate value of 4682 SUBI insn. 4683 4684 -- : BFD_RELOC_AVR_HH8_LDI_NEG 4685 This is a 16 bit reloc for the AVR that stores negated 8 bit value 4686 (most high 8 bit of program memory address) into 8 bit immediate 4687 value of LDI or SUBI insn. 4688 4689 -- : BFD_RELOC_AVR_MS8_LDI_NEG 4690 This is a 16 bit reloc for the AVR that stores negated 8 bit value 4691 (msb of 32 bit value) into 8 bit immediate value of LDI insn. 4692 4693 -- : BFD_RELOC_AVR_LO8_LDI_PM 4694 This is a 16 bit reloc for the AVR that stores 8 bit value (usually 4695 command address) into 8 bit immediate value of LDI insn. 4696 4697 -- : BFD_RELOC_AVR_LO8_LDI_GS 4698 This is a 16 bit reloc for the AVR that stores 8 bit value 4699 (command address) into 8 bit immediate value of LDI insn. If the 4700 address is beyond the 128k boundary, the linker inserts a jump 4701 stub for this reloc in the lower 128k. 4702 4703 -- : BFD_RELOC_AVR_HI8_LDI_PM 4704 This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 4705 bit of command address) into 8 bit immediate value of LDI insn. 4706 4707 -- : BFD_RELOC_AVR_HI8_LDI_GS 4708 This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 4709 bit of command address) into 8 bit immediate value of LDI insn. 4710 If the address is beyond the 128k boundary, the linker inserts a 4711 jump stub for this reloc below 128k. 4712 4713 -- : BFD_RELOC_AVR_HH8_LDI_PM 4714 This is a 16 bit reloc for the AVR that stores 8 bit value (most 4715 high 8 bit of command address) into 8 bit immediate value of LDI 4716 insn. 4717 4718 -- : BFD_RELOC_AVR_LO8_LDI_PM_NEG 4719 This is a 16 bit reloc for the AVR that stores negated 8 bit value 4720 (usually command address) into 8 bit immediate value of SUBI insn. 4721 4722 -- : BFD_RELOC_AVR_HI8_LDI_PM_NEG 4723 This is a 16 bit reloc for the AVR that stores negated 8 bit value 4724 (high 8 bit of 16 bit command address) into 8 bit immediate value 4725 of SUBI insn. 4726 4727 -- : BFD_RELOC_AVR_HH8_LDI_PM_NEG 4728 This is a 16 bit reloc for the AVR that stores negated 8 bit value 4729 (high 6 bit of 22 bit command address) into 8 bit immediate value 4730 of SUBI insn. 4731 4732 -- : BFD_RELOC_AVR_CALL 4733 This is a 32 bit reloc for the AVR that stores 23 bit value into 4734 22 bits. 4735 4736 -- : BFD_RELOC_AVR_LDI 4737 This is a 16 bit reloc for the AVR that stores all needed bits for 4738 absolute addressing with ldi with overflow check to linktime 4739 4740 -- : BFD_RELOC_AVR_6 4741 This is a 6 bit reloc for the AVR that stores offset for ldd/std 4742 instructions 4743 4744 -- : BFD_RELOC_AVR_6_ADIW 4745 This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw 4746 instructions 4747 4748 -- : BFD_RELOC_RX_NEG8 4749 -- : BFD_RELOC_RX_NEG16 4750 -- : BFD_RELOC_RX_NEG24 4751 -- : BFD_RELOC_RX_NEG32 4752 -- : BFD_RELOC_RX_16_OP 4753 -- : BFD_RELOC_RX_24_OP 4754 -- : BFD_RELOC_RX_32_OP 4755 -- : BFD_RELOC_RX_8U 4756 -- : BFD_RELOC_RX_16U 4757 -- : BFD_RELOC_RX_24U 4758 -- : BFD_RELOC_RX_DIR3U_PCREL 4759 -- : BFD_RELOC_RX_DIFF 4760 -- : BFD_RELOC_RX_GPRELB 4761 -- : BFD_RELOC_RX_GPRELW 4762 -- : BFD_RELOC_RX_GPRELL 4763 -- : BFD_RELOC_RX_SYM 4764 -- : BFD_RELOC_RX_OP_SUBTRACT 4765 -- : BFD_RELOC_RX_ABS8 4766 -- : BFD_RELOC_RX_ABS16 4767 -- : BFD_RELOC_RX_ABS32 4768 -- : BFD_RELOC_RX_ABS16U 4769 -- : BFD_RELOC_RX_ABS16UW 4770 -- : BFD_RELOC_RX_ABS16UL 4771 -- : BFD_RELOC_RX_RELAX 4772 Renesas RX Relocations. 4773 4774 -- : BFD_RELOC_390_12 4775 Direct 12 bit. 4776 4777 -- : BFD_RELOC_390_GOT12 4778 12 bit GOT offset. 4779 4780 -- : BFD_RELOC_390_PLT32 4781 32 bit PC relative PLT address. 4782 4783 -- : BFD_RELOC_390_COPY 4784 Copy symbol at runtime. 4785 4786 -- : BFD_RELOC_390_GLOB_DAT 4787 Create GOT entry. 4788 4789 -- : BFD_RELOC_390_JMP_SLOT 4790 Create PLT entry. 4791 4792 -- : BFD_RELOC_390_RELATIVE 4793 Adjust by program base. 4794 4795 -- : BFD_RELOC_390_GOTPC 4796 32 bit PC relative offset to GOT. 4797 4798 -- : BFD_RELOC_390_GOT16 4799 16 bit GOT offset. 4800 4801 -- : BFD_RELOC_390_PC16DBL 4802 PC relative 16 bit shifted by 1. 4803 4804 -- : BFD_RELOC_390_PLT16DBL 4805 16 bit PC rel. PLT shifted by 1. 4806 4807 -- : BFD_RELOC_390_PC32DBL 4808 PC relative 32 bit shifted by 1. 4809 4810 -- : BFD_RELOC_390_PLT32DBL 4811 32 bit PC rel. PLT shifted by 1. 4812 4813 -- : BFD_RELOC_390_GOTPCDBL 4814 32 bit PC rel. GOT shifted by 1. 4815 4816 -- : BFD_RELOC_390_GOT64 4817 64 bit GOT offset. 4818 4819 -- : BFD_RELOC_390_PLT64 4820 64 bit PC relative PLT address. 4821 4822 -- : BFD_RELOC_390_GOTENT 4823 32 bit rel. offset to GOT entry. 4824 4825 -- : BFD_RELOC_390_GOTOFF64 4826 64 bit offset to GOT. 4827 4828 -- : BFD_RELOC_390_GOTPLT12 4829 12-bit offset to symbol-entry within GOT, with PLT handling. 4830 4831 -- : BFD_RELOC_390_GOTPLT16 4832 16-bit offset to symbol-entry within GOT, with PLT handling. 4833 4834 -- : BFD_RELOC_390_GOTPLT32 4835 32-bit offset to symbol-entry within GOT, with PLT handling. 4836 4837 -- : BFD_RELOC_390_GOTPLT64 4838 64-bit offset to symbol-entry within GOT, with PLT handling. 4839 4840 -- : BFD_RELOC_390_GOTPLTENT 4841 32-bit rel. offset to symbol-entry within GOT, with PLT handling. 4842 4843 -- : BFD_RELOC_390_PLTOFF16 4844 16-bit rel. offset from the GOT to a PLT entry. 4845 4846 -- : BFD_RELOC_390_PLTOFF32 4847 32-bit rel. offset from the GOT to a PLT entry. 4848 4849 -- : BFD_RELOC_390_PLTOFF64 4850 64-bit rel. offset from the GOT to a PLT entry. 4851 4852 -- : BFD_RELOC_390_TLS_LOAD 4853 -- : BFD_RELOC_390_TLS_GDCALL 4854 -- : BFD_RELOC_390_TLS_LDCALL 4855 -- : BFD_RELOC_390_TLS_GD32 4856 -- : BFD_RELOC_390_TLS_GD64 4857 -- : BFD_RELOC_390_TLS_GOTIE12 4858 -- : BFD_RELOC_390_TLS_GOTIE32 4859 -- : BFD_RELOC_390_TLS_GOTIE64 4860 -- : BFD_RELOC_390_TLS_LDM32 4861 -- : BFD_RELOC_390_TLS_LDM64 4862 -- : BFD_RELOC_390_TLS_IE32 4863 -- : BFD_RELOC_390_TLS_IE64 4864 -- : BFD_RELOC_390_TLS_IEENT 4865 -- : BFD_RELOC_390_TLS_LE32 4866 -- : BFD_RELOC_390_TLS_LE64 4867 -- : BFD_RELOC_390_TLS_LDO32 4868 -- : BFD_RELOC_390_TLS_LDO64 4869 -- : BFD_RELOC_390_TLS_DTPMOD 4870 -- : BFD_RELOC_390_TLS_DTPOFF 4871 -- : BFD_RELOC_390_TLS_TPOFF 4872 s390 tls relocations. 4873 4874 -- : BFD_RELOC_390_20 4875 -- : BFD_RELOC_390_GOT20 4876 -- : BFD_RELOC_390_GOTPLT20 4877 -- : BFD_RELOC_390_TLS_GOTIE20 4878 Long displacement extension. 4879 4880 -- : BFD_RELOC_SCORE_GPREL15 4881 Score relocations Low 16 bit for load/store 4882 4883 -- : BFD_RELOC_SCORE_DUMMY2 4884 -- : BFD_RELOC_SCORE_JMP 4885 This is a 24-bit reloc with the right 1 bit assumed to be 0 4886 4887 -- : BFD_RELOC_SCORE_BRANCH 4888 This is a 19-bit reloc with the right 1 bit assumed to be 0 4889 4890 -- : BFD_RELOC_SCORE_IMM30 4891 This is a 32-bit reloc for 48-bit instructions. 4892 4893 -- : BFD_RELOC_SCORE_IMM32 4894 This is a 32-bit reloc for 48-bit instructions. 4895 4896 -- : BFD_RELOC_SCORE16_JMP 4897 This is a 11-bit reloc with the right 1 bit assumed to be 0 4898 4899 -- : BFD_RELOC_SCORE16_BRANCH 4900 This is a 8-bit reloc with the right 1 bit assumed to be 0 4901 4902 -- : BFD_RELOC_SCORE_BCMP 4903 This is a 9-bit reloc with the right 1 bit assumed to be 0 4904 4905 -- : BFD_RELOC_SCORE_GOT15 4906 -- : BFD_RELOC_SCORE_GOT_LO16 4907 -- : BFD_RELOC_SCORE_CALL15 4908 -- : BFD_RELOC_SCORE_DUMMY_HI16 4909 Undocumented Score relocs 4910 4911 -- : BFD_RELOC_IP2K_FR9 4912 Scenix IP2K - 9-bit register number / data address 4913 4914 -- : BFD_RELOC_IP2K_BANK 4915 Scenix IP2K - 4-bit register/data bank number 4916 4917 -- : BFD_RELOC_IP2K_ADDR16CJP 4918 Scenix IP2K - low 13 bits of instruction word address 4919 4920 -- : BFD_RELOC_IP2K_PAGE3 4921 Scenix IP2K - high 3 bits of instruction word address 4922 4923 -- : BFD_RELOC_IP2K_LO8DATA 4924 -- : BFD_RELOC_IP2K_HI8DATA 4925 -- : BFD_RELOC_IP2K_EX8DATA 4926 Scenix IP2K - ext/low/high 8 bits of data address 4927 4928 -- : BFD_RELOC_IP2K_LO8INSN 4929 -- : BFD_RELOC_IP2K_HI8INSN 4930 Scenix IP2K - low/high 8 bits of instruction word address 4931 4932 -- : BFD_RELOC_IP2K_PC_SKIP 4933 Scenix IP2K - even/odd PC modifier to modify snb pcl.0 4934 4935 -- : BFD_RELOC_IP2K_TEXT 4936 Scenix IP2K - 16 bit word address in text section. 4937 4938 -- : BFD_RELOC_IP2K_FR_OFFSET 4939 Scenix IP2K - 7-bit sp or dp offset 4940 4941 -- : BFD_RELOC_VPE4KMATH_DATA 4942 -- : BFD_RELOC_VPE4KMATH_INSN 4943 Scenix VPE4K coprocessor - data/insn-space addressing 4944 4945 -- : BFD_RELOC_VTABLE_INHERIT 4946 -- : BFD_RELOC_VTABLE_ENTRY 4947 These two relocations are used by the linker to determine which of 4948 the entries in a C++ virtual function table are actually used. 4949 When the -gc-sections option is given, the linker will zero out 4950 the entries that are not used, so that the code for those 4951 functions need not be included in the output. 4952 4953 VTABLE_INHERIT is a zero-space relocation used to describe to the 4954 linker the inheritance tree of a C++ virtual function table. The 4955 relocation's symbol should be the parent class' vtable, and the 4956 relocation should be located at the child vtable. 4957 4958 VTABLE_ENTRY is a zero-space relocation that describes the use of a 4959 virtual function table entry. The reloc's symbol should refer to 4960 the table of the class mentioned in the code. Off of that base, 4961 an offset describes the entry that is being used. For Rela hosts, 4962 this offset is stored in the reloc's addend. For Rel hosts, we 4963 are forced to put this offset in the reloc's section offset. 4964 4965 -- : BFD_RELOC_IA64_IMM14 4966 -- : BFD_RELOC_IA64_IMM22 4967 -- : BFD_RELOC_IA64_IMM64 4968 -- : BFD_RELOC_IA64_DIR32MSB 4969 -- : BFD_RELOC_IA64_DIR32LSB 4970 -- : BFD_RELOC_IA64_DIR64MSB 4971 -- : BFD_RELOC_IA64_DIR64LSB 4972 -- : BFD_RELOC_IA64_GPREL22 4973 -- : BFD_RELOC_IA64_GPREL64I 4974 -- : BFD_RELOC_IA64_GPREL32MSB 4975 -- : BFD_RELOC_IA64_GPREL32LSB 4976 -- : BFD_RELOC_IA64_GPREL64MSB 4977 -- : BFD_RELOC_IA64_GPREL64LSB 4978 -- : BFD_RELOC_IA64_LTOFF22 4979 -- : BFD_RELOC_IA64_LTOFF64I 4980 -- : BFD_RELOC_IA64_PLTOFF22 4981 -- : BFD_RELOC_IA64_PLTOFF64I 4982 -- : BFD_RELOC_IA64_PLTOFF64MSB 4983 -- : BFD_RELOC_IA64_PLTOFF64LSB 4984 -- : BFD_RELOC_IA64_FPTR64I 4985 -- : BFD_RELOC_IA64_FPTR32MSB 4986 -- : BFD_RELOC_IA64_FPTR32LSB 4987 -- : BFD_RELOC_IA64_FPTR64MSB 4988 -- : BFD_RELOC_IA64_FPTR64LSB 4989 -- : BFD_RELOC_IA64_PCREL21B 4990 -- : BFD_RELOC_IA64_PCREL21BI 4991 -- : BFD_RELOC_IA64_PCREL21M 4992 -- : BFD_RELOC_IA64_PCREL21F 4993 -- : BFD_RELOC_IA64_PCREL22 4994 -- : BFD_RELOC_IA64_PCREL60B 4995 -- : BFD_RELOC_IA64_PCREL64I 4996 -- : BFD_RELOC_IA64_PCREL32MSB 4997 -- : BFD_RELOC_IA64_PCREL32LSB 4998 -- : BFD_RELOC_IA64_PCREL64MSB 4999 -- : BFD_RELOC_IA64_PCREL64LSB 5000 -- : BFD_RELOC_IA64_LTOFF_FPTR22 5001 -- : BFD_RELOC_IA64_LTOFF_FPTR64I 5002 -- : BFD_RELOC_IA64_LTOFF_FPTR32MSB 5003 -- : BFD_RELOC_IA64_LTOFF_FPTR32LSB 5004 -- : BFD_RELOC_IA64_LTOFF_FPTR64MSB 5005 -- : BFD_RELOC_IA64_LTOFF_FPTR64LSB 5006 -- : BFD_RELOC_IA64_SEGREL32MSB 5007 -- : BFD_RELOC_IA64_SEGREL32LSB 5008 -- : BFD_RELOC_IA64_SEGREL64MSB 5009 -- : BFD_RELOC_IA64_SEGREL64LSB 5010 -- : BFD_RELOC_IA64_SECREL32MSB 5011 -- : BFD_RELOC_IA64_SECREL32LSB 5012 -- : BFD_RELOC_IA64_SECREL64MSB 5013 -- : BFD_RELOC_IA64_SECREL64LSB 5014 -- : BFD_RELOC_IA64_REL32MSB 5015 -- : BFD_RELOC_IA64_REL32LSB 5016 -- : BFD_RELOC_IA64_REL64MSB 5017 -- : BFD_RELOC_IA64_REL64LSB 5018 -- : BFD_RELOC_IA64_LTV32MSB 5019 -- : BFD_RELOC_IA64_LTV32LSB 5020 -- : BFD_RELOC_IA64_LTV64MSB 5021 -- : BFD_RELOC_IA64_LTV64LSB 5022 -- : BFD_RELOC_IA64_IPLTMSB 5023 -- : BFD_RELOC_IA64_IPLTLSB 5024 -- : BFD_RELOC_IA64_COPY 5025 -- : BFD_RELOC_IA64_LTOFF22X 5026 -- : BFD_RELOC_IA64_LDXMOV 5027 -- : BFD_RELOC_IA64_TPREL14 5028 -- : BFD_RELOC_IA64_TPREL22 5029 -- : BFD_RELOC_IA64_TPREL64I 5030 -- : BFD_RELOC_IA64_TPREL64MSB 5031 -- : BFD_RELOC_IA64_TPREL64LSB 5032 -- : BFD_RELOC_IA64_LTOFF_TPREL22 5033 -- : BFD_RELOC_IA64_DTPMOD64MSB 5034 -- : BFD_RELOC_IA64_DTPMOD64LSB 5035 -- : BFD_RELOC_IA64_LTOFF_DTPMOD22 5036 -- : BFD_RELOC_IA64_DTPREL14 5037 -- : BFD_RELOC_IA64_DTPREL22 5038 -- : BFD_RELOC_IA64_DTPREL64I 5039 -- : BFD_RELOC_IA64_DTPREL32MSB 5040 -- : BFD_RELOC_IA64_DTPREL32LSB 5041 -- : BFD_RELOC_IA64_DTPREL64MSB 5042 -- : BFD_RELOC_IA64_DTPREL64LSB 5043 -- : BFD_RELOC_IA64_LTOFF_DTPREL22 5044 Intel IA64 Relocations. 5045 5046 -- : BFD_RELOC_M68HC11_HI8 5047 Motorola 68HC11 reloc. This is the 8 bit high part of an absolute 5048 address. 5049 5050 -- : BFD_RELOC_M68HC11_LO8 5051 Motorola 68HC11 reloc. This is the 8 bit low part of an absolute 5052 address. 5053 5054 -- : BFD_RELOC_M68HC11_3B 5055 Motorola 68HC11 reloc. This is the 3 bit of a value. 5056 5057 -- : BFD_RELOC_M68HC11_RL_JUMP 5058 Motorola 68HC11 reloc. This reloc marks the beginning of a 5059 jump/call instruction. It is used for linker relaxation to 5060 correctly identify beginning of instruction and change some 5061 branches to use PC-relative addressing mode. 5062 5063 -- : BFD_RELOC_M68HC11_RL_GROUP 5064 Motorola 68HC11 reloc. This reloc marks a group of several 5065 instructions that gcc generates and for which the linker 5066 relaxation pass can modify and/or remove some of them. 5067 5068 -- : BFD_RELOC_M68HC11_LO16 5069 Motorola 68HC11 reloc. This is the 16-bit lower part of an 5070 address. It is used for 'call' instruction to specify the symbol 5071 address without any special transformation (due to memory bank 5072 window). 5073 5074 -- : BFD_RELOC_M68HC11_PAGE 5075 Motorola 68HC11 reloc. This is a 8-bit reloc that specifies the 5076 page number of an address. It is used by 'call' instruction to 5077 specify the page number of the symbol. 5078 5079 -- : BFD_RELOC_M68HC11_24 5080 Motorola 68HC11 reloc. This is a 24-bit reloc that represents the 5081 address with a 16-bit value and a 8-bit page number. The symbol 5082 address is transformed to follow the 16K memory bank of 68HC12 5083 (seen as mapped in the window). 5084 5085 -- : BFD_RELOC_M68HC12_5B 5086 Motorola 68HC12 reloc. This is the 5 bits of a value. 5087 5088 -- : BFD_RELOC_16C_NUM08 5089 -- : BFD_RELOC_16C_NUM08_C 5090 -- : BFD_RELOC_16C_NUM16 5091 -- : BFD_RELOC_16C_NUM16_C 5092 -- : BFD_RELOC_16C_NUM32 5093 -- : BFD_RELOC_16C_NUM32_C 5094 -- : BFD_RELOC_16C_DISP04 5095 -- : BFD_RELOC_16C_DISP04_C 5096 -- : BFD_RELOC_16C_DISP08 5097 -- : BFD_RELOC_16C_DISP08_C 5098 -- : BFD_RELOC_16C_DISP16 5099 -- : BFD_RELOC_16C_DISP16_C 5100 -- : BFD_RELOC_16C_DISP24 5101 -- : BFD_RELOC_16C_DISP24_C 5102 -- : BFD_RELOC_16C_DISP24a 5103 -- : BFD_RELOC_16C_DISP24a_C 5104 -- : BFD_RELOC_16C_REG04 5105 -- : BFD_RELOC_16C_REG04_C 5106 -- : BFD_RELOC_16C_REG04a 5107 -- : BFD_RELOC_16C_REG04a_C 5108 -- : BFD_RELOC_16C_REG14 5109 -- : BFD_RELOC_16C_REG14_C 5110 -- : BFD_RELOC_16C_REG16 5111 -- : BFD_RELOC_16C_REG16_C 5112 -- : BFD_RELOC_16C_REG20 5113 -- : BFD_RELOC_16C_REG20_C 5114 -- : BFD_RELOC_16C_ABS20 5115 -- : BFD_RELOC_16C_ABS20_C 5116 -- : BFD_RELOC_16C_ABS24 5117 -- : BFD_RELOC_16C_ABS24_C 5118 -- : BFD_RELOC_16C_IMM04 5119 -- : BFD_RELOC_16C_IMM04_C 5120 -- : BFD_RELOC_16C_IMM16 5121 -- : BFD_RELOC_16C_IMM16_C 5122 -- : BFD_RELOC_16C_IMM20 5123 -- : BFD_RELOC_16C_IMM20_C 5124 -- : BFD_RELOC_16C_IMM24 5125 -- : BFD_RELOC_16C_IMM24_C 5126 -- : BFD_RELOC_16C_IMM32 5127 -- : BFD_RELOC_16C_IMM32_C 5128 NS CR16C Relocations. 5129 5130 -- : BFD_RELOC_CR16_NUM8 5131 -- : BFD_RELOC_CR16_NUM16 5132 -- : BFD_RELOC_CR16_NUM32 5133 -- : BFD_RELOC_CR16_NUM32a 5134 -- : BFD_RELOC_CR16_REGREL0 5135 -- : BFD_RELOC_CR16_REGREL4 5136 -- : BFD_RELOC_CR16_REGREL4a 5137 -- : BFD_RELOC_CR16_REGREL14 5138 -- : BFD_RELOC_CR16_REGREL14a 5139 -- : BFD_RELOC_CR16_REGREL16 5140 -- : BFD_RELOC_CR16_REGREL20 5141 -- : BFD_RELOC_CR16_REGREL20a 5142 -- : BFD_RELOC_CR16_ABS20 5143 -- : BFD_RELOC_CR16_ABS24 5144 -- : BFD_RELOC_CR16_IMM4 5145 -- : BFD_RELOC_CR16_IMM8 5146 -- : BFD_RELOC_CR16_IMM16 5147 -- : BFD_RELOC_CR16_IMM20 5148 -- : BFD_RELOC_CR16_IMM24 5149 -- : BFD_RELOC_CR16_IMM32 5150 -- : BFD_RELOC_CR16_IMM32a 5151 -- : BFD_RELOC_CR16_DISP4 5152 -- : BFD_RELOC_CR16_DISP8 5153 -- : BFD_RELOC_CR16_DISP16 5154 -- : BFD_RELOC_CR16_DISP20 5155 -- : BFD_RELOC_CR16_DISP24 5156 -- : BFD_RELOC_CR16_DISP24a 5157 -- : BFD_RELOC_CR16_SWITCH8 5158 -- : BFD_RELOC_CR16_SWITCH16 5159 -- : BFD_RELOC_CR16_SWITCH32 5160 -- : BFD_RELOC_CR16_GOT_REGREL20 5161 -- : BFD_RELOC_CR16_GOTC_REGREL20 5162 -- : BFD_RELOC_CR16_GLOB_DAT 5163 NS CR16 Relocations. 5164 5165 -- : BFD_RELOC_CRX_REL4 5166 -- : BFD_RELOC_CRX_REL8 5167 -- : BFD_RELOC_CRX_REL8_CMP 5168 -- : BFD_RELOC_CRX_REL16 5169 -- : BFD_RELOC_CRX_REL24 5170 -- : BFD_RELOC_CRX_REL32 5171 -- : BFD_RELOC_CRX_REGREL12 5172 -- : BFD_RELOC_CRX_REGREL22 5173 -- : BFD_RELOC_CRX_REGREL28 5174 -- : BFD_RELOC_CRX_REGREL32 5175 -- : BFD_RELOC_CRX_ABS16 5176 -- : BFD_RELOC_CRX_ABS32 5177 -- : BFD_RELOC_CRX_NUM8 5178 -- : BFD_RELOC_CRX_NUM16 5179 -- : BFD_RELOC_CRX_NUM32 5180 -- : BFD_RELOC_CRX_IMM16 5181 -- : BFD_RELOC_CRX_IMM32 5182 -- : BFD_RELOC_CRX_SWITCH8 5183 -- : BFD_RELOC_CRX_SWITCH16 5184 -- : BFD_RELOC_CRX_SWITCH32 5185 NS CRX Relocations. 5186 5187 -- : BFD_RELOC_CRIS_BDISP8 5188 -- : BFD_RELOC_CRIS_UNSIGNED_5 5189 -- : BFD_RELOC_CRIS_SIGNED_6 5190 -- : BFD_RELOC_CRIS_UNSIGNED_6 5191 -- : BFD_RELOC_CRIS_SIGNED_8 5192 -- : BFD_RELOC_CRIS_UNSIGNED_8 5193 -- : BFD_RELOC_CRIS_SIGNED_16 5194 -- : BFD_RELOC_CRIS_UNSIGNED_16 5195 -- : BFD_RELOC_CRIS_LAPCQ_OFFSET 5196 -- : BFD_RELOC_CRIS_UNSIGNED_4 5197 These relocs are only used within the CRIS assembler. They are not 5198 (at present) written to any object files. 5199 5200 -- : BFD_RELOC_CRIS_COPY 5201 -- : BFD_RELOC_CRIS_GLOB_DAT 5202 -- : BFD_RELOC_CRIS_JUMP_SLOT 5203 -- : BFD_RELOC_CRIS_RELATIVE 5204 Relocs used in ELF shared libraries for CRIS. 5205 5206 -- : BFD_RELOC_CRIS_32_GOT 5207 32-bit offset to symbol-entry within GOT. 5208 5209 -- : BFD_RELOC_CRIS_16_GOT 5210 16-bit offset to symbol-entry within GOT. 5211 5212 -- : BFD_RELOC_CRIS_32_GOTPLT 5213 32-bit offset to symbol-entry within GOT, with PLT handling. 5214 5215 -- : BFD_RELOC_CRIS_16_GOTPLT 5216 16-bit offset to symbol-entry within GOT, with PLT handling. 5217 5218 -- : BFD_RELOC_CRIS_32_GOTREL 5219 32-bit offset to symbol, relative to GOT. 5220 5221 -- : BFD_RELOC_CRIS_32_PLT_GOTREL 5222 32-bit offset to symbol with PLT entry, relative to GOT. 5223 5224 -- : BFD_RELOC_CRIS_32_PLT_PCREL 5225 32-bit offset to symbol with PLT entry, relative to this 5226 relocation. 5227 5228 -- : BFD_RELOC_CRIS_32_GOT_GD 5229 -- : BFD_RELOC_CRIS_16_GOT_GD 5230 -- : BFD_RELOC_CRIS_32_GD 5231 -- : BFD_RELOC_CRIS_DTP 5232 -- : BFD_RELOC_CRIS_32_DTPREL 5233 -- : BFD_RELOC_CRIS_16_DTPREL 5234 -- : BFD_RELOC_CRIS_32_GOT_TPREL 5235 -- : BFD_RELOC_CRIS_16_GOT_TPREL 5236 -- : BFD_RELOC_CRIS_32_TPREL 5237 -- : BFD_RELOC_CRIS_16_TPREL 5238 -- : BFD_RELOC_CRIS_DTPMOD 5239 -- : BFD_RELOC_CRIS_32_IE 5240 Relocs used in TLS code for CRIS. 5241 5242 -- : BFD_RELOC_860_COPY 5243 -- : BFD_RELOC_860_GLOB_DAT 5244 -- : BFD_RELOC_860_JUMP_SLOT 5245 -- : BFD_RELOC_860_RELATIVE 5246 -- : BFD_RELOC_860_PC26 5247 -- : BFD_RELOC_860_PLT26 5248 -- : BFD_RELOC_860_PC16 5249 -- : BFD_RELOC_860_LOW0 5250 -- : BFD_RELOC_860_SPLIT0 5251 -- : BFD_RELOC_860_LOW1 5252 -- : BFD_RELOC_860_SPLIT1 5253 -- : BFD_RELOC_860_LOW2 5254 -- : BFD_RELOC_860_SPLIT2 5255 -- : BFD_RELOC_860_LOW3 5256 -- : BFD_RELOC_860_LOGOT0 5257 -- : BFD_RELOC_860_SPGOT0 5258 -- : BFD_RELOC_860_LOGOT1 5259 -- : BFD_RELOC_860_SPGOT1 5260 -- : BFD_RELOC_860_LOGOTOFF0 5261 -- : BFD_RELOC_860_SPGOTOFF0 5262 -- : BFD_RELOC_860_LOGOTOFF1 5263 -- : BFD_RELOC_860_SPGOTOFF1 5264 -- : BFD_RELOC_860_LOGOTOFF2 5265 -- : BFD_RELOC_860_LOGOTOFF3 5266 -- : BFD_RELOC_860_LOPC 5267 -- : BFD_RELOC_860_HIGHADJ 5268 -- : BFD_RELOC_860_HAGOT 5269 -- : BFD_RELOC_860_HAGOTOFF 5270 -- : BFD_RELOC_860_HAPC 5271 -- : BFD_RELOC_860_HIGH 5272 -- : BFD_RELOC_860_HIGOT 5273 -- : BFD_RELOC_860_HIGOTOFF 5274 Intel i860 Relocations. 5275 5276 -- : BFD_RELOC_OPENRISC_ABS_26 5277 -- : BFD_RELOC_OPENRISC_REL_26 5278 OpenRISC Relocations. 5279 5280 -- : BFD_RELOC_H8_DIR16A8 5281 -- : BFD_RELOC_H8_DIR16R8 5282 -- : BFD_RELOC_H8_DIR24A8 5283 -- : BFD_RELOC_H8_DIR24R8 5284 -- : BFD_RELOC_H8_DIR32A16 5285 H8 elf Relocations. 5286 5287 -- : BFD_RELOC_XSTORMY16_REL_12 5288 -- : BFD_RELOC_XSTORMY16_12 5289 -- : BFD_RELOC_XSTORMY16_24 5290 -- : BFD_RELOC_XSTORMY16_FPTR16 5291 Sony Xstormy16 Relocations. 5292 5293 -- : BFD_RELOC_RELC 5294 Self-describing complex relocations. 5295 5296 -- : BFD_RELOC_XC16X_PAG 5297 -- : BFD_RELOC_XC16X_POF 5298 -- : BFD_RELOC_XC16X_SEG 5299 -- : BFD_RELOC_XC16X_SOF 5300 Infineon Relocations. 5301 5302 -- : BFD_RELOC_VAX_GLOB_DAT 5303 -- : BFD_RELOC_VAX_JMP_SLOT 5304 -- : BFD_RELOC_VAX_RELATIVE 5305 Relocations used by VAX ELF. 5306 5307 -- : BFD_RELOC_MT_PC16 5308 Morpho MT - 16 bit immediate relocation. 5309 5310 -- : BFD_RELOC_MT_HI16 5311 Morpho MT - Hi 16 bits of an address. 5312 5313 -- : BFD_RELOC_MT_LO16 5314 Morpho MT - Low 16 bits of an address. 5315 5316 -- : BFD_RELOC_MT_GNU_VTINHERIT 5317 Morpho MT - Used to tell the linker which vtable entries are used. 5318 5319 -- : BFD_RELOC_MT_GNU_VTENTRY 5320 Morpho MT - Used to tell the linker which vtable entries are used. 5321 5322 -- : BFD_RELOC_MT_PCINSN8 5323 Morpho MT - 8 bit immediate relocation. 5324 5325 -- : BFD_RELOC_MSP430_10_PCREL 5326 -- : BFD_RELOC_MSP430_16_PCREL 5327 -- : BFD_RELOC_MSP430_16 5328 -- : BFD_RELOC_MSP430_16_PCREL_BYTE 5329 -- : BFD_RELOC_MSP430_16_BYTE 5330 -- : BFD_RELOC_MSP430_2X_PCREL 5331 -- : BFD_RELOC_MSP430_RL_PCREL 5332 msp430 specific relocation codes 5333 5334 -- : BFD_RELOC_IQ2000_OFFSET_16 5335 -- : BFD_RELOC_IQ2000_OFFSET_21 5336 -- : BFD_RELOC_IQ2000_UHI16 5337 IQ2000 Relocations. 5338 5339 -- : BFD_RELOC_XTENSA_RTLD 5340 Special Xtensa relocation used only by PLT entries in ELF shared 5341 objects to indicate that the runtime linker should set the value 5342 to one of its own internal functions or data structures. 5343 5344 -- : BFD_RELOC_XTENSA_GLOB_DAT 5345 -- : BFD_RELOC_XTENSA_JMP_SLOT 5346 -- : BFD_RELOC_XTENSA_RELATIVE 5347 Xtensa relocations for ELF shared objects. 5348 5349 -- : BFD_RELOC_XTENSA_PLT 5350 Xtensa relocation used in ELF object files for symbols that may 5351 require PLT entries. Otherwise, this is just a generic 32-bit 5352 relocation. 5353 5354 -- : BFD_RELOC_XTENSA_DIFF8 5355 -- : BFD_RELOC_XTENSA_DIFF16 5356 -- : BFD_RELOC_XTENSA_DIFF32 5357 Xtensa relocations to mark the difference of two local symbols. 5358 These are only needed to support linker relaxation and can be 5359 ignored when not relaxing. The field is set to the value of the 5360 difference assuming no relaxation. The relocation encodes the 5361 position of the first symbol so the linker can determine whether 5362 to adjust the field value. 5363 5364 -- : BFD_RELOC_XTENSA_SLOT0_OP 5365 -- : BFD_RELOC_XTENSA_SLOT1_OP 5366 -- : BFD_RELOC_XTENSA_SLOT2_OP 5367 -- : BFD_RELOC_XTENSA_SLOT3_OP 5368 -- : BFD_RELOC_XTENSA_SLOT4_OP 5369 -- : BFD_RELOC_XTENSA_SLOT5_OP 5370 -- : BFD_RELOC_XTENSA_SLOT6_OP 5371 -- : BFD_RELOC_XTENSA_SLOT7_OP 5372 -- : BFD_RELOC_XTENSA_SLOT8_OP 5373 -- : BFD_RELOC_XTENSA_SLOT9_OP 5374 -- : BFD_RELOC_XTENSA_SLOT10_OP 5375 -- : BFD_RELOC_XTENSA_SLOT11_OP 5376 -- : BFD_RELOC_XTENSA_SLOT12_OP 5377 -- : BFD_RELOC_XTENSA_SLOT13_OP 5378 -- : BFD_RELOC_XTENSA_SLOT14_OP 5379 Generic Xtensa relocations for instruction operands. Only the slot 5380 number is encoded in the relocation. The relocation applies to the 5381 last PC-relative immediate operand, or if there are no PC-relative 5382 immediates, to the last immediate operand. 5383 5384 -- : BFD_RELOC_XTENSA_SLOT0_ALT 5385 -- : BFD_RELOC_XTENSA_SLOT1_ALT 5386 -- : BFD_RELOC_XTENSA_SLOT2_ALT 5387 -- : BFD_RELOC_XTENSA_SLOT3_ALT 5388 -- : BFD_RELOC_XTENSA_SLOT4_ALT 5389 -- : BFD_RELOC_XTENSA_SLOT5_ALT 5390 -- : BFD_RELOC_XTENSA_SLOT6_ALT 5391 -- : BFD_RELOC_XTENSA_SLOT7_ALT 5392 -- : BFD_RELOC_XTENSA_SLOT8_ALT 5393 -- : BFD_RELOC_XTENSA_SLOT9_ALT 5394 -- : BFD_RELOC_XTENSA_SLOT10_ALT 5395 -- : BFD_RELOC_XTENSA_SLOT11_ALT 5396 -- : BFD_RELOC_XTENSA_SLOT12_ALT 5397 -- : BFD_RELOC_XTENSA_SLOT13_ALT 5398 -- : BFD_RELOC_XTENSA_SLOT14_ALT 5399 Alternate Xtensa relocations. Only the slot is encoded in the 5400 relocation. The meaning of these relocations is opcode-specific. 5401 5402 -- : BFD_RELOC_XTENSA_OP0 5403 -- : BFD_RELOC_XTENSA_OP1 5404 -- : BFD_RELOC_XTENSA_OP2 5405 Xtensa relocations for backward compatibility. These have all been 5406 replaced by BFD_RELOC_XTENSA_SLOT0_OP. 5407 5408 -- : BFD_RELOC_XTENSA_ASM_EXPAND 5409 Xtensa relocation to mark that the assembler expanded the 5410 instructions from an original target. The expansion size is 5411 encoded in the reloc size. 5412 5413 -- : BFD_RELOC_XTENSA_ASM_SIMPLIFY 5414 Xtensa relocation to mark that the linker should simplify 5415 assembler-expanded instructions. This is commonly used internally 5416 by the linker after analysis of a BFD_RELOC_XTENSA_ASM_EXPAND. 5417 5418 -- : BFD_RELOC_XTENSA_TLSDESC_FN 5419 -- : BFD_RELOC_XTENSA_TLSDESC_ARG 5420 -- : BFD_RELOC_XTENSA_TLS_DTPOFF 5421 -- : BFD_RELOC_XTENSA_TLS_TPOFF 5422 -- : BFD_RELOC_XTENSA_TLS_FUNC 5423 -- : BFD_RELOC_XTENSA_TLS_ARG 5424 -- : BFD_RELOC_XTENSA_TLS_CALL 5425 Xtensa TLS relocations. 5426 5427 -- : BFD_RELOC_Z80_DISP8 5428 8 bit signed offset in (ix+d) or (iy+d). 5429 5430 -- : BFD_RELOC_Z8K_DISP7 5431 DJNZ offset. 5432 5433 -- : BFD_RELOC_Z8K_CALLR 5434 CALR offset. 5435 5436 -- : BFD_RELOC_Z8K_IMM4L 5437 4 bit value. 5438 5439 -- : BFD_RELOC_LM32_CALL 5440 -- : BFD_RELOC_LM32_BRANCH 5441 -- : BFD_RELOC_LM32_16_GOT 5442 -- : BFD_RELOC_LM32_GOTOFF_HI16 5443 -- : BFD_RELOC_LM32_GOTOFF_LO16 5444 -- : BFD_RELOC_LM32_COPY 5445 -- : BFD_RELOC_LM32_GLOB_DAT 5446 -- : BFD_RELOC_LM32_JMP_SLOT 5447 -- : BFD_RELOC_LM32_RELATIVE 5448 Lattice Mico32 relocations. 5449 5450 -- : BFD_RELOC_MACH_O_SECTDIFF 5451 Difference between two section addreses. Must be followed by a 5452 BFD_RELOC_MACH_O_PAIR. 5453 5454 -- : BFD_RELOC_MACH_O_PAIR 5455 Pair of relocation. Contains the first symbol. 5456 5457 -- : BFD_RELOC_MACH_O_X86_64_BRANCH32 5458 -- : BFD_RELOC_MACH_O_X86_64_BRANCH8 5459 PCREL relocations. They are marked as branch to create PLT entry 5460 if required. 5461 5462 -- : BFD_RELOC_MACH_O_X86_64_GOT 5463 Used when referencing a GOT entry. 5464 5465 -- : BFD_RELOC_MACH_O_X86_64_GOT_LOAD 5466 Used when loading a GOT entry with movq. It is specially marked 5467 so that the linker could optimize the movq to a leaq if possible. 5468 5469 -- : BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32 5470 Symbol will be substracted. Must be followed by a BFD_RELOC_64. 5471 5472 -- : BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64 5473 Symbol will be substracted. Must be followed by a BFD_RELOC_64. 5474 5475 -- : BFD_RELOC_MACH_O_X86_64_PCREL32_1 5476 Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. 5477 5478 -- : BFD_RELOC_MACH_O_X86_64_PCREL32_2 5479 Same as BFD_RELOC_32_PCREL but with an implicit -2 addend. 5480 5481 -- : BFD_RELOC_MACH_O_X86_64_PCREL32_4 5482 Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. 5483 5484 -- : BFD_RELOC_MICROBLAZE_32_LO 5485 This is a 32 bit reloc for the microblaze that stores the low 16 5486 bits of a value 5487 5488 -- : BFD_RELOC_MICROBLAZE_32_LO_PCREL 5489 This is a 32 bit pc-relative reloc for the microblaze that stores 5490 the low 16 bits of a value 5491 5492 -- : BFD_RELOC_MICROBLAZE_32_ROSDA 5493 This is a 32 bit reloc for the microblaze that stores a value 5494 relative to the read-only small data area anchor 5495 5496 -- : BFD_RELOC_MICROBLAZE_32_RWSDA 5497 This is a 32 bit reloc for the microblaze that stores a value 5498 relative to the read-write small data area anchor 5499 5500 -- : BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM 5501 This is a 32 bit reloc for the microblaze to handle expressions of 5502 the form "Symbol Op Symbol" 5503 5504 -- : BFD_RELOC_MICROBLAZE_64_NONE 5505 This is a 64 bit reloc that stores the 32 bit pc relative value in 5506 two words (with an imm instruction). No relocation is done here - 5507 only used for relaxing 5508 5509 -- : BFD_RELOC_MICROBLAZE_64_GOTPC 5510 This is a 64 bit reloc that stores the 32 bit pc relative value in 5511 two words (with an imm instruction). The relocation is 5512 PC-relative GOT offset 5513 5514 -- : BFD_RELOC_MICROBLAZE_64_GOT 5515 This is a 64 bit reloc that stores the 32 bit pc relative value in 5516 two words (with an imm instruction). The relocation is GOT offset 5517 5518 -- : BFD_RELOC_MICROBLAZE_64_PLT 5519 This is a 64 bit reloc that stores the 32 bit pc relative value in 5520 two words (with an imm instruction). The relocation is 5521 PC-relative offset into PLT 5522 5523 -- : BFD_RELOC_MICROBLAZE_64_GOTOFF 5524 This is a 64 bit reloc that stores the 32 bit GOT relative value 5525 in two words (with an imm instruction). The relocation is 5526 relative offset from _GLOBAL_OFFSET_TABLE_ 5527 5528 -- : BFD_RELOC_MICROBLAZE_32_GOTOFF 5529 This is a 32 bit reloc that stores the 32 bit GOT relative value 5530 in a word. The relocation is relative offset from 5531 5532 -- : BFD_RELOC_MICROBLAZE_COPY 5533 This is used to tell the dynamic linker to copy the value out of 5534 the dynamic object into the runtime process image. 5535 5536 5537 typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; 5538 5539 2.10.2.2 `bfd_reloc_type_lookup' 5540 ................................ 5541 5542 *Synopsis* 5543 reloc_howto_type *bfd_reloc_type_lookup 5544 (bfd *abfd, bfd_reloc_code_real_type code); 5545 reloc_howto_type *bfd_reloc_name_lookup 5546 (bfd *abfd, const char *reloc_name); 5547 *Description* 5548 Return a pointer to a howto structure which, when invoked, will perform 5549 the relocation CODE on data from the architecture noted. 5550 5551 2.10.2.3 `bfd_default_reloc_type_lookup' 5552 ........................................ 5553 5554 *Synopsis* 5555 reloc_howto_type *bfd_default_reloc_type_lookup 5556 (bfd *abfd, bfd_reloc_code_real_type code); 5557 *Description* 5558 Provides a default relocation lookup routine for any architecture. 5559 5560 2.10.2.4 `bfd_get_reloc_code_name' 5561 .................................. 5562 5563 *Synopsis* 5564 const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code); 5565 *Description* 5566 Provides a printable name for the supplied relocation code. Useful 5567 mainly for printing error messages. 5568 5569 2.10.2.5 `bfd_generic_relax_section' 5570 .................................... 5571 5572 *Synopsis* 5573 bfd_boolean bfd_generic_relax_section 5574 (bfd *abfd, 5575 asection *section, 5576 struct bfd_link_info *, 5577 bfd_boolean *); 5578 *Description* 5579 Provides default handling for relaxing for back ends which don't do 5580 relaxing. 5581 5582 2.10.2.6 `bfd_generic_gc_sections' 5583 .................................. 5584 5585 *Synopsis* 5586 bfd_boolean bfd_generic_gc_sections 5587 (bfd *, struct bfd_link_info *); 5588 *Description* 5589 Provides default handling for relaxing for back ends which don't do 5590 section gc - i.e., does nothing. 5591 5592 2.10.2.7 `bfd_generic_merge_sections' 5593 ..................................... 5594 5595 *Synopsis* 5596 bfd_boolean bfd_generic_merge_sections 5597 (bfd *, struct bfd_link_info *); 5598 *Description* 5599 Provides default handling for SEC_MERGE section merging for back ends 5600 which don't have SEC_MERGE support - i.e., does nothing. 5601 5602 2.10.2.8 `bfd_generic_get_relocated_section_contents' 5603 ..................................................... 5604 5605 *Synopsis* 5606 bfd_byte *bfd_generic_get_relocated_section_contents 5607 (bfd *abfd, 5608 struct bfd_link_info *link_info, 5609 struct bfd_link_order *link_order, 5610 bfd_byte *data, 5611 bfd_boolean relocatable, 5612 asymbol **symbols); 5613 *Description* 5614 Provides default handling of relocation effort for back ends which 5615 can't be bothered to do it efficiently. 5616 5617 5618 File: bfd.info, Node: Core Files, Next: Targets, Prev: Relocations, Up: BFD front end 5619 5620 2.11 Core files 5621 =============== 5622 5623 2.11.1 Core file functions 5624 -------------------------- 5625 5626 *Description* 5627 These are functions pertaining to core files. 5628 5629 2.11.1.1 `bfd_core_file_failing_command' 5630 ........................................ 5631 5632 *Synopsis* 5633 const char *bfd_core_file_failing_command (bfd *abfd); 5634 *Description* 5635 Return a read-only string explaining which program was running when it 5636 failed and produced the core file ABFD. 5637 5638 2.11.1.2 `bfd_core_file_failing_signal' 5639 ....................................... 5640 5641 *Synopsis* 5642 int bfd_core_file_failing_signal (bfd *abfd); 5643 *Description* 5644 Returns the signal number which caused the core dump which generated 5645 the file the BFD ABFD is attached to. 5646 5647 2.11.1.3 `core_file_matches_executable_p' 5648 ......................................... 5649 5650 *Synopsis* 5651 bfd_boolean core_file_matches_executable_p 5652 (bfd *core_bfd, bfd *exec_bfd); 5653 *Description* 5654 Return `TRUE' if the core file attached to CORE_BFD was generated by a 5655 run of the executable file attached to EXEC_BFD, `FALSE' otherwise. 5656 5657 2.11.1.4 `generic_core_file_matches_executable_p' 5658 ................................................. 5659 5660 *Synopsis* 5661 bfd_boolean generic_core_file_matches_executable_p 5662 (bfd *core_bfd, bfd *exec_bfd); 5663 *Description* 5664 Return TRUE if the core file attached to CORE_BFD was generated by a 5665 run of the executable file attached to EXEC_BFD. The match is based on 5666 executable basenames only. 5667 5668 Note: When not able to determine the core file failing command or 5669 the executable name, we still return TRUE even though we're not sure 5670 that core file and executable match. This is to avoid generating a 5671 false warning in situations where we really don't know whether they 5672 match or not. 5673 5674 5675 File: bfd.info, Node: Targets, Next: Architectures, Prev: Core Files, Up: BFD front end 5676 5677 2.12 Targets 5678 ============ 5679 5680 *Description* 5681 Each port of BFD to a different machine requires the creation of a 5682 target back end. All the back end provides to the root part of BFD is a 5683 structure containing pointers to functions which perform certain low 5684 level operations on files. BFD translates the applications's requests 5685 through a pointer into calls to the back end routines. 5686 5687 When a file is opened with `bfd_openr', its format and target are 5688 unknown. BFD uses various mechanisms to determine how to interpret the 5689 file. The operations performed are: 5690 5691 * Create a BFD by calling the internal routine `_bfd_new_bfd', then 5692 call `bfd_find_target' with the target string supplied to 5693 `bfd_openr' and the new BFD pointer. 5694 5695 * If a null target string was provided to `bfd_find_target', look up 5696 the environment variable `GNUTARGET' and use that as the target 5697 string. 5698 5699 * If the target string is still `NULL', or the target string is 5700 `default', then use the first item in the target vector as the 5701 target type, and set `target_defaulted' in the BFD to cause 5702 `bfd_check_format' to loop through all the targets. *Note 5703 bfd_target::. *Note Formats::. 5704 5705 * Otherwise, inspect the elements in the target vector one by one, 5706 until a match on target name is found. When found, use it. 5707 5708 * Otherwise return the error `bfd_error_invalid_target' to 5709 `bfd_openr'. 5710 5711 * `bfd_openr' attempts to open the file using `bfd_open_file', and 5712 returns the BFD. 5713 Once the BFD has been opened and the target selected, the file 5714 format may be determined. This is done by calling `bfd_check_format' on 5715 the BFD with a suggested format. If `target_defaulted' has been set, 5716 each possible target type is tried to see if it recognizes the 5717 specified format. `bfd_check_format' returns `TRUE' when the caller 5718 guesses right. 5719 5720 * Menu: 5721 5722 * bfd_target:: 5723 5724 5725 File: bfd.info, Node: bfd_target, Prev: Targets, Up: Targets 5726 5727 2.12.1 bfd_target 5728 ----------------- 5729 5730 *Description* 5731 This structure contains everything that BFD knows about a target. It 5732 includes things like its byte order, name, and which routines to call 5733 to do various operations. 5734 5735 Every BFD points to a target structure with its `xvec' member. 5736 5737 The macros below are used to dispatch to functions through the 5738 `bfd_target' vector. They are used in a number of macros further down 5739 in `bfd.h', and are also used when calling various routines by hand 5740 inside the BFD implementation. The ARGLIST argument must be 5741 parenthesized; it contains all the arguments to the called function. 5742 5743 They make the documentation (more) unpleasant to read, so if someone 5744 wants to fix this and not break the above, please do. 5745 #define BFD_SEND(bfd, message, arglist) \ 5746 ((*((bfd)->xvec->message)) arglist) 5747 5748 #ifdef DEBUG_BFD_SEND 5749 #undef BFD_SEND 5750 #define BFD_SEND(bfd, message, arglist) \ 5751 (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \ 5752 ((*((bfd)->xvec->message)) arglist) : \ 5753 (bfd_assert (__FILE__,__LINE__), NULL)) 5754 #endif 5755 For operations which index on the BFD format: 5756 #define BFD_SEND_FMT(bfd, message, arglist) \ 5757 (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) 5758 5759 #ifdef DEBUG_BFD_SEND 5760 #undef BFD_SEND_FMT 5761 #define BFD_SEND_FMT(bfd, message, arglist) \ 5762 (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \ 5763 (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \ 5764 (bfd_assert (__FILE__,__LINE__), NULL)) 5765 #endif 5766 This is the structure which defines the type of BFD this is. The 5767 `xvec' member of the struct `bfd' itself points here. Each module that 5768 implements access to a different target under BFD, defines one of these. 5769 5770 FIXME, these names should be rationalised with the names of the 5771 entry points which call them. Too bad we can't have one macro to define 5772 them both! 5773 enum bfd_flavour 5774 { 5775 bfd_target_unknown_flavour, 5776 bfd_target_aout_flavour, 5777 bfd_target_coff_flavour, 5778 bfd_target_ecoff_flavour, 5779 bfd_target_xcoff_flavour, 5780 bfd_target_elf_flavour, 5781 bfd_target_ieee_flavour, 5782 bfd_target_nlm_flavour, 5783 bfd_target_oasys_flavour, 5784 bfd_target_tekhex_flavour, 5785 bfd_target_srec_flavour, 5786 bfd_target_verilog_flavour, 5787 bfd_target_ihex_flavour, 5788 bfd_target_som_flavour, 5789 bfd_target_os9k_flavour, 5790 bfd_target_versados_flavour, 5791 bfd_target_msdos_flavour, 5792 bfd_target_ovax_flavour, 5793 bfd_target_evax_flavour, 5794 bfd_target_mmo_flavour, 5795 bfd_target_mach_o_flavour, 5796 bfd_target_pef_flavour, 5797 bfd_target_pef_xlib_flavour, 5798 bfd_target_sym_flavour 5799 }; 5800 5801 enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN }; 5802 5803 /* Forward declaration. */ 5804 typedef struct bfd_link_info _bfd_link_info; 5805 5806 typedef struct bfd_target 5807 { 5808 /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ 5809 char *name; 5810 5811 /* The "flavour" of a back end is a general indication about 5812 the contents of a file. */ 5813 enum bfd_flavour flavour; 5814 5815 /* The order of bytes within the data area of a file. */ 5816 enum bfd_endian byteorder; 5817 5818 /* The order of bytes within the header parts of a file. */ 5819 enum bfd_endian header_byteorder; 5820 5821 /* A mask of all the flags which an executable may have set - 5822 from the set `BFD_NO_FLAGS', `HAS_RELOC', ...`D_PAGED'. */ 5823 flagword object_flags; 5824 5825 /* A mask of all the flags which a section may have set - from 5826 the set `SEC_NO_FLAGS', `SEC_ALLOC', ...`SET_NEVER_LOAD'. */ 5827 flagword section_flags; 5828 5829 /* The character normally found at the front of a symbol. 5830 (if any), perhaps `_'. */ 5831 char symbol_leading_char; 5832 5833 /* The pad character for file names within an archive header. */ 5834 char ar_pad_char; 5835 5836 /* The maximum number of characters in an archive header. */ 5837 unsigned short ar_max_namelen; 5838 5839 /* Entries for byte swapping for data. These are different from the 5840 other entry points, since they don't take a BFD as the first argument. 5841 Certain other handlers could do the same. */ 5842 bfd_uint64_t (*bfd_getx64) (const void *); 5843 bfd_int64_t (*bfd_getx_signed_64) (const void *); 5844 void (*bfd_putx64) (bfd_uint64_t, void *); 5845 bfd_vma (*bfd_getx32) (const void *); 5846 bfd_signed_vma (*bfd_getx_signed_32) (const void *); 5847 void (*bfd_putx32) (bfd_vma, void *); 5848 bfd_vma (*bfd_getx16) (const void *); 5849 bfd_signed_vma (*bfd_getx_signed_16) (const void *); 5850 void (*bfd_putx16) (bfd_vma, void *); 5851 5852 /* Byte swapping for the headers. */ 5853 bfd_uint64_t (*bfd_h_getx64) (const void *); 5854 bfd_int64_t (*bfd_h_getx_signed_64) (const void *); 5855 void (*bfd_h_putx64) (bfd_uint64_t, void *); 5856 bfd_vma (*bfd_h_getx32) (const void *); 5857 bfd_signed_vma (*bfd_h_getx_signed_32) (const void *); 5858 void (*bfd_h_putx32) (bfd_vma, void *); 5859 bfd_vma (*bfd_h_getx16) (const void *); 5860 bfd_signed_vma (*bfd_h_getx_signed_16) (const void *); 5861 void (*bfd_h_putx16) (bfd_vma, void *); 5862 5863 /* Format dependent routines: these are vectors of entry points 5864 within the target vector structure, one for each format to check. */ 5865 5866 /* Check the format of a file being read. Return a `bfd_target *' or zero. */ 5867 const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); 5868 5869 /* Set the format of a file being written. */ 5870 bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); 5871 5872 /* Write cached information into a file being written, at `bfd_close'. */ 5873 bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *); 5874 The general target vector. These vectors are initialized using the 5875 BFD_JUMP_TABLE macros. 5876 5877 /* Generic entry points. */ 5878 #define BFD_JUMP_TABLE_GENERIC(NAME) \ 5879 NAME##_close_and_cleanup, \ 5880 NAME##_bfd_free_cached_info, \ 5881 NAME##_new_section_hook, \ 5882 NAME##_get_section_contents, \ 5883 NAME##_get_section_contents_in_window 5884 5885 /* Called when the BFD is being closed to do any necessary cleanup. */ 5886 bfd_boolean (*_close_and_cleanup) (bfd *); 5887 /* Ask the BFD to free all cached information. */ 5888 bfd_boolean (*_bfd_free_cached_info) (bfd *); 5889 /* Called when a new section is created. */ 5890 bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); 5891 /* Read the contents of a section. */ 5892 bfd_boolean (*_bfd_get_section_contents) 5893 (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); 5894 bfd_boolean (*_bfd_get_section_contents_in_window) 5895 (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); 5896 5897 /* Entry points to copy private data. */ 5898 #define BFD_JUMP_TABLE_COPY(NAME) \ 5899 NAME##_bfd_copy_private_bfd_data, \ 5900 NAME##_bfd_merge_private_bfd_data, \ 5901 _bfd_generic_init_private_section_data, \ 5902 NAME##_bfd_copy_private_section_data, \ 5903 NAME##_bfd_copy_private_symbol_data, \ 5904 NAME##_bfd_copy_private_header_data, \ 5905 NAME##_bfd_set_private_flags, \ 5906 NAME##_bfd_print_private_bfd_data 5907 5908 /* Called to copy BFD general private data from one object file 5909 to another. */ 5910 bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); 5911 /* Called to merge BFD general private data from one object file 5912 to a common output file when linking. */ 5913 bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); 5914 /* Called to initialize BFD private section data from one object file 5915 to another. */ 5916 #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ 5917 BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) 5918 bfd_boolean (*_bfd_init_private_section_data) 5919 (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); 5920 /* Called to copy BFD private section data from one object file 5921 to another. */ 5922 bfd_boolean (*_bfd_copy_private_section_data) 5923 (bfd *, sec_ptr, bfd *, sec_ptr); 5924 /* Called to copy BFD private symbol data from one symbol 5925 to another. */ 5926 bfd_boolean (*_bfd_copy_private_symbol_data) 5927 (bfd *, asymbol *, bfd *, asymbol *); 5928 /* Called to copy BFD private header data from one object file 5929 to another. */ 5930 bfd_boolean (*_bfd_copy_private_header_data) 5931 (bfd *, bfd *); 5932 /* Called to set private backend flags. */ 5933 bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); 5934 5935 /* Called to print private BFD data. */ 5936 bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *); 5937 5938 /* Core file entry points. */ 5939 #define BFD_JUMP_TABLE_CORE(NAME) \ 5940 NAME##_core_file_failing_command, \ 5941 NAME##_core_file_failing_signal, \ 5942 NAME##_core_file_matches_executable_p 5943 5944 char * (*_core_file_failing_command) (bfd *); 5945 int (*_core_file_failing_signal) (bfd *); 5946 bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *); 5947 5948 /* Archive entry points. */ 5949 #define BFD_JUMP_TABLE_ARCHIVE(NAME) \ 5950 NAME##_slurp_armap, \ 5951 NAME##_slurp_extended_name_table, \ 5952 NAME##_construct_extended_name_table, \ 5953 NAME##_truncate_arname, \ 5954 NAME##_write_armap, \ 5955 NAME##_read_ar_hdr, \ 5956 NAME##_write_ar_hdr, \ 5957 NAME##_openr_next_archived_file, \ 5958 NAME##_get_elt_at_index, \ 5959 NAME##_generic_stat_arch_elt, \ 5960 NAME##_update_armap_timestamp 5961 5962 bfd_boolean (*_bfd_slurp_armap) (bfd *); 5963 bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); 5964 bfd_boolean (*_bfd_construct_extended_name_table) 5965 (bfd *, char **, bfd_size_type *, const char **); 5966 void (*_bfd_truncate_arname) (bfd *, const char *, char *); 5967 bfd_boolean (*write_armap) 5968 (bfd *, unsigned int, struct orl *, unsigned int, int); 5969 void * (*_bfd_read_ar_hdr_fn) (bfd *); 5970 bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); 5971 bfd * (*openr_next_archived_file) (bfd *, bfd *); 5972 #define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) 5973 bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); 5974 int (*_bfd_stat_arch_elt) (bfd *, struct stat *); 5975 bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); 5976 5977 /* Entry points used for symbols. */ 5978 #define BFD_JUMP_TABLE_SYMBOLS(NAME) \ 5979 NAME##_get_symtab_upper_bound, \ 5980 NAME##_canonicalize_symtab, \ 5981 NAME##_make_empty_symbol, \ 5982 NAME##_print_symbol, \ 5983 NAME##_get_symbol_info, \ 5984 NAME##_bfd_is_local_label_name, \ 5985 NAME##_bfd_is_target_special_symbol, \ 5986 NAME##_get_lineno, \ 5987 NAME##_find_nearest_line, \ 5988 _bfd_generic_find_line, \ 5989 NAME##_find_inliner_info, \ 5990 NAME##_bfd_make_debug_symbol, \ 5991 NAME##_read_minisymbols, \ 5992 NAME##_minisymbol_to_symbol 5993 5994 long (*_bfd_get_symtab_upper_bound) (bfd *); 5995 long (*_bfd_canonicalize_symtab) 5996 (bfd *, struct bfd_symbol **); 5997 struct bfd_symbol * 5998 (*_bfd_make_empty_symbol) (bfd *); 5999 void (*_bfd_print_symbol) 6000 (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); 6001 #define bfd_print_symbol(b,p,s,e) BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) 6002 void (*_bfd_get_symbol_info) 6003 (bfd *, struct bfd_symbol *, symbol_info *); 6004 #define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) 6005 bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); 6006 bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); 6007 alent * (*_get_lineno) (bfd *, struct bfd_symbol *); 6008 bfd_boolean (*_bfd_find_nearest_line) 6009 (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, 6010 const char **, const char **, unsigned int *); 6011 bfd_boolean (*_bfd_find_line) 6012 (bfd *, struct bfd_symbol **, struct bfd_symbol *, 6013 const char **, unsigned int *); 6014 bfd_boolean (*_bfd_find_inliner_info) 6015 (bfd *, const char **, const char **, unsigned int *); 6016 /* Back-door to allow format-aware applications to create debug symbols 6017 while using BFD for everything else. Currently used by the assembler 6018 when creating COFF files. */ 6019 asymbol * (*_bfd_make_debug_symbol) 6020 (bfd *, void *, unsigned long size); 6021 #define bfd_read_minisymbols(b, d, m, s) \ 6022 BFD_SEND (b, _read_minisymbols, (b, d, m, s)) 6023 long (*_read_minisymbols) 6024 (bfd *, bfd_boolean, void **, unsigned int *); 6025 #define bfd_minisymbol_to_symbol(b, d, m, f) \ 6026 BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) 6027 asymbol * (*_minisymbol_to_symbol) 6028 (bfd *, bfd_boolean, const void *, asymbol *); 6029 6030 /* Routines for relocs. */ 6031 #define BFD_JUMP_TABLE_RELOCS(NAME) \ 6032 NAME##_get_reloc_upper_bound, \ 6033 NAME##_canonicalize_reloc, \ 6034 NAME##_bfd_reloc_type_lookup, \ 6035 NAME##_bfd_reloc_name_lookup 6036 6037 long (*_get_reloc_upper_bound) (bfd *, sec_ptr); 6038 long (*_bfd_canonicalize_reloc) 6039 (bfd *, sec_ptr, arelent **, struct bfd_symbol **); 6040 /* See documentation on reloc types. */ 6041 reloc_howto_type * 6042 (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); 6043 reloc_howto_type * 6044 (*reloc_name_lookup) (bfd *, const char *); 6045 6046 6047 /* Routines used when writing an object file. */ 6048 #define BFD_JUMP_TABLE_WRITE(NAME) \ 6049 NAME##_set_arch_mach, \ 6050 NAME##_set_section_contents 6051 6052 bfd_boolean (*_bfd_set_arch_mach) 6053 (bfd *, enum bfd_architecture, unsigned long); 6054 bfd_boolean (*_bfd_set_section_contents) 6055 (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); 6056 6057 /* Routines used by the linker. */ 6058 #define BFD_JUMP_TABLE_LINK(NAME) \ 6059 NAME##_sizeof_headers, \ 6060 NAME##_bfd_get_relocated_section_contents, \ 6061 NAME##_bfd_relax_section, \ 6062 NAME##_bfd_link_hash_table_create, \ 6063 NAME##_bfd_link_hash_table_free, \ 6064 NAME##_bfd_link_add_symbols, \ 6065 NAME##_bfd_link_just_syms, \ 6066 NAME##_bfd_copy_link_hash_symbol_type, \ 6067 NAME##_bfd_final_link, \ 6068 NAME##_bfd_link_split_section, \ 6069 NAME##_bfd_gc_sections, \ 6070 NAME##_bfd_merge_sections, \ 6071 NAME##_bfd_is_group_section, \ 6072 NAME##_bfd_discard_group, \ 6073 NAME##_section_already_linked, \ 6074 NAME##_bfd_define_common_symbol 6075 6076 int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); 6077 bfd_byte * (*_bfd_get_relocated_section_contents) 6078 (bfd *, struct bfd_link_info *, struct bfd_link_order *, 6079 bfd_byte *, bfd_boolean, struct bfd_symbol **); 6080 6081 bfd_boolean (*_bfd_relax_section) 6082 (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); 6083 6084 /* Create a hash table for the linker. Different backends store 6085 different information in this table. */ 6086 struct bfd_link_hash_table * 6087 (*_bfd_link_hash_table_create) (bfd *); 6088 6089 /* Release the memory associated with the linker hash table. */ 6090 void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); 6091 6092 /* Add symbols from this object file into the hash table. */ 6093 bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); 6094 6095 /* Indicate that we are only retrieving symbol values from this section. */ 6096 void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); 6097 6098 /* Copy the symbol type of a linker hash table entry. */ 6099 #define bfd_copy_link_hash_symbol_type(b, t, f) \ 6100 BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) 6101 void (*_bfd_copy_link_hash_symbol_type) 6102 (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); 6103 6104 /* Do a link based on the link_order structures attached to each 6105 section of the BFD. */ 6106 bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *); 6107 6108 /* Should this section be split up into smaller pieces during linking. */ 6109 bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); 6110 6111 /* Remove sections that are not referenced from the output. */ 6112 bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); 6113 6114 /* Attempt to merge SEC_MERGE sections. */ 6115 bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); 6116 6117 /* Is this section a member of a group? */ 6118 bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); 6119 6120 /* Discard members of a group. */ 6121 bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); 6122 6123 /* Check if SEC has been already linked during a reloceatable or 6124 final link. */ 6125 void (*_section_already_linked) (bfd *, struct bfd_section *, 6126 struct bfd_link_info *); 6127 6128 /* Define a common symbol. */ 6129 bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, 6130 struct bfd_link_hash_entry *); 6131 6132 /* Routines to handle dynamic symbols and relocs. */ 6133 #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ 6134 NAME##_get_dynamic_symtab_upper_bound, \ 6135 NAME##_canonicalize_dynamic_symtab, \ 6136 NAME##_get_synthetic_symtab, \ 6137 NAME##_get_dynamic_reloc_upper_bound, \ 6138 NAME##_canonicalize_dynamic_reloc 6139 6140 /* Get the amount of memory required to hold the dynamic symbols. */ 6141 long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); 6142 /* Read in the dynamic symbols. */ 6143 long (*_bfd_canonicalize_dynamic_symtab) 6144 (bfd *, struct bfd_symbol **); 6145 /* Create synthetized symbols. */ 6146 long (*_bfd_get_synthetic_symtab) 6147 (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, 6148 struct bfd_symbol **); 6149 /* Get the amount of memory required to hold the dynamic relocs. */ 6150 long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); 6151 /* Read in the dynamic relocs. */ 6152 long (*_bfd_canonicalize_dynamic_reloc) 6153 (bfd *, arelent **, struct bfd_symbol **); 6154 A pointer to an alternative bfd_target in case the current one is not 6155 satisfactory. This can happen when the target cpu supports both big 6156 and little endian code, and target chosen by the linker has the wrong 6157 endianness. The function open_output() in ld/ldlang.c uses this field 6158 to find an alternative output format that is suitable. 6159 /* Opposite endian version of this target. */ 6160 const struct bfd_target * alternative_target; 6161 6162 /* Data for use by back-end routines, which isn't 6163 generic enough to belong in this structure. */ 6164 const void *backend_data; 6165 6166 } bfd_target; 6167 6168 2.12.1.1 `bfd_set_default_target' 6169 ................................. 6170 6171 *Synopsis* 6172 bfd_boolean bfd_set_default_target (const char *name); 6173 *Description* 6174 Set the default target vector to use when recognizing a BFD. This 6175 takes the name of the target, which may be a BFD target name or a 6176 configuration triplet. 6177 6178 2.12.1.2 `bfd_find_target' 6179 .......................... 6180 6181 *Synopsis* 6182 const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); 6183 *Description* 6184 Return a pointer to the transfer vector for the object target named 6185 TARGET_NAME. If TARGET_NAME is `NULL', choose the one in the 6186 environment variable `GNUTARGET'; if that is null or not defined, then 6187 choose the first entry in the target list. Passing in the string 6188 "default" or setting the environment variable to "default" will cause 6189 the first entry in the target list to be returned, and 6190 "target_defaulted" will be set in the BFD if ABFD isn't `NULL'. This 6191 causes `bfd_check_format' to loop over all the targets to find the one 6192 that matches the file being read. 6193 6194 2.12.1.3 `bfd_get_target_info' 6195 .............................. 6196 6197 *Synopsis* 6198 const bfd_target *bfd_get_target_info (const char *target_name, 6199 bfd *abfd, 6200 bfd_boolean *is_bigendian, 6201 int *underscoring, 6202 const char **def_target_arch); 6203 *Description* 6204 Return a pointer to the transfer vector for the object target named 6205 TARGET_NAME. If TARGET_NAME is `NULL', choose the one in the 6206 environment variable `GNUTARGET'; if that is null or not defined, then 6207 choose the first entry in the target list. Passing in the string 6208 "default" or setting the environment variable to "default" will cause 6209 the first entry in the target list to be returned, and 6210 "target_defaulted" will be set in the BFD if ABFD isn't `NULL'. This 6211 causes `bfd_check_format' to loop over all the targets to find the one 6212 that matches the file being read. If IS_BIGENDIAN is not `NULL', then 6213 set this value to target's endian mode. True for big-endian, FALSE for 6214 little-endian or for invalid target. If UNDERSCORING is not `NULL', 6215 then set this value to target's underscoring mode. Zero for 6216 none-underscoring, -1 for invalid target, else the value of target 6217 vector's symbol underscoring. If DEF_TARGET_ARCH is not `NULL', then 6218 set it to the architecture string specified by the target_name. 6219 6220 2.12.1.4 `bfd_target_list' 6221 .......................... 6222 6223 *Synopsis* 6224 const char ** bfd_target_list (void); 6225 *Description* 6226 Return a freshly malloced NULL-terminated vector of the names of all 6227 the valid BFD targets. Do not modify the names. 6228 6229 2.12.1.5 `bfd_seach_for_target' 6230 ............................... 6231 6232 *Synopsis* 6233 const bfd_target *bfd_search_for_target 6234 (int (*search_func) (const bfd_target *, void *), 6235 void *); 6236 *Description* 6237 Return a pointer to the first transfer vector in the list of transfer 6238 vectors maintained by BFD that produces a non-zero result when passed 6239 to the function SEARCH_FUNC. The parameter DATA is passed, unexamined, 6240 to the search function. 6241 6242 6243 File: bfd.info, Node: Architectures, Next: Opening and Closing, Prev: Targets, Up: BFD front end 6244 6245 2.13 Architectures 6246 ================== 6247 6248 BFD keeps one atom in a BFD describing the architecture of the data 6249 attached to the BFD: a pointer to a `bfd_arch_info_type'. 6250 6251 Pointers to structures can be requested independently of a BFD so 6252 that an architecture's information can be interrogated without access 6253 to an open BFD. 6254 6255 The architecture information is provided by each architecture 6256 package. The set of default architectures is selected by the macro 6257 `SELECT_ARCHITECTURES'. This is normally set up in the 6258 `config/TARGET.mt' file of your choice. If the name is not defined, 6259 then all the architectures supported are included. 6260 6261 When BFD starts up, all the architectures are called with an 6262 initialize method. It is up to the architecture back end to insert as 6263 many items into the list of architectures as it wants to; generally 6264 this would be one for each machine and one for the default case (an 6265 item with a machine field of 0). 6266 6267 BFD's idea of an architecture is implemented in `archures.c'. 6268 6269 2.13.1 bfd_architecture 6270 ----------------------- 6271 6272 *Description* 6273 This enum gives the object file's CPU architecture, in a global 6274 sense--i.e., what processor family does it belong to? Another field 6275 indicates which processor within the family is in use. The machine 6276 gives a number which distinguishes different versions of the 6277 architecture, containing, for example, 2 and 3 for Intel i960 KA and 6278 i960 KB, and 68020 and 68030 for Motorola 68020 and 68030. 6279 enum bfd_architecture 6280 { 6281 bfd_arch_unknown, /* File arch not known. */ 6282 bfd_arch_obscure, /* Arch known, not one of these. */ 6283 bfd_arch_m68k, /* Motorola 68xxx */ 6284 #define bfd_mach_m68000 1 6285 #define bfd_mach_m68008 2 6286 #define bfd_mach_m68010 3 6287 #define bfd_mach_m68020 4 6288 #define bfd_mach_m68030 5 6289 #define bfd_mach_m68040 6 6290 #define bfd_mach_m68060 7 6291 #define bfd_mach_cpu32 8 6292 #define bfd_mach_fido 9 6293 #define bfd_mach_mcf_isa_a_nodiv 10 6294 #define bfd_mach_mcf_isa_a 11 6295 #define bfd_mach_mcf_isa_a_mac 12 6296 #define bfd_mach_mcf_isa_a_emac 13 6297 #define bfd_mach_mcf_isa_aplus 14 6298 #define bfd_mach_mcf_isa_aplus_mac 15 6299 #define bfd_mach_mcf_isa_aplus_emac 16 6300 #define bfd_mach_mcf_isa_b_nousp 17 6301 #define bfd_mach_mcf_isa_b_nousp_mac 18 6302 #define bfd_mach_mcf_isa_b_nousp_emac 19 6303 #define bfd_mach_mcf_isa_b 20 6304 #define bfd_mach_mcf_isa_b_mac 21 6305 #define bfd_mach_mcf_isa_b_emac 22 6306 #define bfd_mach_mcf_isa_b_float 23 6307 #define bfd_mach_mcf_isa_b_float_mac 24 6308 #define bfd_mach_mcf_isa_b_float_emac 25 6309 #define bfd_mach_mcf_isa_c 26 6310 #define bfd_mach_mcf_isa_c_mac 27 6311 #define bfd_mach_mcf_isa_c_emac 28 6312 #define bfd_mach_mcf_isa_c_nodiv 29 6313 #define bfd_mach_mcf_isa_c_nodiv_mac 30 6314 #define bfd_mach_mcf_isa_c_nodiv_emac 31 6315 bfd_arch_vax, /* DEC Vax */ 6316 bfd_arch_i960, /* Intel 960 */ 6317 /* The order of the following is important. 6318 lower number indicates a machine type that 6319 only accepts a subset of the instructions 6320 available to machines with higher numbers. 6321 The exception is the "ca", which is 6322 incompatible with all other machines except 6323 "core". */ 6324 6325 #define bfd_mach_i960_core 1 6326 #define bfd_mach_i960_ka_sa 2 6327 #define bfd_mach_i960_kb_sb 3 6328 #define bfd_mach_i960_mc 4 6329 #define bfd_mach_i960_xa 5 6330 #define bfd_mach_i960_ca 6 6331 #define bfd_mach_i960_jx 7 6332 #define bfd_mach_i960_hx 8 6333 6334 bfd_arch_or32, /* OpenRISC 32 */ 6335 6336 bfd_arch_sparc, /* SPARC */ 6337 #define bfd_mach_sparc 1 6338 /* The difference between v8plus and v9 is that v9 is a true 64 bit env. */ 6339 #define bfd_mach_sparc_sparclet 2 6340 #define bfd_mach_sparc_sparclite 3 6341 #define bfd_mach_sparc_v8plus 4 6342 #define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */ 6343 #define bfd_mach_sparc_sparclite_le 6 6344 #define bfd_mach_sparc_v9 7 6345 #define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */ 6346 #define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */ 6347 #define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */ 6348 /* Nonzero if MACH has the v9 instruction set. */ 6349 #define bfd_mach_sparc_v9_p(mach) \ 6350 ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \ 6351 && (mach) != bfd_mach_sparc_sparclite_le) 6352 /* Nonzero if MACH is a 64 bit sparc architecture. */ 6353 #define bfd_mach_sparc_64bit_p(mach) \ 6354 ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb) 6355 bfd_arch_spu, /* PowerPC SPU */ 6356 #define bfd_mach_spu 256 6357 bfd_arch_mips, /* MIPS Rxxxx */ 6358 #define bfd_mach_mips3000 3000 6359 #define bfd_mach_mips3900 3900 6360 #define bfd_mach_mips4000 4000 6361 #define bfd_mach_mips4010 4010 6362 #define bfd_mach_mips4100 4100 6363 #define bfd_mach_mips4111 4111 6364 #define bfd_mach_mips4120 4120 6365 #define bfd_mach_mips4300 4300 6366 #define bfd_mach_mips4400 4400 6367 #define bfd_mach_mips4600 4600 6368 #define bfd_mach_mips4650 4650 6369 #define bfd_mach_mips5000 5000 6370 #define bfd_mach_mips5400 5400 6371 #define bfd_mach_mips5500 5500 6372 #define bfd_mach_mips6000 6000 6373 #define bfd_mach_mips7000 7000 6374 #define bfd_mach_mips8000 8000 6375 #define bfd_mach_mips9000 9000 6376 #define bfd_mach_mips10000 10000 6377 #define bfd_mach_mips12000 12000 6378 #define bfd_mach_mips14000 14000 6379 #define bfd_mach_mips16000 16000 6380 #define bfd_mach_mips16 16 6381 #define bfd_mach_mips5 5 6382 #define bfd_mach_mips_loongson_2e 3001 6383 #define bfd_mach_mips_loongson_2f 3002 6384 #define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ 6385 #define bfd_mach_mips_octeon 6501 6386 #define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */ 6387 #define bfd_mach_mipsisa32 32 6388 #define bfd_mach_mipsisa32r2 33 6389 #define bfd_mach_mipsisa64 64 6390 #define bfd_mach_mipsisa64r2 65 6391 bfd_arch_i386, /* Intel 386 */ 6392 #define bfd_mach_i386_i386 1 6393 #define bfd_mach_i386_i8086 2 6394 #define bfd_mach_i386_i386_intel_syntax 3 6395 #define bfd_mach_x86_64 64 6396 #define bfd_mach_x86_64_intel_syntax 65 6397 bfd_arch_l1om, /* Intel L1OM */ 6398 #define bfd_mach_l1om 66 6399 #define bfd_mach_l1om_intel_syntax 67 6400 bfd_arch_we32k, /* AT&T WE32xxx */ 6401 bfd_arch_tahoe, /* CCI/Harris Tahoe */ 6402 bfd_arch_i860, /* Intel 860 */ 6403 bfd_arch_i370, /* IBM 360/370 Mainframes */ 6404 bfd_arch_romp, /* IBM ROMP PC/RT */ 6405 bfd_arch_convex, /* Convex */ 6406 bfd_arch_m88k, /* Motorola 88xxx */ 6407 bfd_arch_m98k, /* Motorola 98xxx */ 6408 bfd_arch_pyramid, /* Pyramid Technology */ 6409 bfd_arch_h8300, /* Renesas H8/300 (formerly Hitachi H8/300) */ 6410 #define bfd_mach_h8300 1 6411 #define bfd_mach_h8300h 2 6412 #define bfd_mach_h8300s 3 6413 #define bfd_mach_h8300hn 4 6414 #define bfd_mach_h8300sn 5 6415 #define bfd_mach_h8300sx 6 6416 #define bfd_mach_h8300sxn 7 6417 bfd_arch_pdp11, /* DEC PDP-11 */ 6418 bfd_arch_plugin, 6419 bfd_arch_powerpc, /* PowerPC */ 6420 #define bfd_mach_ppc 32 6421 #define bfd_mach_ppc64 64 6422 #define bfd_mach_ppc_403 403 6423 #define bfd_mach_ppc_403gc 4030 6424 #define bfd_mach_ppc_405 405 6425 #define bfd_mach_ppc_505 505 6426 #define bfd_mach_ppc_601 601 6427 #define bfd_mach_ppc_602 602 6428 #define bfd_mach_ppc_603 603 6429 #define bfd_mach_ppc_ec603e 6031 6430 #define bfd_mach_ppc_604 604 6431 #define bfd_mach_ppc_620 620 6432 #define bfd_mach_ppc_630 630 6433 #define bfd_mach_ppc_750 750 6434 #define bfd_mach_ppc_860 860 6435 #define bfd_mach_ppc_a35 35 6436 #define bfd_mach_ppc_rs64ii 642 6437 #define bfd_mach_ppc_rs64iii 643 6438 #define bfd_mach_ppc_7400 7400 6439 #define bfd_mach_ppc_e500 500 6440 #define bfd_mach_ppc_e500mc 5001 6441 #define bfd_mach_ppc_e500mc64 5005 6442 #define bfd_mach_ppc_titan 83 6443 bfd_arch_rs6000, /* IBM RS/6000 */ 6444 #define bfd_mach_rs6k 6000 6445 #define bfd_mach_rs6k_rs1 6001 6446 #define bfd_mach_rs6k_rsc 6003 6447 #define bfd_mach_rs6k_rs2 6002 6448 bfd_arch_hppa, /* HP PA RISC */ 6449 #define bfd_mach_hppa10 10 6450 #define bfd_mach_hppa11 11 6451 #define bfd_mach_hppa20 20 6452 #define bfd_mach_hppa20w 25 6453 bfd_arch_d10v, /* Mitsubishi D10V */ 6454 #define bfd_mach_d10v 1 6455 #define bfd_mach_d10v_ts2 2 6456 #define bfd_mach_d10v_ts3 3 6457 bfd_arch_d30v, /* Mitsubishi D30V */ 6458 bfd_arch_dlx, /* DLX */ 6459 bfd_arch_m68hc11, /* Motorola 68HC11 */ 6460 bfd_arch_m68hc12, /* Motorola 68HC12 */ 6461 #define bfd_mach_m6812_default 0 6462 #define bfd_mach_m6812 1 6463 #define bfd_mach_m6812s 2 6464 bfd_arch_z8k, /* Zilog Z8000 */ 6465 #define bfd_mach_z8001 1 6466 #define bfd_mach_z8002 2 6467 bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ 6468 bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ 6469 #define bfd_mach_sh 1 6470 #define bfd_mach_sh2 0x20 6471 #define bfd_mach_sh_dsp 0x2d 6472 #define bfd_mach_sh2a 0x2a 6473 #define bfd_mach_sh2a_nofpu 0x2b 6474 #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 6475 #define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 6476 #define bfd_mach_sh2a_or_sh4 0x2a3 6477 #define bfd_mach_sh2a_or_sh3e 0x2a4 6478 #define bfd_mach_sh2e 0x2e 6479 #define bfd_mach_sh3 0x30 6480 #define bfd_mach_sh3_nommu 0x31 6481 #define bfd_mach_sh3_dsp 0x3d 6482 #define bfd_mach_sh3e 0x3e 6483 #define bfd_mach_sh4 0x40 6484 #define bfd_mach_sh4_nofpu 0x41 6485 #define bfd_mach_sh4_nommu_nofpu 0x42 6486 #define bfd_mach_sh4a 0x4a 6487 #define bfd_mach_sh4a_nofpu 0x4b 6488 #define bfd_mach_sh4al_dsp 0x4d 6489 #define bfd_mach_sh5 0x50 6490 bfd_arch_alpha, /* Dec Alpha */ 6491 #define bfd_mach_alpha_ev4 0x10 6492 #define bfd_mach_alpha_ev5 0x20 6493 #define bfd_mach_alpha_ev6 0x30 6494 bfd_arch_arm, /* Advanced Risc Machines ARM. */ 6495 #define bfd_mach_arm_unknown 0 6496 #define bfd_mach_arm_2 1 6497 #define bfd_mach_arm_2a 2 6498 #define bfd_mach_arm_3 3 6499 #define bfd_mach_arm_3M 4 6500 #define bfd_mach_arm_4 5 6501 #define bfd_mach_arm_4T 6 6502 #define bfd_mach_arm_5 7 6503 #define bfd_mach_arm_5T 8 6504 #define bfd_mach_arm_5TE 9 6505 #define bfd_mach_arm_XScale 10 6506 #define bfd_mach_arm_ep9312 11 6507 #define bfd_mach_arm_iWMMXt 12 6508 #define bfd_mach_arm_iWMMXt2 13 6509 bfd_arch_ns32k, /* National Semiconductors ns32000 */ 6510 bfd_arch_w65, /* WDC 65816 */ 6511 bfd_arch_tic30, /* Texas Instruments TMS320C30 */ 6512 bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ 6513 #define bfd_mach_tic3x 30 6514 #define bfd_mach_tic4x 40 6515 bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ 6516 bfd_arch_tic80, /* TI TMS320c80 (MVP) */ 6517 bfd_arch_v850, /* NEC V850 */ 6518 #define bfd_mach_v850 1 6519 #define bfd_mach_v850e 'E' 6520 #define bfd_mach_v850e1 '1' 6521 bfd_arch_arc, /* ARC Cores */ 6522 #define bfd_mach_arc_5 5 6523 #define bfd_mach_arc_6 6 6524 #define bfd_mach_arc_7 7 6525 #define bfd_mach_arc_8 8 6526 bfd_arch_m32c, /* Renesas M16C/M32C. */ 6527 #define bfd_mach_m16c 0x75 6528 #define bfd_mach_m32c 0x78 6529 bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ 6530 #define bfd_mach_m32r 1 /* For backwards compatibility. */ 6531 #define bfd_mach_m32rx 'x' 6532 #define bfd_mach_m32r2 '2' 6533 bfd_arch_mn10200, /* Matsushita MN10200 */ 6534 bfd_arch_mn10300, /* Matsushita MN10300 */ 6535 #define bfd_mach_mn10300 300 6536 #define bfd_mach_am33 330 6537 #define bfd_mach_am33_2 332 6538 bfd_arch_fr30, 6539 #define bfd_mach_fr30 0x46523330 6540 bfd_arch_frv, 6541 #define bfd_mach_frv 1 6542 #define bfd_mach_frvsimple 2 6543 #define bfd_mach_fr300 300 6544 #define bfd_mach_fr400 400 6545 #define bfd_mach_fr450 450 6546 #define bfd_mach_frvtomcat 499 /* fr500 prototype */ 6547 #define bfd_mach_fr500 500 6548 #define bfd_mach_fr550 550 6549 bfd_arch_moxie, /* The moxie processor */ 6550 #define bfd_mach_moxie 1 6551 bfd_arch_mcore, 6552 bfd_arch_mep, 6553 #define bfd_mach_mep 1 6554 #define bfd_mach_mep_h1 0x6831 6555 #define bfd_mach_mep_c5 0x6335 6556 bfd_arch_ia64, /* HP/Intel ia64 */ 6557 #define bfd_mach_ia64_elf64 64 6558 #define bfd_mach_ia64_elf32 32 6559 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ 6560 #define bfd_mach_ip2022 1 6561 #define bfd_mach_ip2022ext 2 6562 bfd_arch_iq2000, /* Vitesse IQ2000. */ 6563 #define bfd_mach_iq2000 1 6564 #define bfd_mach_iq10 2 6565 bfd_arch_mt, 6566 #define bfd_mach_ms1 1 6567 #define bfd_mach_mrisc2 2 6568 #define bfd_mach_ms2 3 6569 bfd_arch_pj, 6570 bfd_arch_avr, /* Atmel AVR microcontrollers. */ 6571 #define bfd_mach_avr1 1 6572 #define bfd_mach_avr2 2 6573 #define bfd_mach_avr25 25 6574 #define bfd_mach_avr3 3 6575 #define bfd_mach_avr31 31 6576 #define bfd_mach_avr35 35 6577 #define bfd_mach_avr4 4 6578 #define bfd_mach_avr5 5 6579 #define bfd_mach_avr51 51 6580 #define bfd_mach_avr6 6 6581 bfd_arch_bfin, /* ADI Blackfin */ 6582 #define bfd_mach_bfin 1 6583 bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ 6584 #define bfd_mach_cr16 1 6585 bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ 6586 #define bfd_mach_cr16c 1 6587 bfd_arch_crx, /* National Semiconductor CRX. */ 6588 #define bfd_mach_crx 1 6589 bfd_arch_cris, /* Axis CRIS */ 6590 #define bfd_mach_cris_v0_v10 255 6591 #define bfd_mach_cris_v32 32 6592 #define bfd_mach_cris_v10_v32 1032 6593 bfd_arch_rx, /* Renesas RX. */ 6594 #define bfd_mach_rx 0x75 6595 bfd_arch_s390, /* IBM s390 */ 6596 #define bfd_mach_s390_31 31 6597 #define bfd_mach_s390_64 64 6598 bfd_arch_score, /* Sunplus score */ 6599 #define bfd_mach_score3 3 6600 #define bfd_mach_score7 7 6601 bfd_arch_openrisc, /* OpenRISC */ 6602 bfd_arch_mmix, /* Donald Knuth's educational processor. */ 6603 bfd_arch_xstormy16, 6604 #define bfd_mach_xstormy16 1 6605 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ 6606 #define bfd_mach_msp11 11 6607 #define bfd_mach_msp110 110 6608 #define bfd_mach_msp12 12 6609 #define bfd_mach_msp13 13 6610 #define bfd_mach_msp14 14 6611 #define bfd_mach_msp15 15 6612 #define bfd_mach_msp16 16 6613 #define bfd_mach_msp21 21 6614 #define bfd_mach_msp31 31 6615 #define bfd_mach_msp32 32 6616 #define bfd_mach_msp33 33 6617 #define bfd_mach_msp41 41 6618 #define bfd_mach_msp42 42 6619 #define bfd_mach_msp43 43 6620 #define bfd_mach_msp44 44 6621 bfd_arch_xc16x, /* Infineon's XC16X Series. */ 6622 #define bfd_mach_xc16x 1 6623 #define bfd_mach_xc16xl 2 6624 #define bfd_mach_xc16xs 3 6625 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ 6626 #define bfd_mach_xtensa 1 6627 bfd_arch_maxq, /* Dallas MAXQ 10/20 */ 6628 #define bfd_mach_maxq10 10 6629 #define bfd_mach_maxq20 20 6630 bfd_arch_z80, 6631 #define bfd_mach_z80strict 1 /* No undocumented opcodes. */ 6632 #define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ 6633 #define bfd_mach_z80full 7 /* All undocumented instructions. */ 6634 #define bfd_mach_r800 11 /* R800: successor with multiplication. */ 6635 bfd_arch_lm32, /* Lattice Mico32 */ 6636 #define bfd_mach_lm32 1 6637 bfd_arch_microblaze,/* Xilinx MicroBlaze. */ 6638 bfd_arch_last 6639 }; 6640 6641 2.13.2 bfd_arch_info 6642 -------------------- 6643 6644 *Description* 6645 This structure contains information on architectures for use within BFD. 6646 6647 typedef struct bfd_arch_info 6648 { 6649 int bits_per_word; 6650 int bits_per_address; 6651 int bits_per_byte; 6652 enum bfd_architecture arch; 6653 unsigned long mach; 6654 const char *arch_name; 6655 const char *printable_name; 6656 unsigned int section_align_power; 6657 /* TRUE if this is the default machine for the architecture. 6658 The default arch should be the first entry for an arch so that 6659 all the entries for that arch can be accessed via `next'. */ 6660 bfd_boolean the_default; 6661 const struct bfd_arch_info * (*compatible) 6662 (const struct bfd_arch_info *a, const struct bfd_arch_info *b); 6663 6664 bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); 6665 6666 const struct bfd_arch_info *next; 6667 } 6668 bfd_arch_info_type; 6669 6670 2.13.2.1 `bfd_printable_name' 6671 ............................. 6672 6673 *Synopsis* 6674 const char *bfd_printable_name (bfd *abfd); 6675 *Description* 6676 Return a printable string representing the architecture and machine 6677 from the pointer to the architecture info structure. 6678 6679 2.13.2.2 `bfd_scan_arch' 6680 ........................ 6681 6682 *Synopsis* 6683 const bfd_arch_info_type *bfd_scan_arch (const char *string); 6684 *Description* 6685 Figure out if BFD supports any cpu which could be described with the 6686 name STRING. Return a pointer to an `arch_info' structure if a machine 6687 is found, otherwise NULL. 6688 6689 2.13.2.3 `bfd_arch_list' 6690 ........................ 6691 6692 *Synopsis* 6693 const char **bfd_arch_list (void); 6694 *Description* 6695 Return a freshly malloced NULL-terminated vector of the names of all 6696 the valid BFD architectures. Do not modify the names. 6697 6698 2.13.2.4 `bfd_arch_get_compatible' 6699 .................................. 6700 6701 *Synopsis* 6702 const bfd_arch_info_type *bfd_arch_get_compatible 6703 (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns); 6704 *Description* 6705 Determine whether two BFDs' architectures and machine types are 6706 compatible. Calculates the lowest common denominator between the two 6707 architectures and machine types implied by the BFDs and returns a 6708 pointer to an `arch_info' structure describing the compatible machine. 6709 6710 2.13.2.5 `bfd_default_arch_struct' 6711 .................................. 6712 6713 *Description* 6714 The `bfd_default_arch_struct' is an item of `bfd_arch_info_type' which 6715 has been initialized to a fairly generic state. A BFD starts life by 6716 pointing to this structure, until the correct back end has determined 6717 the real architecture of the file. 6718 extern const bfd_arch_info_type bfd_default_arch_struct; 6719 6720 2.13.2.6 `bfd_set_arch_info' 6721 ............................ 6722 6723 *Synopsis* 6724 void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); 6725 *Description* 6726 Set the architecture info of ABFD to ARG. 6727 6728 2.13.2.7 `bfd_default_set_arch_mach' 6729 .................................... 6730 6731 *Synopsis* 6732 bfd_boolean bfd_default_set_arch_mach 6733 (bfd *abfd, enum bfd_architecture arch, unsigned long mach); 6734 *Description* 6735 Set the architecture and machine type in BFD ABFD to ARCH and MACH. 6736 Find the correct pointer to a structure and insert it into the 6737 `arch_info' pointer. 6738 6739 2.13.2.8 `bfd_get_arch' 6740 ....................... 6741 6742 *Synopsis* 6743 enum bfd_architecture bfd_get_arch (bfd *abfd); 6744 *Description* 6745 Return the enumerated type which describes the BFD ABFD's architecture. 6746 6747 2.13.2.9 `bfd_get_mach' 6748 ....................... 6749 6750 *Synopsis* 6751 unsigned long bfd_get_mach (bfd *abfd); 6752 *Description* 6753 Return the long type which describes the BFD ABFD's machine. 6754 6755 2.13.2.10 `bfd_arch_bits_per_byte' 6756 .................................. 6757 6758 *Synopsis* 6759 unsigned int bfd_arch_bits_per_byte (bfd *abfd); 6760 *Description* 6761 Return the number of bits in one of the BFD ABFD's architecture's bytes. 6762 6763 2.13.2.11 `bfd_arch_bits_per_address' 6764 ..................................... 6765 6766 *Synopsis* 6767 unsigned int bfd_arch_bits_per_address (bfd *abfd); 6768 *Description* 6769 Return the number of bits in one of the BFD ABFD's architecture's 6770 addresses. 6771 6772 2.13.2.12 `bfd_default_compatible' 6773 .................................. 6774 6775 *Synopsis* 6776 const bfd_arch_info_type *bfd_default_compatible 6777 (const bfd_arch_info_type *a, const bfd_arch_info_type *b); 6778 *Description* 6779 The default function for testing for compatibility. 6780 6781 2.13.2.13 `bfd_default_scan' 6782 ............................ 6783 6784 *Synopsis* 6785 bfd_boolean bfd_default_scan 6786 (const struct bfd_arch_info *info, const char *string); 6787 *Description* 6788 The default function for working out whether this is an architecture 6789 hit and a machine hit. 6790 6791 2.13.2.14 `bfd_get_arch_info' 6792 ............................. 6793 6794 *Synopsis* 6795 const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); 6796 *Description* 6797 Return the architecture info struct in ABFD. 6798 6799 2.13.2.15 `bfd_lookup_arch' 6800 ........................... 6801 6802 *Synopsis* 6803 const bfd_arch_info_type *bfd_lookup_arch 6804 (enum bfd_architecture arch, unsigned long machine); 6805 *Description* 6806 Look for the architecture info structure which matches the arguments 6807 ARCH and MACHINE. A machine of 0 matches the machine/architecture 6808 structure which marks itself as the default. 6809 6810 2.13.2.16 `bfd_printable_arch_mach' 6811 ................................... 6812 6813 *Synopsis* 6814 const char *bfd_printable_arch_mach 6815 (enum bfd_architecture arch, unsigned long machine); 6816 *Description* 6817 Return a printable string representing the architecture and machine 6818 type. 6819 6820 This routine is depreciated. 6821 6822 2.13.2.17 `bfd_octets_per_byte' 6823 ............................... 6824 6825 *Synopsis* 6826 unsigned int bfd_octets_per_byte (bfd *abfd); 6827 *Description* 6828 Return the number of octets (8-bit quantities) per target byte (minimum 6829 addressable unit). In most cases, this will be one, but some DSP 6830 targets have 16, 32, or even 48 bits per byte. 6831 6832 2.13.2.18 `bfd_arch_mach_octets_per_byte' 6833 ......................................... 6834 6835 *Synopsis* 6836 unsigned int bfd_arch_mach_octets_per_byte 6837 (enum bfd_architecture arch, unsigned long machine); 6838 *Description* 6839 See bfd_octets_per_byte. 6840 6841 This routine is provided for those cases where a bfd * is not 6842 available 6843 6844 6845 File: bfd.info, Node: Opening and Closing, Next: Internal, Prev: Architectures, Up: BFD front end 6846 6847 2.14 Opening and closing BFDs 6848 ============================= 6849 6850 2.14.1 Functions for opening and closing 6851 ---------------------------------------- 6852 6853 2.14.1.1 `bfd_fopen' 6854 .................... 6855 6856 *Synopsis* 6857 bfd *bfd_fopen (const char *filename, const char *target, 6858 const char *mode, int fd); 6859 *Description* 6860 Open the file FILENAME with the target TARGET. Return a pointer to the 6861 created BFD. If FD is not -1, then `fdopen' is used to open the file; 6862 otherwise, `fopen' is used. MODE is passed directly to `fopen' or 6863 `fdopen'. 6864 6865 Calls `bfd_find_target', so TARGET is interpreted as by that 6866 function. 6867 6868 The new BFD is marked as cacheable iff FD is -1. 6869 6870 If `NULL' is returned then an error has occured. Possible errors 6871 are `bfd_error_no_memory', `bfd_error_invalid_target' or `system_call' 6872 error. 6873 6874 2.14.1.2 `bfd_openr' 6875 .................... 6876 6877 *Synopsis* 6878 bfd *bfd_openr (const char *filename, const char *target); 6879 *Description* 6880 Open the file FILENAME (using `fopen') with the target TARGET. Return 6881 a pointer to the created BFD. 6882 6883 Calls `bfd_find_target', so TARGET is interpreted as by that 6884 function. 6885 6886 If `NULL' is returned then an error has occured. Possible errors 6887 are `bfd_error_no_memory', `bfd_error_invalid_target' or `system_call' 6888 error. 6889 6890 2.14.1.3 `bfd_fdopenr' 6891 ...................... 6892 6893 *Synopsis* 6894 bfd *bfd_fdopenr (const char *filename, const char *target, int fd); 6895 *Description* 6896 `bfd_fdopenr' is to `bfd_fopenr' much like `fdopen' is to `fopen'. It 6897 opens a BFD on a file already described by the FD supplied. 6898 6899 When the file is later `bfd_close'd, the file descriptor will be 6900 closed. If the caller desires that this file descriptor be cached by 6901 BFD (opened as needed, closed as needed to free descriptors for other 6902 opens), with the supplied FD used as an initial file descriptor (but 6903 subject to closure at any time), call bfd_set_cacheable(bfd, 1) on the 6904 returned BFD. The default is to assume no caching; the file descriptor 6905 will remain open until `bfd_close', and will not be affected by BFD 6906 operations on other files. 6907 6908 Possible errors are `bfd_error_no_memory', 6909 `bfd_error_invalid_target' and `bfd_error_system_call'. 6910 6911 2.14.1.4 `bfd_openstreamr' 6912 .......................... 6913 6914 *Synopsis* 6915 bfd *bfd_openstreamr (const char *, const char *, void *); 6916 *Description* 6917 Open a BFD for read access on an existing stdio stream. When the BFD 6918 is passed to `bfd_close', the stream will be closed. 6919 6920 2.14.1.5 `bfd_openr_iovec' 6921 .......................... 6922 6923 *Synopsis* 6924 bfd *bfd_openr_iovec (const char *filename, const char *target, 6925 void *(*open_func) (struct bfd *nbfd, 6926 void *open_closure), 6927 void *open_closure, 6928 file_ptr (*pread_func) (struct bfd *nbfd, 6929 void *stream, 6930 void *buf, 6931 file_ptr nbytes, 6932 file_ptr offset), 6933 int (*close_func) (struct bfd *nbfd, 6934 void *stream), 6935 int (*stat_func) (struct bfd *abfd, 6936 void *stream, 6937 struct stat *sb)); 6938 *Description* 6939 Create and return a BFD backed by a read-only STREAM. The STREAM is 6940 created using OPEN_FUNC, accessed using PREAD_FUNC and destroyed using 6941 CLOSE_FUNC. 6942 6943 Calls `bfd_find_target', so TARGET is interpreted as by that 6944 function. 6945 6946 Calls OPEN_FUNC (which can call `bfd_zalloc' and `bfd_get_filename') 6947 to obtain the read-only stream backing the BFD. OPEN_FUNC either 6948 succeeds returning the non-`NULL' STREAM, or fails returning `NULL' 6949 (setting `bfd_error'). 6950 6951 Calls PREAD_FUNC to request NBYTES of data from STREAM starting at 6952 OFFSET (e.g., via a call to `bfd_read'). PREAD_FUNC either succeeds 6953 returning the number of bytes read (which can be less than NBYTES when 6954 end-of-file), or fails returning -1 (setting `bfd_error'). 6955 6956 Calls CLOSE_FUNC when the BFD is later closed using `bfd_close'. 6957 CLOSE_FUNC either succeeds returning 0, or fails returning -1 (setting 6958 `bfd_error'). 6959 6960 Calls STAT_FUNC to fill in a stat structure for bfd_stat, 6961 bfd_get_size, and bfd_get_mtime calls. STAT_FUNC returns 0 on success, 6962 or returns -1 on failure (setting `bfd_error'). 6963 6964 If `bfd_openr_iovec' returns `NULL' then an error has occurred. 6965 Possible errors are `bfd_error_no_memory', `bfd_error_invalid_target' 6966 and `bfd_error_system_call'. 6967 6968 2.14.1.6 `bfd_openw' 6969 .................... 6970 6971 *Synopsis* 6972 bfd *bfd_openw (const char *filename, const char *target); 6973 *Description* 6974 Create a BFD, associated with file FILENAME, using the file format 6975 TARGET, and return a pointer to it. 6976 6977 Possible errors are `bfd_error_system_call', `bfd_error_no_memory', 6978 `bfd_error_invalid_target'. 6979 6980 2.14.1.7 `bfd_close' 6981 .................... 6982 6983 *Synopsis* 6984 bfd_boolean bfd_close (bfd *abfd); 6985 *Description* 6986 Close a BFD. If the BFD was open for writing, then pending operations 6987 are completed and the file written out and closed. If the created file 6988 is executable, then `chmod' is called to mark it as such. 6989 6990 All memory attached to the BFD is released. 6991 6992 The file descriptor associated with the BFD is closed (even if it 6993 was passed in to BFD by `bfd_fdopenr'). 6994 6995 *Returns* 6996 `TRUE' is returned if all is ok, otherwise `FALSE'. 6997 6998 2.14.1.8 `bfd_close_all_done' 6999 ............................. 7000 7001 *Synopsis* 7002 bfd_boolean bfd_close_all_done (bfd *); 7003 *Description* 7004 Close a BFD. Differs from `bfd_close' since it does not complete any 7005 pending operations. This routine would be used if the application had 7006 just used BFD for swapping and didn't want to use any of the writing 7007 code. 7008 7009 If the created file is executable, then `chmod' is called to mark it 7010 as such. 7011 7012 All memory attached to the BFD is released. 7013 7014 *Returns* 7015 `TRUE' is returned if all is ok, otherwise `FALSE'. 7016 7017 2.14.1.9 `bfd_create' 7018 ..................... 7019 7020 *Synopsis* 7021 bfd *bfd_create (const char *filename, bfd *templ); 7022 *Description* 7023 Create a new BFD in the manner of `bfd_openw', but without opening a 7024 file. The new BFD takes the target from the target used by TEMPLATE. 7025 The format is always set to `bfd_object'. 7026 7027 2.14.1.10 `bfd_make_writable' 7028 ............................. 7029 7030 *Synopsis* 7031 bfd_boolean bfd_make_writable (bfd *abfd); 7032 *Description* 7033 Takes a BFD as created by `bfd_create' and converts it into one like as 7034 returned by `bfd_openw'. It does this by converting the BFD to 7035 BFD_IN_MEMORY. It's assumed that you will call `bfd_make_readable' on 7036 this bfd later. 7037 7038 *Returns* 7039 `TRUE' is returned if all is ok, otherwise `FALSE'. 7040 7041 2.14.1.11 `bfd_make_readable' 7042 ............................. 7043 7044 *Synopsis* 7045 bfd_boolean bfd_make_readable (bfd *abfd); 7046 *Description* 7047 Takes a BFD as created by `bfd_create' and `bfd_make_writable' and 7048 converts it into one like as returned by `bfd_openr'. It does this by 7049 writing the contents out to the memory buffer, then reversing the 7050 direction. 7051 7052 *Returns* 7053 `TRUE' is returned if all is ok, otherwise `FALSE'. 7054 7055 2.14.1.12 `bfd_alloc' 7056 ..................... 7057 7058 *Synopsis* 7059 void *bfd_alloc (bfd *abfd, bfd_size_type wanted); 7060 *Description* 7061 Allocate a block of WANTED bytes of memory attached to `abfd' and 7062 return a pointer to it. 7063 7064 2.14.1.13 `bfd_alloc2' 7065 ...................... 7066 7067 *Synopsis* 7068 void *bfd_alloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size); 7069 *Description* 7070 Allocate a block of NMEMB elements of SIZE bytes each of memory 7071 attached to `abfd' and return a pointer to it. 7072 7073 2.14.1.14 `bfd_zalloc' 7074 ...................... 7075 7076 *Synopsis* 7077 void *bfd_zalloc (bfd *abfd, bfd_size_type wanted); 7078 *Description* 7079 Allocate a block of WANTED bytes of zeroed memory attached to `abfd' 7080 and return a pointer to it. 7081 7082 2.14.1.15 `bfd_zalloc2' 7083 ....................... 7084 7085 *Synopsis* 7086 void *bfd_zalloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size); 7087 *Description* 7088 Allocate a block of NMEMB elements of SIZE bytes each of zeroed memory 7089 attached to `abfd' and return a pointer to it. 7090 7091 2.14.1.16 `bfd_calc_gnu_debuglink_crc32' 7092 ........................................ 7093 7094 *Synopsis* 7095 unsigned long bfd_calc_gnu_debuglink_crc32 7096 (unsigned long crc, const unsigned char *buf, bfd_size_type len); 7097 *Description* 7098 Computes a CRC value as used in the .gnu_debuglink section. Advances 7099 the previously computed CRC value by computing and adding in the crc32 7100 for LEN bytes of BUF. 7101 7102 *Returns* 7103 Return the updated CRC32 value. 7104 7105 2.14.1.17 `get_debug_link_info' 7106 ............................... 7107 7108 *Synopsis* 7109 char *get_debug_link_info (bfd *abfd, unsigned long *crc32_out); 7110 *Description* 7111 fetch the filename and CRC32 value for any separate debuginfo 7112 associated with ABFD. Return NULL if no such info found, otherwise 7113 return filename and update CRC32_OUT. 7114 7115 2.14.1.18 `separate_debug_file_exists' 7116 ...................................... 7117 7118 *Synopsis* 7119 bfd_boolean separate_debug_file_exists 7120 (char *name, unsigned long crc32); 7121 *Description* 7122 Checks to see if NAME is a file and if its contents match CRC32. 7123 7124 2.14.1.19 `find_separate_debug_file' 7125 .................................... 7126 7127 *Synopsis* 7128 char *find_separate_debug_file (bfd *abfd); 7129 *Description* 7130 Searches ABFD for a reference to separate debugging information, scans 7131 various locations in the filesystem, including the file tree rooted at 7132 DEBUG_FILE_DIRECTORY, and returns a filename of such debugging 7133 information if the file is found and has matching CRC32. Returns NULL 7134 if no reference to debugging file exists, or file cannot be found. 7135 7136 2.14.1.20 `bfd_follow_gnu_debuglink' 7137 .................................... 7138 7139 *Synopsis* 7140 char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir); 7141 *Description* 7142 Takes a BFD and searches it for a .gnu_debuglink section. If this 7143 section is found, it examines the section for the name and checksum of 7144 a '.debug' file containing auxiliary debugging information. It then 7145 searches the filesystem for this .debug file in some standard 7146 locations, including the directory tree rooted at DIR, and if found 7147 returns the full filename. 7148 7149 If DIR is NULL, it will search a default path configured into libbfd 7150 at build time. [XXX this feature is not currently implemented]. 7151 7152 *Returns* 7153 `NULL' on any errors or failure to locate the .debug file, otherwise a 7154 pointer to a heap-allocated string containing the filename. The caller 7155 is responsible for freeing this string. 7156 7157 2.14.1.21 `bfd_create_gnu_debuglink_section' 7158 ............................................ 7159 7160 *Synopsis* 7161 struct bfd_section *bfd_create_gnu_debuglink_section 7162 (bfd *abfd, const char *filename); 7163 *Description* 7164 Takes a BFD and adds a .gnu_debuglink section to it. The section is 7165 sized to be big enough to contain a link to the specified FILENAME. 7166 7167 *Returns* 7168 A pointer to the new section is returned if all is ok. Otherwise 7169 `NULL' is returned and bfd_error is set. 7170 7171 2.14.1.22 `bfd_fill_in_gnu_debuglink_section' 7172 ............................................. 7173 7174 *Synopsis* 7175 bfd_boolean bfd_fill_in_gnu_debuglink_section 7176 (bfd *abfd, struct bfd_section *sect, const char *filename); 7177 *Description* 7178 Takes a BFD and containing a .gnu_debuglink section SECT and fills in 7179 the contents of the section to contain a link to the specified 7180 FILENAME. The filename should be relative to the current directory. 7181 7182 *Returns* 7183 `TRUE' is returned if all is ok. Otherwise `FALSE' is returned and 7184 bfd_error is set. 7185 7186 7187 File: bfd.info, Node: Internal, Next: File Caching, Prev: Opening and Closing, Up: BFD front end 7188 7189 2.15 Implementation details 7190 =========================== 7191 7192 2.15.1 Internal functions 7193 ------------------------- 7194 7195 *Description* 7196 These routines are used within BFD. They are not intended for export, 7197 but are documented here for completeness. 7198 7199 2.15.1.1 `bfd_write_bigendian_4byte_int' 7200 ........................................ 7201 7202 *Synopsis* 7203 bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int); 7204 *Description* 7205 Write a 4 byte integer I to the output BFD ABFD, in big endian order 7206 regardless of what else is going on. This is useful in archives. 7207 7208 2.15.1.2 `bfd_put_size' 7209 ....................... 7210 7211 2.15.1.3 `bfd_get_size' 7212 ....................... 7213 7214 *Description* 7215 These macros as used for reading and writing raw data in sections; each 7216 access (except for bytes) is vectored through the target format of the 7217 BFD and mangled accordingly. The mangling performs any necessary endian 7218 translations and removes alignment restrictions. Note that types 7219 accepted and returned by these macros are identical so they can be 7220 swapped around in macros--for example, `libaout.h' defines `GET_WORD' 7221 to either `bfd_get_32' or `bfd_get_64'. 7222 7223 In the put routines, VAL must be a `bfd_vma'. If we are on a system 7224 without prototypes, the caller is responsible for making sure that is 7225 true, with a cast if necessary. We don't cast them in the macro 7226 definitions because that would prevent `lint' or `gcc -Wall' from 7227 detecting sins such as passing a pointer. To detect calling these with 7228 less than a `bfd_vma', use `gcc -Wconversion' on a host with 64 bit 7229 `bfd_vma''s. 7230 7231 /* Byte swapping macros for user section data. */ 7232 7233 #define bfd_put_8(abfd, val, ptr) \ 7234 ((void) (*((unsigned char *) (ptr)) = (val) & 0xff)) 7235 #define bfd_put_signed_8 \ 7236 bfd_put_8 7237 #define bfd_get_8(abfd, ptr) \ 7238 (*(unsigned char *) (ptr) & 0xff) 7239 #define bfd_get_signed_8(abfd, ptr) \ 7240 (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) 7241 7242 #define bfd_put_16(abfd, val, ptr) \ 7243 BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) 7244 #define bfd_put_signed_16 \ 7245 bfd_put_16 7246 #define bfd_get_16(abfd, ptr) \ 7247 BFD_SEND (abfd, bfd_getx16, (ptr)) 7248 #define bfd_get_signed_16(abfd, ptr) \ 7249 BFD_SEND (abfd, bfd_getx_signed_16, (ptr)) 7250 7251 #define bfd_put_32(abfd, val, ptr) \ 7252 BFD_SEND (abfd, bfd_putx32, ((val),(ptr))) 7253 #define bfd_put_signed_32 \ 7254 bfd_put_32 7255 #define bfd_get_32(abfd, ptr) \ 7256 BFD_SEND (abfd, bfd_getx32, (ptr)) 7257 #define bfd_get_signed_32(abfd, ptr) \ 7258 BFD_SEND (abfd, bfd_getx_signed_32, (ptr)) 7259 7260 #define bfd_put_64(abfd, val, ptr) \ 7261 BFD_SEND (abfd, bfd_putx64, ((val), (ptr))) 7262 #define bfd_put_signed_64 \ 7263 bfd_put_64 7264 #define bfd_get_64(abfd, ptr) \ 7265 BFD_SEND (abfd, bfd_getx64, (ptr)) 7266 #define bfd_get_signed_64(abfd, ptr) \ 7267 BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) 7268 7269 #define bfd_get(bits, abfd, ptr) \ 7270 ((bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr) \ 7271 : (bits) == 16 ? bfd_get_16 (abfd, ptr) \ 7272 : (bits) == 32 ? bfd_get_32 (abfd, ptr) \ 7273 : (bits) == 64 ? bfd_get_64 (abfd, ptr) \ 7274 : (abort (), (bfd_vma) - 1)) 7275 7276 #define bfd_put(bits, abfd, val, ptr) \ 7277 ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \ 7278 : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \ 7279 : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \ 7280 : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \ 7281 : (abort (), (void) 0)) 7282 7283 2.15.1.4 `bfd_h_put_size' 7284 ......................... 7285 7286 *Description* 7287 These macros have the same function as their `bfd_get_x' brethren, 7288 except that they are used for removing information for the header 7289 records of object files. Believe it or not, some object files keep 7290 their header records in big endian order and their data in little 7291 endian order. 7292 7293 /* Byte swapping macros for file header data. */ 7294 7295 #define bfd_h_put_8(abfd, val, ptr) \ 7296 bfd_put_8 (abfd, val, ptr) 7297 #define bfd_h_put_signed_8(abfd, val, ptr) \ 7298 bfd_put_8 (abfd, val, ptr) 7299 #define bfd_h_get_8(abfd, ptr) \ 7300 bfd_get_8 (abfd, ptr) 7301 #define bfd_h_get_signed_8(abfd, ptr) \ 7302 bfd_get_signed_8 (abfd, ptr) 7303 7304 #define bfd_h_put_16(abfd, val, ptr) \ 7305 BFD_SEND (abfd, bfd_h_putx16, (val, ptr)) 7306 #define bfd_h_put_signed_16 \ 7307 bfd_h_put_16 7308 #define bfd_h_get_16(abfd, ptr) \ 7309 BFD_SEND (abfd, bfd_h_getx16, (ptr)) 7310 #define bfd_h_get_signed_16(abfd, ptr) \ 7311 BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr)) 7312 7313 #define bfd_h_put_32(abfd, val, ptr) \ 7314 BFD_SEND (abfd, bfd_h_putx32, (val, ptr)) 7315 #define bfd_h_put_signed_32 \ 7316 bfd_h_put_32 7317 #define bfd_h_get_32(abfd, ptr) \ 7318 BFD_SEND (abfd, bfd_h_getx32, (ptr)) 7319 #define bfd_h_get_signed_32(abfd, ptr) \ 7320 BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr)) 7321 7322 #define bfd_h_put_64(abfd, val, ptr) \ 7323 BFD_SEND (abfd, bfd_h_putx64, (val, ptr)) 7324 #define bfd_h_put_signed_64 \ 7325 bfd_h_put_64 7326 #define bfd_h_get_64(abfd, ptr) \ 7327 BFD_SEND (abfd, bfd_h_getx64, (ptr)) 7328 #define bfd_h_get_signed_64(abfd, ptr) \ 7329 BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr)) 7330 7331 /* Aliases for the above, which should eventually go away. */ 7332 7333 #define H_PUT_64 bfd_h_put_64 7334 #define H_PUT_32 bfd_h_put_32 7335 #define H_PUT_16 bfd_h_put_16 7336 #define H_PUT_8 bfd_h_put_8 7337 #define H_PUT_S64 bfd_h_put_signed_64 7338 #define H_PUT_S32 bfd_h_put_signed_32 7339 #define H_PUT_S16 bfd_h_put_signed_16 7340 #define H_PUT_S8 bfd_h_put_signed_8 7341 #define H_GET_64 bfd_h_get_64 7342 #define H_GET_32 bfd_h_get_32 7343 #define H_GET_16 bfd_h_get_16 7344 #define H_GET_8 bfd_h_get_8 7345 #define H_GET_S64 bfd_h_get_signed_64 7346 #define H_GET_S32 bfd_h_get_signed_32 7347 #define H_GET_S16 bfd_h_get_signed_16 7348 #define H_GET_S8 bfd_h_get_signed_8 7349 7350 2.15.1.5 `bfd_log2' 7351 ................... 7352 7353 *Synopsis* 7354 unsigned int bfd_log2 (bfd_vma x); 7355 *Description* 7356 Return the log base 2 of the value supplied, rounded up. E.g., an X of 7357 1025 returns 11. A X of 0 returns 0. 7358 7359 7360 File: bfd.info, Node: File Caching, Next: Linker Functions, Prev: Internal, Up: BFD front end 7361 7362 2.16 File caching 7363 ================= 7364 7365 The file caching mechanism is embedded within BFD and allows the 7366 application to open as many BFDs as it wants without regard to the 7367 underlying operating system's file descriptor limit (often as low as 20 7368 open files). The module in `cache.c' maintains a least recently used 7369 list of `BFD_CACHE_MAX_OPEN' files, and exports the name 7370 `bfd_cache_lookup', which runs around and makes sure that the required 7371 BFD is open. If not, then it chooses a file to close, closes it and 7372 opens the one wanted, returning its file handle. 7373 7374 2.16.1 Caching functions 7375 ------------------------ 7376 7377 2.16.1.1 `bfd_cache_init' 7378 ......................... 7379 7380 *Synopsis* 7381 bfd_boolean bfd_cache_init (bfd *abfd); 7382 *Description* 7383 Add a newly opened BFD to the cache. 7384 7385 2.16.1.2 `bfd_cache_close' 7386 .......................... 7387 7388 *Synopsis* 7389 bfd_boolean bfd_cache_close (bfd *abfd); 7390 *Description* 7391 Remove the BFD ABFD from the cache. If the attached file is open, then 7392 close it too. 7393 7394 *Returns* 7395 `FALSE' is returned if closing the file fails, `TRUE' is returned if 7396 all is well. 7397 7398 2.16.1.3 `bfd_cache_close_all' 7399 .............................. 7400 7401 *Synopsis* 7402 bfd_boolean bfd_cache_close_all (void); 7403 *Description* 7404 Remove all BFDs from the cache. If the attached file is open, then 7405 close it too. 7406 7407 *Returns* 7408 `FALSE' is returned if closing one of the file fails, `TRUE' is 7409 returned if all is well. 7410 7411 2.16.1.4 `bfd_open_file' 7412 ........................ 7413 7414 *Synopsis* 7415 FILE* bfd_open_file (bfd *abfd); 7416 *Description* 7417 Call the OS to open a file for ABFD. Return the `FILE *' (possibly 7418 `NULL') that results from this operation. Set up the BFD so that 7419 future accesses know the file is open. If the `FILE *' returned is 7420 `NULL', then it won't have been put in the cache, so it won't have to 7421 be removed from it. 7422 7423 7424 File: bfd.info, Node: Linker Functions, Next: Hash Tables, Prev: File Caching, Up: BFD front end 7425 7426 2.17 Linker Functions 7427 ===================== 7428 7429 The linker uses three special entry points in the BFD target vector. 7430 It is not necessary to write special routines for these entry points 7431 when creating a new BFD back end, since generic versions are provided. 7432 However, writing them can speed up linking and make it use 7433 significantly less runtime memory. 7434 7435 The first routine creates a hash table used by the other routines. 7436 The second routine adds the symbols from an object file to the hash 7437 table. The third routine takes all the object files and links them 7438 together to create the output file. These routines are designed so 7439 that the linker proper does not need to know anything about the symbols 7440 in the object files that it is linking. The linker merely arranges the 7441 sections as directed by the linker script and lets BFD handle the 7442 details of symbols and relocs. 7443 7444 The second routine and third routines are passed a pointer to a 7445 `struct bfd_link_info' structure (defined in `bfdlink.h') which holds 7446 information relevant to the link, including the linker hash table 7447 (which was created by the first routine) and a set of callback 7448 functions to the linker proper. 7449 7450 The generic linker routines are in `linker.c', and use the header 7451 file `genlink.h'. As of this writing, the only back ends which have 7452 implemented versions of these routines are a.out (in `aoutx.h') and 7453 ECOFF (in `ecoff.c'). The a.out routines are used as examples 7454 throughout this section. 7455 7456 * Menu: 7457 7458 * Creating a Linker Hash Table:: 7459 * Adding Symbols to the Hash Table:: 7460 * Performing the Final Link:: 7461 7462 7463 File: bfd.info, Node: Creating a Linker Hash Table, Next: Adding Symbols to the Hash Table, Prev: Linker Functions, Up: Linker Functions 7464 7465 2.17.1 Creating a linker hash table 7466 ----------------------------------- 7467 7468 The linker routines must create a hash table, which must be derived 7469 from `struct bfd_link_hash_table' described in `bfdlink.c'. *Note Hash 7470 Tables::, for information on how to create a derived hash table. This 7471 entry point is called using the target vector of the linker output file. 7472 7473 The `_bfd_link_hash_table_create' entry point must allocate and 7474 initialize an instance of the desired hash table. If the back end does 7475 not require any additional information to be stored with the entries in 7476 the hash table, the entry point may simply create a `struct 7477 bfd_link_hash_table'. Most likely, however, some additional 7478 information will be needed. 7479 7480 For example, with each entry in the hash table the a.out linker 7481 keeps the index the symbol has in the final output file (this index 7482 number is used so that when doing a relocatable link the symbol index 7483 used in the output file can be quickly filled in when copying over a 7484 reloc). The a.out linker code defines the required structures and 7485 functions for a hash table derived from `struct bfd_link_hash_table'. 7486 The a.out linker hash table is created by the function 7487 `NAME(aout,link_hash_table_create)'; it simply allocates space for the 7488 hash table, initializes it, and returns a pointer to it. 7489 7490 When writing the linker routines for a new back end, you will 7491 generally not know exactly which fields will be required until you have 7492 finished. You should simply create a new hash table which defines no 7493 additional fields, and then simply add fields as they become necessary. 7494 7495 7496 File: bfd.info, Node: Adding Symbols to the Hash Table, Next: Performing the Final Link, Prev: Creating a Linker Hash Table, Up: Linker Functions 7497 7498 2.17.2 Adding symbols to the hash table 7499 --------------------------------------- 7500 7501 The linker proper will call the `_bfd_link_add_symbols' entry point for 7502 each object file or archive which is to be linked (typically these are 7503 the files named on the command line, but some may also come from the 7504 linker script). The entry point is responsible for examining the file. 7505 For an object file, BFD must add any relevant symbol information to 7506 the hash table. For an archive, BFD must determine which elements of 7507 the archive should be used and adding them to the link. 7508 7509 The a.out version of this entry point is 7510 `NAME(aout,link_add_symbols)'. 7511 7512 * Menu: 7513 7514 * Differing file formats:: 7515 * Adding symbols from an object file:: 7516 * Adding symbols from an archive:: 7517 7518 7519 File: bfd.info, Node: Differing file formats, Next: Adding symbols from an object file, Prev: Adding Symbols to the Hash Table, Up: Adding Symbols to the Hash Table 7520 7521 2.17.2.1 Differing file formats 7522 ............................... 7523 7524 Normally all the files involved in a link will be of the same format, 7525 but it is also possible to link together different format object files, 7526 and the back end must support that. The `_bfd_link_add_symbols' entry 7527 point is called via the target vector of the file to be added. This 7528 has an important consequence: the function may not assume that the hash 7529 table is the type created by the corresponding 7530 `_bfd_link_hash_table_create' vector. All the `_bfd_link_add_symbols' 7531 function can assume about the hash table is that it is derived from 7532 `struct bfd_link_hash_table'. 7533 7534 Sometimes the `_bfd_link_add_symbols' function must store some 7535 information in the hash table entry to be used by the `_bfd_final_link' 7536 function. In such a case the output bfd xvec must be checked to make 7537 sure that the hash table was created by an object file of the same 7538 format. 7539 7540 The `_bfd_final_link' routine must be prepared to handle a hash 7541 entry without any extra information added by the 7542 `_bfd_link_add_symbols' function. A hash entry without extra 7543 information will also occur when the linker script directs the linker 7544 to create a symbol. Note that, regardless of how a hash table entry is 7545 added, all the fields will be initialized to some sort of null value by 7546 the hash table entry initialization function. 7547 7548 See `ecoff_link_add_externals' for an example of how to check the 7549 output bfd before saving information (in this case, the ECOFF external 7550 symbol debugging information) in a hash table entry. 7551 7552 7553 File: bfd.info, Node: Adding symbols from an object file, Next: Adding symbols from an archive, Prev: Differing file formats, Up: Adding Symbols to the Hash Table 7554 7555 2.17.2.2 Adding symbols from an object file 7556 ........................................... 7557 7558 When the `_bfd_link_add_symbols' routine is passed an object file, it 7559 must add all externally visible symbols in that object file to the hash 7560 table. The actual work of adding the symbol to the hash table is 7561 normally handled by the function `_bfd_generic_link_add_one_symbol'. 7562 The `_bfd_link_add_symbols' routine is responsible for reading all the 7563 symbols from the object file and passing the correct information to 7564 `_bfd_generic_link_add_one_symbol'. 7565 7566 The `_bfd_link_add_symbols' routine should not use 7567 `bfd_canonicalize_symtab' to read the symbols. The point of providing 7568 this routine is to avoid the overhead of converting the symbols into 7569 generic `asymbol' structures. 7570 7571 `_bfd_generic_link_add_one_symbol' handles the details of combining 7572 common symbols, warning about multiple definitions, and so forth. It 7573 takes arguments which describe the symbol to add, notably symbol flags, 7574 a section, and an offset. The symbol flags include such things as 7575 `BSF_WEAK' or `BSF_INDIRECT'. The section is a section in the object 7576 file, or something like `bfd_und_section_ptr' for an undefined symbol 7577 or `bfd_com_section_ptr' for a common symbol. 7578 7579 If the `_bfd_final_link' routine is also going to need to read the 7580 symbol information, the `_bfd_link_add_symbols' routine should save it 7581 somewhere attached to the object file BFD. However, the information 7582 should only be saved if the `keep_memory' field of the `info' argument 7583 is TRUE, so that the `-no-keep-memory' linker switch is effective. 7584 7585 The a.out function which adds symbols from an object file is 7586 `aout_link_add_object_symbols', and most of the interesting work is in 7587 `aout_link_add_symbols'. The latter saves pointers to the hash tables 7588 entries created by `_bfd_generic_link_add_one_symbol' indexed by symbol 7589 number, so that the `_bfd_final_link' routine does not have to call the 7590 hash table lookup routine to locate the entry. 7591 7592 7593 File: bfd.info, Node: Adding symbols from an archive, Prev: Adding symbols from an object file, Up: Adding Symbols to the Hash Table 7594 7595 2.17.2.3 Adding symbols from an archive 7596 ....................................... 7597 7598 When the `_bfd_link_add_symbols' routine is passed an archive, it must 7599 look through the symbols defined by the archive and decide which 7600 elements of the archive should be included in the link. For each such 7601 element it must call the `add_archive_element' linker callback, and it 7602 must add the symbols from the object file to the linker hash table. 7603 7604 In most cases the work of looking through the symbols in the archive 7605 should be done by the `_bfd_generic_link_add_archive_symbols' function. 7606 This function builds a hash table from the archive symbol table and 7607 looks through the list of undefined symbols to see which elements 7608 should be included. `_bfd_generic_link_add_archive_symbols' is passed 7609 a function to call to make the final decision about adding an archive 7610 element to the link and to do the actual work of adding the symbols to 7611 the linker hash table. 7612 7613 The function passed to `_bfd_generic_link_add_archive_symbols' must 7614 read the symbols of the archive element and decide whether the archive 7615 element should be included in the link. If the element is to be 7616 included, the `add_archive_element' linker callback routine must be 7617 called with the element as an argument, and the elements symbols must 7618 be added to the linker hash table just as though the element had itself 7619 been passed to the `_bfd_link_add_symbols' function. 7620 7621 When the a.out `_bfd_link_add_symbols' function receives an archive, 7622 it calls `_bfd_generic_link_add_archive_symbols' passing 7623 `aout_link_check_archive_element' as the function argument. 7624 `aout_link_check_archive_element' calls `aout_link_check_ar_symbols'. 7625 If the latter decides to add the element (an element is only added if 7626 it provides a real, non-common, definition for a previously undefined 7627 or common symbol) it calls the `add_archive_element' callback and then 7628 `aout_link_check_archive_element' calls `aout_link_add_symbols' to 7629 actually add the symbols to the linker hash table. 7630 7631 The ECOFF back end is unusual in that it does not normally call 7632 `_bfd_generic_link_add_archive_symbols', because ECOFF archives already 7633 contain a hash table of symbols. The ECOFF back end searches the 7634 archive itself to avoid the overhead of creating a new hash table. 7635 7636 7637 File: bfd.info, Node: Performing the Final Link, Prev: Adding Symbols to the Hash Table, Up: Linker Functions 7638 7639 2.17.3 Performing the final link 7640 -------------------------------- 7641 7642 When all the input files have been processed, the linker calls the 7643 `_bfd_final_link' entry point of the output BFD. This routine is 7644 responsible for producing the final output file, which has several 7645 aspects. It must relocate the contents of the input sections and copy 7646 the data into the output sections. It must build an output symbol 7647 table including any local symbols from the input files and the global 7648 symbols from the hash table. When producing relocatable output, it must 7649 modify the input relocs and write them into the output file. There may 7650 also be object format dependent work to be done. 7651 7652 The linker will also call the `write_object_contents' entry point 7653 when the BFD is closed. The two entry points must work together in 7654 order to produce the correct output file. 7655 7656 The details of how this works are inevitably dependent upon the 7657 specific object file format. The a.out `_bfd_final_link' routine is 7658 `NAME(aout,final_link)'. 7659 7660 * Menu: 7661 7662 * Information provided by the linker:: 7663 * Relocating the section contents:: 7664 * Writing the symbol table:: 7665 7666 7667 File: bfd.info, Node: Information provided by the linker, Next: Relocating the section contents, Prev: Performing the Final Link, Up: Performing the Final Link 7668 7669 2.17.3.1 Information provided by the linker 7670 ........................................... 7671 7672 Before the linker calls the `_bfd_final_link' entry point, it sets up 7673 some data structures for the function to use. 7674 7675 The `input_bfds' field of the `bfd_link_info' structure will point 7676 to a list of all the input files included in the link. These files are 7677 linked through the `link_next' field of the `bfd' structure. 7678 7679 Each section in the output file will have a list of `link_order' 7680 structures attached to the `map_head.link_order' field (the 7681 `link_order' structure is defined in `bfdlink.h'). These structures 7682 describe how to create the contents of the output section in terms of 7683 the contents of various input sections, fill constants, and, 7684 eventually, other types of information. They also describe relocs that 7685 must be created by the BFD backend, but do not correspond to any input 7686 file; this is used to support -Ur, which builds constructors while 7687 generating a relocatable object file. 7688 7689 7690 File: bfd.info, Node: Relocating the section contents, Next: Writing the symbol table, Prev: Information provided by the linker, Up: Performing the Final Link 7691 7692 2.17.3.2 Relocating the section contents 7693 ........................................ 7694 7695 The `_bfd_final_link' function should look through the `link_order' 7696 structures attached to each section of the output file. Each 7697 `link_order' structure should either be handled specially, or it should 7698 be passed to the function `_bfd_default_link_order' which will do the 7699 right thing (`_bfd_default_link_order' is defined in `linker.c'). 7700 7701 For efficiency, a `link_order' of type `bfd_indirect_link_order' 7702 whose associated section belongs to a BFD of the same format as the 7703 output BFD must be handled specially. This type of `link_order' 7704 describes part of an output section in terms of a section belonging to 7705 one of the input files. The `_bfd_final_link' function should read the 7706 contents of the section and any associated relocs, apply the relocs to 7707 the section contents, and write out the modified section contents. If 7708 performing a relocatable link, the relocs themselves must also be 7709 modified and written out. 7710 7711 The functions `_bfd_relocate_contents' and 7712 `_bfd_final_link_relocate' provide some general support for performing 7713 the actual relocations, notably overflow checking. Their arguments 7714 include information about the symbol the relocation is against and a 7715 `reloc_howto_type' argument which describes the relocation to perform. 7716 These functions are defined in `reloc.c'. 7717 7718 The a.out function which handles reading, relocating, and writing 7719 section contents is `aout_link_input_section'. The actual relocation 7720 is done in `aout_link_input_section_std' and 7721 `aout_link_input_section_ext'. 7722 7723 7724 File: bfd.info, Node: Writing the symbol table, Prev: Relocating the section contents, Up: Performing the Final Link 7725 7726 2.17.3.3 Writing the symbol table 7727 ................................. 7728 7729 The `_bfd_final_link' function must gather all the symbols in the input 7730 files and write them out. It must also write out all the symbols in 7731 the global hash table. This must be controlled by the `strip' and 7732 `discard' fields of the `bfd_link_info' structure. 7733 7734 The local symbols of the input files will not have been entered into 7735 the linker hash table. The `_bfd_final_link' routine must consider 7736 each input file and include the symbols in the output file. It may be 7737 convenient to do this when looking through the `link_order' structures, 7738 or it may be done by stepping through the `input_bfds' list. 7739 7740 The `_bfd_final_link' routine must also traverse the global hash 7741 table to gather all the externally visible symbols. It is possible 7742 that most of the externally visible symbols may be written out when 7743 considering the symbols of each input file, but it is still necessary 7744 to traverse the hash table since the linker script may have defined 7745 some symbols that are not in any of the input files. 7746 7747 The `strip' field of the `bfd_link_info' structure controls which 7748 symbols are written out. The possible values are listed in 7749 `bfdlink.h'. If the value is `strip_some', then the `keep_hash' field 7750 of the `bfd_link_info' structure is a hash table of symbols to keep; 7751 each symbol should be looked up in this hash table, and only symbols 7752 which are present should be included in the output file. 7753 7754 If the `strip' field of the `bfd_link_info' structure permits local 7755 symbols to be written out, the `discard' field is used to further 7756 controls which local symbols are included in the output file. If the 7757 value is `discard_l', then all local symbols which begin with a certain 7758 prefix are discarded; this is controlled by the 7759 `bfd_is_local_label_name' entry point. 7760 7761 The a.out backend handles symbols by calling 7762 `aout_link_write_symbols' on each input BFD and then traversing the 7763 global hash table with the function `aout_link_write_other_symbol'. It 7764 builds a string table while writing out the symbols, which is written 7765 to the output file at the end of `NAME(aout,final_link)'. 7766 7767 2.17.3.4 `bfd_link_split_section' 7768 ................................. 7769 7770 *Synopsis* 7771 bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); 7772 *Description* 7773 Return nonzero if SEC should be split during a reloceatable or final 7774 link. 7775 #define bfd_link_split_section(abfd, sec) \ 7776 BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec)) 7777 7778 2.17.3.5 `bfd_section_already_linked' 7779 ..................................... 7780 7781 *Synopsis* 7782 void bfd_section_already_linked (bfd *abfd, asection *sec, 7783 struct bfd_link_info *info); 7784 *Description* 7785 Check if SEC has been already linked during a reloceatable or final 7786 link. 7787 #define bfd_section_already_linked(abfd, sec, info) \ 7788 BFD_SEND (abfd, _section_already_linked, (abfd, sec, info)) 7789 7790 2.17.3.6 `bfd_generic_define_common_symbol' 7791 ........................................... 7792 7793 *Synopsis* 7794 bfd_boolean bfd_generic_define_common_symbol 7795 (bfd *output_bfd, struct bfd_link_info *info, 7796 struct bfd_link_hash_entry *h); 7797 *Description* 7798 Convert common symbol H into a defined symbol. Return TRUE on success 7799 and FALSE on failure. 7800 #define bfd_define_common_symbol(output_bfd, info, h) \ 7801 BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h)) 7802 7803 2.17.3.7 `bfd_find_version_for_sym ' 7804 .................................... 7805 7806 *Synopsis* 7807 struct bfd_elf_version_tree * bfd_find_version_for_sym 7808 (struct bfd_elf_version_tree *verdefs, 7809 const char *sym_name, bfd_boolean *hide); 7810 *Description* 7811 Search an elf version script tree for symbol versioning info and export 7812 / don't-export status for a given symbol. Return non-NULL on success 7813 and NULL on failure; also sets the output `hide' boolean parameter. 7814 7815 7816 File: bfd.info, Node: Hash Tables, Prev: Linker Functions, Up: BFD front end 7817 7818 2.18 Hash Tables 7819 ================ 7820 7821 BFD provides a simple set of hash table functions. Routines are 7822 provided to initialize a hash table, to free a hash table, to look up a 7823 string in a hash table and optionally create an entry for it, and to 7824 traverse a hash table. There is currently no routine to delete an 7825 string from a hash table. 7826 7827 The basic hash table does not permit any data to be stored with a 7828 string. However, a hash table is designed to present a base class from 7829 which other types of hash tables may be derived. These derived types 7830 may store additional information with the string. Hash tables were 7831 implemented in this way, rather than simply providing a data pointer in 7832 a hash table entry, because they were designed for use by the linker 7833 back ends. The linker may create thousands of hash table entries, and 7834 the overhead of allocating private data and storing and following 7835 pointers becomes noticeable. 7836 7837 The basic hash table code is in `hash.c'. 7838 7839 * Menu: 7840 7841 * Creating and Freeing a Hash Table:: 7842 * Looking Up or Entering a String:: 7843 * Traversing a Hash Table:: 7844 * Deriving a New Hash Table Type:: 7845 7846 7847 File: bfd.info, Node: Creating and Freeing a Hash Table, Next: Looking Up or Entering a String, Prev: Hash Tables, Up: Hash Tables 7848 7849 2.18.1 Creating and freeing a hash table 7850 ---------------------------------------- 7851 7852 To create a hash table, create an instance of a `struct bfd_hash_table' 7853 (defined in `bfd.h') and call `bfd_hash_table_init' (if you know 7854 approximately how many entries you will need, the function 7855 `bfd_hash_table_init_n', which takes a SIZE argument, may be used). 7856 `bfd_hash_table_init' returns `FALSE' if some sort of error occurs. 7857 7858 The function `bfd_hash_table_init' take as an argument a function to 7859 use to create new entries. For a basic hash table, use the function 7860 `bfd_hash_newfunc'. *Note Deriving a New Hash Table Type::, for why 7861 you would want to use a different value for this argument. 7862 7863 `bfd_hash_table_init' will create an objalloc which will be used to 7864 allocate new entries. You may allocate memory on this objalloc using 7865 `bfd_hash_allocate'. 7866 7867 Use `bfd_hash_table_free' to free up all the memory that has been 7868 allocated for a hash table. This will not free up the `struct 7869 bfd_hash_table' itself, which you must provide. 7870 7871 Use `bfd_hash_set_default_size' to set the default size of hash 7872 table to use. 7873 7874 7875 File: bfd.info, Node: Looking Up or Entering a String, Next: Traversing a Hash Table, Prev: Creating and Freeing a Hash Table, Up: Hash Tables 7876 7877 2.18.2 Looking up or entering a string 7878 -------------------------------------- 7879 7880 The function `bfd_hash_lookup' is used both to look up a string in the 7881 hash table and to create a new entry. 7882 7883 If the CREATE argument is `FALSE', `bfd_hash_lookup' will look up a 7884 string. If the string is found, it will returns a pointer to a `struct 7885 bfd_hash_entry'. If the string is not found in the table 7886 `bfd_hash_lookup' will return `NULL'. You should not modify any of the 7887 fields in the returns `struct bfd_hash_entry'. 7888 7889 If the CREATE argument is `TRUE', the string will be entered into 7890 the hash table if it is not already there. Either way a pointer to a 7891 `struct bfd_hash_entry' will be returned, either to the existing 7892 structure or to a newly created one. In this case, a `NULL' return 7893 means that an error occurred. 7894 7895 If the CREATE argument is `TRUE', and a new entry is created, the 7896 COPY argument is used to decide whether to copy the string onto the 7897 hash table objalloc or not. If COPY is passed as `FALSE', you must be 7898 careful not to deallocate or modify the string as long as the hash table 7899 exists. 7900 7901 7902 File: bfd.info, Node: Traversing a Hash Table, Next: Deriving a New Hash Table Type, Prev: Looking Up or Entering a String, Up: Hash Tables 7903 7904 2.18.3 Traversing a hash table 7905 ------------------------------ 7906 7907 The function `bfd_hash_traverse' may be used to traverse a hash table, 7908 calling a function on each element. The traversal is done in a random 7909 order. 7910 7911 `bfd_hash_traverse' takes as arguments a function and a generic 7912 `void *' pointer. The function is called with a hash table entry (a 7913 `struct bfd_hash_entry *') and the generic pointer passed to 7914 `bfd_hash_traverse'. The function must return a `boolean' value, which 7915 indicates whether to continue traversing the hash table. If the 7916 function returns `FALSE', `bfd_hash_traverse' will stop the traversal 7917 and return immediately. 7918 7919 7920 File: bfd.info, Node: Deriving a New Hash Table Type, Prev: Traversing a Hash Table, Up: Hash Tables 7921 7922 2.18.4 Deriving a new hash table type 7923 ------------------------------------- 7924 7925 Many uses of hash tables want to store additional information which 7926 each entry in the hash table. Some also find it convenient to store 7927 additional information with the hash table itself. This may be done 7928 using a derived hash table. 7929 7930 Since C is not an object oriented language, creating a derived hash 7931 table requires sticking together some boilerplate routines with a few 7932 differences specific to the type of hash table you want to create. 7933 7934 An example of a derived hash table is the linker hash table. The 7935 structures for this are defined in `bfdlink.h'. The functions are in 7936 `linker.c'. 7937 7938 You may also derive a hash table from an already derived hash table. 7939 For example, the a.out linker backend code uses a hash table derived 7940 from the linker hash table. 7941 7942 * Menu: 7943 7944 * Define the Derived Structures:: 7945 * Write the Derived Creation Routine:: 7946 * Write Other Derived Routines:: 7947 7948 7949 File: bfd.info, Node: Define the Derived Structures, Next: Write the Derived Creation Routine, Prev: Deriving a New Hash Table Type, Up: Deriving a New Hash Table Type 7950 7951 2.18.4.1 Define the derived structures 7952 ...................................... 7953 7954 You must define a structure for an entry in the hash table, and a 7955 structure for the hash table itself. 7956 7957 The first field in the structure for an entry in the hash table must 7958 be of the type used for an entry in the hash table you are deriving 7959 from. If you are deriving from a basic hash table this is `struct 7960 bfd_hash_entry', which is defined in `bfd.h'. The first field in the 7961 structure for the hash table itself must be of the type of the hash 7962 table you are deriving from itself. If you are deriving from a basic 7963 hash table, this is `struct bfd_hash_table'. 7964 7965 For example, the linker hash table defines `struct 7966 bfd_link_hash_entry' (in `bfdlink.h'). The first field, `root', is of 7967 type `struct bfd_hash_entry'. Similarly, the first field in `struct 7968 bfd_link_hash_table', `table', is of type `struct bfd_hash_table'. 7969 7970 7971 File: bfd.info, Node: Write the Derived Creation Routine, Next: Write Other Derived Routines, Prev: Define the Derived Structures, Up: Deriving a New Hash Table Type 7972 7973 2.18.4.2 Write the derived creation routine 7974 ........................................... 7975 7976 You must write a routine which will create and initialize an entry in 7977 the hash table. This routine is passed as the function argument to 7978 `bfd_hash_table_init'. 7979 7980 In order to permit other hash tables to be derived from the hash 7981 table you are creating, this routine must be written in a standard way. 7982 7983 The first argument to the creation routine is a pointer to a hash 7984 table entry. This may be `NULL', in which case the routine should 7985 allocate the right amount of space. Otherwise the space has already 7986 been allocated by a hash table type derived from this one. 7987 7988 After allocating space, the creation routine must call the creation 7989 routine of the hash table type it is derived from, passing in a pointer 7990 to the space it just allocated. This will initialize any fields used 7991 by the base hash table. 7992 7993 Finally the creation routine must initialize any local fields for 7994 the new hash table type. 7995 7996 Here is a boilerplate example of a creation routine. FUNCTION_NAME 7997 is the name of the routine. ENTRY_TYPE is the type of an entry in the 7998 hash table you are creating. BASE_NEWFUNC is the name of the creation 7999 routine of the hash table type your hash table is derived from. 8000 8001 struct bfd_hash_entry * 8002 FUNCTION_NAME (struct bfd_hash_entry *entry, 8003 struct bfd_hash_table *table, 8004 const char *string) 8005 { 8006 struct ENTRY_TYPE *ret = (ENTRY_TYPE *) entry; 8007 8008 /* Allocate the structure if it has not already been allocated by a 8009 derived class. */ 8010 if (ret == NULL) 8011 { 8012 ret = bfd_hash_allocate (table, sizeof (* ret)); 8013 if (ret == NULL) 8014 return NULL; 8015 } 8016 8017 /* Call the allocation method of the base class. */ 8018 ret = ((ENTRY_TYPE *) 8019 BASE_NEWFUNC ((struct bfd_hash_entry *) ret, table, string)); 8020 8021 /* Initialize the local fields here. */ 8022 8023 return (struct bfd_hash_entry *) ret; 8024 } 8025 *Description* 8026 The creation routine for the linker hash table, which is in `linker.c', 8027 looks just like this example. FUNCTION_NAME is 8028 `_bfd_link_hash_newfunc'. ENTRY_TYPE is `struct bfd_link_hash_entry'. 8029 BASE_NEWFUNC is `bfd_hash_newfunc', the creation routine for a basic 8030 hash table. 8031 8032 `_bfd_link_hash_newfunc' also initializes the local fields in a 8033 linker hash table entry: `type', `written' and `next'. 8034 8035 8036 File: bfd.info, Node: Write Other Derived Routines, Prev: Write the Derived Creation Routine, Up: Deriving a New Hash Table Type 8037 8038 2.18.4.3 Write other derived routines 8039 ..................................... 8040 8041 You will want to write other routines for your new hash table, as well. 8042 8043 You will want an initialization routine which calls the 8044 initialization routine of the hash table you are deriving from and 8045 initializes any other local fields. For the linker hash table, this is 8046 `_bfd_link_hash_table_init' in `linker.c'. 8047 8048 You will want a lookup routine which calls the lookup routine of the 8049 hash table you are deriving from and casts the result. The linker hash 8050 table uses `bfd_link_hash_lookup' in `linker.c' (this actually takes an 8051 additional argument which it uses to decide how to return the looked up 8052 value). 8053 8054 You may want a traversal routine. This should just call the 8055 traversal routine of the hash table you are deriving from with 8056 appropriate casts. The linker hash table uses `bfd_link_hash_traverse' 8057 in `linker.c'. 8058 8059 These routines may simply be defined as macros. For example, the 8060 a.out backend linker hash table, which is derived from the linker hash 8061 table, uses macros for the lookup and traversal routines. These are 8062 `aout_link_hash_lookup' and `aout_link_hash_traverse' in aoutx.h. 8063 8064 8065 File: bfd.info, Node: BFD back ends, Next: GNU Free Documentation License, Prev: BFD front end, Up: Top 8066 8067 3 BFD back ends 8068 *************** 8069 8070 * Menu: 8071 8072 * What to Put Where:: 8073 * aout :: a.out backends 8074 * coff :: coff backends 8075 * elf :: elf backends 8076 * mmo :: mmo backend 8077 8078 8079 File: bfd.info, Node: What to Put Where, Next: aout, Prev: BFD back ends, Up: BFD back ends 8080 8081 3.1 What to Put Where 8082 ===================== 8083 8084 All of BFD lives in one directory. 8085 8086 8087 File: bfd.info, Node: aout, Next: coff, Prev: What to Put Where, Up: BFD back ends 8088 8089 3.2 a.out backends 8090 ================== 8091 8092 *Description* 8093 BFD supports a number of different flavours of a.out format, though the 8094 major differences are only the sizes of the structures on disk, and the 8095 shape of the relocation information. 8096 8097 The support is split into a basic support file `aoutx.h' and other 8098 files which derive functions from the base. One derivation file is 8099 `aoutf1.h' (for a.out flavour 1), and adds to the basic a.out functions 8100 support for sun3, sun4, 386 and 29k a.out files, to create a target 8101 jump vector for a specific target. 8102 8103 This information is further split out into more specific files for 8104 each machine, including `sunos.c' for sun3 and sun4, `newsos3.c' for 8105 the Sony NEWS, and `demo64.c' for a demonstration of a 64 bit a.out 8106 format. 8107 8108 The base file `aoutx.h' defines general mechanisms for reading and 8109 writing records to and from disk and various other methods which BFD 8110 requires. It is included by `aout32.c' and `aout64.c' to form the names 8111 `aout_32_swap_exec_header_in', `aout_64_swap_exec_header_in', etc. 8112 8113 As an example, this is what goes on to make the back end for a sun4, 8114 from `aout32.c': 8115 8116 #define ARCH_SIZE 32 8117 #include "aoutx.h" 8118 8119 Which exports names: 8120 8121 ... 8122 aout_32_canonicalize_reloc 8123 aout_32_find_nearest_line 8124 aout_32_get_lineno 8125 aout_32_get_reloc_upper_bound 8126 ... 8127 8128 from `sunos.c': 8129 8130 #define TARGET_NAME "a.out-sunos-big" 8131 #define VECNAME sunos_big_vec 8132 #include "aoutf1.h" 8133 8134 requires all the names from `aout32.c', and produces the jump vector 8135 8136 sunos_big_vec 8137 8138 The file `host-aout.c' is a special case. It is for a large set of 8139 hosts that use "more or less standard" a.out files, and for which 8140 cross-debugging is not interesting. It uses the standard 32-bit a.out 8141 support routines, but determines the file offsets and addresses of the 8142 text, data, and BSS sections, the machine architecture and machine 8143 type, and the entry point address, in a host-dependent manner. Once 8144 these values have been determined, generic code is used to handle the 8145 object file. 8146 8147 When porting it to run on a new system, you must supply: 8148 8149 HOST_PAGE_SIZE 8150 HOST_SEGMENT_SIZE 8151 HOST_MACHINE_ARCH (optional) 8152 HOST_MACHINE_MACHINE (optional) 8153 HOST_TEXT_START_ADDR 8154 HOST_STACK_END_ADDR 8155 8156 in the file `../include/sys/h-XXX.h' (for your host). These values, 8157 plus the structures and macros defined in `a.out.h' on your host 8158 system, will produce a BFD target that will access ordinary a.out files 8159 on your host. To configure a new machine to use `host-aout.c', specify: 8160 8161 TDEFAULTS = -DDEFAULT_VECTOR=host_aout_big_vec 8162 TDEPFILES= host-aout.o trad-core.o 8163 8164 in the `config/XXX.mt' file, and modify `configure.in' to use the 8165 `XXX.mt' file (by setting "`bfd_target=XXX'") when your configuration 8166 is selected. 8167 8168 3.2.1 Relocations 8169 ----------------- 8170 8171 *Description* 8172 The file `aoutx.h' provides for both the _standard_ and _extended_ 8173 forms of a.out relocation records. 8174 8175 The standard records contain only an address, a symbol index, and a 8176 type field. The extended records (used on 29ks and sparcs) also have a 8177 full integer for an addend. 8178 8179 3.2.2 Internal entry points 8180 --------------------------- 8181 8182 *Description* 8183 `aoutx.h' exports several routines for accessing the contents of an 8184 a.out file, which are gathered and exported in turn by various format 8185 specific files (eg sunos.c). 8186 8187 3.2.2.1 `aout_SIZE_swap_exec_header_in' 8188 ....................................... 8189 8190 *Synopsis* 8191 void aout_SIZE_swap_exec_header_in, 8192 (bfd *abfd, 8193 struct external_exec *bytes, 8194 struct internal_exec *execp); 8195 *Description* 8196 Swap the information in an executable header RAW_BYTES taken from a raw 8197 byte stream memory image into the internal exec header structure EXECP. 8198 8199 3.2.2.2 `aout_SIZE_swap_exec_header_out' 8200 ........................................ 8201 8202 *Synopsis* 8203 void aout_SIZE_swap_exec_header_out 8204 (bfd *abfd, 8205 struct internal_exec *execp, 8206 struct external_exec *raw_bytes); 8207 *Description* 8208 Swap the information in an internal exec header structure EXECP into 8209 the buffer RAW_BYTES ready for writing to disk. 8210 8211 3.2.2.3 `aout_SIZE_some_aout_object_p' 8212 ...................................... 8213 8214 *Synopsis* 8215 const bfd_target *aout_SIZE_some_aout_object_p 8216 (bfd *abfd, 8217 struct internal_exec *execp, 8218 const bfd_target *(*callback_to_real_object_p) (bfd *)); 8219 *Description* 8220 Some a.out variant thinks that the file open in ABFD checking is an 8221 a.out file. Do some more checking, and set up for access if it really 8222 is. Call back to the calling environment's "finish up" function just 8223 before returning, to handle any last-minute setup. 8224 8225 3.2.2.4 `aout_SIZE_mkobject' 8226 ............................ 8227 8228 *Synopsis* 8229 bfd_boolean aout_SIZE_mkobject, (bfd *abfd); 8230 *Description* 8231 Initialize BFD ABFD for use with a.out files. 8232 8233 3.2.2.5 `aout_SIZE_machine_type' 8234 ................................ 8235 8236 *Synopsis* 8237 enum machine_type aout_SIZE_machine_type 8238 (enum bfd_architecture arch, 8239 unsigned long machine, 8240 bfd_boolean *unknown); 8241 *Description* 8242 Keep track of machine architecture and machine type for a.out's. Return 8243 the `machine_type' for a particular architecture and machine, or 8244 `M_UNKNOWN' if that exact architecture and machine can't be represented 8245 in a.out format. 8246 8247 If the architecture is understood, machine type 0 (default) is 8248 always understood. 8249 8250 3.2.2.6 `aout_SIZE_set_arch_mach' 8251 ................................. 8252 8253 *Synopsis* 8254 bfd_boolean aout_SIZE_set_arch_mach, 8255 (bfd *, 8256 enum bfd_architecture arch, 8257 unsigned long machine); 8258 *Description* 8259 Set the architecture and the machine of the BFD ABFD to the values ARCH 8260 and MACHINE. Verify that ABFD's format can support the architecture 8261 required. 8262 8263 3.2.2.7 `aout_SIZE_new_section_hook' 8264 .................................... 8265 8266 *Synopsis* 8267 bfd_boolean aout_SIZE_new_section_hook, 8268 (bfd *abfd, 8269 asection *newsect); 8270 *Description* 8271 Called by the BFD in response to a `bfd_make_section' request. 8272 8273 8274 File: bfd.info, Node: coff, Next: elf, Prev: aout, Up: BFD back ends 8275 8276 3.3 coff backends 8277 ================= 8278 8279 BFD supports a number of different flavours of coff format. The major 8280 differences between formats are the sizes and alignments of fields in 8281 structures on disk, and the occasional extra field. 8282 8283 Coff in all its varieties is implemented with a few common files and 8284 a number of implementation specific files. For example, The 88k bcs 8285 coff format is implemented in the file `coff-m88k.c'. This file 8286 `#include's `coff/m88k.h' which defines the external structure of the 8287 coff format for the 88k, and `coff/internal.h' which defines the 8288 internal structure. `coff-m88k.c' also defines the relocations used by 8289 the 88k format *Note Relocations::. 8290 8291 The Intel i960 processor version of coff is implemented in 8292 `coff-i960.c'. This file has the same structure as `coff-m88k.c', 8293 except that it includes `coff/i960.h' rather than `coff-m88k.h'. 8294 8295 3.3.1 Porting to a new version of coff 8296 -------------------------------------- 8297 8298 The recommended method is to select from the existing implementations 8299 the version of coff which is most like the one you want to use. For 8300 example, we'll say that i386 coff is the one you select, and that your 8301 coff flavour is called foo. Copy `i386coff.c' to `foocoff.c', copy 8302 `../include/coff/i386.h' to `../include/coff/foo.h', and add the lines 8303 to `targets.c' and `Makefile.in' so that your new back end is used. 8304 Alter the shapes of the structures in `../include/coff/foo.h' so that 8305 they match what you need. You will probably also have to add `#ifdef's 8306 to the code in `coff/internal.h' and `coffcode.h' if your version of 8307 coff is too wild. 8308 8309 You can verify that your new BFD backend works quite simply by 8310 building `objdump' from the `binutils' directory, and making sure that 8311 its version of what's going on and your host system's idea (assuming it 8312 has the pretty standard coff dump utility, usually called `att-dump' or 8313 just `dump') are the same. Then clean up your code, and send what 8314 you've done to Cygnus. Then your stuff will be in the next release, and 8315 you won't have to keep integrating it. 8316 8317 3.3.2 How the coff backend works 8318 -------------------------------- 8319 8320 3.3.2.1 File layout 8321 ................... 8322 8323 The Coff backend is split into generic routines that are applicable to 8324 any Coff target and routines that are specific to a particular target. 8325 The target-specific routines are further split into ones which are 8326 basically the same for all Coff targets except that they use the 8327 external symbol format or use different values for certain constants. 8328 8329 The generic routines are in `coffgen.c'. These routines work for 8330 any Coff target. They use some hooks into the target specific code; 8331 the hooks are in a `bfd_coff_backend_data' structure, one of which 8332 exists for each target. 8333 8334 The essentially similar target-specific routines are in 8335 `coffcode.h'. This header file includes executable C code. The 8336 various Coff targets first include the appropriate Coff header file, 8337 make any special defines that are needed, and then include `coffcode.h'. 8338 8339 Some of the Coff targets then also have additional routines in the 8340 target source file itself. 8341 8342 For example, `coff-i960.c' includes `coff/internal.h' and 8343 `coff/i960.h'. It then defines a few constants, such as `I960', and 8344 includes `coffcode.h'. Since the i960 has complex relocation types, 8345 `coff-i960.c' also includes some code to manipulate the i960 relocs. 8346 This code is not in `coffcode.h' because it would not be used by any 8347 other target. 8348 8349 3.3.2.2 Coff long section names 8350 ............................... 8351 8352 In the standard Coff object format, section names are limited to the 8353 eight bytes available in the `s_name' field of the `SCNHDR' section 8354 header structure. The format requires the field to be NUL-padded, but 8355 not necessarily NUL-terminated, so the longest section names permitted 8356 are a full eight characters. 8357 8358 The Microsoft PE variants of the Coff object file format add an 8359 extension to support the use of long section names. This extension is 8360 defined in section 4 of the Microsoft PE/COFF specification (rev 8.1). 8361 If a section name is too long to fit into the section header's `s_name' 8362 field, it is instead placed into the string table, and the `s_name' 8363 field is filled with a slash ("/") followed by the ASCII decimal 8364 representation of the offset of the full name relative to the string 8365 table base. 8366 8367 Note that this implies that the extension can only be used in object 8368 files, as executables do not contain a string table. The standard 8369 specifies that long section names from objects emitted into executable 8370 images are to be truncated. 8371 8372 However, as a GNU extension, BFD can generate executable images that 8373 contain a string table and long section names. This would appear to be 8374 technically valid, as the standard only says that Coff debugging 8375 information is deprecated, not forbidden, and in practice it works, 8376 although some tools that parse PE files expecting the MS standard 8377 format may become confused; `PEview' is one known example. 8378 8379 The functionality is supported in BFD by code implemented under the 8380 control of the macro `COFF_LONG_SECTION_NAMES'. If not defined, the 8381 format does not support long section names in any way. If defined, it 8382 is used to initialise a flag, `_bfd_coff_long_section_names', and a 8383 hook function pointer, `_bfd_coff_set_long_section_names', in the Coff 8384 backend data structure. The flag controls the generation of long 8385 section names in output BFDs at runtime; if it is false, as it will be 8386 by default when generating an executable image, long section names are 8387 truncated; if true, the long section names extension is employed. The 8388 hook points to a function that allows the value of the flag to be 8389 altered at runtime, on formats that support long section names at all; 8390 on other formats it points to a stub that returns an error indication. 8391 With input BFDs, the flag is set according to whether any long section 8392 names are detected while reading the section headers. For a completely 8393 new BFD, the flag is set to the default for the target format. This 8394 information can be used by a client of the BFD library when deciding 8395 what output format to generate, and means that a BFD that is opened for 8396 read and subsequently converted to a writeable BFD and modified 8397 in-place will retain whatever format it had on input. 8398 8399 If `COFF_LONG_SECTION_NAMES' is simply defined (blank), or is 8400 defined to the value "1", then long section names are enabled by 8401 default; if it is defined to the value zero, they are disabled by 8402 default (but still accepted in input BFDs). The header `coffcode.h' 8403 defines a macro, `COFF_DEFAULT_LONG_SECTION_NAMES', which is used in 8404 the backends to initialise the backend data structure fields 8405 appropriately; see the comments for further detail. 8406 8407 3.3.2.3 Bit twiddling 8408 ..................... 8409 8410 Each flavour of coff supported in BFD has its own header file 8411 describing the external layout of the structures. There is also an 8412 internal description of the coff layout, in `coff/internal.h'. A major 8413 function of the coff backend is swapping the bytes and twiddling the 8414 bits to translate the external form of the structures into the normal 8415 internal form. This is all performed in the `bfd_swap'_thing_direction 8416 routines. Some elements are different sizes between different versions 8417 of coff; it is the duty of the coff version specific include file to 8418 override the definitions of various packing routines in `coffcode.h'. 8419 E.g., the size of line number entry in coff is sometimes 16 bits, and 8420 sometimes 32 bits. `#define'ing `PUT_LNSZ_LNNO' and `GET_LNSZ_LNNO' 8421 will select the correct one. No doubt, some day someone will find a 8422 version of coff which has a varying field size not catered to at the 8423 moment. To port BFD, that person will have to add more `#defines'. 8424 Three of the bit twiddling routines are exported to `gdb'; 8425 `coff_swap_aux_in', `coff_swap_sym_in' and `coff_swap_lineno_in'. `GDB' 8426 reads the symbol table on its own, but uses BFD to fix things up. More 8427 of the bit twiddlers are exported for `gas'; `coff_swap_aux_out', 8428 `coff_swap_sym_out', `coff_swap_lineno_out', `coff_swap_reloc_out', 8429 `coff_swap_filehdr_out', `coff_swap_aouthdr_out', 8430 `coff_swap_scnhdr_out'. `Gas' currently keeps track of all the symbol 8431 table and reloc drudgery itself, thereby saving the internal BFD 8432 overhead, but uses BFD to swap things on the way out, making cross 8433 ports much safer. Doing so also allows BFD (and thus the linker) to 8434 use the same header files as `gas', which makes one avenue to disaster 8435 disappear. 8436 8437 3.3.2.4 Symbol reading 8438 ...................... 8439 8440 The simple canonical form for symbols used by BFD is not rich enough to 8441 keep all the information available in a coff symbol table. The back end 8442 gets around this problem by keeping the original symbol table around, 8443 "behind the scenes". 8444 8445 When a symbol table is requested (through a call to 8446 `bfd_canonicalize_symtab'), a request gets through to 8447 `coff_get_normalized_symtab'. This reads the symbol table from the coff 8448 file and swaps all the structures inside into the internal form. It 8449 also fixes up all the pointers in the table (represented in the file by 8450 offsets from the first symbol in the table) into physical pointers to 8451 elements in the new internal table. This involves some work since the 8452 meanings of fields change depending upon context: a field that is a 8453 pointer to another structure in the symbol table at one moment may be 8454 the size in bytes of a structure at the next. Another pass is made 8455 over the table. All symbols which mark file names (`C_FILE' symbols) 8456 are modified so that the internal string points to the value in the 8457 auxent (the real filename) rather than the normal text associated with 8458 the symbol (`".file"'). 8459 8460 At this time the symbol names are moved around. Coff stores all 8461 symbols less than nine characters long physically within the symbol 8462 table; longer strings are kept at the end of the file in the string 8463 table. This pass moves all strings into memory and replaces them with 8464 pointers to the strings. 8465 8466 The symbol table is massaged once again, this time to create the 8467 canonical table used by the BFD application. Each symbol is inspected 8468 in turn, and a decision made (using the `sclass' field) about the 8469 various flags to set in the `asymbol'. *Note Symbols::. The generated 8470 canonical table shares strings with the hidden internal symbol table. 8471 8472 Any linenumbers are read from the coff file too, and attached to the 8473 symbols which own the functions the linenumbers belong to. 8474 8475 3.3.2.5 Symbol writing 8476 ...................... 8477 8478 Writing a symbol to a coff file which didn't come from a coff file will 8479 lose any debugging information. The `asymbol' structure remembers the 8480 BFD from which the symbol was taken, and on output the back end makes 8481 sure that the same destination target as source target is present. 8482 8483 When the symbols have come from a coff file then all the debugging 8484 information is preserved. 8485 8486 Symbol tables are provided for writing to the back end in a vector 8487 of pointers to pointers. This allows applications like the linker to 8488 accumulate and output large symbol tables without having to do too much 8489 byte copying. 8490 8491 This function runs through the provided symbol table and patches 8492 each symbol marked as a file place holder (`C_FILE') to point to the 8493 next file place holder in the list. It also marks each `offset' field 8494 in the list with the offset from the first symbol of the current symbol. 8495 8496 Another function of this procedure is to turn the canonical value 8497 form of BFD into the form used by coff. Internally, BFD expects symbol 8498 values to be offsets from a section base; so a symbol physically at 8499 0x120, but in a section starting at 0x100, would have the value 0x20. 8500 Coff expects symbols to contain their final value, so symbols have 8501 their values changed at this point to reflect their sum with their 8502 owning section. This transformation uses the `output_section' field of 8503 the `asymbol''s `asection' *Note Sections::. 8504 8505 * `coff_mangle_symbols' 8506 This routine runs though the provided symbol table and uses the 8507 offsets generated by the previous pass and the pointers generated when 8508 the symbol table was read in to create the structured hierarchy 8509 required by coff. It changes each pointer to a symbol into the index 8510 into the symbol table of the asymbol. 8511 8512 * `coff_write_symbols' 8513 This routine runs through the symbol table and patches up the 8514 symbols from their internal form into the coff way, calls the bit 8515 twiddlers, and writes out the table to the file. 8516 8517 3.3.2.6 `coff_symbol_type' 8518 .......................... 8519 8520 *Description* 8521 The hidden information for an `asymbol' is described in a 8522 `combined_entry_type': 8523 8524 8525 typedef struct coff_ptr_struct 8526 { 8527 /* Remembers the offset from the first symbol in the file for 8528 this symbol. Generated by coff_renumber_symbols. */ 8529 unsigned int offset; 8530 8531 /* Should the value of this symbol be renumbered. Used for 8532 XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. */ 8533 unsigned int fix_value : 1; 8534 8535 /* Should the tag field of this symbol be renumbered. 8536 Created by coff_pointerize_aux. */ 8537 unsigned int fix_tag : 1; 8538 8539 /* Should the endidx field of this symbol be renumbered. 8540 Created by coff_pointerize_aux. */ 8541 unsigned int fix_end : 1; 8542 8543 /* Should the x_csect.x_scnlen field be renumbered. 8544 Created by coff_pointerize_aux. */ 8545 unsigned int fix_scnlen : 1; 8546 8547 /* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the 8548 index into the line number entries. Set by coff_slurp_symbol_table. */ 8549 unsigned int fix_line : 1; 8550 8551 /* The container for the symbol structure as read and translated 8552 from the file. */ 8553 union 8554 { 8555 union internal_auxent auxent; 8556 struct internal_syment syment; 8557 } u; 8558 } combined_entry_type; 8559 8560 8561 /* Each canonical asymbol really looks like this: */ 8562 8563 typedef struct coff_symbol_struct 8564 { 8565 /* The actual symbol which the rest of BFD works with */ 8566 asymbol symbol; 8567 8568 /* A pointer to the hidden information for this symbol */ 8569 combined_entry_type *native; 8570 8571 /* A pointer to the linenumber information for this symbol */ 8572 struct lineno_cache_entry *lineno; 8573 8574 /* Have the line numbers been relocated yet ? */ 8575 bfd_boolean done_lineno; 8576 } coff_symbol_type; 8577 8578 3.3.2.7 `bfd_coff_backend_data' 8579 ............................... 8580 8581 /* COFF symbol classifications. */ 8582 8583 enum coff_symbol_classification 8584 { 8585 /* Global symbol. */ 8586 COFF_SYMBOL_GLOBAL, 8587 /* Common symbol. */ 8588 COFF_SYMBOL_COMMON, 8589 /* Undefined symbol. */ 8590 COFF_SYMBOL_UNDEFINED, 8591 /* Local symbol. */ 8592 COFF_SYMBOL_LOCAL, 8593 /* PE section symbol. */ 8594 COFF_SYMBOL_PE_SECTION 8595 }; 8596 Special entry points for gdb to swap in coff symbol table parts: 8597 typedef struct 8598 { 8599 void (*_bfd_coff_swap_aux_in) 8600 (bfd *, void *, int, int, int, int, void *); 8601 8602 void (*_bfd_coff_swap_sym_in) 8603 (bfd *, void *, void *); 8604 8605 void (*_bfd_coff_swap_lineno_in) 8606 (bfd *, void *, void *); 8607 8608 unsigned int (*_bfd_coff_swap_aux_out) 8609 (bfd *, void *, int, int, int, int, void *); 8610 8611 unsigned int (*_bfd_coff_swap_sym_out) 8612 (bfd *, void *, void *); 8613 8614 unsigned int (*_bfd_coff_swap_lineno_out) 8615 (bfd *, void *, void *); 8616 8617 unsigned int (*_bfd_coff_swap_reloc_out) 8618 (bfd *, void *, void *); 8619 8620 unsigned int (*_bfd_coff_swap_filehdr_out) 8621 (bfd *, void *, void *); 8622 8623 unsigned int (*_bfd_coff_swap_aouthdr_out) 8624 (bfd *, void *, void *); 8625 8626 unsigned int (*_bfd_coff_swap_scnhdr_out) 8627 (bfd *, void *, void *); 8628 8629 unsigned int _bfd_filhsz; 8630 unsigned int _bfd_aoutsz; 8631 unsigned int _bfd_scnhsz; 8632 unsigned int _bfd_symesz; 8633 unsigned int _bfd_auxesz; 8634 unsigned int _bfd_relsz; 8635 unsigned int _bfd_linesz; 8636 unsigned int _bfd_filnmlen; 8637 bfd_boolean _bfd_coff_long_filenames; 8638 8639 bfd_boolean _bfd_coff_long_section_names; 8640 bfd_boolean (*_bfd_coff_set_long_section_names) 8641 (bfd *, int); 8642 8643 unsigned int _bfd_coff_default_section_alignment_power; 8644 bfd_boolean _bfd_coff_force_symnames_in_strings; 8645 unsigned int _bfd_coff_debug_string_prefix_length; 8646 8647 void (*_bfd_coff_swap_filehdr_in) 8648 (bfd *, void *, void *); 8649 8650 void (*_bfd_coff_swap_aouthdr_in) 8651 (bfd *, void *, void *); 8652 8653 void (*_bfd_coff_swap_scnhdr_in) 8654 (bfd *, void *, void *); 8655 8656 void (*_bfd_coff_swap_reloc_in) 8657 (bfd *abfd, void *, void *); 8658 8659 bfd_boolean (*_bfd_coff_bad_format_hook) 8660 (bfd *, void *); 8661 8662 bfd_boolean (*_bfd_coff_set_arch_mach_hook) 8663 (bfd *, void *); 8664 8665 void * (*_bfd_coff_mkobject_hook) 8666 (bfd *, void *, void *); 8667 8668 bfd_boolean (*_bfd_styp_to_sec_flags_hook) 8669 (bfd *, void *, const char *, asection *, flagword *); 8670 8671 void (*_bfd_set_alignment_hook) 8672 (bfd *, asection *, void *); 8673 8674 bfd_boolean (*_bfd_coff_slurp_symbol_table) 8675 (bfd *); 8676 8677 bfd_boolean (*_bfd_coff_symname_in_debug) 8678 (bfd *, struct internal_syment *); 8679 8680 bfd_boolean (*_bfd_coff_pointerize_aux_hook) 8681 (bfd *, combined_entry_type *, combined_entry_type *, 8682 unsigned int, combined_entry_type *); 8683 8684 bfd_boolean (*_bfd_coff_print_aux) 8685 (bfd *, FILE *, combined_entry_type *, combined_entry_type *, 8686 combined_entry_type *, unsigned int); 8687 8688 void (*_bfd_coff_reloc16_extra_cases) 8689 (bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *, 8690 bfd_byte *, unsigned int *, unsigned int *); 8691 8692 int (*_bfd_coff_reloc16_estimate) 8693 (bfd *, asection *, arelent *, unsigned int, 8694 struct bfd_link_info *); 8695 8696 enum coff_symbol_classification (*_bfd_coff_classify_symbol) 8697 (bfd *, struct internal_syment *); 8698 8699 bfd_boolean (*_bfd_coff_compute_section_file_positions) 8700 (bfd *); 8701 8702 bfd_boolean (*_bfd_coff_start_final_link) 8703 (bfd *, struct bfd_link_info *); 8704 8705 bfd_boolean (*_bfd_coff_relocate_section) 8706 (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, 8707 struct internal_reloc *, struct internal_syment *, asection **); 8708 8709 reloc_howto_type *(*_bfd_coff_rtype_to_howto) 8710 (bfd *, asection *, struct internal_reloc *, 8711 struct coff_link_hash_entry *, struct internal_syment *, 8712 bfd_vma *); 8713 8714 bfd_boolean (*_bfd_coff_adjust_symndx) 8715 (bfd *, struct bfd_link_info *, bfd *, asection *, 8716 struct internal_reloc *, bfd_boolean *); 8717 8718 bfd_boolean (*_bfd_coff_link_add_one_symbol) 8719 (struct bfd_link_info *, bfd *, const char *, flagword, 8720 asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean, 8721 struct bfd_link_hash_entry **); 8722 8723 bfd_boolean (*_bfd_coff_link_output_has_begun) 8724 (bfd *, struct coff_final_link_info *); 8725 8726 bfd_boolean (*_bfd_coff_final_link_postscript) 8727 (bfd *, struct coff_final_link_info *); 8728 8729 bfd_boolean (*_bfd_coff_print_pdata) 8730 (bfd *, void *); 8731 8732 } bfd_coff_backend_data; 8733 8734 #define coff_backend_info(abfd) \ 8735 ((bfd_coff_backend_data *) (abfd)->xvec->backend_data) 8736 8737 #define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \ 8738 ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i)) 8739 8740 #define bfd_coff_swap_sym_in(a,e,i) \ 8741 ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i)) 8742 8743 #define bfd_coff_swap_lineno_in(a,e,i) \ 8744 ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i)) 8745 8746 #define bfd_coff_swap_reloc_out(abfd, i, o) \ 8747 ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o)) 8748 8749 #define bfd_coff_swap_lineno_out(abfd, i, o) \ 8750 ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o)) 8751 8752 #define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \ 8753 ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o)) 8754 8755 #define bfd_coff_swap_sym_out(abfd, i,o) \ 8756 ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o)) 8757 8758 #define bfd_coff_swap_scnhdr_out(abfd, i,o) \ 8759 ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o)) 8760 8761 #define bfd_coff_swap_filehdr_out(abfd, i,o) \ 8762 ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o)) 8763 8764 #define bfd_coff_swap_aouthdr_out(abfd, i,o) \ 8765 ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o)) 8766 8767 #define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz) 8768 #define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz) 8769 #define bfd_coff_scnhsz(abfd) (coff_backend_info (abfd)->_bfd_scnhsz) 8770 #define bfd_coff_symesz(abfd) (coff_backend_info (abfd)->_bfd_symesz) 8771 #define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz) 8772 #define bfd_coff_relsz(abfd) (coff_backend_info (abfd)->_bfd_relsz) 8773 #define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz) 8774 #define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen) 8775 #define bfd_coff_long_filenames(abfd) \ 8776 (coff_backend_info (abfd)->_bfd_coff_long_filenames) 8777 #define bfd_coff_long_section_names(abfd) \ 8778 (coff_backend_info (abfd)->_bfd_coff_long_section_names) 8779 #define bfd_coff_set_long_section_names(abfd, enable) \ 8780 ((coff_backend_info (abfd)->_bfd_coff_set_long_section_names) (abfd, enable)) 8781 #define bfd_coff_default_section_alignment_power(abfd) \ 8782 (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power) 8783 #define bfd_coff_swap_filehdr_in(abfd, i,o) \ 8784 ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o)) 8785 8786 #define bfd_coff_swap_aouthdr_in(abfd, i,o) \ 8787 ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o)) 8788 8789 #define bfd_coff_swap_scnhdr_in(abfd, i,o) \ 8790 ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o)) 8791 8792 #define bfd_coff_swap_reloc_in(abfd, i, o) \ 8793 ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o)) 8794 8795 #define bfd_coff_bad_format_hook(abfd, filehdr) \ 8796 ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr)) 8797 8798 #define bfd_coff_set_arch_mach_hook(abfd, filehdr)\ 8799 ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr)) 8800 #define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\ 8801 ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook)\ 8802 (abfd, filehdr, aouthdr)) 8803 8804 #define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section, flags_ptr)\ 8805 ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\ 8806 (abfd, scnhdr, name, section, flags_ptr)) 8807 8808 #define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\ 8809 ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr)) 8810 8811 #define bfd_coff_slurp_symbol_table(abfd)\ 8812 ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd)) 8813 8814 #define bfd_coff_symname_in_debug(abfd, sym)\ 8815 ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym)) 8816 8817 #define bfd_coff_force_symnames_in_strings(abfd)\ 8818 (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings) 8819 8820 #define bfd_coff_debug_string_prefix_length(abfd)\ 8821 (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length) 8822 8823 #define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\ 8824 ((coff_backend_info (abfd)->_bfd_coff_print_aux)\ 8825 (abfd, file, base, symbol, aux, indaux)) 8826 8827 #define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order,\ 8828 reloc, data, src_ptr, dst_ptr)\ 8829 ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\ 8830 (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)) 8831 8832 #define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\ 8833 ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\ 8834 (abfd, section, reloc, shrink, link_info)) 8835 8836 #define bfd_coff_classify_symbol(abfd, sym)\ 8837 ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\ 8838 (abfd, sym)) 8839 8840 #define bfd_coff_compute_section_file_positions(abfd)\ 8841 ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\ 8842 (abfd)) 8843 8844 #define bfd_coff_start_final_link(obfd, info)\ 8845 ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\ 8846 (obfd, info)) 8847 #define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\ 8848 ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\ 8849 (obfd, info, ibfd, o, con, rel, isyms, secs)) 8850 #define bfd_coff_rtype_to_howto(abfd, sec, rel, h, sym, addendp)\ 8851 ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\ 8852 (abfd, sec, rel, h, sym, addendp)) 8853 #define bfd_coff_adjust_symndx(obfd, info, ibfd, sec, rel, adjustedp)\ 8854 ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\ 8855 (obfd, info, ibfd, sec, rel, adjustedp)) 8856 #define bfd_coff_link_add_one_symbol(info, abfd, name, flags, section,\ 8857 value, string, cp, coll, hashp)\ 8858 ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\ 8859 (info, abfd, name, flags, section, value, string, cp, coll, hashp)) 8860 8861 #define bfd_coff_link_output_has_begun(a,p) \ 8862 ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a, p)) 8863 #define bfd_coff_final_link_postscript(a,p) \ 8864 ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a, p)) 8865 8866 #define bfd_coff_have_print_pdata(a) \ 8867 (coff_backend_info (a)->_bfd_coff_print_pdata) 8868 #define bfd_coff_print_pdata(a,p) \ 8869 ((coff_backend_info (a)->_bfd_coff_print_pdata) (a, p)) 8870 8871 /* Macro: Returns true if the bfd is a PE executable as opposed to a 8872 PE object file. */ 8873 #define bfd_pei_p(abfd) \ 8874 (CONST_STRNEQ ((abfd)->xvec->name, "pei-")) 8875 8876 3.3.2.8 Writing relocations 8877 ........................... 8878 8879 To write relocations, the back end steps though the canonical 8880 relocation table and create an `internal_reloc'. The symbol index to 8881 use is removed from the `offset' field in the symbol table supplied. 8882 The address comes directly from the sum of the section base address and 8883 the relocation offset; the type is dug directly from the howto field. 8884 Then the `internal_reloc' is swapped into the shape of an 8885 `external_reloc' and written out to disk. 8886 8887 3.3.2.9 Reading linenumbers 8888 ........................... 8889 8890 Creating the linenumber table is done by reading in the entire coff 8891 linenumber table, and creating another table for internal use. 8892 8893 A coff linenumber table is structured so that each function is 8894 marked as having a line number of 0. Each line within the function is 8895 an offset from the first line in the function. The base of the line 8896 number information for the table is stored in the symbol associated 8897 with the function. 8898 8899 Note: The PE format uses line number 0 for a flag indicating a new 8900 source file. 8901 8902 The information is copied from the external to the internal table, 8903 and each symbol which marks a function is marked by pointing its... 8904 8905 How does this work ? 8906 8907 3.3.2.10 Reading relocations 8908 ............................ 8909 8910 Coff relocations are easily transformed into the internal BFD form 8911 (`arelent'). 8912 8913 Reading a coff relocation table is done in the following stages: 8914 8915 * Read the entire coff relocation table into memory. 8916 8917 * Process each relocation in turn; first swap it from the external 8918 to the internal form. 8919 8920 * Turn the symbol referenced in the relocation's symbol index into a 8921 pointer into the canonical symbol table. This table is the same 8922 as the one returned by a call to `bfd_canonicalize_symtab'. The 8923 back end will call that routine and save the result if a 8924 canonicalization hasn't been done. 8925 8926 * The reloc index is turned into a pointer to a howto structure, in 8927 a back end specific way. For instance, the 386 and 960 use the 8928 `r_type' to directly produce an index into a howto table vector; 8929 the 88k subtracts a number from the `r_type' field and creates an 8930 addend field. 8931 8932 8933 File: bfd.info, Node: elf, Next: mmo, Prev: coff, Up: BFD back ends 8934 8935 3.4 ELF backends 8936 ================ 8937 8938 BFD support for ELF formats is being worked on. Currently, the best 8939 supported back ends are for sparc and i386 (running svr4 or Solaris 2). 8940 8941 Documentation of the internals of the support code still needs to be 8942 written. The code is changing quickly enough that we haven't bothered 8943 yet. 8944 8945 8946 File: bfd.info, Node: mmo, Prev: elf, Up: BFD back ends 8947 8948 3.5 mmo backend 8949 =============== 8950 8951 The mmo object format is used exclusively together with Professor 8952 Donald E. Knuth's educational 64-bit processor MMIX. The simulator 8953 `mmix' which is available at 8954 `http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz' 8955 understands this format. That package also includes a combined 8956 assembler and linker called `mmixal'. The mmo format has no advantages 8957 feature-wise compared to e.g. ELF. It is a simple non-relocatable 8958 object format with no support for archives or debugging information, 8959 except for symbol value information and line numbers (which is not yet 8960 implemented in BFD). See 8961 `http://www-cs-faculty.stanford.edu/~knuth/mmix.html' for more 8962 information about MMIX. The ELF format is used for intermediate object 8963 files in the BFD implementation. 8964 8965 * Menu: 8966 8967 * File layout:: 8968 * Symbol-table:: 8969 * mmo section mapping:: 8970 8971 8972 File: bfd.info, Node: File layout, Next: Symbol-table, Prev: mmo, Up: mmo 8973 8974 3.5.1 File layout 8975 ----------------- 8976 8977 The mmo file contents is not partitioned into named sections as with 8978 e.g. ELF. Memory areas is formed by specifying the location of the 8979 data that follows. Only the memory area `0x0000...00' to `0x01ff...ff' 8980 is executable, so it is used for code (and constants) and the area 8981 `0x2000...00' to `0x20ff...ff' is used for writable data. *Note mmo 8982 section mapping::. 8983 8984 There is provision for specifying "special data" of 65536 different 8985 types. We use type 80 (decimal), arbitrarily chosen the same as the 8986 ELF `e_machine' number for MMIX, filling it with section information 8987 normally found in ELF objects. *Note mmo section mapping::. 8988 8989 Contents is entered as 32-bit words, xor:ed over previous contents, 8990 always zero-initialized. A word that starts with the byte `0x98' forms 8991 a command called a `lopcode', where the next byte distinguished between 8992 the thirteen lopcodes. The two remaining bytes, called the `Y' and `Z' 8993 fields, or the `YZ' field (a 16-bit big-endian number), are used for 8994 various purposes different for each lopcode. As documented in 8995 `http://www-cs-faculty.stanford.edu/~knuth/mmixal-intro.ps.gz', the 8996 lopcodes are: 8997 8998 `lop_quote' 8999 0x98000001. The next word is contents, regardless of whether it 9000 starts with 0x98 or not. 9001 9002 `lop_loc' 9003 0x9801YYZZ, where `Z' is 1 or 2. This is a location directive, 9004 setting the location for the next data to the next 32-bit word 9005 (for Z = 1) or 64-bit word (for Z = 2), plus Y * 2^56. Normally 9006 `Y' is 0 for the text segment and 2 for the data segment. 9007 9008 `lop_skip' 9009 0x9802YYZZ. Increase the current location by `YZ' bytes. 9010 9011 `lop_fixo' 9012 0x9803YYZZ, where `Z' is 1 or 2. Store the current location as 64 9013 bits into the location pointed to by the next 32-bit (Z = 1) or 9014 64-bit (Z = 2) word, plus Y * 2^56. 9015 9016 `lop_fixr' 9017 0x9804YYZZ. `YZ' is stored into the current location plus 2 - 4 * 9018 YZ. 9019 9020 `lop_fixrx' 9021 0x980500ZZ. `Z' is 16 or 24. A value `L' derived from the 9022 following 32-bit word are used in a manner similar to `YZ' in 9023 lop_fixr: it is xor:ed into the current location minus 4 * L. The 9024 first byte of the word is 0 or 1. If it is 1, then L = (LOWEST 24 9025 BITS OF WORD) - 2^Z, if 0, then L = (LOWEST 24 BITS OF WORD). 9026 9027 `lop_file' 9028 0x9806YYZZ. `Y' is the file number, `Z' is count of 32-bit words. 9029 Set the file number to `Y' and the line counter to 0. The next Z 9030 * 4 bytes contain the file name, padded with zeros if the count is 9031 not a multiple of four. The same `Y' may occur multiple times, 9032 but `Z' must be 0 for all but the first occurrence. 9033 9034 `lop_line' 9035 0x9807YYZZ. `YZ' is the line number. Together with lop_file, it 9036 forms the source location for the next 32-bit word. Note that for 9037 each non-lopcode 32-bit word, line numbers are assumed incremented 9038 by one. 9039 9040 `lop_spec' 9041 0x9808YYZZ. `YZ' is the type number. Data until the next lopcode 9042 other than lop_quote forms special data of type `YZ'. *Note mmo 9043 section mapping::. 9044 9045 Other types than 80, (or type 80 with a content that does not 9046 parse) is stored in sections named `.MMIX.spec_data.N' where N is 9047 the `YZ'-type. The flags for such a sections say not to allocate 9048 or load the data. The vma is 0. Contents of multiple occurrences 9049 of special data N is concatenated to the data of the previous 9050 lop_spec Ns. The location in data or code at which the lop_spec 9051 occurred is lost. 9052 9053 `lop_pre' 9054 0x980901ZZ. The first lopcode in a file. The `Z' field forms the 9055 length of header information in 32-bit words, where the first word 9056 tells the time in seconds since `00:00:00 GMT Jan 1 1970'. 9057 9058 `lop_post' 9059 0x980a00ZZ. Z > 32. This lopcode follows after all 9060 content-generating lopcodes in a program. The `Z' field denotes 9061 the value of `rG' at the beginning of the program. The following 9062 256 - Z big-endian 64-bit words are loaded into global registers 9063 `$G' ... `$255'. 9064 9065 `lop_stab' 9066 0x980b0000. The next-to-last lopcode in a program. Must follow 9067 immediately after the lop_post lopcode and its data. After this 9068 lopcode follows all symbols in a compressed format (*note 9069 Symbol-table::). 9070 9071 `lop_end' 9072 0x980cYYZZ. The last lopcode in a program. It must follow the 9073 lop_stab lopcode and its data. The `YZ' field contains the number 9074 of 32-bit words of symbol table information after the preceding 9075 lop_stab lopcode. 9076 9077 Note that the lopcode "fixups"; `lop_fixr', `lop_fixrx' and 9078 `lop_fixo' are not generated by BFD, but are handled. They are 9079 generated by `mmixal'. 9080 9081 This trivial one-label, one-instruction file: 9082 9083 :Main TRAP 1,2,3 9084 9085 can be represented this way in mmo: 9086 9087 0x98090101 - lop_pre, one 32-bit word with timestamp. 9088 <timestamp> 9089 0x98010002 - lop_loc, text segment, using a 64-bit address. 9090 Note that mmixal does not emit this for the file above. 9091 0x00000000 - Address, high 32 bits. 9092 0x00000000 - Address, low 32 bits. 9093 0x98060002 - lop_file, 2 32-bit words for file-name. 9094 0x74657374 - "test" 9095 0x2e730000 - ".s\0\0" 9096 0x98070001 - lop_line, line 1. 9097 0x00010203 - TRAP 1,2,3 9098 0x980a00ff - lop_post, setting $255 to 0. 9099 0x00000000 9100 0x00000000 9101 0x980b0000 - lop_stab for ":Main" = 0, serial 1. 9102 0x203a4040 *Note Symbol-table::. 9103 0x10404020 9104 0x4d206120 9105 0x69016e00 9106 0x81000000 9107 0x980c0005 - lop_end; symbol table contained five 32-bit words. 9108 9109 9110 File: bfd.info, Node: Symbol-table, Next: mmo section mapping, Prev: File layout, Up: mmo 9111 9112 3.5.2 Symbol table format 9113 ------------------------- 9114 9115 From mmixal.w (or really, the generated mmixal.tex) in 9116 `http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz'): 9117 "Symbols are stored and retrieved by means of a `ternary search trie', 9118 following ideas of Bentley and Sedgewick. (See ACM-SIAM Symp. on 9119 Discrete Algorithms `8' (1997), 360-369; R.Sedgewick, `Algorithms in C' 9120 (Reading, Mass. Addison-Wesley, 1998), `15.4'.) Each trie node stores 9121 a character, and there are branches to subtries for the cases where a 9122 given character is less than, equal to, or greater than the character 9123 in the trie. There also is a pointer to a symbol table entry if a 9124 symbol ends at the current node." 9125 9126 So it's a tree encoded as a stream of bytes. The stream of bytes 9127 acts on a single virtual global symbol, adding and removing characters 9128 and signalling complete symbol points. Here, we read the stream and 9129 create symbols at the completion points. 9130 9131 First, there's a control byte `m'. If any of the listed bits in `m' 9132 is nonzero, we execute what stands at the right, in the listed order: 9133 9134 (MMO3_LEFT) 9135 0x40 - Traverse left trie. 9136 (Read a new command byte and recurse.) 9137 9138 (MMO3_SYMBITS) 9139 0x2f - Read the next byte as a character and store it in the 9140 current character position; increment character position. 9141 Test the bits of `m': 9142 9143 (MMO3_WCHAR) 9144 0x80 - The character is 16-bit (so read another byte, 9145 merge into current character. 9146 9147 (MMO3_TYPEBITS) 9148 0xf - We have a complete symbol; parse the type, value 9149 and serial number and do what should be done 9150 with a symbol. The type and length information 9151 is in j = (m & 0xf). 9152 9153 (MMO3_REGQUAL_BITS) 9154 j == 0xf: A register variable. The following 9155 byte tells which register. 9156 j <= 8: An absolute symbol. Read j bytes as the 9157 big-endian number the symbol equals. 9158 A j = 2 with two zero bytes denotes an 9159 unknown symbol. 9160 j > 8: As with j <= 8, but add (0x20 << 56) 9161 to the value in the following j - 8 9162 bytes. 9163 9164 Then comes the serial number, as a variant of 9165 uleb128, but better named ubeb128: 9166 Read bytes and shift the previous value left 7 9167 (multiply by 128). Add in the new byte, repeat 9168 until a byte has bit 7 set. The serial number 9169 is the computed value minus 128. 9170 9171 (MMO3_MIDDLE) 9172 0x20 - Traverse middle trie. (Read a new command byte 9173 and recurse.) Decrement character position. 9174 9175 (MMO3_RIGHT) 9176 0x10 - Traverse right trie. (Read a new command byte and 9177 recurse.) 9178 9179 Let's look again at the `lop_stab' for the trivial file (*note File 9180 layout::). 9181 9182 0x980b0000 - lop_stab for ":Main" = 0, serial 1. 9183 0x203a4040 9184 0x10404020 9185 0x4d206120 9186 0x69016e00 9187 0x81000000 9188 9189 This forms the trivial trie (note that the path between ":" and "M" 9190 is redundant): 9191 9192 203a ":" 9193 40 / 9194 40 / 9195 10 \ 9196 40 / 9197 40 / 9198 204d "M" 9199 2061 "a" 9200 2069 "i" 9201 016e "n" is the last character in a full symbol, and 9202 with a value represented in one byte. 9203 00 The value is 0. 9204 81 The serial number is 1. 9205 9206 9207 File: bfd.info, Node: mmo section mapping, Prev: Symbol-table, Up: mmo 9208 9209 3.5.3 mmo section mapping 9210 ------------------------- 9211 9212 The implementation in BFD uses special data type 80 (decimal) to 9213 encapsulate and describe named sections, containing e.g. debug 9214 information. If needed, any datum in the encapsulation will be quoted 9215 using lop_quote. First comes a 32-bit word holding the number of 9216 32-bit words containing the zero-terminated zero-padded segment name. 9217 After the name there's a 32-bit word holding flags describing the 9218 section type. Then comes a 64-bit big-endian word with the section 9219 length (in bytes), then another with the section start address. 9220 Depending on the type of section, the contents might follow, 9221 zero-padded to 32-bit boundary. For a loadable section (such as data 9222 or code), the contents might follow at some later point, not 9223 necessarily immediately, as a lop_loc with the same start address as in 9224 the section description, followed by the contents. This in effect 9225 forms a descriptor that must be emitted before the actual contents. 9226 Sections described this way must not overlap. 9227 9228 For areas that don't have such descriptors, synthetic sections are 9229 formed by BFD. Consecutive contents in the two memory areas 9230 `0x0000...00' to `0x01ff...ff' and `0x2000...00' to `0x20ff...ff' are 9231 entered in sections named `.text' and `.data' respectively. If an area 9232 is not otherwise described, but would together with a neighboring lower 9233 area be less than `0x40000000' bytes long, it is joined with the lower 9234 area and the gap is zero-filled. For other cases, a new section is 9235 formed, named `.MMIX.sec.N'. Here, N is a number, a running count 9236 through the mmo file, starting at 0. 9237 9238 A loadable section specified as: 9239 9240 .section secname,"ax" 9241 TETRA 1,2,3,4,-1,-2009 9242 BYTE 80 9243 9244 and linked to address `0x4', is represented by the sequence: 9245 9246 0x98080050 - lop_spec 80 9247 0x00000002 - two 32-bit words for the section name 9248 0x7365636e - "secn" 9249 0x616d6500 - "ame\0" 9250 0x00000033 - flags CODE, READONLY, LOAD, ALLOC 9251 0x00000000 - high 32 bits of section length 9252 0x0000001c - section length is 28 bytes; 6 * 4 + 1 + alignment to 32 bits 9253 0x00000000 - high 32 bits of section address 9254 0x00000004 - section address is 4 9255 0x98010002 - 64 bits with address of following data 9256 0x00000000 - high 32 bits of address 9257 0x00000004 - low 32 bits: data starts at address 4 9258 0x00000001 - 1 9259 0x00000002 - 2 9260 0x00000003 - 3 9261 0x00000004 - 4 9262 0xffffffff - -1 9263 0xfffff827 - -2009 9264 0x50000000 - 80 as a byte, padded with zeros. 9265 9266 Note that the lop_spec wrapping does not include the section 9267 contents. Compare this to a non-loaded section specified as: 9268 9269 .section thirdsec 9270 TETRA 200001,100002 9271 BYTE 38,40 9272 9273 This, when linked to address `0x200000000000001c', is represented by: 9274 9275 0x98080050 - lop_spec 80 9276 0x00000002 - two 32-bit words for the section name 9277 0x7365636e - "thir" 9278 0x616d6500 - "dsec" 9279 0x00000010 - flag READONLY 9280 0x00000000 - high 32 bits of section length 9281 0x0000000c - section length is 12 bytes; 2 * 4 + 2 + alignment to 32 bits 9282 0x20000000 - high 32 bits of address 9283 0x0000001c - low 32 bits of address 0x200000000000001c 9284 0x00030d41 - 200001 9285 0x000186a2 - 100002 9286 0x26280000 - 38, 40 as bytes, padded with zeros 9287 9288 For the latter example, the section contents must not be loaded in 9289 memory, and is therefore specified as part of the special data. The 9290 address is usually unimportant but might provide information for e.g. 9291 the DWARF 2 debugging format. 9292 9293 9294 File: bfd.info, Node: GNU Free Documentation License, Next: BFD Index, Prev: BFD back ends, Up: Top 9295 9296 Version 1.3, 3 November 2008 9297 9298 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. 9299 `http://fsf.org/' 9300 9301 Everyone is permitted to copy and distribute verbatim copies 9302 of this license document, but changing it is not allowed. 9303 9304 0. PREAMBLE 9305 9306 The purpose of this License is to make a manual, textbook, or other 9307 functional and useful document "free" in the sense of freedom: to 9308 assure everyone the effective freedom to copy and redistribute it, 9309 with or without modifying it, either commercially or 9310 noncommercially. Secondarily, this License preserves for the 9311 author and publisher a way to get credit for their work, while not 9312 being considered responsible for modifications made by others. 9313 9314 This License is a kind of "copyleft", which means that derivative 9315 works of the document must themselves be free in the same sense. 9316 It complements the GNU General Public License, which is a copyleft 9317 license designed for free software. 9318 9319 We have designed this License in order to use it for manuals for 9320 free software, because free software needs free documentation: a 9321 free program should come with manuals providing the same freedoms 9322 that the software does. But this License is not limited to 9323 software manuals; it can be used for any textual work, regardless 9324 of subject matter or whether it is published as a printed book. 9325 We recommend this License principally for works whose purpose is 9326 instruction or reference. 9327 9328 1. APPLICABILITY AND DEFINITIONS 9329 9330 This License applies to any manual or other work, in any medium, 9331 that contains a notice placed by the copyright holder saying it 9332 can be distributed under the terms of this License. Such a notice 9333 grants a world-wide, royalty-free license, unlimited in duration, 9334 to use that work under the conditions stated herein. The 9335 "Document", below, refers to any such manual or work. Any member 9336 of the public is a licensee, and is addressed as "you". You 9337 accept the license if you copy, modify or distribute the work in a 9338 way requiring permission under copyright law. 9339 9340 A "Modified Version" of the Document means any work containing the 9341 Document or a portion of it, either copied verbatim, or with 9342 modifications and/or translated into another language. 9343 9344 A "Secondary Section" is a named appendix or a front-matter section 9345 of the Document that deals exclusively with the relationship of the 9346 publishers or authors of the Document to the Document's overall 9347 subject (or to related matters) and contains nothing that could 9348 fall directly within that overall subject. (Thus, if the Document 9349 is in part a textbook of mathematics, a Secondary Section may not 9350 explain any mathematics.) The relationship could be a matter of 9351 historical connection with the subject or with related matters, or 9352 of legal, commercial, philosophical, ethical or political position 9353 regarding them. 9354 9355 The "Invariant Sections" are certain Secondary Sections whose 9356 titles are designated, as being those of Invariant Sections, in 9357 the notice that says that the Document is released under this 9358 License. If a section does not fit the above definition of 9359 Secondary then it is not allowed to be designated as Invariant. 9360 The Document may contain zero Invariant Sections. If the Document 9361 does not identify any Invariant Sections then there are none. 9362 9363 The "Cover Texts" are certain short passages of text that are 9364 listed, as Front-Cover Texts or Back-Cover Texts, in the notice 9365 that says that the Document is released under this License. A 9366 Front-Cover Text may be at most 5 words, and a Back-Cover Text may 9367 be at most 25 words. 9368 9369 A "Transparent" copy of the Document means a machine-readable copy, 9370 represented in a format whose specification is available to the 9371 general public, that is suitable for revising the document 9372 straightforwardly with generic text editors or (for images 9373 composed of pixels) generic paint programs or (for drawings) some 9374 widely available drawing editor, and that is suitable for input to 9375 text formatters or for automatic translation to a variety of 9376 formats suitable for input to text formatters. A copy made in an 9377 otherwise Transparent file format whose markup, or absence of 9378 markup, has been arranged to thwart or discourage subsequent 9379 modification by readers is not Transparent. An image format is 9380 not Transparent if used for any substantial amount of text. A 9381 copy that is not "Transparent" is called "Opaque". 9382 9383 Examples of suitable formats for Transparent copies include plain 9384 ASCII without markup, Texinfo input format, LaTeX input format, 9385 SGML or XML using a publicly available DTD, and 9386 standard-conforming simple HTML, PostScript or PDF designed for 9387 human modification. Examples of transparent image formats include 9388 PNG, XCF and JPG. Opaque formats include proprietary formats that 9389 can be read and edited only by proprietary word processors, SGML or 9390 XML for which the DTD and/or processing tools are not generally 9391 available, and the machine-generated HTML, PostScript or PDF 9392 produced by some word processors for output purposes only. 9393 9394 The "Title Page" means, for a printed book, the title page itself, 9395 plus such following pages as are needed to hold, legibly, the 9396 material this License requires to appear in the title page. For 9397 works in formats which do not have any title page as such, "Title 9398 Page" means the text near the most prominent appearance of the 9399 work's title, preceding the beginning of the body of the text. 9400 9401 The "publisher" means any person or entity that distributes copies 9402 of the Document to the public. 9403 9404 A section "Entitled XYZ" means a named subunit of the Document 9405 whose title either is precisely XYZ or contains XYZ in parentheses 9406 following text that translates XYZ in another language. (Here XYZ 9407 stands for a specific section name mentioned below, such as 9408 "Acknowledgements", "Dedications", "Endorsements", or "History".) 9409 To "Preserve the Title" of such a section when you modify the 9410 Document means that it remains a section "Entitled XYZ" according 9411 to this definition. 9412 9413 The Document may include Warranty Disclaimers next to the notice 9414 which states that this License applies to the Document. These 9415 Warranty Disclaimers are considered to be included by reference in 9416 this License, but only as regards disclaiming warranties: any other 9417 implication that these Warranty Disclaimers may have is void and 9418 has no effect on the meaning of this License. 9419 9420 2. VERBATIM COPYING 9421 9422 You may copy and distribute the Document in any medium, either 9423 commercially or noncommercially, provided that this License, the 9424 copyright notices, and the license notice saying this License 9425 applies to the Document are reproduced in all copies, and that you 9426 add no other conditions whatsoever to those of this License. You 9427 may not use technical measures to obstruct or control the reading 9428 or further copying of the copies you make or distribute. However, 9429 you may accept compensation in exchange for copies. If you 9430 distribute a large enough number of copies you must also follow 9431 the conditions in section 3. 9432 9433 You may also lend copies, under the same conditions stated above, 9434 and you may publicly display copies. 9435 9436 3. COPYING IN QUANTITY 9437 9438 If you publish printed copies (or copies in media that commonly 9439 have printed covers) of the Document, numbering more than 100, and 9440 the Document's license notice requires Cover Texts, you must 9441 enclose the copies in covers that carry, clearly and legibly, all 9442 these Cover Texts: Front-Cover Texts on the front cover, and 9443 Back-Cover Texts on the back cover. Both covers must also clearly 9444 and legibly identify you as the publisher of these copies. The 9445 front cover must present the full title with all words of the 9446 title equally prominent and visible. You may add other material 9447 on the covers in addition. Copying with changes limited to the 9448 covers, as long as they preserve the title of the Document and 9449 satisfy these conditions, can be treated as verbatim copying in 9450 other respects. 9451 9452 If the required texts for either cover are too voluminous to fit 9453 legibly, you should put the first ones listed (as many as fit 9454 reasonably) on the actual cover, and continue the rest onto 9455 adjacent pages. 9456 9457 If you publish or distribute Opaque copies of the Document 9458 numbering more than 100, you must either include a 9459 machine-readable Transparent copy along with each Opaque copy, or 9460 state in or with each Opaque copy a computer-network location from 9461 which the general network-using public has access to download 9462 using public-standard network protocols a complete Transparent 9463 copy of the Document, free of added material. If you use the 9464 latter option, you must take reasonably prudent steps, when you 9465 begin distribution of Opaque copies in quantity, to ensure that 9466 this Transparent copy will remain thus accessible at the stated 9467 location until at least one year after the last time you 9468 distribute an Opaque copy (directly or through your agents or 9469 retailers) of that edition to the public. 9470 9471 It is requested, but not required, that you contact the authors of 9472 the Document well before redistributing any large number of 9473 copies, to give them a chance to provide you with an updated 9474 version of the Document. 9475 9476 4. MODIFICATIONS 9477 9478 You may copy and distribute a Modified Version of the Document 9479 under the conditions of sections 2 and 3 above, provided that you 9480 release the Modified Version under precisely this License, with 9481 the Modified Version filling the role of the Document, thus 9482 licensing distribution and modification of the Modified Version to 9483 whoever possesses a copy of it. In addition, you must do these 9484 things in the Modified Version: 9485 9486 A. Use in the Title Page (and on the covers, if any) a title 9487 distinct from that of the Document, and from those of 9488 previous versions (which should, if there were any, be listed 9489 in the History section of the Document). You may use the 9490 same title as a previous version if the original publisher of 9491 that version gives permission. 9492 9493 B. List on the Title Page, as authors, one or more persons or 9494 entities responsible for authorship of the modifications in 9495 the Modified Version, together with at least five of the 9496 principal authors of the Document (all of its principal 9497 authors, if it has fewer than five), unless they release you 9498 from this requirement. 9499 9500 C. State on the Title page the name of the publisher of the 9501 Modified Version, as the publisher. 9502 9503 D. Preserve all the copyright notices of the Document. 9504 9505 E. Add an appropriate copyright notice for your modifications 9506 adjacent to the other copyright notices. 9507 9508 F. Include, immediately after the copyright notices, a license 9509 notice giving the public permission to use the Modified 9510 Version under the terms of this License, in the form shown in 9511 the Addendum below. 9512 9513 G. Preserve in that license notice the full lists of Invariant 9514 Sections and required Cover Texts given in the Document's 9515 license notice. 9516 9517 H. Include an unaltered copy of this License. 9518 9519 I. Preserve the section Entitled "History", Preserve its Title, 9520 and add to it an item stating at least the title, year, new 9521 authors, and publisher of the Modified Version as given on 9522 the Title Page. If there is no section Entitled "History" in 9523 the Document, create one stating the title, year, authors, 9524 and publisher of the Document as given on its Title Page, 9525 then add an item describing the Modified Version as stated in 9526 the previous sentence. 9527 9528 J. Preserve the network location, if any, given in the Document 9529 for public access to a Transparent copy of the Document, and 9530 likewise the network locations given in the Document for 9531 previous versions it was based on. These may be placed in 9532 the "History" section. You may omit a network location for a 9533 work that was published at least four years before the 9534 Document itself, or if the original publisher of the version 9535 it refers to gives permission. 9536 9537 K. For any section Entitled "Acknowledgements" or "Dedications", 9538 Preserve the Title of the section, and preserve in the 9539 section all the substance and tone of each of the contributor 9540 acknowledgements and/or dedications given therein. 9541 9542 L. Preserve all the Invariant Sections of the Document, 9543 unaltered in their text and in their titles. Section numbers 9544 or the equivalent are not considered part of the section 9545 titles. 9546 9547 M. Delete any section Entitled "Endorsements". Such a section 9548 may not be included in the Modified Version. 9549 9550 N. Do not retitle any existing section to be Entitled 9551 "Endorsements" or to conflict in title with any Invariant 9552 Section. 9553 9554 O. Preserve any Warranty Disclaimers. 9555 9556 If the Modified Version includes new front-matter sections or 9557 appendices that qualify as Secondary Sections and contain no 9558 material copied from the Document, you may at your option 9559 designate some or all of these sections as invariant. To do this, 9560 add their titles to the list of Invariant Sections in the Modified 9561 Version's license notice. These titles must be distinct from any 9562 other section titles. 9563 9564 You may add a section Entitled "Endorsements", provided it contains 9565 nothing but endorsements of your Modified Version by various 9566 parties--for example, statements of peer review or that the text 9567 has been approved by an organization as the authoritative 9568 definition of a standard. 9569 9570 You may add a passage of up to five words as a Front-Cover Text, 9571 and a passage of up to 25 words as a Back-Cover Text, to the end 9572 of the list of Cover Texts in the Modified Version. Only one 9573 passage of Front-Cover Text and one of Back-Cover Text may be 9574 added by (or through arrangements made by) any one entity. If the 9575 Document already includes a cover text for the same cover, 9576 previously added by you or by arrangement made by the same entity 9577 you are acting on behalf of, you may not add another; but you may 9578 replace the old one, on explicit permission from the previous 9579 publisher that added the old one. 9580 9581 The author(s) and publisher(s) of the Document do not by this 9582 License give permission to use their names for publicity for or to 9583 assert or imply endorsement of any Modified Version. 9584 9585 5. COMBINING DOCUMENTS 9586 9587 You may combine the Document with other documents released under 9588 this License, under the terms defined in section 4 above for 9589 modified versions, provided that you include in the combination 9590 all of the Invariant Sections of all of the original documents, 9591 unmodified, and list them all as Invariant Sections of your 9592 combined work in its license notice, and that you preserve all 9593 their Warranty Disclaimers. 9594 9595 The combined work need only contain one copy of this License, and 9596 multiple identical Invariant Sections may be replaced with a single 9597 copy. If there are multiple Invariant Sections with the same name 9598 but different contents, make the title of each such section unique 9599 by adding at the end of it, in parentheses, the name of the 9600 original author or publisher of that section if known, or else a 9601 unique number. Make the same adjustment to the section titles in 9602 the list of Invariant Sections in the license notice of the 9603 combined work. 9604 9605 In the combination, you must combine any sections Entitled 9606 "History" in the various original documents, forming one section 9607 Entitled "History"; likewise combine any sections Entitled 9608 "Acknowledgements", and any sections Entitled "Dedications". You 9609 must delete all sections Entitled "Endorsements." 9610 9611 6. COLLECTIONS OF DOCUMENTS 9612 9613 You may make a collection consisting of the Document and other 9614 documents released under this License, and replace the individual 9615 copies of this License in the various documents with a single copy 9616 that is included in the collection, provided that you follow the 9617 rules of this License for verbatim copying of each of the 9618 documents in all other respects. 9619 9620 You may extract a single document from such a collection, and 9621 distribute it individually under this License, provided you insert 9622 a copy of this License into the extracted document, and follow 9623 this License in all other respects regarding verbatim copying of 9624 that document. 9625 9626 7. AGGREGATION WITH INDEPENDENT WORKS 9627 9628 A compilation of the Document or its derivatives with other 9629 separate and independent documents or works, in or on a volume of 9630 a storage or distribution medium, is called an "aggregate" if the 9631 copyright resulting from the compilation is not used to limit the 9632 legal rights of the compilation's users beyond what the individual 9633 works permit. When the Document is included in an aggregate, this 9634 License does not apply to the other works in the aggregate which 9635 are not themselves derivative works of the Document. 9636 9637 If the Cover Text requirement of section 3 is applicable to these 9638 copies of the Document, then if the Document is less than one half 9639 of the entire aggregate, the Document's Cover Texts may be placed 9640 on covers that bracket the Document within the aggregate, or the 9641 electronic equivalent of covers if the Document is in electronic 9642 form. Otherwise they must appear on printed covers that bracket 9643 the whole aggregate. 9644 9645 8. TRANSLATION 9646 9647 Translation is considered a kind of modification, so you may 9648 distribute translations of the Document under the terms of section 9649 4. Replacing Invariant Sections with translations requires special 9650 permission from their copyright holders, but you may include 9651 translations of some or all Invariant Sections in addition to the 9652 original versions of these Invariant Sections. You may include a 9653 translation of this License, and all the license notices in the 9654 Document, and any Warranty Disclaimers, provided that you also 9655 include the original English version of this License and the 9656 original versions of those notices and disclaimers. In case of a 9657 disagreement between the translation and the original version of 9658 this License or a notice or disclaimer, the original version will 9659 prevail. 9660 9661 If a section in the Document is Entitled "Acknowledgements", 9662 "Dedications", or "History", the requirement (section 4) to 9663 Preserve its Title (section 1) will typically require changing the 9664 actual title. 9665 9666 9. TERMINATION 9667 9668 You may not copy, modify, sublicense, or distribute the Document 9669 except as expressly provided under this License. Any attempt 9670 otherwise to copy, modify, sublicense, or distribute it is void, 9671 and will automatically terminate your rights under this License. 9672 9673 However, if you cease all violation of this License, then your 9674 license from a particular copyright holder is reinstated (a) 9675 provisionally, unless and until the copyright holder explicitly 9676 and finally terminates your license, and (b) permanently, if the 9677 copyright holder fails to notify you of the violation by some 9678 reasonable means prior to 60 days after the cessation. 9679 9680 Moreover, your license from a particular copyright holder is 9681 reinstated permanently if the copyright holder notifies you of the 9682 violation by some reasonable means, this is the first time you have 9683 received notice of violation of this License (for any work) from 9684 that copyright holder, and you cure the violation prior to 30 days 9685 after your receipt of the notice. 9686 9687 Termination of your rights under this section does not terminate 9688 the licenses of parties who have received copies or rights from 9689 you under this License. If your rights have been terminated and 9690 not permanently reinstated, receipt of a copy of some or all of 9691 the same material does not give you any rights to use it. 9692 9693 10. FUTURE REVISIONS OF THIS LICENSE 9694 9695 The Free Software Foundation may publish new, revised versions of 9696 the GNU Free Documentation License from time to time. Such new 9697 versions will be similar in spirit to the present version, but may 9698 differ in detail to address new problems or concerns. See 9699 `http://www.gnu.org/copyleft/'. 9700 9701 Each version of the License is given a distinguishing version 9702 number. If the Document specifies that a particular numbered 9703 version of this License "or any later version" applies to it, you 9704 have the option of following the terms and conditions either of 9705 that specified version or of any later version that has been 9706 published (not as a draft) by the Free Software Foundation. If 9707 the Document does not specify a version number of this License, 9708 you may choose any version ever published (not as a draft) by the 9709 Free Software Foundation. If the Document specifies that a proxy 9710 can decide which future versions of this License can be used, that 9711 proxy's public statement of acceptance of a version permanently 9712 authorizes you to choose that version for the Document. 9713 9714 11. RELICENSING 9715 9716 "Massive Multiauthor Collaboration Site" (or "MMC Site") means any 9717 World Wide Web server that publishes copyrightable works and also 9718 provides prominent facilities for anybody to edit those works. A 9719 public wiki that anybody can edit is an example of such a server. 9720 A "Massive Multiauthor Collaboration" (or "MMC") contained in the 9721 site means any set of copyrightable works thus published on the MMC 9722 site. 9723 9724 "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 9725 license published by Creative Commons Corporation, a not-for-profit 9726 corporation with a principal place of business in San Francisco, 9727 California, as well as future copyleft versions of that license 9728 published by that same organization. 9729 9730 "Incorporate" means to publish or republish a Document, in whole or 9731 in part, as part of another Document. 9732 9733 An MMC is "eligible for relicensing" if it is licensed under this 9734 License, and if all works that were first published under this 9735 License somewhere other than this MMC, and subsequently 9736 incorporated in whole or in part into the MMC, (1) had no cover 9737 texts or invariant sections, and (2) were thus incorporated prior 9738 to November 1, 2008. 9739 9740 The operator of an MMC Site may republish an MMC contained in the 9741 site under CC-BY-SA on the same site at any time before August 1, 9742 2009, provided the MMC is eligible for relicensing. 9743 9744 9745 ADDENDUM: How to use this License for your documents 9746 ==================================================== 9747 9748 To use this License in a document you have written, include a copy of 9749 the License in the document and put the following copyright and license 9750 notices just after the title page: 9751 9752 Copyright (C) YEAR YOUR NAME. 9753 Permission is granted to copy, distribute and/or modify this document 9754 under the terms of the GNU Free Documentation License, Version 1.3 9755 or any later version published by the Free Software Foundation; 9756 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover 9757 Texts. A copy of the license is included in the section entitled ``GNU 9758 Free Documentation License''. 9759 9760 If you have Invariant Sections, Front-Cover Texts and Back-Cover 9761 Texts, replace the "with...Texts." line with this: 9762 9763 with the Invariant Sections being LIST THEIR TITLES, with 9764 the Front-Cover Texts being LIST, and with the Back-Cover Texts 9765 being LIST. 9766 9767 If you have Invariant Sections without Cover Texts, or some other 9768 combination of the three, merge those two alternatives to suit the 9769 situation. 9770 9771 If your document contains nontrivial examples of program code, we 9772 recommend releasing these examples in parallel under your choice of 9773 free software license, such as the GNU General Public License, to 9774 permit their use in free software. 9775 9776 9777 File: bfd.info, Node: BFD Index, Prev: GNU Free Documentation License, Up: Top 9778 9779 BFD Index 9780 ********* 9781 9782 [index] 9783 * Menu: 9784 9785 * _bfd_final_link_relocate: Relocating the section contents. 9786 (line 22) 9787 * _bfd_generic_link_add_archive_symbols: Adding symbols from an archive. 9788 (line 12) 9789 * _bfd_generic_link_add_one_symbol: Adding symbols from an object file. 9790 (line 19) 9791 * _bfd_generic_make_empty_symbol: symbol handling functions. 9792 (line 92) 9793 * _bfd_link_add_symbols in target vector: Adding Symbols to the Hash Table. 9794 (line 6) 9795 * _bfd_link_final_link in target vector: Performing the Final Link. 9796 (line 6) 9797 * _bfd_link_hash_table_create in target vector: Creating a Linker Hash Table. 9798 (line 6) 9799 * _bfd_relocate_contents: Relocating the section contents. 9800 (line 22) 9801 * aout_SIZE_machine_type: aout. (line 147) 9802 * aout_SIZE_mkobject: aout. (line 139) 9803 * aout_SIZE_new_section_hook: aout. (line 177) 9804 * aout_SIZE_set_arch_mach: aout. (line 164) 9805 * aout_SIZE_some_aout_object_p: aout. (line 125) 9806 * aout_SIZE_swap_exec_header_in: aout. (line 101) 9807 * aout_SIZE_swap_exec_header_out: aout. (line 113) 9808 * arelent_chain: typedef arelent. (line 339) 9809 * BFD: Overview. (line 6) 9810 * BFD canonical format: Canonical format. (line 11) 9811 * bfd_alloc: Opening and Closing. 9812 (line 211) 9813 * bfd_alloc2: Opening and Closing. 9814 (line 220) 9815 * bfd_alt_mach_code: BFD front end. (line 689) 9816 * bfd_arch_bits_per_address: Architectures. (line 521) 9817 * bfd_arch_bits_per_byte: Architectures. (line 513) 9818 * bfd_arch_get_compatible: Architectures. (line 456) 9819 * bfd_arch_list: Architectures. (line 447) 9820 * bfd_arch_mach_octets_per_byte: Architectures. (line 590) 9821 * BFD_ARELOC_BFIN_ADD: howto manager. (line 1007) 9822 * BFD_ARELOC_BFIN_ADDR: howto manager. (line 1058) 9823 * BFD_ARELOC_BFIN_AND: howto manager. (line 1028) 9824 * BFD_ARELOC_BFIN_COMP: howto manager. (line 1049) 9825 * BFD_ARELOC_BFIN_CONST: howto manager. (line 1004) 9826 * BFD_ARELOC_BFIN_DIV: howto manager. (line 1016) 9827 * BFD_ARELOC_BFIN_HWPAGE: howto manager. (line 1055) 9828 * BFD_ARELOC_BFIN_LAND: howto manager. (line 1037) 9829 * BFD_ARELOC_BFIN_LEN: howto manager. (line 1043) 9830 * BFD_ARELOC_BFIN_LOR: howto manager. (line 1040) 9831 * BFD_ARELOC_BFIN_LSHIFT: howto manager. (line 1022) 9832 * BFD_ARELOC_BFIN_MOD: howto manager. (line 1019) 9833 * BFD_ARELOC_BFIN_MULT: howto manager. (line 1013) 9834 * BFD_ARELOC_BFIN_NEG: howto manager. (line 1046) 9835 * BFD_ARELOC_BFIN_OR: howto manager. (line 1031) 9836 * BFD_ARELOC_BFIN_PAGE: howto manager. (line 1052) 9837 * BFD_ARELOC_BFIN_PUSH: howto manager. (line 1001) 9838 * BFD_ARELOC_BFIN_RSHIFT: howto manager. (line 1025) 9839 * BFD_ARELOC_BFIN_SUB: howto manager. (line 1010) 9840 * BFD_ARELOC_BFIN_XOR: howto manager. (line 1034) 9841 * bfd_cache_close: File Caching. (line 26) 9842 * bfd_cache_close_all: File Caching. (line 39) 9843 * bfd_cache_init: File Caching. (line 18) 9844 * bfd_calc_gnu_debuglink_crc32: Opening and Closing. 9845 (line 247) 9846 * bfd_canonicalize_reloc: BFD front end. (line 408) 9847 * bfd_canonicalize_symtab: symbol handling functions. 9848 (line 50) 9849 * bfd_check_format: Formats. (line 21) 9850 * bfd_check_format_matches: Formats. (line 52) 9851 * bfd_check_overflow: typedef arelent. (line 351) 9852 * bfd_close: Opening and Closing. 9853 (line 136) 9854 * bfd_close_all_done: Opening and Closing. 9855 (line 154) 9856 * bfd_coff_backend_data: coff. (line 304) 9857 * bfd_copy_private_bfd_data: BFD front end. (line 547) 9858 * bfd_copy_private_header_data: BFD front end. (line 529) 9859 * bfd_copy_private_section_data: section prototypes. (line 255) 9860 * bfd_copy_private_symbol_data: symbol handling functions. 9861 (line 140) 9862 * bfd_core_file_failing_command: Core Files. (line 12) 9863 * bfd_core_file_failing_signal: Core Files. (line 21) 9864 * bfd_create: Opening and Closing. 9865 (line 173) 9866 * bfd_create_gnu_debuglink_section: Opening and Closing. 9867 (line 313) 9868 * bfd_decode_symclass: symbol handling functions. 9869 (line 111) 9870 * bfd_default_arch_struct: Architectures. (line 468) 9871 * bfd_default_compatible: Architectures. (line 530) 9872 * bfd_default_reloc_type_lookup: howto manager. (line 2302) 9873 * bfd_default_scan: Architectures. (line 539) 9874 * bfd_default_set_arch_mach: Architectures. (line 486) 9875 * bfd_demangle: BFD front end. (line 787) 9876 * bfd_emul_get_commonpagesize: BFD front end. (line 767) 9877 * bfd_emul_get_maxpagesize: BFD front end. (line 747) 9878 * bfd_emul_set_commonpagesize: BFD front end. (line 778) 9879 * bfd_emul_set_maxpagesize: BFD front end. (line 758) 9880 * bfd_errmsg: BFD front end. (line 333) 9881 * bfd_fdopenr: Opening and Closing. 9882 (line 46) 9883 * bfd_fill_in_gnu_debuglink_section: Opening and Closing. 9884 (line 327) 9885 * bfd_find_target: bfd_target. (line 454) 9886 * bfd_find_version_for_sym: Writing the symbol table. 9887 (line 80) 9888 * bfd_follow_gnu_debuglink: Opening and Closing. 9889 (line 292) 9890 * bfd_fopen: Opening and Closing. 9891 (line 9) 9892 * bfd_format_string: Formats. (line 79) 9893 * bfd_generic_define_common_symbol: Writing the symbol table. 9894 (line 67) 9895 * bfd_generic_discard_group: section prototypes. (line 281) 9896 * bfd_generic_gc_sections: howto manager. (line 2333) 9897 * bfd_generic_get_relocated_section_contents: howto manager. (line 2353) 9898 * bfd_generic_is_group_section: section prototypes. (line 273) 9899 * bfd_generic_merge_sections: howto manager. (line 2343) 9900 * bfd_generic_relax_section: howto manager. (line 2320) 9901 * bfd_get_arch: Architectures. (line 497) 9902 * bfd_get_arch_info: Architectures. (line 549) 9903 * bfd_get_arch_size: BFD front end. (line 452) 9904 * bfd_get_error: BFD front end. (line 314) 9905 * bfd_get_error_handler: BFD front end. (line 384) 9906 * bfd_get_gp_size: BFD front end. (line 493) 9907 * bfd_get_mach: Architectures. (line 505) 9908 * bfd_get_mtime: BFD front end. (line 831) 9909 * bfd_get_next_mapent: Archives. (line 52) 9910 * bfd_get_reloc_code_name: howto manager. (line 2311) 9911 * bfd_get_reloc_size: typedef arelent. (line 330) 9912 * bfd_get_reloc_upper_bound: BFD front end. (line 398) 9913 * bfd_get_section_by_name: section prototypes. (line 17) 9914 * bfd_get_section_by_name_if: section prototypes. (line 31) 9915 * bfd_get_section_contents: section prototypes. (line 228) 9916 * bfd_get_sign_extend_vma: BFD front end. (line 465) 9917 * bfd_get_size <1>: BFD front end. (line 840) 9918 * bfd_get_size: Internal. (line 25) 9919 * bfd_get_symtab_upper_bound: symbol handling functions. 9920 (line 6) 9921 * bfd_get_target_info: bfd_target. (line 470) 9922 * bfd_get_unique_section_name: section prototypes. (line 50) 9923 * bfd_h_put_size: Internal. (line 97) 9924 * bfd_hash_allocate: Creating and Freeing a Hash Table. 9925 (line 17) 9926 * bfd_hash_lookup: Looking Up or Entering a String. 9927 (line 6) 9928 * bfd_hash_newfunc: Creating and Freeing a Hash Table. 9929 (line 12) 9930 * bfd_hash_set_default_size: Creating and Freeing a Hash Table. 9931 (line 25) 9932 * bfd_hash_table_free: Creating and Freeing a Hash Table. 9933 (line 21) 9934 * bfd_hash_table_init: Creating and Freeing a Hash Table. 9935 (line 6) 9936 * bfd_hash_table_init_n: Creating and Freeing a Hash Table. 9937 (line 6) 9938 * bfd_hash_traverse: Traversing a Hash Table. 9939 (line 6) 9940 * bfd_init: Initialization. (line 11) 9941 * bfd_install_relocation: typedef arelent. (line 392) 9942 * bfd_is_local_label: symbol handling functions. 9943 (line 17) 9944 * bfd_is_local_label_name: symbol handling functions. 9945 (line 26) 9946 * bfd_is_target_special_symbol: symbol handling functions. 9947 (line 38) 9948 * bfd_is_undefined_symclass: symbol handling functions. 9949 (line 120) 9950 * bfd_link_split_section: Writing the symbol table. 9951 (line 44) 9952 * bfd_log2: Internal. (line 164) 9953 * bfd_lookup_arch: Architectures. (line 557) 9954 * bfd_make_debug_symbol: symbol handling functions. 9955 (line 102) 9956 * bfd_make_empty_symbol: symbol handling functions. 9957 (line 78) 9958 * bfd_make_readable: Opening and Closing. 9959 (line 197) 9960 * bfd_make_section: section prototypes. (line 129) 9961 * bfd_make_section_anyway: section prototypes. (line 100) 9962 * bfd_make_section_anyway_with_flags: section prototypes. (line 82) 9963 * bfd_make_section_old_way: section prototypes. (line 62) 9964 * bfd_make_section_with_flags: section prototypes. (line 116) 9965 * bfd_make_writable: Opening and Closing. 9966 (line 183) 9967 * bfd_malloc_and_get_section: section prototypes. (line 245) 9968 * bfd_map_over_sections: section prototypes. (line 155) 9969 * bfd_merge_private_bfd_data: BFD front end. (line 563) 9970 * bfd_mmap: BFD front end. (line 869) 9971 * bfd_octets_per_byte: Architectures. (line 580) 9972 * bfd_open_file: File Caching. (line 52) 9973 * bfd_openr: Opening and Closing. 9974 (line 30) 9975 * bfd_openr_iovec: Opening and Closing. 9976 (line 76) 9977 * bfd_openr_next_archived_file: Archives. (line 78) 9978 * bfd_openstreamr: Opening and Closing. 9979 (line 67) 9980 * bfd_openw: Opening and Closing. 9981 (line 124) 9982 * bfd_perform_relocation: typedef arelent. (line 367) 9983 * bfd_perror: BFD front end. (line 342) 9984 * bfd_preserve_finish: BFD front end. (line 737) 9985 * bfd_preserve_restore: BFD front end. (line 727) 9986 * bfd_preserve_save: BFD front end. (line 711) 9987 * bfd_print_symbol_vandf: symbol handling functions. 9988 (line 70) 9989 * bfd_printable_arch_mach: Architectures. (line 568) 9990 * bfd_printable_name: Architectures. (line 428) 9991 * bfd_put_size: Internal. (line 22) 9992 * BFD_RELOC_12_PCREL: howto manager. (line 39) 9993 * BFD_RELOC_14: howto manager. (line 31) 9994 * BFD_RELOC_16: howto manager. (line 30) 9995 * BFD_RELOC_16_BASEREL: howto manager. (line 95) 9996 * BFD_RELOC_16_GOT_PCREL: howto manager. (line 52) 9997 * BFD_RELOC_16_GOTOFF: howto manager. (line 55) 9998 * BFD_RELOC_16_PCREL: howto manager. (line 38) 9999 * BFD_RELOC_16_PCREL_S2: howto manager. (line 107) 10000 * BFD_RELOC_16_PLT_PCREL: howto manager. (line 63) 10001 * BFD_RELOC_16_PLTOFF: howto manager. (line 67) 10002 * BFD_RELOC_16C_ABS20: howto manager. (line 1866) 10003 * BFD_RELOC_16C_ABS20_C: howto manager. (line 1867) 10004 * BFD_RELOC_16C_ABS24: howto manager. (line 1868) 10005 * BFD_RELOC_16C_ABS24_C: howto manager. (line 1869) 10006 * BFD_RELOC_16C_DISP04: howto manager. (line 1846) 10007 * BFD_RELOC_16C_DISP04_C: howto manager. (line 1847) 10008 * BFD_RELOC_16C_DISP08: howto manager. (line 1848) 10009 * BFD_RELOC_16C_DISP08_C: howto manager. (line 1849) 10010 * BFD_RELOC_16C_DISP16: howto manager. (line 1850) 10011 * BFD_RELOC_16C_DISP16_C: howto manager. (line 1851) 10012 * BFD_RELOC_16C_DISP24: howto manager. (line 1852) 10013 * BFD_RELOC_16C_DISP24_C: howto manager. (line 1853) 10014 * BFD_RELOC_16C_DISP24a: howto manager. (line 1854) 10015 * BFD_RELOC_16C_DISP24a_C: howto manager. (line 1855) 10016 * BFD_RELOC_16C_IMM04: howto manager. (line 1870) 10017 * BFD_RELOC_16C_IMM04_C: howto manager. (line 1871) 10018 * BFD_RELOC_16C_IMM16: howto manager. (line 1872) 10019 * BFD_RELOC_16C_IMM16_C: howto manager. (line 1873) 10020 * BFD_RELOC_16C_IMM20: howto manager. (line 1874) 10021 * BFD_RELOC_16C_IMM20_C: howto manager. (line 1875) 10022 * BFD_RELOC_16C_IMM24: howto manager. (line 1876) 10023 * BFD_RELOC_16C_IMM24_C: howto manager. (line 1877) 10024 * BFD_RELOC_16C_IMM32: howto manager. (line 1878) 10025 * BFD_RELOC_16C_IMM32_C: howto manager. (line 1879) 10026 * BFD_RELOC_16C_NUM08: howto manager. (line 1840) 10027 * BFD_RELOC_16C_NUM08_C: howto manager. (line 1841) 10028 * BFD_RELOC_16C_NUM16: howto manager. (line 1842) 10029 * BFD_RELOC_16C_NUM16_C: howto manager. (line 1843) 10030 * BFD_RELOC_16C_NUM32: howto manager. (line 1844) 10031 * BFD_RELOC_16C_NUM32_C: howto manager. (line 1845) 10032 * BFD_RELOC_16C_REG04: howto manager. (line 1856) 10033 * BFD_RELOC_16C_REG04_C: howto manager. (line 1857) 10034 * BFD_RELOC_16C_REG04a: howto manager. (line 1858) 10035 * BFD_RELOC_16C_REG04a_C: howto manager. (line 1859) 10036 * BFD_RELOC_16C_REG14: howto manager. (line 1860) 10037 * BFD_RELOC_16C_REG14_C: howto manager. (line 1861) 10038 * BFD_RELOC_16C_REG16: howto manager. (line 1862) 10039 * BFD_RELOC_16C_REG16_C: howto manager. (line 1863) 10040 * BFD_RELOC_16C_REG20: howto manager. (line 1864) 10041 * BFD_RELOC_16C_REG20_C: howto manager. (line 1865) 10042 * BFD_RELOC_23_PCREL_S2: howto manager. (line 108) 10043 * BFD_RELOC_24: howto manager. (line 29) 10044 * BFD_RELOC_24_PCREL: howto manager. (line 37) 10045 * BFD_RELOC_24_PLT_PCREL: howto manager. (line 62) 10046 * BFD_RELOC_26: howto manager. (line 28) 10047 * BFD_RELOC_32: howto manager. (line 27) 10048 * BFD_RELOC_32_BASEREL: howto manager. (line 94) 10049 * BFD_RELOC_32_GOT_PCREL: howto manager. (line 51) 10050 * BFD_RELOC_32_GOTOFF: howto manager. (line 54) 10051 * BFD_RELOC_32_PCREL: howto manager. (line 36) 10052 * BFD_RELOC_32_PCREL_S2: howto manager. (line 106) 10053 * BFD_RELOC_32_PLT_PCREL: howto manager. (line 61) 10054 * BFD_RELOC_32_PLTOFF: howto manager. (line 66) 10055 * BFD_RELOC_32_SECREL: howto manager. (line 48) 10056 * BFD_RELOC_386_COPY: howto manager. (line 507) 10057 * BFD_RELOC_386_GLOB_DAT: howto manager. (line 508) 10058 * BFD_RELOC_386_GOT32: howto manager. (line 505) 10059 * BFD_RELOC_386_GOTOFF: howto manager. (line 511) 10060 * BFD_RELOC_386_GOTPC: howto manager. (line 512) 10061 * BFD_RELOC_386_IRELATIVE: howto manager. (line 528) 10062 * BFD_RELOC_386_JUMP_SLOT: howto manager. (line 509) 10063 * BFD_RELOC_386_PLT32: howto manager. (line 506) 10064 * BFD_RELOC_386_RELATIVE: howto manager. (line 510) 10065 * BFD_RELOC_386_TLS_DESC: howto manager. (line 527) 10066 * BFD_RELOC_386_TLS_DESC_CALL: howto manager. (line 526) 10067 * BFD_RELOC_386_TLS_DTPMOD32: howto manager. (line 522) 10068 * BFD_RELOC_386_TLS_DTPOFF32: howto manager. (line 523) 10069 * BFD_RELOC_386_TLS_GD: howto manager. (line 517) 10070 * BFD_RELOC_386_TLS_GOTDESC: howto manager. (line 525) 10071 * BFD_RELOC_386_TLS_GOTIE: howto manager. (line 515) 10072 * BFD_RELOC_386_TLS_IE: howto manager. (line 514) 10073 * BFD_RELOC_386_TLS_IE_32: howto manager. (line 520) 10074 * BFD_RELOC_386_TLS_LDM: howto manager. (line 518) 10075 * BFD_RELOC_386_TLS_LDO_32: howto manager. (line 519) 10076 * BFD_RELOC_386_TLS_LE: howto manager. (line 516) 10077 * BFD_RELOC_386_TLS_LE_32: howto manager. (line 521) 10078 * BFD_RELOC_386_TLS_TPOFF: howto manager. (line 513) 10079 * BFD_RELOC_386_TLS_TPOFF32: howto manager. (line 524) 10080 * BFD_RELOC_390_12: howto manager. (line 1526) 10081 * BFD_RELOC_390_20: howto manager. (line 1626) 10082 * BFD_RELOC_390_COPY: howto manager. (line 1535) 10083 * BFD_RELOC_390_GLOB_DAT: howto manager. (line 1538) 10084 * BFD_RELOC_390_GOT12: howto manager. (line 1529) 10085 * BFD_RELOC_390_GOT16: howto manager. (line 1550) 10086 * BFD_RELOC_390_GOT20: howto manager. (line 1627) 10087 * BFD_RELOC_390_GOT64: howto manager. (line 1568) 10088 * BFD_RELOC_390_GOTENT: howto manager. (line 1574) 10089 * BFD_RELOC_390_GOTOFF64: howto manager. (line 1577) 10090 * BFD_RELOC_390_GOTPC: howto manager. (line 1547) 10091 * BFD_RELOC_390_GOTPCDBL: howto manager. (line 1565) 10092 * BFD_RELOC_390_GOTPLT12: howto manager. (line 1580) 10093 * BFD_RELOC_390_GOTPLT16: howto manager. (line 1583) 10094 * BFD_RELOC_390_GOTPLT20: howto manager. (line 1628) 10095 * BFD_RELOC_390_GOTPLT32: howto manager. (line 1586) 10096 * BFD_RELOC_390_GOTPLT64: howto manager. (line 1589) 10097 * BFD_RELOC_390_GOTPLTENT: howto manager. (line 1592) 10098 * BFD_RELOC_390_JMP_SLOT: howto manager. (line 1541) 10099 * BFD_RELOC_390_PC16DBL: howto manager. (line 1553) 10100 * BFD_RELOC_390_PC32DBL: howto manager. (line 1559) 10101 * BFD_RELOC_390_PLT16DBL: howto manager. (line 1556) 10102 * BFD_RELOC_390_PLT32: howto manager. (line 1532) 10103 * BFD_RELOC_390_PLT32DBL: howto manager. (line 1562) 10104 * BFD_RELOC_390_PLT64: howto manager. (line 1571) 10105 * BFD_RELOC_390_PLTOFF16: howto manager. (line 1595) 10106 * BFD_RELOC_390_PLTOFF32: howto manager. (line 1598) 10107 * BFD_RELOC_390_PLTOFF64: howto manager. (line 1601) 10108 * BFD_RELOC_390_RELATIVE: howto manager. (line 1544) 10109 * BFD_RELOC_390_TLS_DTPMOD: howto manager. (line 1621) 10110 * BFD_RELOC_390_TLS_DTPOFF: howto manager. (line 1622) 10111 * BFD_RELOC_390_TLS_GD32: howto manager. (line 1607) 10112 * BFD_RELOC_390_TLS_GD64: howto manager. (line 1608) 10113 * BFD_RELOC_390_TLS_GDCALL: howto manager. (line 1605) 10114 * BFD_RELOC_390_TLS_GOTIE12: howto manager. (line 1609) 10115 * BFD_RELOC_390_TLS_GOTIE20: howto manager. (line 1629) 10116 * BFD_RELOC_390_TLS_GOTIE32: howto manager. (line 1610) 10117 * BFD_RELOC_390_TLS_GOTIE64: howto manager. (line 1611) 10118 * BFD_RELOC_390_TLS_IE32: howto manager. (line 1614) 10119 * BFD_RELOC_390_TLS_IE64: howto manager. (line 1615) 10120 * BFD_RELOC_390_TLS_IEENT: howto manager. (line 1616) 10121 * BFD_RELOC_390_TLS_LDCALL: howto manager. (line 1606) 10122 * BFD_RELOC_390_TLS_LDM32: howto manager. (line 1612) 10123 * BFD_RELOC_390_TLS_LDM64: howto manager. (line 1613) 10124 * BFD_RELOC_390_TLS_LDO32: howto manager. (line 1619) 10125 * BFD_RELOC_390_TLS_LDO64: howto manager. (line 1620) 10126 * BFD_RELOC_390_TLS_LE32: howto manager. (line 1617) 10127 * BFD_RELOC_390_TLS_LE64: howto manager. (line 1618) 10128 * BFD_RELOC_390_TLS_LOAD: howto manager. (line 1604) 10129 * BFD_RELOC_390_TLS_TPOFF: howto manager. (line 1623) 10130 * BFD_RELOC_64: howto manager. (line 26) 10131 * BFD_RELOC_64_PCREL: howto manager. (line 35) 10132 * BFD_RELOC_64_PLT_PCREL: howto manager. (line 60) 10133 * BFD_RELOC_64_PLTOFF: howto manager. (line 65) 10134 * BFD_RELOC_68K_GLOB_DAT: howto manager. (line 74) 10135 * BFD_RELOC_68K_JMP_SLOT: howto manager. (line 75) 10136 * BFD_RELOC_68K_RELATIVE: howto manager. (line 76) 10137 * BFD_RELOC_68K_TLS_GD16: howto manager. (line 78) 10138 * BFD_RELOC_68K_TLS_GD32: howto manager. (line 77) 10139 * BFD_RELOC_68K_TLS_GD8: howto manager. (line 79) 10140 * BFD_RELOC_68K_TLS_IE16: howto manager. (line 87) 10141 * BFD_RELOC_68K_TLS_IE32: howto manager. (line 86) 10142 * BFD_RELOC_68K_TLS_IE8: howto manager. (line 88) 10143 * BFD_RELOC_68K_TLS_LDM16: howto manager. (line 81) 10144 * BFD_RELOC_68K_TLS_LDM32: howto manager. (line 80) 10145 * BFD_RELOC_68K_TLS_LDM8: howto manager. (line 82) 10146 * BFD_RELOC_68K_TLS_LDO16: howto manager. (line 84) 10147 * BFD_RELOC_68K_TLS_LDO32: howto manager. (line 83) 10148 * BFD_RELOC_68K_TLS_LDO8: howto manager. (line 85) 10149 * BFD_RELOC_68K_TLS_LE16: howto manager. (line 90) 10150 * BFD_RELOC_68K_TLS_LE32: howto manager. (line 89) 10151 * BFD_RELOC_68K_TLS_LE8: howto manager. (line 91) 10152 * BFD_RELOC_8: howto manager. (line 32) 10153 * BFD_RELOC_860_COPY: howto manager. (line 1994) 10154 * BFD_RELOC_860_GLOB_DAT: howto manager. (line 1995) 10155 * BFD_RELOC_860_HAGOT: howto manager. (line 2020) 10156 * BFD_RELOC_860_HAGOTOFF: howto manager. (line 2021) 10157 * BFD_RELOC_860_HAPC: howto manager. (line 2022) 10158 * BFD_RELOC_860_HIGH: howto manager. (line 2023) 10159 * BFD_RELOC_860_HIGHADJ: howto manager. (line 2019) 10160 * BFD_RELOC_860_HIGOT: howto manager. (line 2024) 10161 * BFD_RELOC_860_HIGOTOFF: howto manager. (line 2025) 10162 * BFD_RELOC_860_JUMP_SLOT: howto manager. (line 1996) 10163 * BFD_RELOC_860_LOGOT0: howto manager. (line 2008) 10164 * BFD_RELOC_860_LOGOT1: howto manager. (line 2010) 10165 * BFD_RELOC_860_LOGOTOFF0: howto manager. (line 2012) 10166 * BFD_RELOC_860_LOGOTOFF1: howto manager. (line 2014) 10167 * BFD_RELOC_860_LOGOTOFF2: howto manager. (line 2016) 10168 * BFD_RELOC_860_LOGOTOFF3: howto manager. (line 2017) 10169 * BFD_RELOC_860_LOPC: howto manager. (line 2018) 10170 * BFD_RELOC_860_LOW0: howto manager. (line 2001) 10171 * BFD_RELOC_860_LOW1: howto manager. (line 2003) 10172 * BFD_RELOC_860_LOW2: howto manager. (line 2005) 10173 * BFD_RELOC_860_LOW3: howto manager. (line 2007) 10174 * BFD_RELOC_860_PC16: howto manager. (line 2000) 10175 * BFD_RELOC_860_PC26: howto manager. (line 1998) 10176 * BFD_RELOC_860_PLT26: howto manager. (line 1999) 10177 * BFD_RELOC_860_RELATIVE: howto manager. (line 1997) 10178 * BFD_RELOC_860_SPGOT0: howto manager. (line 2009) 10179 * BFD_RELOC_860_SPGOT1: howto manager. (line 2011) 10180 * BFD_RELOC_860_SPGOTOFF0: howto manager. (line 2013) 10181 * BFD_RELOC_860_SPGOTOFF1: howto manager. (line 2015) 10182 * BFD_RELOC_860_SPLIT0: howto manager. (line 2002) 10183 * BFD_RELOC_860_SPLIT1: howto manager. (line 2004) 10184 * BFD_RELOC_860_SPLIT2: howto manager. (line 2006) 10185 * BFD_RELOC_8_BASEREL: howto manager. (line 99) 10186 * BFD_RELOC_8_FFnn: howto manager. (line 103) 10187 * BFD_RELOC_8_GOT_PCREL: howto manager. (line 53) 10188 * BFD_RELOC_8_GOTOFF: howto manager. (line 59) 10189 * BFD_RELOC_8_PCREL: howto manager. (line 40) 10190 * BFD_RELOC_8_PLT_PCREL: howto manager. (line 64) 10191 * BFD_RELOC_8_PLTOFF: howto manager. (line 71) 10192 * BFD_RELOC_ALPHA_BOH: howto manager. (line 315) 10193 * BFD_RELOC_ALPHA_BRSGP: howto manager. (line 298) 10194 * BFD_RELOC_ALPHA_BSR: howto manager. (line 307) 10195 * BFD_RELOC_ALPHA_CODEADDR: howto manager. (line 289) 10196 * BFD_RELOC_ALPHA_DTPMOD64: howto manager. (line 321) 10197 * BFD_RELOC_ALPHA_DTPREL16: howto manager. (line 326) 10198 * BFD_RELOC_ALPHA_DTPREL64: howto manager. (line 323) 10199 * BFD_RELOC_ALPHA_DTPREL_HI16: howto manager. (line 324) 10200 * BFD_RELOC_ALPHA_DTPREL_LO16: howto manager. (line 325) 10201 * BFD_RELOC_ALPHA_ELF_LITERAL: howto manager. (line 254) 10202 * BFD_RELOC_ALPHA_GOTDTPREL16: howto manager. (line 322) 10203 * BFD_RELOC_ALPHA_GOTTPREL16: howto manager. (line 327) 10204 * BFD_RELOC_ALPHA_GPDISP: howto manager. (line 248) 10205 * BFD_RELOC_ALPHA_GPDISP_HI16: howto manager. (line 234) 10206 * BFD_RELOC_ALPHA_GPDISP_LO16: howto manager. (line 242) 10207 * BFD_RELOC_ALPHA_GPREL_HI16: howto manager. (line 293) 10208 * BFD_RELOC_ALPHA_GPREL_LO16: howto manager. (line 294) 10209 * BFD_RELOC_ALPHA_HINT: howto manager. (line 280) 10210 * BFD_RELOC_ALPHA_LDA: howto manager. (line 311) 10211 * BFD_RELOC_ALPHA_LINKAGE: howto manager. (line 285) 10212 * BFD_RELOC_ALPHA_LITERAL: howto manager. (line 253) 10213 * BFD_RELOC_ALPHA_LITUSE: howto manager. (line 255) 10214 * BFD_RELOC_ALPHA_NOP: howto manager. (line 303) 10215 * BFD_RELOC_ALPHA_TLSGD: howto manager. (line 319) 10216 * BFD_RELOC_ALPHA_TLSLDM: howto manager. (line 320) 10217 * BFD_RELOC_ALPHA_TPREL16: howto manager. (line 331) 10218 * BFD_RELOC_ALPHA_TPREL64: howto manager. (line 328) 10219 * BFD_RELOC_ALPHA_TPREL_HI16: howto manager. (line 329) 10220 * BFD_RELOC_ALPHA_TPREL_LO16: howto manager. (line 330) 10221 * BFD_RELOC_ARC_B22_PCREL: howto manager. (line 936) 10222 * BFD_RELOC_ARC_B26: howto manager. (line 941) 10223 * BFD_RELOC_ARM_ADR_IMM: howto manager. (line 829) 10224 * BFD_RELOC_ARM_ADRL_IMMEDIATE: howto manager. (line 816) 10225 * BFD_RELOC_ARM_ALU_PC_G0: howto manager. (line 783) 10226 * BFD_RELOC_ARM_ALU_PC_G0_NC: howto manager. (line 782) 10227 * BFD_RELOC_ARM_ALU_PC_G1: howto manager. (line 785) 10228 * BFD_RELOC_ARM_ALU_PC_G1_NC: howto manager. (line 784) 10229 * BFD_RELOC_ARM_ALU_PC_G2: howto manager. (line 786) 10230 * BFD_RELOC_ARM_ALU_SB_G0: howto manager. (line 797) 10231 * BFD_RELOC_ARM_ALU_SB_G0_NC: howto manager. (line 796) 10232 * BFD_RELOC_ARM_ALU_SB_G1: howto manager. (line 799) 10233 * BFD_RELOC_ARM_ALU_SB_G1_NC: howto manager. (line 798) 10234 * BFD_RELOC_ARM_ALU_SB_G2: howto manager. (line 800) 10235 * BFD_RELOC_ARM_CP_OFF_IMM: howto manager. (line 825) 10236 * BFD_RELOC_ARM_CP_OFF_IMM_S2: howto manager. (line 826) 10237 * BFD_RELOC_ARM_GLOB_DAT: howto manager. (line 764) 10238 * BFD_RELOC_ARM_GOT32: howto manager. (line 765) 10239 * BFD_RELOC_ARM_GOTOFF: howto manager. (line 768) 10240 * BFD_RELOC_ARM_GOTPC: howto manager. (line 769) 10241 * BFD_RELOC_ARM_HWLITERAL: howto manager. (line 836) 10242 * BFD_RELOC_ARM_IMMEDIATE: howto manager. (line 815) 10243 * BFD_RELOC_ARM_IN_POOL: howto manager. (line 832) 10244 * BFD_RELOC_ARM_JUMP_SLOT: howto manager. (line 763) 10245 * BFD_RELOC_ARM_LDC_PC_G0: howto manager. (line 793) 10246 * BFD_RELOC_ARM_LDC_PC_G1: howto manager. (line 794) 10247 * BFD_RELOC_ARM_LDC_PC_G2: howto manager. (line 795) 10248 * BFD_RELOC_ARM_LDC_SB_G0: howto manager. (line 807) 10249 * BFD_RELOC_ARM_LDC_SB_G1: howto manager. (line 808) 10250 * BFD_RELOC_ARM_LDC_SB_G2: howto manager. (line 809) 10251 * BFD_RELOC_ARM_LDR_IMM: howto manager. (line 830) 10252 * BFD_RELOC_ARM_LDR_PC_G0: howto manager. (line 787) 10253 * BFD_RELOC_ARM_LDR_PC_G1: howto manager. (line 788) 10254 * BFD_RELOC_ARM_LDR_PC_G2: howto manager. (line 789) 10255 * BFD_RELOC_ARM_LDR_SB_G0: howto manager. (line 801) 10256 * BFD_RELOC_ARM_LDR_SB_G1: howto manager. (line 802) 10257 * BFD_RELOC_ARM_LDR_SB_G2: howto manager. (line 803) 10258 * BFD_RELOC_ARM_LDRS_PC_G0: howto manager. (line 790) 10259 * BFD_RELOC_ARM_LDRS_PC_G1: howto manager. (line 791) 10260 * BFD_RELOC_ARM_LDRS_PC_G2: howto manager. (line 792) 10261 * BFD_RELOC_ARM_LDRS_SB_G0: howto manager. (line 804) 10262 * BFD_RELOC_ARM_LDRS_SB_G1: howto manager. (line 805) 10263 * BFD_RELOC_ARM_LDRS_SB_G2: howto manager. (line 806) 10264 * BFD_RELOC_ARM_LITERAL: howto manager. (line 831) 10265 * BFD_RELOC_ARM_MOVT: howto manager. (line 754) 10266 * BFD_RELOC_ARM_MOVT_PCREL: howto manager. (line 756) 10267 * BFD_RELOC_ARM_MOVW: howto manager. (line 753) 10268 * BFD_RELOC_ARM_MOVW_PCREL: howto manager. (line 755) 10269 * BFD_RELOC_ARM_MULTI: howto manager. (line 824) 10270 * BFD_RELOC_ARM_OFFSET_IMM: howto manager. (line 727) 10271 * BFD_RELOC_ARM_OFFSET_IMM8: howto manager. (line 833) 10272 * BFD_RELOC_ARM_PCREL_BLX: howto manager. (line 698) 10273 * BFD_RELOC_ARM_PCREL_BRANCH: howto manager. (line 694) 10274 * BFD_RELOC_ARM_PCREL_CALL: howto manager. (line 708) 10275 * BFD_RELOC_ARM_PCREL_JUMP: howto manager. (line 712) 10276 * BFD_RELOC_ARM_PLT32: howto manager. (line 766) 10277 * BFD_RELOC_ARM_PREL31: howto manager. (line 750) 10278 * BFD_RELOC_ARM_RELATIVE: howto manager. (line 767) 10279 * BFD_RELOC_ARM_ROSEGREL32: howto manager. (line 739) 10280 * BFD_RELOC_ARM_SBREL32: howto manager. (line 742) 10281 * BFD_RELOC_ARM_SHIFT_IMM: howto manager. (line 821) 10282 * BFD_RELOC_ARM_SMC: howto manager. (line 822) 10283 * BFD_RELOC_ARM_SWI: howto manager. (line 823) 10284 * BFD_RELOC_ARM_T32_ADD_IMM: howto manager. (line 818) 10285 * BFD_RELOC_ARM_T32_ADD_PC12: howto manager. (line 820) 10286 * BFD_RELOC_ARM_T32_CP_OFF_IMM: howto manager. (line 827) 10287 * BFD_RELOC_ARM_T32_CP_OFF_IMM_S2: howto manager. (line 828) 10288 * BFD_RELOC_ARM_T32_IMM12: howto manager. (line 819) 10289 * BFD_RELOC_ARM_T32_IMMEDIATE: howto manager. (line 817) 10290 * BFD_RELOC_ARM_T32_OFFSET_IMM: howto manager. (line 835) 10291 * BFD_RELOC_ARM_T32_OFFSET_U8: howto manager. (line 834) 10292 * BFD_RELOC_ARM_TARGET1: howto manager. (line 735) 10293 * BFD_RELOC_ARM_TARGET2: howto manager. (line 745) 10294 * BFD_RELOC_ARM_THUMB_ADD: howto manager. (line 837) 10295 * BFD_RELOC_ARM_THUMB_IMM: howto manager. (line 838) 10296 * BFD_RELOC_ARM_THUMB_MOVT: howto manager. (line 758) 10297 * BFD_RELOC_ARM_THUMB_MOVT_PCREL: howto manager. (line 760) 10298 * BFD_RELOC_ARM_THUMB_MOVW: howto manager. (line 757) 10299 * BFD_RELOC_ARM_THUMB_MOVW_PCREL: howto manager. (line 759) 10300 * BFD_RELOC_ARM_THUMB_OFFSET: howto manager. (line 731) 10301 * BFD_RELOC_ARM_THUMB_SHIFT: howto manager. (line 839) 10302 * BFD_RELOC_ARM_TLS_DTPMOD32: howto manager. (line 776) 10303 * BFD_RELOC_ARM_TLS_DTPOFF32: howto manager. (line 775) 10304 * BFD_RELOC_ARM_TLS_GD32: howto manager. (line 772) 10305 * BFD_RELOC_ARM_TLS_IE32: howto manager. (line 778) 10306 * BFD_RELOC_ARM_TLS_LDM32: howto manager. (line 774) 10307 * BFD_RELOC_ARM_TLS_LDO32: howto manager. (line 773) 10308 * BFD_RELOC_ARM_TLS_LE32: howto manager. (line 779) 10309 * BFD_RELOC_ARM_TLS_TPOFF32: howto manager. (line 777) 10310 * BFD_RELOC_ARM_V4BX: howto manager. (line 812) 10311 * BFD_RELOC_AVR_13_PCREL: howto manager. (line 1401) 10312 * BFD_RELOC_AVR_16_PM: howto manager. (line 1405) 10313 * BFD_RELOC_AVR_6: howto manager. (line 1492) 10314 * BFD_RELOC_AVR_6_ADIW: howto manager. (line 1496) 10315 * BFD_RELOC_AVR_7_PCREL: howto manager. (line 1397) 10316 * BFD_RELOC_AVR_CALL: howto manager. (line 1484) 10317 * BFD_RELOC_AVR_HH8_LDI: howto manager. (line 1417) 10318 * BFD_RELOC_AVR_HH8_LDI_NEG: howto manager. (line 1436) 10319 * BFD_RELOC_AVR_HH8_LDI_PM: howto manager. (line 1465) 10320 * BFD_RELOC_AVR_HH8_LDI_PM_NEG: howto manager. (line 1479) 10321 * BFD_RELOC_AVR_HI8_LDI: howto manager. (line 1413) 10322 * BFD_RELOC_AVR_HI8_LDI_GS: howto manager. (line 1459) 10323 * BFD_RELOC_AVR_HI8_LDI_NEG: howto manager. (line 1431) 10324 * BFD_RELOC_AVR_HI8_LDI_PM: howto manager. (line 1455) 10325 * BFD_RELOC_AVR_HI8_LDI_PM_NEG: howto manager. (line 1474) 10326 * BFD_RELOC_AVR_LDI: howto manager. (line 1488) 10327 * BFD_RELOC_AVR_LO8_LDI: howto manager. (line 1409) 10328 * BFD_RELOC_AVR_LO8_LDI_GS: howto manager. (line 1449) 10329 * BFD_RELOC_AVR_LO8_LDI_NEG: howto manager. (line 1426) 10330 * BFD_RELOC_AVR_LO8_LDI_PM: howto manager. (line 1445) 10331 * BFD_RELOC_AVR_LO8_LDI_PM_NEG: howto manager. (line 1470) 10332 * BFD_RELOC_AVR_MS8_LDI: howto manager. (line 1422) 10333 * BFD_RELOC_AVR_MS8_LDI_NEG: howto manager. (line 1441) 10334 * BFD_RELOC_BFIN_10_PCREL: howto manager. (line 961) 10335 * BFD_RELOC_BFIN_11_PCREL: howto manager. (line 964) 10336 * BFD_RELOC_BFIN_12_PCREL_JUMP: howto manager. (line 967) 10337 * BFD_RELOC_BFIN_12_PCREL_JUMP_S: howto manager. (line 970) 10338 * BFD_RELOC_BFIN_16_HIGH: howto manager. (line 949) 10339 * BFD_RELOC_BFIN_16_IMM: howto manager. (line 946) 10340 * BFD_RELOC_BFIN_16_LOW: howto manager. (line 958) 10341 * BFD_RELOC_BFIN_24_PCREL_CALL_X: howto manager. (line 973) 10342 * BFD_RELOC_BFIN_24_PCREL_JUMP_L: howto manager. (line 976) 10343 * BFD_RELOC_BFIN_4_PCREL: howto manager. (line 952) 10344 * BFD_RELOC_BFIN_5_PCREL: howto manager. (line 955) 10345 * BFD_RELOC_BFIN_FUNCDESC: howto manager. (line 982) 10346 * BFD_RELOC_BFIN_FUNCDESC_GOT17M4: howto manager. (line 983) 10347 * BFD_RELOC_BFIN_FUNCDESC_GOTHI: howto manager. (line 984) 10348 * BFD_RELOC_BFIN_FUNCDESC_GOTLO: howto manager. (line 985) 10349 * BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4: howto manager. (line 987) 10350 * BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI: howto manager. (line 988) 10351 * BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO: howto manager. (line 989) 10352 * BFD_RELOC_BFIN_FUNCDESC_VALUE: howto manager. (line 986) 10353 * BFD_RELOC_BFIN_GOT: howto manager. (line 995) 10354 * BFD_RELOC_BFIN_GOT17M4: howto manager. (line 979) 10355 * BFD_RELOC_BFIN_GOTHI: howto manager. (line 980) 10356 * BFD_RELOC_BFIN_GOTLO: howto manager. (line 981) 10357 * BFD_RELOC_BFIN_GOTOFF17M4: howto manager. (line 990) 10358 * BFD_RELOC_BFIN_GOTOFFHI: howto manager. (line 991) 10359 * BFD_RELOC_BFIN_GOTOFFLO: howto manager. (line 992) 10360 * BFD_RELOC_BFIN_PLTPC: howto manager. (line 998) 10361 * bfd_reloc_code_type: howto manager. (line 10) 10362 * BFD_RELOC_CR16_ABS20: howto manager. (line 1894) 10363 * BFD_RELOC_CR16_ABS24: howto manager. (line 1895) 10364 * BFD_RELOC_CR16_DISP16: howto manager. (line 1905) 10365 * BFD_RELOC_CR16_DISP20: howto manager. (line 1906) 10366 * BFD_RELOC_CR16_DISP24: howto manager. (line 1907) 10367 * BFD_RELOC_CR16_DISP24a: howto manager. (line 1908) 10368 * BFD_RELOC_CR16_DISP4: howto manager. (line 1903) 10369 * BFD_RELOC_CR16_DISP8: howto manager. (line 1904) 10370 * BFD_RELOC_CR16_GLOB_DAT: howto manager. (line 1914) 10371 * BFD_RELOC_CR16_GOT_REGREL20: howto manager. (line 1912) 10372 * BFD_RELOC_CR16_GOTC_REGREL20: howto manager. (line 1913) 10373 * BFD_RELOC_CR16_IMM16: howto manager. (line 1898) 10374 * BFD_RELOC_CR16_IMM20: howto manager. (line 1899) 10375 * BFD_RELOC_CR16_IMM24: howto manager. (line 1900) 10376 * BFD_RELOC_CR16_IMM32: howto manager. (line 1901) 10377 * BFD_RELOC_CR16_IMM32a: howto manager. (line 1902) 10378 * BFD_RELOC_CR16_IMM4: howto manager. (line 1896) 10379 * BFD_RELOC_CR16_IMM8: howto manager. (line 1897) 10380 * BFD_RELOC_CR16_NUM16: howto manager. (line 1883) 10381 * BFD_RELOC_CR16_NUM32: howto manager. (line 1884) 10382 * BFD_RELOC_CR16_NUM32a: howto manager. (line 1885) 10383 * BFD_RELOC_CR16_NUM8: howto manager. (line 1882) 10384 * BFD_RELOC_CR16_REGREL0: howto manager. (line 1886) 10385 * BFD_RELOC_CR16_REGREL14: howto manager. (line 1889) 10386 * BFD_RELOC_CR16_REGREL14a: howto manager. (line 1890) 10387 * BFD_RELOC_CR16_REGREL16: howto manager. (line 1891) 10388 * BFD_RELOC_CR16_REGREL20: howto manager. (line 1892) 10389 * BFD_RELOC_CR16_REGREL20a: howto manager. (line 1893) 10390 * BFD_RELOC_CR16_REGREL4: howto manager. (line 1887) 10391 * BFD_RELOC_CR16_REGREL4a: howto manager. (line 1888) 10392 * BFD_RELOC_CR16_SWITCH16: howto manager. (line 1910) 10393 * BFD_RELOC_CR16_SWITCH32: howto manager. (line 1911) 10394 * BFD_RELOC_CR16_SWITCH8: howto manager. (line 1909) 10395 * BFD_RELOC_CRIS_16_DTPREL: howto manager. (line 1985) 10396 * BFD_RELOC_CRIS_16_GOT: howto manager. (line 1961) 10397 * BFD_RELOC_CRIS_16_GOT_GD: howto manager. (line 1981) 10398 * BFD_RELOC_CRIS_16_GOT_TPREL: howto manager. (line 1987) 10399 * BFD_RELOC_CRIS_16_GOTPLT: howto manager. (line 1967) 10400 * BFD_RELOC_CRIS_16_TPREL: howto manager. (line 1989) 10401 * BFD_RELOC_CRIS_32_DTPREL: howto manager. (line 1984) 10402 * BFD_RELOC_CRIS_32_GD: howto manager. (line 1982) 10403 * BFD_RELOC_CRIS_32_GOT: howto manager. (line 1958) 10404 * BFD_RELOC_CRIS_32_GOT_GD: howto manager. (line 1980) 10405 * BFD_RELOC_CRIS_32_GOT_TPREL: howto manager. (line 1986) 10406 * BFD_RELOC_CRIS_32_GOTPLT: howto manager. (line 1964) 10407 * BFD_RELOC_CRIS_32_GOTREL: howto manager. (line 1970) 10408 * BFD_RELOC_CRIS_32_IE: howto manager. (line 1991) 10409 * BFD_RELOC_CRIS_32_PLT_GOTREL: howto manager. (line 1973) 10410 * BFD_RELOC_CRIS_32_PLT_PCREL: howto manager. (line 1976) 10411 * BFD_RELOC_CRIS_32_TPREL: howto manager. (line 1988) 10412 * BFD_RELOC_CRIS_BDISP8: howto manager. (line 1939) 10413 * BFD_RELOC_CRIS_COPY: howto manager. (line 1952) 10414 * BFD_RELOC_CRIS_DTP: howto manager. (line 1983) 10415 * BFD_RELOC_CRIS_DTPMOD: howto manager. (line 1990) 10416 * BFD_RELOC_CRIS_GLOB_DAT: howto manager. (line 1953) 10417 * BFD_RELOC_CRIS_JUMP_SLOT: howto manager. (line 1954) 10418 * BFD_RELOC_CRIS_LAPCQ_OFFSET: howto manager. (line 1947) 10419 * BFD_RELOC_CRIS_RELATIVE: howto manager. (line 1955) 10420 * BFD_RELOC_CRIS_SIGNED_16: howto manager. (line 1945) 10421 * BFD_RELOC_CRIS_SIGNED_6: howto manager. (line 1941) 10422 * BFD_RELOC_CRIS_SIGNED_8: howto manager. (line 1943) 10423 * BFD_RELOC_CRIS_UNSIGNED_16: howto manager. (line 1946) 10424 * BFD_RELOC_CRIS_UNSIGNED_4: howto manager. (line 1948) 10425 * BFD_RELOC_CRIS_UNSIGNED_5: howto manager. (line 1940) 10426 * BFD_RELOC_CRIS_UNSIGNED_6: howto manager. (line 1942) 10427 * BFD_RELOC_CRIS_UNSIGNED_8: howto manager. (line 1944) 10428 * BFD_RELOC_CRX_ABS16: howto manager. (line 1927) 10429 * BFD_RELOC_CRX_ABS32: howto manager. (line 1928) 10430 * BFD_RELOC_CRX_IMM16: howto manager. (line 1932) 10431 * BFD_RELOC_CRX_IMM32: howto manager. (line 1933) 10432 * BFD_RELOC_CRX_NUM16: howto manager. (line 1930) 10433 * BFD_RELOC_CRX_NUM32: howto manager. (line 1931) 10434 * BFD_RELOC_CRX_NUM8: howto manager. (line 1929) 10435 * BFD_RELOC_CRX_REGREL12: howto manager. (line 1923) 10436 * BFD_RELOC_CRX_REGREL22: howto manager. (line 1924) 10437 * BFD_RELOC_CRX_REGREL28: howto manager. (line 1925) 10438 * BFD_RELOC_CRX_REGREL32: howto manager. (line 1926) 10439 * BFD_RELOC_CRX_REL16: howto manager. (line 1920) 10440 * BFD_RELOC_CRX_REL24: howto manager. (line 1921) 10441 * BFD_RELOC_CRX_REL32: howto manager. (line 1922) 10442 * BFD_RELOC_CRX_REL4: howto manager. (line 1917) 10443 * BFD_RELOC_CRX_REL8: howto manager. (line 1918) 10444 * BFD_RELOC_CRX_REL8_CMP: howto manager. (line 1919) 10445 * BFD_RELOC_CRX_SWITCH16: howto manager. (line 1935) 10446 * BFD_RELOC_CRX_SWITCH32: howto manager. (line 1936) 10447 * BFD_RELOC_CRX_SWITCH8: howto manager. (line 1934) 10448 * BFD_RELOC_CTOR: howto manager. (line 688) 10449 * BFD_RELOC_D10V_10_PCREL_L: howto manager. (line 1065) 10450 * BFD_RELOC_D10V_10_PCREL_R: howto manager. (line 1061) 10451 * BFD_RELOC_D10V_18: howto manager. (line 1070) 10452 * BFD_RELOC_D10V_18_PCREL: howto manager. (line 1073) 10453 * BFD_RELOC_D30V_15: howto manager. (line 1088) 10454 * BFD_RELOC_D30V_15_PCREL: howto manager. (line 1092) 10455 * BFD_RELOC_D30V_15_PCREL_R: howto manager. (line 1096) 10456 * BFD_RELOC_D30V_21: howto manager. (line 1101) 10457 * BFD_RELOC_D30V_21_PCREL: howto manager. (line 1105) 10458 * BFD_RELOC_D30V_21_PCREL_R: howto manager. (line 1109) 10459 * BFD_RELOC_D30V_32: howto manager. (line 1114) 10460 * BFD_RELOC_D30V_32_PCREL: howto manager. (line 1117) 10461 * BFD_RELOC_D30V_6: howto manager. (line 1076) 10462 * BFD_RELOC_D30V_9_PCREL: howto manager. (line 1079) 10463 * BFD_RELOC_D30V_9_PCREL_R: howto manager. (line 1083) 10464 * BFD_RELOC_DLX_HI16_S: howto manager. (line 1120) 10465 * BFD_RELOC_DLX_JMP26: howto manager. (line 1126) 10466 * BFD_RELOC_DLX_LO16: howto manager. (line 1123) 10467 * BFD_RELOC_FR30_10_IN_8: howto manager. (line 1305) 10468 * BFD_RELOC_FR30_12_PCREL: howto manager. (line 1313) 10469 * BFD_RELOC_FR30_20: howto manager. (line 1289) 10470 * BFD_RELOC_FR30_48: howto manager. (line 1286) 10471 * BFD_RELOC_FR30_6_IN_4: howto manager. (line 1293) 10472 * BFD_RELOC_FR30_8_IN_8: howto manager. (line 1297) 10473 * BFD_RELOC_FR30_9_IN_8: howto manager. (line 1301) 10474 * BFD_RELOC_FR30_9_PCREL: howto manager. (line 1309) 10475 * BFD_RELOC_FRV_FUNCDESC: howto manager. (line 440) 10476 * BFD_RELOC_FRV_FUNCDESC_GOT12: howto manager. (line 441) 10477 * BFD_RELOC_FRV_FUNCDESC_GOTHI: howto manager. (line 442) 10478 * BFD_RELOC_FRV_FUNCDESC_GOTLO: howto manager. (line 443) 10479 * BFD_RELOC_FRV_FUNCDESC_GOTOFF12: howto manager. (line 445) 10480 * BFD_RELOC_FRV_FUNCDESC_GOTOFFHI: howto manager. (line 446) 10481 * BFD_RELOC_FRV_FUNCDESC_GOTOFFLO: howto manager. (line 447) 10482 * BFD_RELOC_FRV_FUNCDESC_VALUE: howto manager. (line 444) 10483 * BFD_RELOC_FRV_GETTLSOFF: howto manager. (line 451) 10484 * BFD_RELOC_FRV_GETTLSOFF_RELAX: howto manager. (line 464) 10485 * BFD_RELOC_FRV_GOT12: howto manager. (line 437) 10486 * BFD_RELOC_FRV_GOTHI: howto manager. (line 438) 10487 * BFD_RELOC_FRV_GOTLO: howto manager. (line 439) 10488 * BFD_RELOC_FRV_GOTOFF12: howto manager. (line 448) 10489 * BFD_RELOC_FRV_GOTOFFHI: howto manager. (line 449) 10490 * BFD_RELOC_FRV_GOTOFFLO: howto manager. (line 450) 10491 * BFD_RELOC_FRV_GOTTLSDESC12: howto manager. (line 453) 10492 * BFD_RELOC_FRV_GOTTLSDESCHI: howto manager. (line 454) 10493 * BFD_RELOC_FRV_GOTTLSDESCLO: howto manager. (line 455) 10494 * BFD_RELOC_FRV_GOTTLSOFF12: howto manager. (line 459) 10495 * BFD_RELOC_FRV_GOTTLSOFFHI: howto manager. (line 460) 10496 * BFD_RELOC_FRV_GOTTLSOFFLO: howto manager. (line 461) 10497 * BFD_RELOC_FRV_GPREL12: howto manager. (line 432) 10498 * BFD_RELOC_FRV_GPREL32: howto manager. (line 434) 10499 * BFD_RELOC_FRV_GPRELHI: howto manager. (line 435) 10500 * BFD_RELOC_FRV_GPRELLO: howto manager. (line 436) 10501 * BFD_RELOC_FRV_GPRELU12: howto manager. (line 433) 10502 * BFD_RELOC_FRV_HI16: howto manager. (line 431) 10503 * BFD_RELOC_FRV_LABEL16: howto manager. (line 428) 10504 * BFD_RELOC_FRV_LABEL24: howto manager. (line 429) 10505 * BFD_RELOC_FRV_LO16: howto manager. (line 430) 10506 * BFD_RELOC_FRV_TLSDESC_RELAX: howto manager. (line 463) 10507 * BFD_RELOC_FRV_TLSDESC_VALUE: howto manager. (line 452) 10508 * BFD_RELOC_FRV_TLSMOFF: howto manager. (line 466) 10509 * BFD_RELOC_FRV_TLSMOFF12: howto manager. (line 456) 10510 * BFD_RELOC_FRV_TLSMOFFHI: howto manager. (line 457) 10511 * BFD_RELOC_FRV_TLSMOFFLO: howto manager. (line 458) 10512 * BFD_RELOC_FRV_TLSOFF: howto manager. (line 462) 10513 * BFD_RELOC_FRV_TLSOFF_RELAX: howto manager. (line 465) 10514 * BFD_RELOC_GPREL16: howto manager. (line 121) 10515 * BFD_RELOC_GPREL32: howto manager. (line 122) 10516 * BFD_RELOC_H8_DIR16A8: howto manager. (line 2032) 10517 * BFD_RELOC_H8_DIR16R8: howto manager. (line 2033) 10518 * BFD_RELOC_H8_DIR24A8: howto manager. (line 2034) 10519 * BFD_RELOC_H8_DIR24R8: howto manager. (line 2035) 10520 * BFD_RELOC_H8_DIR32A16: howto manager. (line 2036) 10521 * BFD_RELOC_HI16: howto manager. (line 344) 10522 * BFD_RELOC_HI16_BASEREL: howto manager. (line 97) 10523 * BFD_RELOC_HI16_GOTOFF: howto manager. (line 57) 10524 * BFD_RELOC_HI16_PCREL: howto manager. (line 356) 10525 * BFD_RELOC_HI16_PLTOFF: howto manager. (line 69) 10526 * BFD_RELOC_HI16_S: howto manager. (line 347) 10527 * BFD_RELOC_HI16_S_BASEREL: howto manager. (line 98) 10528 * BFD_RELOC_HI16_S_GOTOFF: howto manager. (line 58) 10529 * BFD_RELOC_HI16_S_PCREL: howto manager. (line 359) 10530 * BFD_RELOC_HI16_S_PLTOFF: howto manager. (line 70) 10531 * BFD_RELOC_HI22: howto manager. (line 116) 10532 * BFD_RELOC_I370_D12: howto manager. (line 685) 10533 * BFD_RELOC_I960_CALLJ: howto manager. (line 128) 10534 * BFD_RELOC_IA64_COPY: howto manager. (line 1776) 10535 * BFD_RELOC_IA64_DIR32LSB: howto manager. (line 1721) 10536 * BFD_RELOC_IA64_DIR32MSB: howto manager. (line 1720) 10537 * BFD_RELOC_IA64_DIR64LSB: howto manager. (line 1723) 10538 * BFD_RELOC_IA64_DIR64MSB: howto manager. (line 1722) 10539 * BFD_RELOC_IA64_DTPMOD64LSB: howto manager. (line 1786) 10540 * BFD_RELOC_IA64_DTPMOD64MSB: howto manager. (line 1785) 10541 * BFD_RELOC_IA64_DTPREL14: howto manager. (line 1788) 10542 * BFD_RELOC_IA64_DTPREL22: howto manager. (line 1789) 10543 * BFD_RELOC_IA64_DTPREL32LSB: howto manager. (line 1792) 10544 * BFD_RELOC_IA64_DTPREL32MSB: howto manager. (line 1791) 10545 * BFD_RELOC_IA64_DTPREL64I: howto manager. (line 1790) 10546 * BFD_RELOC_IA64_DTPREL64LSB: howto manager. (line 1794) 10547 * BFD_RELOC_IA64_DTPREL64MSB: howto manager. (line 1793) 10548 * BFD_RELOC_IA64_FPTR32LSB: howto manager. (line 1738) 10549 * BFD_RELOC_IA64_FPTR32MSB: howto manager. (line 1737) 10550 * BFD_RELOC_IA64_FPTR64I: howto manager. (line 1736) 10551 * BFD_RELOC_IA64_FPTR64LSB: howto manager. (line 1740) 10552 * BFD_RELOC_IA64_FPTR64MSB: howto manager. (line 1739) 10553 * BFD_RELOC_IA64_GPREL22: howto manager. (line 1724) 10554 * BFD_RELOC_IA64_GPREL32LSB: howto manager. (line 1727) 10555 * BFD_RELOC_IA64_GPREL32MSB: howto manager. (line 1726) 10556 * BFD_RELOC_IA64_GPREL64I: howto manager. (line 1725) 10557 * BFD_RELOC_IA64_GPREL64LSB: howto manager. (line 1729) 10558 * BFD_RELOC_IA64_GPREL64MSB: howto manager. (line 1728) 10559 * BFD_RELOC_IA64_IMM14: howto manager. (line 1717) 10560 * BFD_RELOC_IA64_IMM22: howto manager. (line 1718) 10561 * BFD_RELOC_IA64_IMM64: howto manager. (line 1719) 10562 * BFD_RELOC_IA64_IPLTLSB: howto manager. (line 1775) 10563 * BFD_RELOC_IA64_IPLTMSB: howto manager. (line 1774) 10564 * BFD_RELOC_IA64_LDXMOV: howto manager. (line 1778) 10565 * BFD_RELOC_IA64_LTOFF22: howto manager. (line 1730) 10566 * BFD_RELOC_IA64_LTOFF22X: howto manager. (line 1777) 10567 * BFD_RELOC_IA64_LTOFF64I: howto manager. (line 1731) 10568 * BFD_RELOC_IA64_LTOFF_DTPMOD22: howto manager. (line 1787) 10569 * BFD_RELOC_IA64_LTOFF_DTPREL22: howto manager. (line 1795) 10570 * BFD_RELOC_IA64_LTOFF_FPTR22: howto manager. (line 1752) 10571 * BFD_RELOC_IA64_LTOFF_FPTR32LSB: howto manager. (line 1755) 10572 * BFD_RELOC_IA64_LTOFF_FPTR32MSB: howto manager. (line 1754) 10573 * BFD_RELOC_IA64_LTOFF_FPTR64I: howto manager. (line 1753) 10574 * BFD_RELOC_IA64_LTOFF_FPTR64LSB: howto manager. (line 1757) 10575 * BFD_RELOC_IA64_LTOFF_FPTR64MSB: howto manager. (line 1756) 10576 * BFD_RELOC_IA64_LTOFF_TPREL22: howto manager. (line 1784) 10577 * BFD_RELOC_IA64_LTV32LSB: howto manager. (line 1771) 10578 * BFD_RELOC_IA64_LTV32MSB: howto manager. (line 1770) 10579 * BFD_RELOC_IA64_LTV64LSB: howto manager. (line 1773) 10580 * BFD_RELOC_IA64_LTV64MSB: howto manager. (line 1772) 10581 * BFD_RELOC_IA64_PCREL21B: howto manager. (line 1741) 10582 * BFD_RELOC_IA64_PCREL21BI: howto manager. (line 1742) 10583 * BFD_RELOC_IA64_PCREL21F: howto manager. (line 1744) 10584 * BFD_RELOC_IA64_PCREL21M: howto manager. (line 1743) 10585 * BFD_RELOC_IA64_PCREL22: howto manager. (line 1745) 10586 * BFD_RELOC_IA64_PCREL32LSB: howto manager. (line 1749) 10587 * BFD_RELOC_IA64_PCREL32MSB: howto manager. (line 1748) 10588 * BFD_RELOC_IA64_PCREL60B: howto manager. (line 1746) 10589 * BFD_RELOC_IA64_PCREL64I: howto manager. (line 1747) 10590 * BFD_RELOC_IA64_PCREL64LSB: howto manager. (line 1751) 10591 * BFD_RELOC_IA64_PCREL64MSB: howto manager. (line 1750) 10592 * BFD_RELOC_IA64_PLTOFF22: howto manager. (line 1732) 10593 * BFD_RELOC_IA64_PLTOFF64I: howto manager. (line 1733) 10594 * BFD_RELOC_IA64_PLTOFF64LSB: howto manager. (line 1735) 10595 * BFD_RELOC_IA64_PLTOFF64MSB: howto manager. (line 1734) 10596 * BFD_RELOC_IA64_REL32LSB: howto manager. (line 1767) 10597 * BFD_RELOC_IA64_REL32MSB: howto manager. (line 1766) 10598 * BFD_RELOC_IA64_REL64LSB: howto manager. (line 1769) 10599 * BFD_RELOC_IA64_REL64MSB: howto manager. (line 1768) 10600 * BFD_RELOC_IA64_SECREL32LSB: howto manager. (line 1763) 10601 * BFD_RELOC_IA64_SECREL32MSB: howto manager. (line 1762) 10602 * BFD_RELOC_IA64_SECREL64LSB: howto manager. (line 1765) 10603 * BFD_RELOC_IA64_SECREL64MSB: howto manager. (line 1764) 10604 * BFD_RELOC_IA64_SEGREL32LSB: howto manager. (line 1759) 10605 * BFD_RELOC_IA64_SEGREL32MSB: howto manager. (line 1758) 10606 * BFD_RELOC_IA64_SEGREL64LSB: howto manager. (line 1761) 10607 * BFD_RELOC_IA64_SEGREL64MSB: howto manager. (line 1760) 10608 * BFD_RELOC_IA64_TPREL14: howto manager. (line 1779) 10609 * BFD_RELOC_IA64_TPREL22: howto manager. (line 1780) 10610 * BFD_RELOC_IA64_TPREL64I: howto manager. (line 1781) 10611 * BFD_RELOC_IA64_TPREL64LSB: howto manager. (line 1783) 10612 * BFD_RELOC_IA64_TPREL64MSB: howto manager. (line 1782) 10613 * BFD_RELOC_IP2K_ADDR16CJP: howto manager. (line 1669) 10614 * BFD_RELOC_IP2K_BANK: howto manager. (line 1666) 10615 * BFD_RELOC_IP2K_EX8DATA: howto manager. (line 1677) 10616 * BFD_RELOC_IP2K_FR9: howto manager. (line 1663) 10617 * BFD_RELOC_IP2K_FR_OFFSET: howto manager. (line 1690) 10618 * BFD_RELOC_IP2K_HI8DATA: howto manager. (line 1676) 10619 * BFD_RELOC_IP2K_HI8INSN: howto manager. (line 1681) 10620 * BFD_RELOC_IP2K_LO8DATA: howto manager. (line 1675) 10621 * BFD_RELOC_IP2K_LO8INSN: howto manager. (line 1680) 10622 * BFD_RELOC_IP2K_PAGE3: howto manager. (line 1672) 10623 * BFD_RELOC_IP2K_PC_SKIP: howto manager. (line 1684) 10624 * BFD_RELOC_IP2K_TEXT: howto manager. (line 1687) 10625 * BFD_RELOC_IQ2000_OFFSET_16: howto manager. (line 2086) 10626 * BFD_RELOC_IQ2000_OFFSET_21: howto manager. (line 2087) 10627 * BFD_RELOC_IQ2000_UHI16: howto manager. (line 2088) 10628 * BFD_RELOC_LM32_16_GOT: howto manager. (line 2193) 10629 * BFD_RELOC_LM32_BRANCH: howto manager. (line 2192) 10630 * BFD_RELOC_LM32_CALL: howto manager. (line 2191) 10631 * BFD_RELOC_LM32_COPY: howto manager. (line 2196) 10632 * BFD_RELOC_LM32_GLOB_DAT: howto manager. (line 2197) 10633 * BFD_RELOC_LM32_GOTOFF_HI16: howto manager. (line 2194) 10634 * BFD_RELOC_LM32_GOTOFF_LO16: howto manager. (line 2195) 10635 * BFD_RELOC_LM32_JMP_SLOT: howto manager. (line 2198) 10636 * BFD_RELOC_LM32_RELATIVE: howto manager. (line 2199) 10637 * BFD_RELOC_LO10: howto manager. (line 117) 10638 * BFD_RELOC_LO16: howto manager. (line 353) 10639 * BFD_RELOC_LO16_BASEREL: howto manager. (line 96) 10640 * BFD_RELOC_LO16_GOTOFF: howto manager. (line 56) 10641 * BFD_RELOC_LO16_PCREL: howto manager. (line 362) 10642 * BFD_RELOC_LO16_PLTOFF: howto manager. (line 68) 10643 * BFD_RELOC_M32C_HI8: howto manager. (line 1129) 10644 * BFD_RELOC_M32C_RL_1ADDR: howto manager. (line 1131) 10645 * BFD_RELOC_M32C_RL_2ADDR: howto manager. (line 1132) 10646 * BFD_RELOC_M32C_RL_JUMP: howto manager. (line 1130) 10647 * BFD_RELOC_M32R_10_PCREL: howto manager. (line 1139) 10648 * BFD_RELOC_M32R_18_PCREL: howto manager. (line 1143) 10649 * BFD_RELOC_M32R_24: howto manager. (line 1135) 10650 * BFD_RELOC_M32R_26_PCREL: howto manager. (line 1146) 10651 * BFD_RELOC_M32R_26_PLTREL: howto manager. (line 1165) 10652 * BFD_RELOC_M32R_COPY: howto manager. (line 1166) 10653 * BFD_RELOC_M32R_GLOB_DAT: howto manager. (line 1167) 10654 * BFD_RELOC_M32R_GOT16_HI_SLO: howto manager. (line 1176) 10655 * BFD_RELOC_M32R_GOT16_HI_ULO: howto manager. (line 1175) 10656 * BFD_RELOC_M32R_GOT16_LO: howto manager. (line 1177) 10657 * BFD_RELOC_M32R_GOT24: howto manager. (line 1164) 10658 * BFD_RELOC_M32R_GOTOFF: howto manager. (line 1170) 10659 * BFD_RELOC_M32R_GOTOFF_HI_SLO: howto manager. (line 1172) 10660 * BFD_RELOC_M32R_GOTOFF_HI_ULO: howto manager. (line 1171) 10661 * BFD_RELOC_M32R_GOTOFF_LO: howto manager. (line 1173) 10662 * BFD_RELOC_M32R_GOTPC24: howto manager. (line 1174) 10663 * BFD_RELOC_M32R_GOTPC_HI_SLO: howto manager. (line 1179) 10664 * BFD_RELOC_M32R_GOTPC_HI_ULO: howto manager. (line 1178) 10665 * BFD_RELOC_M32R_GOTPC_LO: howto manager. (line 1180) 10666 * BFD_RELOC_M32R_HI16_SLO: howto manager. (line 1153) 10667 * BFD_RELOC_M32R_HI16_ULO: howto manager. (line 1149) 10668 * BFD_RELOC_M32R_JMP_SLOT: howto manager. (line 1168) 10669 * BFD_RELOC_M32R_LO16: howto manager. (line 1157) 10670 * BFD_RELOC_M32R_RELATIVE: howto manager. (line 1169) 10671 * BFD_RELOC_M32R_SDA16: howto manager. (line 1160) 10672 * BFD_RELOC_M68HC11_24: howto manager. (line 1831) 10673 * BFD_RELOC_M68HC11_3B: howto manager. (line 1806) 10674 * BFD_RELOC_M68HC11_HI8: howto manager. (line 1798) 10675 * BFD_RELOC_M68HC11_LO16: howto manager. (line 1820) 10676 * BFD_RELOC_M68HC11_LO8: howto manager. (line 1802) 10677 * BFD_RELOC_M68HC11_PAGE: howto manager. (line 1826) 10678 * BFD_RELOC_M68HC11_RL_GROUP: howto manager. (line 1815) 10679 * BFD_RELOC_M68HC11_RL_JUMP: howto manager. (line 1809) 10680 * BFD_RELOC_M68HC12_5B: howto manager. (line 1837) 10681 * BFD_RELOC_MACH_O_PAIR: howto manager. (line 2206) 10682 * BFD_RELOC_MACH_O_SECTDIFF: howto manager. (line 2202) 10683 * BFD_RELOC_MACH_O_X86_64_BRANCH32: howto manager. (line 2209) 10684 * BFD_RELOC_MACH_O_X86_64_BRANCH8: howto manager. (line 2210) 10685 * BFD_RELOC_MACH_O_X86_64_GOT: howto manager. (line 2214) 10686 * BFD_RELOC_MACH_O_X86_64_GOT_LOAD: howto manager. (line 2217) 10687 * BFD_RELOC_MACH_O_X86_64_PCREL32_1: howto manager. (line 2227) 10688 * BFD_RELOC_MACH_O_X86_64_PCREL32_2: howto manager. (line 2230) 10689 * BFD_RELOC_MACH_O_X86_64_PCREL32_4: howto manager. (line 2233) 10690 * BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32: howto manager. (line 2221) 10691 * BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64: howto manager. (line 2224) 10692 * BFD_RELOC_MCORE_PCREL_32: howto manager. (line 1320) 10693 * BFD_RELOC_MCORE_PCREL_IMM11BY2: howto manager. (line 1318) 10694 * BFD_RELOC_MCORE_PCREL_IMM4BY2: howto manager. (line 1319) 10695 * BFD_RELOC_MCORE_PCREL_IMM8BY4: howto manager. (line 1317) 10696 * BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2: howto manager. (line 1321) 10697 * BFD_RELOC_MCORE_RVA: howto manager. (line 1322) 10698 * BFD_RELOC_MEP_16: howto manager. (line 1326) 10699 * BFD_RELOC_MEP_32: howto manager. (line 1327) 10700 * BFD_RELOC_MEP_8: howto manager. (line 1325) 10701 * BFD_RELOC_MEP_ADDR24A4: howto manager. (line 1342) 10702 * BFD_RELOC_MEP_GNU_VTENTRY: howto manager. (line 1344) 10703 * BFD_RELOC_MEP_GNU_VTINHERIT: howto manager. (line 1343) 10704 * BFD_RELOC_MEP_GPREL: howto manager. (line 1336) 10705 * BFD_RELOC_MEP_HI16S: howto manager. (line 1335) 10706 * BFD_RELOC_MEP_HI16U: howto manager. (line 1334) 10707 * BFD_RELOC_MEP_LOW16: howto manager. (line 1333) 10708 * BFD_RELOC_MEP_PCABS24A2: howto manager. (line 1332) 10709 * BFD_RELOC_MEP_PCREL12A2: howto manager. (line 1329) 10710 * BFD_RELOC_MEP_PCREL17A2: howto manager. (line 1330) 10711 * BFD_RELOC_MEP_PCREL24A2: howto manager. (line 1331) 10712 * BFD_RELOC_MEP_PCREL8A2: howto manager. (line 1328) 10713 * BFD_RELOC_MEP_TPREL: howto manager. (line 1337) 10714 * BFD_RELOC_MEP_TPREL7: howto manager. (line 1338) 10715 * BFD_RELOC_MEP_TPREL7A2: howto manager. (line 1339) 10716 * BFD_RELOC_MEP_TPREL7A4: howto manager. (line 1340) 10717 * BFD_RELOC_MEP_UIMM24: howto manager. (line 1341) 10718 * BFD_RELOC_MICROBLAZE_32_GOTOFF: howto manager. (line 2280) 10719 * BFD_RELOC_MICROBLAZE_32_LO: howto manager. (line 2236) 10720 * BFD_RELOC_MICROBLAZE_32_LO_PCREL: howto manager. (line 2240) 10721 * BFD_RELOC_MICROBLAZE_32_ROSDA: howto manager. (line 2244) 10722 * BFD_RELOC_MICROBLAZE_32_RWSDA: howto manager. (line 2248) 10723 * BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM: howto manager. (line 2252) 10724 * BFD_RELOC_MICROBLAZE_64_GOT: howto manager. (line 2266) 10725 * BFD_RELOC_MICROBLAZE_64_GOTOFF: howto manager. (line 2275) 10726 * BFD_RELOC_MICROBLAZE_64_GOTPC: howto manager. (line 2261) 10727 * BFD_RELOC_MICROBLAZE_64_NONE: howto manager. (line 2256) 10728 * BFD_RELOC_MICROBLAZE_64_PLT: howto manager. (line 2270) 10729 * BFD_RELOC_MICROBLAZE_COPY: howto manager. (line 2284) 10730 * BFD_RELOC_MIPS16_CALL16: howto manager. (line 366) 10731 * BFD_RELOC_MIPS16_GOT16: howto manager. (line 365) 10732 * BFD_RELOC_MIPS16_GPREL: howto manager. (line 341) 10733 * BFD_RELOC_MIPS16_HI16: howto manager. (line 370) 10734 * BFD_RELOC_MIPS16_HI16_S: howto manager. (line 373) 10735 * BFD_RELOC_MIPS16_JMP: howto manager. (line 338) 10736 * BFD_RELOC_MIPS16_LO16: howto manager. (line 379) 10737 * BFD_RELOC_MIPS_CALL16: howto manager. (line 386) 10738 * BFD_RELOC_MIPS_CALL_HI16: howto manager. (line 389) 10739 * BFD_RELOC_MIPS_CALL_LO16: howto manager. (line 390) 10740 * BFD_RELOC_MIPS_COPY: howto manager. (line 421) 10741 * BFD_RELOC_MIPS_DELETE: howto manager. (line 399) 10742 * BFD_RELOC_MIPS_GOT16: howto manager. (line 385) 10743 * BFD_RELOC_MIPS_GOT_DISP: howto manager. (line 394) 10744 * BFD_RELOC_MIPS_GOT_HI16: howto manager. (line 387) 10745 * BFD_RELOC_MIPS_GOT_LO16: howto manager. (line 388) 10746 * BFD_RELOC_MIPS_GOT_OFST: howto manager. (line 393) 10747 * BFD_RELOC_MIPS_GOT_PAGE: howto manager. (line 392) 10748 * BFD_RELOC_MIPS_HIGHER: howto manager. (line 401) 10749 * BFD_RELOC_MIPS_HIGHEST: howto manager. (line 400) 10750 * BFD_RELOC_MIPS_INSERT_A: howto manager. (line 397) 10751 * BFD_RELOC_MIPS_INSERT_B: howto manager. (line 398) 10752 * BFD_RELOC_MIPS_JALR: howto manager. (line 405) 10753 * BFD_RELOC_MIPS_JMP: howto manager. (line 334) 10754 * BFD_RELOC_MIPS_JUMP_SLOT: howto manager. (line 422) 10755 * BFD_RELOC_MIPS_LITERAL: howto manager. (line 382) 10756 * BFD_RELOC_MIPS_REL16: howto manager. (line 403) 10757 * BFD_RELOC_MIPS_RELGOT: howto manager. (line 404) 10758 * BFD_RELOC_MIPS_SCN_DISP: howto manager. (line 402) 10759 * BFD_RELOC_MIPS_SHIFT5: howto manager. (line 395) 10760 * BFD_RELOC_MIPS_SHIFT6: howto manager. (line 396) 10761 * BFD_RELOC_MIPS_SUB: howto manager. (line 391) 10762 * BFD_RELOC_MIPS_TLS_DTPMOD32: howto manager. (line 406) 10763 * BFD_RELOC_MIPS_TLS_DTPMOD64: howto manager. (line 408) 10764 * BFD_RELOC_MIPS_TLS_DTPREL32: howto manager. (line 407) 10765 * BFD_RELOC_MIPS_TLS_DTPREL64: howto manager. (line 409) 10766 * BFD_RELOC_MIPS_TLS_DTPREL_HI16: howto manager. (line 412) 10767 * BFD_RELOC_MIPS_TLS_DTPREL_LO16: howto manager. (line 413) 10768 * BFD_RELOC_MIPS_TLS_GD: howto manager. (line 410) 10769 * BFD_RELOC_MIPS_TLS_GOTTPREL: howto manager. (line 414) 10770 * BFD_RELOC_MIPS_TLS_LDM: howto manager. (line 411) 10771 * BFD_RELOC_MIPS_TLS_TPREL32: howto manager. (line 415) 10772 * BFD_RELOC_MIPS_TLS_TPREL64: howto manager. (line 416) 10773 * BFD_RELOC_MIPS_TLS_TPREL_HI16: howto manager. (line 417) 10774 * BFD_RELOC_MIPS_TLS_TPREL_LO16: howto manager. (line 418) 10775 * BFD_RELOC_MMIX_ADDR19: howto manager. (line 1373) 10776 * BFD_RELOC_MMIX_ADDR27: howto manager. (line 1377) 10777 * BFD_RELOC_MMIX_BASE_PLUS_OFFSET: howto manager. (line 1389) 10778 * BFD_RELOC_MMIX_CBRANCH: howto manager. (line 1353) 10779 * BFD_RELOC_MMIX_CBRANCH_1: howto manager. (line 1355) 10780 * BFD_RELOC_MMIX_CBRANCH_2: howto manager. (line 1356) 10781 * BFD_RELOC_MMIX_CBRANCH_3: howto manager. (line 1357) 10782 * BFD_RELOC_MMIX_CBRANCH_J: howto manager. (line 1354) 10783 * BFD_RELOC_MMIX_GETA: howto manager. (line 1347) 10784 * BFD_RELOC_MMIX_GETA_1: howto manager. (line 1348) 10785 * BFD_RELOC_MMIX_GETA_2: howto manager. (line 1349) 10786 * BFD_RELOC_MMIX_GETA_3: howto manager. (line 1350) 10787 * BFD_RELOC_MMIX_JMP: howto manager. (line 1367) 10788 * BFD_RELOC_MMIX_JMP_1: howto manager. (line 1368) 10789 * BFD_RELOC_MMIX_JMP_2: howto manager. (line 1369) 10790 * BFD_RELOC_MMIX_JMP_3: howto manager. (line 1370) 10791 * BFD_RELOC_MMIX_LOCAL: howto manager. (line 1393) 10792 * BFD_RELOC_MMIX_PUSHJ: howto manager. (line 1360) 10793 * BFD_RELOC_MMIX_PUSHJ_1: howto manager. (line 1361) 10794 * BFD_RELOC_MMIX_PUSHJ_2: howto manager. (line 1362) 10795 * BFD_RELOC_MMIX_PUSHJ_3: howto manager. (line 1363) 10796 * BFD_RELOC_MMIX_PUSHJ_STUBBABLE: howto manager. (line 1364) 10797 * BFD_RELOC_MMIX_REG: howto manager. (line 1385) 10798 * BFD_RELOC_MMIX_REG_OR_BYTE: howto manager. (line 1381) 10799 * BFD_RELOC_MN10300_16_PCREL: howto manager. (line 1255) 10800 * BFD_RELOC_MN10300_32_PCREL: howto manager. (line 1251) 10801 * BFD_RELOC_MN10300_ALIGN: howto manager. (line 501) 10802 * BFD_RELOC_MN10300_COPY: howto manager. (line 484) 10803 * BFD_RELOC_MN10300_GLOB_DAT: howto manager. (line 487) 10804 * BFD_RELOC_MN10300_GOT16: howto manager. (line 480) 10805 * BFD_RELOC_MN10300_GOT24: howto manager. (line 476) 10806 * BFD_RELOC_MN10300_GOT32: howto manager. (line 472) 10807 * BFD_RELOC_MN10300_GOTOFF24: howto manager. (line 469) 10808 * BFD_RELOC_MN10300_JMP_SLOT: howto manager. (line 490) 10809 * BFD_RELOC_MN10300_RELATIVE: howto manager. (line 493) 10810 * BFD_RELOC_MN10300_SYM_DIFF: howto manager. (line 496) 10811 * BFD_RELOC_MOXIE_10_PCREL: howto manager. (line 425) 10812 * BFD_RELOC_MSP430_10_PCREL: howto manager. (line 2077) 10813 * BFD_RELOC_MSP430_16: howto manager. (line 2079) 10814 * BFD_RELOC_MSP430_16_BYTE: howto manager. (line 2081) 10815 * BFD_RELOC_MSP430_16_PCREL: howto manager. (line 2078) 10816 * BFD_RELOC_MSP430_16_PCREL_BYTE: howto manager. (line 2080) 10817 * BFD_RELOC_MSP430_2X_PCREL: howto manager. (line 2082) 10818 * BFD_RELOC_MSP430_RL_PCREL: howto manager. (line 2083) 10819 * BFD_RELOC_MT_GNU_VTENTRY: howto manager. (line 2071) 10820 * BFD_RELOC_MT_GNU_VTINHERIT: howto manager. (line 2068) 10821 * BFD_RELOC_MT_HI16: howto manager. (line 2062) 10822 * BFD_RELOC_MT_LO16: howto manager. (line 2065) 10823 * BFD_RELOC_MT_PC16: howto manager. (line 2059) 10824 * BFD_RELOC_MT_PCINSN8: howto manager. (line 2074) 10825 * BFD_RELOC_NONE: howto manager. (line 131) 10826 * BFD_RELOC_NS32K_DISP_16: howto manager. (line 567) 10827 * BFD_RELOC_NS32K_DISP_16_PCREL: howto manager. (line 570) 10828 * BFD_RELOC_NS32K_DISP_32: howto manager. (line 568) 10829 * BFD_RELOC_NS32K_DISP_32_PCREL: howto manager. (line 571) 10830 * BFD_RELOC_NS32K_DISP_8: howto manager. (line 566) 10831 * BFD_RELOC_NS32K_DISP_8_PCREL: howto manager. (line 569) 10832 * BFD_RELOC_NS32K_IMM_16: howto manager. (line 561) 10833 * BFD_RELOC_NS32K_IMM_16_PCREL: howto manager. (line 564) 10834 * BFD_RELOC_NS32K_IMM_32: howto manager. (line 562) 10835 * BFD_RELOC_NS32K_IMM_32_PCREL: howto manager. (line 565) 10836 * BFD_RELOC_NS32K_IMM_8: howto manager. (line 560) 10837 * BFD_RELOC_NS32K_IMM_8_PCREL: howto manager. (line 563) 10838 * BFD_RELOC_OPENRISC_ABS_26: howto manager. (line 2028) 10839 * BFD_RELOC_OPENRISC_REL_26: howto manager. (line 2029) 10840 * BFD_RELOC_PDP11_DISP_6_PCREL: howto manager. (line 575) 10841 * BFD_RELOC_PDP11_DISP_8_PCREL: howto manager. (line 574) 10842 * BFD_RELOC_PJ_CODE_DIR16: howto manager. (line 580) 10843 * BFD_RELOC_PJ_CODE_DIR32: howto manager. (line 581) 10844 * BFD_RELOC_PJ_CODE_HI16: howto manager. (line 578) 10845 * BFD_RELOC_PJ_CODE_LO16: howto manager. (line 579) 10846 * BFD_RELOC_PJ_CODE_REL16: howto manager. (line 582) 10847 * BFD_RELOC_PJ_CODE_REL32: howto manager. (line 583) 10848 * BFD_RELOC_PPC64_ADDR16_DS: howto manager. (line 628) 10849 * BFD_RELOC_PPC64_ADDR16_LO_DS: howto manager. (line 629) 10850 * BFD_RELOC_PPC64_DTPREL16_DS: howto manager. (line 677) 10851 * BFD_RELOC_PPC64_DTPREL16_HIGHER: howto manager. (line 679) 10852 * BFD_RELOC_PPC64_DTPREL16_HIGHERA: howto manager. (line 680) 10853 * BFD_RELOC_PPC64_DTPREL16_HIGHEST: howto manager. (line 681) 10854 * BFD_RELOC_PPC64_DTPREL16_HIGHESTA: howto manager. (line 682) 10855 * BFD_RELOC_PPC64_DTPREL16_LO_DS: howto manager. (line 678) 10856 * BFD_RELOC_PPC64_GOT16_DS: howto manager. (line 630) 10857 * BFD_RELOC_PPC64_GOT16_LO_DS: howto manager. (line 631) 10858 * BFD_RELOC_PPC64_HIGHER: howto manager. (line 616) 10859 * BFD_RELOC_PPC64_HIGHER_S: howto manager. (line 617) 10860 * BFD_RELOC_PPC64_HIGHEST: howto manager. (line 618) 10861 * BFD_RELOC_PPC64_HIGHEST_S: howto manager. (line 619) 10862 * BFD_RELOC_PPC64_PLT16_LO_DS: howto manager. (line 632) 10863 * BFD_RELOC_PPC64_PLTGOT16: howto manager. (line 624) 10864 * BFD_RELOC_PPC64_PLTGOT16_DS: howto manager. (line 637) 10865 * BFD_RELOC_PPC64_PLTGOT16_HA: howto manager. (line 627) 10866 * BFD_RELOC_PPC64_PLTGOT16_HI: howto manager. (line 626) 10867 * BFD_RELOC_PPC64_PLTGOT16_LO: howto manager. (line 625) 10868 * BFD_RELOC_PPC64_PLTGOT16_LO_DS: howto manager. (line 638) 10869 * BFD_RELOC_PPC64_SECTOFF_DS: howto manager. (line 633) 10870 * BFD_RELOC_PPC64_SECTOFF_LO_DS: howto manager. (line 634) 10871 * BFD_RELOC_PPC64_TOC: howto manager. (line 623) 10872 * BFD_RELOC_PPC64_TOC16_DS: howto manager. (line 635) 10873 * BFD_RELOC_PPC64_TOC16_HA: howto manager. (line 622) 10874 * BFD_RELOC_PPC64_TOC16_HI: howto manager. (line 621) 10875 * BFD_RELOC_PPC64_TOC16_LO: howto manager. (line 620) 10876 * BFD_RELOC_PPC64_TOC16_LO_DS: howto manager. (line 636) 10877 * BFD_RELOC_PPC64_TPREL16_DS: howto manager. (line 671) 10878 * BFD_RELOC_PPC64_TPREL16_HIGHER: howto manager. (line 673) 10879 * BFD_RELOC_PPC64_TPREL16_HIGHERA: howto manager. (line 674) 10880 * BFD_RELOC_PPC64_TPREL16_HIGHEST: howto manager. (line 675) 10881 * BFD_RELOC_PPC64_TPREL16_HIGHESTA: howto manager. (line 676) 10882 * BFD_RELOC_PPC64_TPREL16_LO_DS: howto manager. (line 672) 10883 * BFD_RELOC_PPC_B16: howto manager. (line 589) 10884 * BFD_RELOC_PPC_B16_BRNTAKEN: howto manager. (line 591) 10885 * BFD_RELOC_PPC_B16_BRTAKEN: howto manager. (line 590) 10886 * BFD_RELOC_PPC_B26: howto manager. (line 586) 10887 * BFD_RELOC_PPC_BA16: howto manager. (line 592) 10888 * BFD_RELOC_PPC_BA16_BRNTAKEN: howto manager. (line 594) 10889 * BFD_RELOC_PPC_BA16_BRTAKEN: howto manager. (line 593) 10890 * BFD_RELOC_PPC_BA26: howto manager. (line 587) 10891 * BFD_RELOC_PPC_COPY: howto manager. (line 595) 10892 * BFD_RELOC_PPC_DTPMOD: howto manager. (line 644) 10893 * BFD_RELOC_PPC_DTPREL: howto manager. (line 654) 10894 * BFD_RELOC_PPC_DTPREL16: howto manager. (line 650) 10895 * BFD_RELOC_PPC_DTPREL16_HA: howto manager. (line 653) 10896 * BFD_RELOC_PPC_DTPREL16_HI: howto manager. (line 652) 10897 * BFD_RELOC_PPC_DTPREL16_LO: howto manager. (line 651) 10898 * BFD_RELOC_PPC_EMB_BIT_FLD: howto manager. (line 614) 10899 * BFD_RELOC_PPC_EMB_MRKREF: howto manager. (line 609) 10900 * BFD_RELOC_PPC_EMB_NADDR16: howto manager. (line 601) 10901 * BFD_RELOC_PPC_EMB_NADDR16_HA: howto manager. (line 604) 10902 * BFD_RELOC_PPC_EMB_NADDR16_HI: howto manager. (line 603) 10903 * BFD_RELOC_PPC_EMB_NADDR16_LO: howto manager. (line 602) 10904 * BFD_RELOC_PPC_EMB_NADDR32: howto manager. (line 600) 10905 * BFD_RELOC_PPC_EMB_RELSDA: howto manager. (line 615) 10906 * BFD_RELOC_PPC_EMB_RELSEC16: howto manager. (line 610) 10907 * BFD_RELOC_PPC_EMB_RELST_HA: howto manager. (line 613) 10908 * BFD_RELOC_PPC_EMB_RELST_HI: howto manager. (line 612) 10909 * BFD_RELOC_PPC_EMB_RELST_LO: howto manager. (line 611) 10910 * BFD_RELOC_PPC_EMB_SDA21: howto manager. (line 608) 10911 * BFD_RELOC_PPC_EMB_SDA2I16: howto manager. (line 606) 10912 * BFD_RELOC_PPC_EMB_SDA2REL: howto manager. (line 607) 10913 * BFD_RELOC_PPC_EMB_SDAI16: howto manager. (line 605) 10914 * BFD_RELOC_PPC_GLOB_DAT: howto manager. (line 596) 10915 * BFD_RELOC_PPC_GOT_DTPREL16: howto manager. (line 667) 10916 * BFD_RELOC_PPC_GOT_DTPREL16_HA: howto manager. (line 670) 10917 * BFD_RELOC_PPC_GOT_DTPREL16_HI: howto manager. (line 669) 10918 * BFD_RELOC_PPC_GOT_DTPREL16_LO: howto manager. (line 668) 10919 * BFD_RELOC_PPC_GOT_TLSGD16: howto manager. (line 655) 10920 * BFD_RELOC_PPC_GOT_TLSGD16_HA: howto manager. (line 658) 10921 * BFD_RELOC_PPC_GOT_TLSGD16_HI: howto manager. (line 657) 10922 * BFD_RELOC_PPC_GOT_TLSGD16_LO: howto manager. (line 656) 10923 * BFD_RELOC_PPC_GOT_TLSLD16: howto manager. (line 659) 10924 * BFD_RELOC_PPC_GOT_TLSLD16_HA: howto manager. (line 662) 10925 * BFD_RELOC_PPC_GOT_TLSLD16_HI: howto manager. (line 661) 10926 * BFD_RELOC_PPC_GOT_TLSLD16_LO: howto manager. (line 660) 10927 * BFD_RELOC_PPC_GOT_TPREL16: howto manager. (line 663) 10928 * BFD_RELOC_PPC_GOT_TPREL16_HA: howto manager. (line 666) 10929 * BFD_RELOC_PPC_GOT_TPREL16_HI: howto manager. (line 665) 10930 * BFD_RELOC_PPC_GOT_TPREL16_LO: howto manager. (line 664) 10931 * BFD_RELOC_PPC_JMP_SLOT: howto manager. (line 597) 10932 * BFD_RELOC_PPC_LOCAL24PC: howto manager. (line 599) 10933 * BFD_RELOC_PPC_RELATIVE: howto manager. (line 598) 10934 * BFD_RELOC_PPC_TLS: howto manager. (line 641) 10935 * BFD_RELOC_PPC_TLSGD: howto manager. (line 642) 10936 * BFD_RELOC_PPC_TLSLD: howto manager. (line 643) 10937 * BFD_RELOC_PPC_TOC16: howto manager. (line 588) 10938 * BFD_RELOC_PPC_TPREL: howto manager. (line 649) 10939 * BFD_RELOC_PPC_TPREL16: howto manager. (line 645) 10940 * BFD_RELOC_PPC_TPREL16_HA: howto manager. (line 648) 10941 * BFD_RELOC_PPC_TPREL16_HI: howto manager. (line 647) 10942 * BFD_RELOC_PPC_TPREL16_LO: howto manager. (line 646) 10943 * BFD_RELOC_RELC: howto manager. (line 2045) 10944 * BFD_RELOC_RVA: howto manager. (line 100) 10945 * BFD_RELOC_RX_16_OP: howto manager. (line 1504) 10946 * BFD_RELOC_RX_16U: howto manager. (line 1508) 10947 * BFD_RELOC_RX_24_OP: howto manager. (line 1505) 10948 * BFD_RELOC_RX_24U: howto manager. (line 1509) 10949 * BFD_RELOC_RX_32_OP: howto manager. (line 1506) 10950 * BFD_RELOC_RX_8U: howto manager. (line 1507) 10951 * BFD_RELOC_RX_ABS16: howto manager. (line 1518) 10952 * BFD_RELOC_RX_ABS16U: howto manager. (line 1520) 10953 * BFD_RELOC_RX_ABS16UL: howto manager. (line 1522) 10954 * BFD_RELOC_RX_ABS16UW: howto manager. (line 1521) 10955 * BFD_RELOC_RX_ABS32: howto manager. (line 1519) 10956 * BFD_RELOC_RX_ABS8: howto manager. (line 1517) 10957 * BFD_RELOC_RX_DIFF: howto manager. (line 1511) 10958 * BFD_RELOC_RX_DIR3U_PCREL: howto manager. (line 1510) 10959 * BFD_RELOC_RX_GPRELB: howto manager. (line 1512) 10960 * BFD_RELOC_RX_GPRELL: howto manager. (line 1514) 10961 * BFD_RELOC_RX_GPRELW: howto manager. (line 1513) 10962 * BFD_RELOC_RX_NEG16: howto manager. (line 1501) 10963 * BFD_RELOC_RX_NEG24: howto manager. (line 1502) 10964 * BFD_RELOC_RX_NEG32: howto manager. (line 1503) 10965 * BFD_RELOC_RX_NEG8: howto manager. (line 1500) 10966 * BFD_RELOC_RX_OP_SUBTRACT: howto manager. (line 1516) 10967 * BFD_RELOC_RX_RELAX: howto manager. (line 1523) 10968 * BFD_RELOC_RX_SYM: howto manager. (line 1515) 10969 * BFD_RELOC_SCORE16_BRANCH: howto manager. (line 1651) 10970 * BFD_RELOC_SCORE16_JMP: howto manager. (line 1648) 10971 * BFD_RELOC_SCORE_BCMP: howto manager. (line 1654) 10972 * BFD_RELOC_SCORE_BRANCH: howto manager. (line 1639) 10973 * BFD_RELOC_SCORE_CALL15: howto manager. (line 1659) 10974 * BFD_RELOC_SCORE_DUMMY2: howto manager. (line 1635) 10975 * BFD_RELOC_SCORE_DUMMY_HI16: howto manager. (line 1660) 10976 * BFD_RELOC_SCORE_GOT15: howto manager. (line 1657) 10977 * BFD_RELOC_SCORE_GOT_LO16: howto manager. (line 1658) 10978 * BFD_RELOC_SCORE_GPREL15: howto manager. (line 1632) 10979 * BFD_RELOC_SCORE_IMM30: howto manager. (line 1642) 10980 * BFD_RELOC_SCORE_IMM32: howto manager. (line 1645) 10981 * BFD_RELOC_SCORE_JMP: howto manager. (line 1636) 10982 * BFD_RELOC_SH_ALIGN: howto manager. (line 865) 10983 * BFD_RELOC_SH_CODE: howto manager. (line 866) 10984 * BFD_RELOC_SH_COPY: howto manager. (line 871) 10985 * BFD_RELOC_SH_COPY64: howto manager. (line 896) 10986 * BFD_RELOC_SH_COUNT: howto manager. (line 864) 10987 * BFD_RELOC_SH_DATA: howto manager. (line 867) 10988 * BFD_RELOC_SH_DISP12: howto manager. (line 847) 10989 * BFD_RELOC_SH_DISP12BY2: howto manager. (line 848) 10990 * BFD_RELOC_SH_DISP12BY4: howto manager. (line 849) 10991 * BFD_RELOC_SH_DISP12BY8: howto manager. (line 850) 10992 * BFD_RELOC_SH_DISP20: howto manager. (line 851) 10993 * BFD_RELOC_SH_DISP20BY8: howto manager. (line 852) 10994 * BFD_RELOC_SH_GLOB_DAT: howto manager. (line 872) 10995 * BFD_RELOC_SH_GLOB_DAT64: howto manager. (line 897) 10996 * BFD_RELOC_SH_GOT10BY4: howto manager. (line 900) 10997 * BFD_RELOC_SH_GOT10BY8: howto manager. (line 901) 10998 * BFD_RELOC_SH_GOT_HI16: howto manager. (line 879) 10999 * BFD_RELOC_SH_GOT_LOW16: howto manager. (line 876) 11000 * BFD_RELOC_SH_GOT_MEDHI16: howto manager. (line 878) 11001 * BFD_RELOC_SH_GOT_MEDLOW16: howto manager. (line 877) 11002 * BFD_RELOC_SH_GOTOFF_HI16: howto manager. (line 891) 11003 * BFD_RELOC_SH_GOTOFF_LOW16: howto manager. (line 888) 11004 * BFD_RELOC_SH_GOTOFF_MEDHI16: howto manager. (line 890) 11005 * BFD_RELOC_SH_GOTOFF_MEDLOW16: howto manager. (line 889) 11006 * BFD_RELOC_SH_GOTPC: howto manager. (line 875) 11007 * BFD_RELOC_SH_GOTPC_HI16: howto manager. (line 895) 11008 * BFD_RELOC_SH_GOTPC_LOW16: howto manager. (line 892) 11009 * BFD_RELOC_SH_GOTPC_MEDHI16: howto manager. (line 894) 11010 * BFD_RELOC_SH_GOTPC_MEDLOW16: howto manager. (line 893) 11011 * BFD_RELOC_SH_GOTPLT10BY4: howto manager. (line 902) 11012 * BFD_RELOC_SH_GOTPLT10BY8: howto manager. (line 903) 11013 * BFD_RELOC_SH_GOTPLT32: howto manager. (line 904) 11014 * BFD_RELOC_SH_GOTPLT_HI16: howto manager. (line 883) 11015 * BFD_RELOC_SH_GOTPLT_LOW16: howto manager. (line 880) 11016 * BFD_RELOC_SH_GOTPLT_MEDHI16: howto manager. (line 882) 11017 * BFD_RELOC_SH_GOTPLT_MEDLOW16: howto manager. (line 881) 11018 * BFD_RELOC_SH_IMM3: howto manager. (line 845) 11019 * BFD_RELOC_SH_IMM3U: howto manager. (line 846) 11020 * BFD_RELOC_SH_IMM4: howto manager. (line 853) 11021 * BFD_RELOC_SH_IMM4BY2: howto manager. (line 854) 11022 * BFD_RELOC_SH_IMM4BY4: howto manager. (line 855) 11023 * BFD_RELOC_SH_IMM8: howto manager. (line 856) 11024 * BFD_RELOC_SH_IMM8BY2: howto manager. (line 857) 11025 * BFD_RELOC_SH_IMM8BY4: howto manager. (line 858) 11026 * BFD_RELOC_SH_IMM_HI16: howto manager. (line 922) 11027 * BFD_RELOC_SH_IMM_HI16_PCREL: howto manager. (line 923) 11028 * BFD_RELOC_SH_IMM_LOW16: howto manager. (line 916) 11029 * BFD_RELOC_SH_IMM_LOW16_PCREL: howto manager. (line 917) 11030 * BFD_RELOC_SH_IMM_MEDHI16: howto manager. (line 920) 11031 * BFD_RELOC_SH_IMM_MEDHI16_PCREL: howto manager. (line 921) 11032 * BFD_RELOC_SH_IMM_MEDLOW16: howto manager. (line 918) 11033 * BFD_RELOC_SH_IMM_MEDLOW16_PCREL: howto manager. (line 919) 11034 * BFD_RELOC_SH_IMMS10: howto manager. (line 910) 11035 * BFD_RELOC_SH_IMMS10BY2: howto manager. (line 911) 11036 * BFD_RELOC_SH_IMMS10BY4: howto manager. (line 912) 11037 * BFD_RELOC_SH_IMMS10BY8: howto manager. (line 913) 11038 * BFD_RELOC_SH_IMMS16: howto manager. (line 914) 11039 * BFD_RELOC_SH_IMMS6: howto manager. (line 907) 11040 * BFD_RELOC_SH_IMMS6BY32: howto manager. (line 908) 11041 * BFD_RELOC_SH_IMMU16: howto manager. (line 915) 11042 * BFD_RELOC_SH_IMMU5: howto manager. (line 906) 11043 * BFD_RELOC_SH_IMMU6: howto manager. (line 909) 11044 * BFD_RELOC_SH_JMP_SLOT: howto manager. (line 873) 11045 * BFD_RELOC_SH_JMP_SLOT64: howto manager. (line 898) 11046 * BFD_RELOC_SH_LABEL: howto manager. (line 868) 11047 * BFD_RELOC_SH_LOOP_END: howto manager. (line 870) 11048 * BFD_RELOC_SH_LOOP_START: howto manager. (line 869) 11049 * BFD_RELOC_SH_PCDISP12BY2: howto manager. (line 844) 11050 * BFD_RELOC_SH_PCDISP8BY2: howto manager. (line 843) 11051 * BFD_RELOC_SH_PCRELIMM8BY2: howto manager. (line 859) 11052 * BFD_RELOC_SH_PCRELIMM8BY4: howto manager. (line 860) 11053 * BFD_RELOC_SH_PLT_HI16: howto manager. (line 887) 11054 * BFD_RELOC_SH_PLT_LOW16: howto manager. (line 884) 11055 * BFD_RELOC_SH_PLT_MEDHI16: howto manager. (line 886) 11056 * BFD_RELOC_SH_PLT_MEDLOW16: howto manager. (line 885) 11057 * BFD_RELOC_SH_PT_16: howto manager. (line 924) 11058 * BFD_RELOC_SH_RELATIVE: howto manager. (line 874) 11059 * BFD_RELOC_SH_RELATIVE64: howto manager. (line 899) 11060 * BFD_RELOC_SH_SHMEDIA_CODE: howto manager. (line 905) 11061 * BFD_RELOC_SH_SWITCH16: howto manager. (line 861) 11062 * BFD_RELOC_SH_SWITCH32: howto manager. (line 862) 11063 * BFD_RELOC_SH_TLS_DTPMOD32: howto manager. (line 930) 11064 * BFD_RELOC_SH_TLS_DTPOFF32: howto manager. (line 931) 11065 * BFD_RELOC_SH_TLS_GD_32: howto manager. (line 925) 11066 * BFD_RELOC_SH_TLS_IE_32: howto manager. (line 928) 11067 * BFD_RELOC_SH_TLS_LD_32: howto manager. (line 926) 11068 * BFD_RELOC_SH_TLS_LDO_32: howto manager. (line 927) 11069 * BFD_RELOC_SH_TLS_LE_32: howto manager. (line 929) 11070 * BFD_RELOC_SH_TLS_TPOFF32: howto manager. (line 932) 11071 * BFD_RELOC_SH_USES: howto manager. (line 863) 11072 * BFD_RELOC_SPARC13: howto manager. (line 134) 11073 * BFD_RELOC_SPARC22: howto manager. (line 133) 11074 * BFD_RELOC_SPARC_10: howto manager. (line 163) 11075 * BFD_RELOC_SPARC_11: howto manager. (line 164) 11076 * BFD_RELOC_SPARC_5: howto manager. (line 176) 11077 * BFD_RELOC_SPARC_6: howto manager. (line 175) 11078 * BFD_RELOC_SPARC_64: howto manager. (line 162) 11079 * BFD_RELOC_SPARC_7: howto manager. (line 174) 11080 * BFD_RELOC_SPARC_BASE13: howto manager. (line 158) 11081 * BFD_RELOC_SPARC_BASE22: howto manager. (line 159) 11082 * BFD_RELOC_SPARC_COPY: howto manager. (line 141) 11083 * BFD_RELOC_SPARC_DISP64: howto manager. (line 177) 11084 * BFD_RELOC_SPARC_GLOB_DAT: howto manager. (line 142) 11085 * BFD_RELOC_SPARC_GOT10: howto manager. (line 135) 11086 * BFD_RELOC_SPARC_GOT13: howto manager. (line 136) 11087 * BFD_RELOC_SPARC_GOT22: howto manager. (line 137) 11088 * BFD_RELOC_SPARC_GOTDATA_HIX22: howto manager. (line 148) 11089 * BFD_RELOC_SPARC_GOTDATA_LOX10: howto manager. (line 149) 11090 * BFD_RELOC_SPARC_GOTDATA_OP: howto manager. (line 152) 11091 * BFD_RELOC_SPARC_GOTDATA_OP_HIX22: howto manager. (line 150) 11092 * BFD_RELOC_SPARC_GOTDATA_OP_LOX10: howto manager. (line 151) 11093 * BFD_RELOC_SPARC_H44: howto manager. (line 182) 11094 * BFD_RELOC_SPARC_HH22: howto manager. (line 166) 11095 * BFD_RELOC_SPARC_HIX22: howto manager. (line 180) 11096 * BFD_RELOC_SPARC_HM10: howto manager. (line 167) 11097 * BFD_RELOC_SPARC_IRELATIVE: howto manager. (line 154) 11098 * BFD_RELOC_SPARC_JMP_IREL: howto manager. (line 153) 11099 * BFD_RELOC_SPARC_JMP_SLOT: howto manager. (line 143) 11100 * BFD_RELOC_SPARC_L44: howto manager. (line 184) 11101 * BFD_RELOC_SPARC_LM22: howto manager. (line 168) 11102 * BFD_RELOC_SPARC_LOX10: howto manager. (line 181) 11103 * BFD_RELOC_SPARC_M44: howto manager. (line 183) 11104 * BFD_RELOC_SPARC_OLO10: howto manager. (line 165) 11105 * BFD_RELOC_SPARC_PC10: howto manager. (line 138) 11106 * BFD_RELOC_SPARC_PC22: howto manager. (line 139) 11107 * BFD_RELOC_SPARC_PC_HH22: howto manager. (line 169) 11108 * BFD_RELOC_SPARC_PC_HM10: howto manager. (line 170) 11109 * BFD_RELOC_SPARC_PC_LM22: howto manager. (line 171) 11110 * BFD_RELOC_SPARC_PLT32: howto manager. (line 178) 11111 * BFD_RELOC_SPARC_PLT64: howto manager. (line 179) 11112 * BFD_RELOC_SPARC_REGISTER: howto manager. (line 185) 11113 * BFD_RELOC_SPARC_RELATIVE: howto manager. (line 144) 11114 * BFD_RELOC_SPARC_REV32: howto manager. (line 188) 11115 * BFD_RELOC_SPARC_TLS_DTPMOD32: howto manager. (line 209) 11116 * BFD_RELOC_SPARC_TLS_DTPMOD64: howto manager. (line 210) 11117 * BFD_RELOC_SPARC_TLS_DTPOFF32: howto manager. (line 211) 11118 * BFD_RELOC_SPARC_TLS_DTPOFF64: howto manager. (line 212) 11119 * BFD_RELOC_SPARC_TLS_GD_ADD: howto manager. (line 193) 11120 * BFD_RELOC_SPARC_TLS_GD_CALL: howto manager. (line 194) 11121 * BFD_RELOC_SPARC_TLS_GD_HI22: howto manager. (line 191) 11122 * BFD_RELOC_SPARC_TLS_GD_LO10: howto manager. (line 192) 11123 * BFD_RELOC_SPARC_TLS_IE_ADD: howto manager. (line 206) 11124 * BFD_RELOC_SPARC_TLS_IE_HI22: howto manager. (line 202) 11125 * BFD_RELOC_SPARC_TLS_IE_LD: howto manager. (line 204) 11126 * BFD_RELOC_SPARC_TLS_IE_LDX: howto manager. (line 205) 11127 * BFD_RELOC_SPARC_TLS_IE_LO10: howto manager. (line 203) 11128 * BFD_RELOC_SPARC_TLS_LDM_ADD: howto manager. (line 197) 11129 * BFD_RELOC_SPARC_TLS_LDM_CALL: howto manager. (line 198) 11130 * BFD_RELOC_SPARC_TLS_LDM_HI22: howto manager. (line 195) 11131 * BFD_RELOC_SPARC_TLS_LDM_LO10: howto manager. (line 196) 11132 * BFD_RELOC_SPARC_TLS_LDO_ADD: howto manager. (line 201) 11133 * BFD_RELOC_SPARC_TLS_LDO_HIX22: howto manager. (line 199) 11134 * BFD_RELOC_SPARC_TLS_LDO_LOX10: howto manager. (line 200) 11135 * BFD_RELOC_SPARC_TLS_LE_HIX22: howto manager. (line 207) 11136 * BFD_RELOC_SPARC_TLS_LE_LOX10: howto manager. (line 208) 11137 * BFD_RELOC_SPARC_TLS_TPOFF32: howto manager. (line 213) 11138 * BFD_RELOC_SPARC_TLS_TPOFF64: howto manager. (line 214) 11139 * BFD_RELOC_SPARC_UA16: howto manager. (line 145) 11140 * BFD_RELOC_SPARC_UA32: howto manager. (line 146) 11141 * BFD_RELOC_SPARC_UA64: howto manager. (line 147) 11142 * BFD_RELOC_SPARC_WDISP16: howto manager. (line 172) 11143 * BFD_RELOC_SPARC_WDISP19: howto manager. (line 173) 11144 * BFD_RELOC_SPARC_WDISP22: howto manager. (line 132) 11145 * BFD_RELOC_SPARC_WPLT30: howto manager. (line 140) 11146 * BFD_RELOC_SPU_ADD_PIC: howto manager. (line 231) 11147 * BFD_RELOC_SPU_HI16: howto manager. (line 228) 11148 * BFD_RELOC_SPU_IMM10: howto manager. (line 219) 11149 * BFD_RELOC_SPU_IMM10W: howto manager. (line 220) 11150 * BFD_RELOC_SPU_IMM16: howto manager. (line 221) 11151 * BFD_RELOC_SPU_IMM16W: howto manager. (line 222) 11152 * BFD_RELOC_SPU_IMM18: howto manager. (line 223) 11153 * BFD_RELOC_SPU_IMM7: howto manager. (line 217) 11154 * BFD_RELOC_SPU_IMM8: howto manager. (line 218) 11155 * BFD_RELOC_SPU_LO16: howto manager. (line 227) 11156 * BFD_RELOC_SPU_PCREL16: howto manager. (line 226) 11157 * BFD_RELOC_SPU_PCREL9a: howto manager. (line 224) 11158 * BFD_RELOC_SPU_PCREL9b: howto manager. (line 225) 11159 * BFD_RELOC_SPU_PPU32: howto manager. (line 229) 11160 * BFD_RELOC_SPU_PPU64: howto manager. (line 230) 11161 * BFD_RELOC_THUMB_PCREL_BLX: howto manager. (line 703) 11162 * BFD_RELOC_THUMB_PCREL_BRANCH12: howto manager. (line 717) 11163 * BFD_RELOC_THUMB_PCREL_BRANCH20: howto manager. (line 718) 11164 * BFD_RELOC_THUMB_PCREL_BRANCH23: howto manager. (line 719) 11165 * BFD_RELOC_THUMB_PCREL_BRANCH25: howto manager. (line 720) 11166 * BFD_RELOC_THUMB_PCREL_BRANCH7: howto manager. (line 715) 11167 * BFD_RELOC_THUMB_PCREL_BRANCH9: howto manager. (line 716) 11168 * BFD_RELOC_TIC30_LDP: howto manager. (line 1259) 11169 * BFD_RELOC_TIC54X_16_OF_23: howto manager. (line 1277) 11170 * BFD_RELOC_TIC54X_23: howto manager. (line 1274) 11171 * BFD_RELOC_TIC54X_MS7_OF_23: howto manager. (line 1282) 11172 * BFD_RELOC_TIC54X_PARTLS7: howto manager. (line 1264) 11173 * BFD_RELOC_TIC54X_PARTMS9: howto manager. (line 1269) 11174 * bfd_reloc_type_lookup: howto manager. (line 2289) 11175 * BFD_RELOC_V850_22_PCREL: howto manager. (line 1186) 11176 * BFD_RELOC_V850_9_PCREL: howto manager. (line 1183) 11177 * BFD_RELOC_V850_ALIGN: howto manager. (line 1244) 11178 * BFD_RELOC_V850_CALLT_16_16_OFFSET: howto manager. (line 1235) 11179 * BFD_RELOC_V850_CALLT_6_7_OFFSET: howto manager. (line 1232) 11180 * BFD_RELOC_V850_LO16_SPLIT_OFFSET: howto manager. (line 1247) 11181 * BFD_RELOC_V850_LONGCALL: howto manager. (line 1238) 11182 * BFD_RELOC_V850_LONGJUMP: howto manager. (line 1241) 11183 * BFD_RELOC_V850_SDA_15_16_OFFSET: howto manager. (line 1192) 11184 * BFD_RELOC_V850_SDA_16_16_OFFSET: howto manager. (line 1189) 11185 * BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET: howto manager. (line 1224) 11186 * BFD_RELOC_V850_TDA_16_16_OFFSET: howto manager. (line 1214) 11187 * BFD_RELOC_V850_TDA_4_4_OFFSET: howto manager. (line 1221) 11188 * BFD_RELOC_V850_TDA_4_5_OFFSET: howto manager. (line 1217) 11189 * BFD_RELOC_V850_TDA_6_8_OFFSET: howto manager. (line 1203) 11190 * BFD_RELOC_V850_TDA_7_7_OFFSET: howto manager. (line 1211) 11191 * BFD_RELOC_V850_TDA_7_8_OFFSET: howto manager. (line 1207) 11192 * BFD_RELOC_V850_ZDA_15_16_OFFSET: howto manager. (line 1199) 11193 * BFD_RELOC_V850_ZDA_16_16_OFFSET: howto manager. (line 1196) 11194 * BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET: howto manager. (line 1228) 11195 * BFD_RELOC_VAX_GLOB_DAT: howto manager. (line 2054) 11196 * BFD_RELOC_VAX_JMP_SLOT: howto manager. (line 2055) 11197 * BFD_RELOC_VAX_RELATIVE: howto manager. (line 2056) 11198 * BFD_RELOC_VPE4KMATH_DATA: howto manager. (line 1693) 11199 * BFD_RELOC_VPE4KMATH_INSN: howto manager. (line 1694) 11200 * BFD_RELOC_VTABLE_ENTRY: howto manager. (line 1698) 11201 * BFD_RELOC_VTABLE_INHERIT: howto manager. (line 1697) 11202 * BFD_RELOC_X86_64_32S: howto manager. (line 538) 11203 * BFD_RELOC_X86_64_COPY: howto manager. (line 533) 11204 * BFD_RELOC_X86_64_DTPMOD64: howto manager. (line 539) 11205 * BFD_RELOC_X86_64_DTPOFF32: howto manager. (line 544) 11206 * BFD_RELOC_X86_64_DTPOFF64: howto manager. (line 540) 11207 * BFD_RELOC_X86_64_GLOB_DAT: howto manager. (line 534) 11208 * BFD_RELOC_X86_64_GOT32: howto manager. (line 531) 11209 * BFD_RELOC_X86_64_GOT64: howto manager. (line 549) 11210 * BFD_RELOC_X86_64_GOTOFF64: howto manager. (line 547) 11211 * BFD_RELOC_X86_64_GOTPC32: howto manager. (line 548) 11212 * BFD_RELOC_X86_64_GOTPC32_TLSDESC: howto manager. (line 554) 11213 * BFD_RELOC_X86_64_GOTPC64: howto manager. (line 551) 11214 * BFD_RELOC_X86_64_GOTPCREL: howto manager. (line 537) 11215 * BFD_RELOC_X86_64_GOTPCREL64: howto manager. (line 550) 11216 * BFD_RELOC_X86_64_GOTPLT64: howto manager. (line 552) 11217 * BFD_RELOC_X86_64_GOTTPOFF: howto manager. (line 545) 11218 * BFD_RELOC_X86_64_IRELATIVE: howto manager. (line 557) 11219 * BFD_RELOC_X86_64_JUMP_SLOT: howto manager. (line 535) 11220 * BFD_RELOC_X86_64_PLT32: howto manager. (line 532) 11221 * BFD_RELOC_X86_64_PLTOFF64: howto manager. (line 553) 11222 * BFD_RELOC_X86_64_RELATIVE: howto manager. (line 536) 11223 * BFD_RELOC_X86_64_TLSDESC: howto manager. (line 556) 11224 * BFD_RELOC_X86_64_TLSDESC_CALL: howto manager. (line 555) 11225 * BFD_RELOC_X86_64_TLSGD: howto manager. (line 542) 11226 * BFD_RELOC_X86_64_TLSLD: howto manager. (line 543) 11227 * BFD_RELOC_X86_64_TPOFF32: howto manager. (line 546) 11228 * BFD_RELOC_X86_64_TPOFF64: howto manager. (line 541) 11229 * BFD_RELOC_XC16X_PAG: howto manager. (line 2048) 11230 * BFD_RELOC_XC16X_POF: howto manager. (line 2049) 11231 * BFD_RELOC_XC16X_SEG: howto manager. (line 2050) 11232 * BFD_RELOC_XC16X_SOF: howto manager. (line 2051) 11233 * BFD_RELOC_XSTORMY16_12: howto manager. (line 2040) 11234 * BFD_RELOC_XSTORMY16_24: howto manager. (line 2041) 11235 * BFD_RELOC_XSTORMY16_FPTR16: howto manager. (line 2042) 11236 * BFD_RELOC_XSTORMY16_REL_12: howto manager. (line 2039) 11237 * BFD_RELOC_XTENSA_ASM_EXPAND: howto manager. (line 2160) 11238 * BFD_RELOC_XTENSA_ASM_SIMPLIFY: howto manager. (line 2165) 11239 * BFD_RELOC_XTENSA_DIFF16: howto manager. (line 2107) 11240 * BFD_RELOC_XTENSA_DIFF32: howto manager. (line 2108) 11241 * BFD_RELOC_XTENSA_DIFF8: howto manager. (line 2106) 11242 * BFD_RELOC_XTENSA_GLOB_DAT: howto manager. (line 2096) 11243 * BFD_RELOC_XTENSA_JMP_SLOT: howto manager. (line 2097) 11244 * BFD_RELOC_XTENSA_OP0: howto manager. (line 2154) 11245 * BFD_RELOC_XTENSA_OP1: howto manager. (line 2155) 11246 * BFD_RELOC_XTENSA_OP2: howto manager. (line 2156) 11247 * BFD_RELOC_XTENSA_PLT: howto manager. (line 2101) 11248 * BFD_RELOC_XTENSA_RELATIVE: howto manager. (line 2098) 11249 * BFD_RELOC_XTENSA_RTLD: howto manager. (line 2091) 11250 * BFD_RELOC_XTENSA_SLOT0_ALT: howto manager. (line 2136) 11251 * BFD_RELOC_XTENSA_SLOT0_OP: howto manager. (line 2116) 11252 * BFD_RELOC_XTENSA_SLOT10_ALT: howto manager. (line 2146) 11253 * BFD_RELOC_XTENSA_SLOT10_OP: howto manager. (line 2126) 11254 * BFD_RELOC_XTENSA_SLOT11_ALT: howto manager. (line 2147) 11255 * BFD_RELOC_XTENSA_SLOT11_OP: howto manager. (line 2127) 11256 * BFD_RELOC_XTENSA_SLOT12_ALT: howto manager. (line 2148) 11257 * BFD_RELOC_XTENSA_SLOT12_OP: howto manager. (line 2128) 11258 * BFD_RELOC_XTENSA_SLOT13_ALT: howto manager. (line 2149) 11259 * BFD_RELOC_XTENSA_SLOT13_OP: howto manager. (line 2129) 11260 * BFD_RELOC_XTENSA_SLOT14_ALT: howto manager. (line 2150) 11261 * BFD_RELOC_XTENSA_SLOT14_OP: howto manager. (line 2130) 11262 * BFD_RELOC_XTENSA_SLOT1_ALT: howto manager. (line 2137) 11263 * BFD_RELOC_XTENSA_SLOT1_OP: howto manager. (line 2117) 11264 * BFD_RELOC_XTENSA_SLOT2_ALT: howto manager. (line 2138) 11265 * BFD_RELOC_XTENSA_SLOT2_OP: howto manager. (line 2118) 11266 * BFD_RELOC_XTENSA_SLOT3_ALT: howto manager. (line 2139) 11267 * BFD_RELOC_XTENSA_SLOT3_OP: howto manager. (line 2119) 11268 * BFD_RELOC_XTENSA_SLOT4_ALT: howto manager. (line 2140) 11269 * BFD_RELOC_XTENSA_SLOT4_OP: howto manager. (line 2120) 11270 * BFD_RELOC_XTENSA_SLOT5_ALT: howto manager. (line 2141) 11271 * BFD_RELOC_XTENSA_SLOT5_OP: howto manager. (line 2121) 11272 * BFD_RELOC_XTENSA_SLOT6_ALT: howto manager. (line 2142) 11273 * BFD_RELOC_XTENSA_SLOT6_OP: howto manager. (line 2122) 11274 * BFD_RELOC_XTENSA_SLOT7_ALT: howto manager. (line 2143) 11275 * BFD_RELOC_XTENSA_SLOT7_OP: howto manager. (line 2123) 11276 * BFD_RELOC_XTENSA_SLOT8_ALT: howto manager. (line 2144) 11277 * BFD_RELOC_XTENSA_SLOT8_OP: howto manager. (line 2124) 11278 * BFD_RELOC_XTENSA_SLOT9_ALT: howto manager. (line 2145) 11279 * BFD_RELOC_XTENSA_SLOT9_OP: howto manager. (line 2125) 11280 * BFD_RELOC_XTENSA_TLS_ARG: howto manager. (line 2175) 11281 * BFD_RELOC_XTENSA_TLS_CALL: howto manager. (line 2176) 11282 * BFD_RELOC_XTENSA_TLS_DTPOFF: howto manager. (line 2172) 11283 * BFD_RELOC_XTENSA_TLS_FUNC: howto manager. (line 2174) 11284 * BFD_RELOC_XTENSA_TLS_TPOFF: howto manager. (line 2173) 11285 * BFD_RELOC_XTENSA_TLSDESC_ARG: howto manager. (line 2171) 11286 * BFD_RELOC_XTENSA_TLSDESC_FN: howto manager. (line 2170) 11287 * BFD_RELOC_Z80_DISP8: howto manager. (line 2179) 11288 * BFD_RELOC_Z8K_CALLR: howto manager. (line 2185) 11289 * BFD_RELOC_Z8K_DISP7: howto manager. (line 2182) 11290 * BFD_RELOC_Z8K_IMM4L: howto manager. (line 2188) 11291 * bfd_scan_arch: Architectures. (line 437) 11292 * bfd_scan_vma: BFD front end. (line 513) 11293 * bfd_seach_for_target: bfd_target. (line 505) 11294 * bfd_section_already_linked: Writing the symbol table. 11295 (line 55) 11296 * bfd_section_list_clear: section prototypes. (line 8) 11297 * bfd_sections_find_if: section prototypes. (line 176) 11298 * bfd_set_arch_info: Architectures. (line 478) 11299 * bfd_set_archive_head: Archives. (line 69) 11300 * bfd_set_default_target: bfd_target. (line 444) 11301 * bfd_set_error: BFD front end. (line 323) 11302 * bfd_set_error_handler: BFD front end. (line 365) 11303 * bfd_set_error_program_name: BFD front end. (line 374) 11304 * bfd_set_file_flags: BFD front end. (line 433) 11305 * bfd_set_format: Formats. (line 68) 11306 * bfd_set_gp_size: BFD front end. (line 503) 11307 * bfd_set_private_flags: BFD front end. (line 580) 11308 * bfd_set_reloc: BFD front end. (line 423) 11309 * bfd_set_section_contents: section prototypes. (line 207) 11310 * bfd_set_section_flags: section prototypes. (line 140) 11311 * bfd_set_section_size: section prototypes. (line 193) 11312 * bfd_set_start_address: BFD front end. (line 482) 11313 * bfd_set_symtab: symbol handling functions. 11314 (line 60) 11315 * bfd_symbol_info: symbol handling functions. 11316 (line 130) 11317 * bfd_target_list: bfd_target. (line 496) 11318 * bfd_write_bigendian_4byte_int: Internal. (line 13) 11319 * bfd_zalloc: Opening and Closing. 11320 (line 229) 11321 * bfd_zalloc2: Opening and Closing. 11322 (line 238) 11323 * coff_symbol_type: coff. (line 244) 11324 * core_file_matches_executable_p: Core Files. (line 30) 11325 * find_separate_debug_file: Opening and Closing. 11326 (line 280) 11327 * generic_core_file_matches_executable_p: Core Files. (line 40) 11328 * get_debug_link_info: Opening and Closing. 11329 (line 261) 11330 * Hash tables: Hash Tables. (line 6) 11331 * internal object-file format: Canonical format. (line 11) 11332 * Linker: Linker Functions. (line 6) 11333 * Other functions: BFD front end. (line 595) 11334 * separate_debug_file_exists: Opening and Closing. 11335 (line 271) 11336 * struct bfd_iovec: BFD front end. (line 798) 11337 * target vector (_bfd_final_link): Performing the Final Link. 11338 (line 6) 11339 * target vector (_bfd_link_add_symbols): Adding Symbols to the Hash Table. 11340 (line 6) 11341 * target vector (_bfd_link_hash_table_create): Creating a Linker Hash Table. 11342 (line 6) 11343 * The HOWTO Macro: typedef arelent. (line 291) 11344 * what is it?: Overview. (line 6) 11345 11346 11347 11348 Tag Table: 11349 Node: Top1138 11350 Node: Overview1477 11351 Node: History2528 11352 Node: How It Works3474 11353 Node: What BFD Version 2 Can Do5017 11354 Node: BFD information loss6332 11355 Node: Canonical format8864 11356 Node: BFD front end13236 11357 Node: Memory Usage44544 11358 Node: Initialization45772 11359 Node: Sections46231 11360 Node: Section Input46714 11361 Node: Section Output48079 11362 Node: typedef asection50565 11363 Node: section prototypes75574 11364 Node: Symbols85254 11365 Node: Reading Symbols86849 11366 Node: Writing Symbols87956 11367 Node: Mini Symbols89665 11368 Node: typedef asymbol90639 11369 Node: symbol handling functions96698 11370 Node: Archives102040 11371 Node: Formats105766 11372 Node: Relocations108714 11373 Node: typedef arelent109441 11374 Node: howto manager125252 11375 Node: Core Files199240 11376 Node: Targets201057 11377 Node: bfd_target203027 11378 Node: Architectures225343 11379 Node: Opening and Closing248693 11380 Node: Internal260031 11381 Node: File Caching266364 11382 Node: Linker Functions268278 11383 Node: Creating a Linker Hash Table269951 11384 Node: Adding Symbols to the Hash Table271689 11385 Node: Differing file formats272589 11386 Node: Adding symbols from an object file274314 11387 Node: Adding symbols from an archive276465 11388 Node: Performing the Final Link278879 11389 Node: Information provided by the linker280121 11390 Node: Relocating the section contents281275 11391 Node: Writing the symbol table283026 11392 Node: Hash Tables287041 11393 Node: Creating and Freeing a Hash Table288239 11394 Node: Looking Up or Entering a String289489 11395 Node: Traversing a Hash Table290742 11396 Node: Deriving a New Hash Table Type291531 11397 Node: Define the Derived Structures292597 11398 Node: Write the Derived Creation Routine293678 11399 Node: Write Other Derived Routines296302 11400 Node: BFD back ends297617 11401 Node: What to Put Where297887 11402 Node: aout298067 11403 Node: coff304385 11404 Node: elf332818 11405 Node: mmo333219 11406 Node: File layout334147 11407 Node: Symbol-table339794 11408 Node: mmo section mapping343563 11409 Node: GNU Free Documentation License347215 11410 Node: BFD Index372298 11411 11412 End Tag Table 11413