Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

Location:
branches/GNU/src/binutils/bfd/doc
Files:
33 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/bfd/doc/ChangeLog

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 2001-06-11  Alan Modra  <amodra@bigpond.net.au>
    2 
    3         * bfdint.texi (BFD target vector miscellaneous): --oformat, not
    4         -oformat.
     12003-02-12  Bob Wilson  <bob.wilson@acm.org>
     2
     3        * bfd.texinfo: Fix quotes for texinfo.  Make section title
     4        capitalization more consistent.  Use @example instead of @lisp.
     5        Replace FDL appendix with include of fdl.texi.
     6        * fdl.texi: New file.
     7
     82002-11-18  Klee Dienes  <kdienes@apple.com>
     9
     10        * Makefile.am (DOCFILES): Add bfdwin.texi, bfdio.texi.
     11        (PROTOS): Add bfdio.p, bfdwin.p.
     12        (SRCDOC): Add bfdio.c, bfdwin.c.
     13        (SRCPROT): Add bfdio.c, bfdwin.c.
     14        (SRCIPROT): Add bfdio.c, bfdwin.c.
     15        (LIBBFD_H_DEP): Add bfdio.c, bfdwin.c.
     16        (BFD_H_DEP): Add bfdio.c, bfdwin.c.
     17        Add rules for bfdio.texi, bfdwin.text.
     18        * bfd.texinfo: Include bfdio.texi.
     19
     202002-10-14  Alan Modra  <amodra@bigpond.net.au>
     21
     22        * Makefile.in: Regenerate.
     23
     242002-10-11  Daniel Jacobowitz  <drow@mvista.com>
     25
     26        * Makefile.in: Regenerated.
     27
     282002-08-29  John David Anglin  <dave@hiauly1.hia.nrc.ca>
     29
     30        * chew.c (paramstuff, outputdots, perform, bang and usage): Remove
     31        void from function definitions.
     32
     332002-08-13  Alan Modra  <amodra@bigpond.net.au>
     34
     35        * header.sed: Strip tabs.
     36
     372002-06-08  Alan Modra  <amodra@bigpond.net.au>
     38
     39        * Makefile.am: Fix quote style in last change.
     40        * Makefile.in: Regenerate.
     41
     422002-06-07  Alan Modra  <amodra@bigpond.net.au>
     43
     44        * Makefile.am (libbfd.h): Don't use "echo -n".
     45        (libcoff.h, bfd.h): Likewise.
     46        * Makefile.in: Regenerate.
     47
     482002-06-06  Lars Brinkhoff  <lars@nocrew.org>
     49
     50        * bfdint.texi: Change registry@sco.com to registry@caldera.com.
     51
     522002-06-05  Alan Modra  <amodra@bigpond.net.au>
     53
     54        * Makefile.am (libbfd.h): Add "Extracted from.." comment.
     55        (libcoff.h, bfd.h): Likewise.
     56        * Makefile.in: Regenerate.
     57
     582002-05-25  Alan Modra  <amodra@bigpond.net.au>
     59
     60        * chew.c: Use #include "" instead of <> for local header files.
     61
     622002-04-20  Alan Modra  <amodra@bigpond.net.au>
     63
     64        * Makefile.in: Regenerate.
     65
     662002-02-11  Alan Modra  <amodra@bigpond.net.au>
     67
     68        * Makefile.in: Regenerate.
     69
     702002-02-01  Alan Modra  <amodra@bigpond.net.au>
     71
     72        * chew.c (WORD): Eliminate.
     73
     742002-01-31  Ivan Guzvinec  <ivang@opencores.org>
     75
     76        * Makefile.in: Regenerate.
     77
     782002-01-31  Alan Modra  <amodra@bigpond.net.au>
     79
     80        * chew.c (courierize): Don't modify @command params.
     81
     822002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
     83
     84        * proto.str (ENUMDOC): Place two spaces between the end of
     85        the text and the closing comment marker.
     86
     872001-10-30  Hans-Peter Nilsson  <hp@bitrange.com>
     88
     89        * bfdint.texi (BFD target vector miscellaneous): Add
     90        bfd_target_mmo_flavour.
     91        * bfd.texinfo (BFD back ends): Add entry for mmo.
     92        * Makefile.am (DOCFILES): Add mmo.texi.
     93        (SRCDOC): Add mmo.c.
     94        (s-mmo, mmo.texi): New rules.
     95
     962001-10-29  Kazu Hirata  <kazu@hxi.com>
     97
     98        * bfdsumm.texi: Fix a typo.
     99
     1002001-10-26  Nick Clifton  <nickc@cambridge.redhat.com>
     101
     102        * bfd.texinfo: Change footer to refer to FSF.  Change subtitle
     103        to refer to original creation date.
     104
     1052002-01-26  Hans-Peter Nilsson  <hp@bitrange.com>
     106
     107        * Makefile.am (install): Depend on install-info.
     108        * Makefile.in: Regenerate.
     109
     1102001-10-03  Alan Modra  <amodra@bigpond.net.au>
     111
     112        * Makefile.am (BFD_H_DEP): Add ../version.h.
     113        * Makefile.in: Regenerate.
     114
     1152001-10-02  Alan Modra  <amodra@bigpond.net.au>
     116
     117        * Makefile.in: Regenerate.
     118
     1192001-10-01  Alan Modra  <amodra@bigpond.net.au>
     120
     121        * header.sed: New file, adds header to generated files.
     122        * Makefile.am: Rewrite rules generating libbfd.h, libcoff.h and
     123        bfd.h, using above.  Add missing elf.c dependecy for libbfd.h.
     124        * Makefile.in: Regenerate.
     125
     1262001-09-21  Alan Modra  <amodra@bigpond.net.au>
     127
     128        * Makefile.in: Regenerate.
     129
     1302001-09-18  Alan Modra  <amodra@bigpond.net.au>
     131
     132        * bfdint.texi: Replace reference to bfd_read with bfd_bread.
     133        Likewise for bfd_write.
     134
     1352001-07-24  Alan Modra  <amodra@bigpond.net.au>
     136
     137        * Makefile.in: Regenerate.
     138
     1392001-06-21  Hans-Peter Nilsson  <hp@axis.com>
     140
     141        * bfdint.texi (BFD relocation functions) <different formats>:
     142        Mention that the GNU linker is aware of input-output format
     143        restrictions when generating relocatable output.  Make new
     144        paragraph for final-link case.
     145        (BFD target vector swap): Fix typo.
    5146
    61472001-01-25  Kazu Hirata  <kazu@hxi.com>
     
    39180        * bfdint.texi (BFD_JUMP_TABLE macros): Fix typo.
    40181
    41 Fri Apr  7 17:54:38 2000  Andrew Cagney  <cagney@b1.cygnus.com>
     1822000-04-07  Andrew Cagney  <cagney@b1.cygnus.com>
    42183
    43184        * Makefile.in: Rebuild with current autoconf/automake.
    44185
    45 Thu Feb  4 23:21:36 1999  Ian Lance Taylor  <ian@cygnus.com>
     1861999-02-04  Ian Lance Taylor  <ian@cygnus.com>
    46187
    47188        * Makefile.in: Rebuild with current autoconf/automake.
    48189
    49 Thu Jul 23 09:36:44 1998  Nick Clifton  <nickc@cygnus.com>
     1901998-07-23  Nick Clifton  <nickc@cygnus.com>
    50191
    51192        * bfdint.texi (BFD ELF processor required): Add paragraph
    52193        describing the necessity to create "include/elf/CPU.h".
    53194
    54 Thu May  7 14:45:43 1998  Ian Lance Taylor  <ian@cygnus.com>
     1951998-05-07  Ian Lance Taylor  <ian@cygnus.com>
    55196
    56197        * Makefile.am (chew.o): Add -I options for intl srcdir and
     
    58199        * Makefile.in: Rebuild.
    59200
    60 Mon Apr 27 20:19:24 1998  Ian Lance Taylor  <ian@cygnus.com>
     2011998-04-27  Ian Lance Taylor  <ian@cygnus.com>
    61202
    62203        * bfdint.texi: New file.
     
    64205        * Makefile.in: Rebuild.
    65206
    66 Mon Apr 13 16:48:56 1998  Ian Lance Taylor  <ian@cygnus.com>
    67 
    68         * Makefile.in: Rebuild.
    69 
    70 Mon Apr  6 14:06:55 1998  Ian Lance Taylor  <ian@cygnus.com>
     2071998-04-13  Ian Lance Taylor  <ian@cygnus.com>
     208
     209        * Makefile.in: Rebuild.
     210
     2111998-04-06  Ian Lance Taylor  <ian@cygnus.com>
    71212
    72213        * Makefile.am (STAGESTUFF): Remove variable.
     
    75216        * Makefile.in: Rebuild.
    76217
    77 Fri Mar 27 16:25:25 1998  Ian Lance Taylor  <ian@cygnus.com>
     2181998-03-27  Ian Lance Taylor  <ian@cygnus.com>
    78219
    79220        * chew.c (skip_white_and_starts): Remove unused declaration.
     
    90231        (main): Call usage for an unrecognized option.
    91232
    92 Fri Feb 13 14:37:14 1998  Ian Lance Taylor  <ian@cygnus.com>
     2331998-02-13  Ian Lance Taylor  <ian@cygnus.com>
    93234
    94235        * Makefile.am (AUTOMAKE_OPTIONS): Define.
    95236        * Makefile.in: Rebuild.
    96237
    97 Mon Jan 26 15:38:36 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
     2381998-01-26  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
    98239
    99240        * doc.str (bodytext): Don't output @* at the end.
     
    105246        * Makefile.in: Rebuild.
    106247
    107 Wed Oct  1 14:41:28 1997  Ian Lance Taylor  <ian@cygnus.com>
     2481997-10-01  Ian Lance Taylor  <ian@cygnus.com>
    108249
    109250        * Makefile.am (libbfd.h): Don't use cpu-h8300.c, cpu-i960.c, or
     
    111252        * Makefile.in: Rebuild.
    112253
    113 Fri Aug 15 04:55:15 1997  Doug Evans  <dje@canuck.cygnus.com>
     2541997-08-15  Doug Evans  <dje@canuck.cygnus.com>
    114255
    115256        * Makefile.am (libbfd.h, libcoff.h): Invoke $(MKDOC) as ./$(MKDOC).
    116257        * Makefile.in: Rebuild.
    117258
    118 Fri Aug  1 12:59:58 1997  Ian Lance Taylor  <ian@cygnus.com>
     2591997-08-01  Ian Lance Taylor  <ian@cygnus.com>
    119260
    120261        * Makefile.am (CC_FOR_BUILD): Don't set explicitly.
    121262        * Makefile.in: Rebuild.
    122263
    123 Thu Jul 31 20:00:12 1997  Ian Lance Taylor  <ian@cygnus.com>
     2641997-07-31  Ian Lance Taylor  <ian@cygnus.com>
    124265
    125266        * Makefile.am: New file, based on old Makefile.in.
    126267        * Makefile.in: Now built with automake.
    127268
    128 Tue Jul 22 14:44:00 1997  Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
     2691997-07-22  Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
    129270
    130271        * Makefile.in: Change stamp-* files to s-* files.  Use bfdt.texi
    131272        rather than bfd.texi.
    132         (DOCFILES): Change bfd.texi to bfdt.texi.
     273        (DOCFILES): Change bfd.texi to bfdt.texi.
    133274        * bfd.texinfo: Include bfdt.texi, not bfd.texi.
    134275
    135 Mon Jun 16 15:33:15 1997  Ian Lance Taylor  <ian@cygnus.com>
     2761997-06-16  Ian Lance Taylor  <ian@cygnus.com>
    136277
    137278        * Makefile.in (CC, CFLAGS): Substitute from configure script.
    138279        From Jeff Makey <jeff@cts.com>.
    139280
    140 Tue Apr 15 12:37:41 1997  Ian Lance Taylor  <ian@cygnus.com>
     2811997-04-15  Ian Lance Taylor  <ian@cygnus.com>
    141282
    142283        * Makefile.in (install-info): Use mkinstalldirs to build
    143284        $(infodir).
    144285
    145 Tue Apr  8 12:49:46 1997  Ian Lance Taylor  <ian@cygnus.com>
     2861997-04-08  Ian Lance Taylor  <ian@cygnus.com>
    146287
    147288        * Makefile.in (install-info): Permit info files to be in srcdir.
     
    152293        remove $(DOCFILES).
    153294
    154 Mon Apr  7 15:23:26 1997  Ian Lance Taylor  <ian@cygnus.com>
     2951997-04-07  Ian Lance Taylor  <ian@cygnus.com>
    155296
    156297        * Makefile.in (distclean): Don't remove *.info files.
    157298
    158 Thu Feb 13 20:50:02 1997  Klaus Kaempf  (kkaempf@progis.de)
     2991997-02-13  Klaus Kaempf  (kkaempf@progis.de)
    159300
    160301        * makefile.vms: New file.
    161302
    162 Tue Jun 18 18:32:28 1996  Ian Lance Taylor  <ian@cygnus.com>
     3031996-06-18  Ian Lance Taylor  <ian@cygnus.com>
    163304
    164305        * chew.c (kill_bogus_lines): Reset sl when not at the start of a
    165306        line.  From Uwe Ohse <uwe@tirka.gun.de>.
    166307
    167 Tue Jan 30 14:10:46 1996  Ian Lance Taylor  <ian@cygnus.com>
     3081996-01-30  Ian Lance Taylor  <ian@cygnus.com>
    168309
    169310        From Ronald F. Guilmette <rfg@monkeys.com>:
     
    171312        (libcoff.h, bfd.h): Likewise.
    172313
    173 Fri Nov  3 14:46:48 1995  Fred Fish  <fnf@cygnus.com>
    174 
    175         * Makefile.in (SRCDOC, SRCPROT, core.texi, bfd.h):  Use corefile.c, 
     3141995-11-03  Fred Fish  <fnf@cygnus.com>
     315
     316        * Makefile.in (SRCDOC, SRCPROT, core.texi, bfd.h):  Use corefile.c,
    176317        renamed from core.c.
    177318
    178 Wed Nov  1 14:28:23 1995  Manfred Hollstein KS/EF4A 60/1F/110 #40283  <manfred@lts.sel.alcatel.de>
     3191995-11-01  Manfred Hollstein KS/EF4A 60/1F/110 #40283  <manfred@lts.sel.alcatel.de>
    179320
    180321        * chew.c: Include <ctype.h>.
    181322
    182 Fri Oct  6 16:23:34 1995  Ken Raeburn  <raeburn@cygnus.com>
     3231995-10-06  Ken Raeburn  <raeburn@cygnus.com>
    183324
    184325        Mon Sep 25 22:49:32 1995  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
     
    186327        * Makefile.in (Makefile): Only remake this Makefile.
    187328
    188 Wed Oct  4 15:51:05 1995  Ken Raeburn  <raeburn@cygnus.com>
     3291995-10-04  Ken Raeburn  <raeburn@cygnus.com>
    189330
    190331        * chew.c: Include <stdio.h>.
    191332
    192 Tue Sep 12 18:14:50 1995  Ian Lance Taylor  <ian@cygnus.com>
     3331995-09-12  Ian Lance Taylor  <ian@cygnus.com>
    193334
    194335        * Makefile.in (maintainer-clean): New target.
    195336
    196 Thu Aug 31 12:18:43 1995  Ian Lance Taylor  <ian@cygnus.com>
     3371995-08-31  Ian Lance Taylor  <ian@cygnus.com>
    197338
    198339        * Makefile.in (bfd.h): Add additional #endif at end of bfd.h if
    199340        __cplusplus is defined.
    200341
    201 Tue Nov 29 16:13:34 1994  Doug Evans  <dje@canuck.cygnus.com>
     3421994-11-29  Doug Evans  <dje@canuck.cygnus.com>
    202343
    203344        * chew.c (write_buffer): New argument `f', all callers changed.
     
    206347        * doc.str (COMMENT): Likewise.
    207348
    208 Mon Sep 12 11:44:17 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
     3491994-09-12  Ian Lance Taylor  (ian@sanguine.cygnus.com)
    209350
    210351        * Makefile.in (DOCFILES): Remove ctor.texi.
     
    216357        * bfd.texinfo (Constructors): Remove section.
    217358
    218 Fri Sep  2 13:33:44 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
     3591994-09-02  Ken Raeburn  (raeburn@cujo.cygnus.com)
    219360
    220361        * chew.c: Include assert.h.  Added prototypes for most functions.
     
    238379        ENUMEQ, ENUMEQX, ENUMDOC.
    239380
    240 Wed Jan 12 18:37:12 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
     3811994-01-12  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
    241382
    242383        * bfd.texinfo: Added Linker Functions node.
    243         * doc/Makefile.in (DOCFILES): Added linker.texi.
     384        * Makefile.in (DOCFILES): Added linker.texi.
    244385        (SRCDOC): Added linker.c.
    245386        (linker.texi): New target.
    246387
    247 Tue Jan  4 10:52:56 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
     3881994-01-04  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
    248389
    249390        * chew.c: Don't rely on a correct declaration of exit.
     
    251392        (main): Use it.
    252393
    253 Mon Jan  3 11:40:40 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
     3941994-01-03  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
    254395
    255396        * bfd.texinfo: Added Hash Tables node.
     
    258399        (hash.texi): New target.
    259400
    260 Thu Dec 30 16:57:04 1993  Ken Raeburn  (raeburn@cujo.cygnus.com)
     4011993-12-30  Ken Raeburn  (raeburn@cujo.cygnus.com)
    261402
    262403        * Makefile.in: Delete all references to seclet.c, since it's just
     
    264405        since they don't contain documentation yet (hint, hint!).
    265406
    266 Fri Nov  5 10:58:53 1993  David J. Mackenzie  (djm@thepub.cygnus.com)
     4071993-11-05  David J. Mackenzie  (djm@thepub.cygnus.com)
    267408
    268409        * bfd.texinfo: Small cleanups.
    269410
    270 Fri Nov 19 03:46:11 1993  Ken Raeburn  (raeburn@cambridge.cygnus.com)
     4111993-11-19  Ken Raeburn  (raeburn@cambridge.cygnus.com)
    271412
    272413        * Makefile.in (archures.texi): Depends on $(MKDOC).
    273414
    274 Tue Aug 10 14:22:39 1993  Ken Raeburn  (raeburn@cambridge.cygnus.com)
     4151993-08-10  Ken Raeburn  (raeburn@cambridge.cygnus.com)
    275416
    276417        * bfd.texinfo (BFD back end): Don't include elfcode.texi, since
    277418        it's empty now and that triggers a makeinfo bug.
    278419
    279 Mon Aug  9 16:27:30 1993  Ken Raeburn  (raeburn@cambridge.cygnus.com)
     4201993-08-09  Ken Raeburn  (raeburn@cambridge.cygnus.com)
    280421
    281422        * bfd.texinfo (BFD back end): New section on ELF, includes
     
    285426        (elf.texi, elfcode.texi): New intermediate targets.
    286427
    287 Thu Jun 24 13:48:13 1993  David J. Mackenzie  (djm@thepub.cygnus.com)
     4281993-06-24  David J. Mackenzie  (djm@thepub.cygnus.com)
    288429
    289430        * Makefile.in (.c.o, chew.o): Put CFLAGS last.
     
    291432        with ld.texinfo.
    292433
    293 Mon Jun 14 12:07:07 1993  david d `zoo' zuhn  (zoo at rtl.cygnus.com)
    294 
    295         * Makefile.in (install-info): remove parentdir cruft, 
    296 
    297 Wed Jun  9 16:00:32 1993  Jim Kingdon  (kingdon@cygnus.com)
     4341993-06-14  david d `zoo' zuhn  (zoo at rtl.cygnus.com)
     435
     436        * Makefile.in (install-info): remove parentdir cruft,
     437
     4381993-06-09  Jim Kingdon  (kingdon@cygnus.com)
    298439
    299440        * Makefile.in (mostlyclean): Remove chew.o.
    300441
    301 Tue May 25 14:46:58 1993  Ken Raeburn  (raeburn@cambridge.cygnus.com)
     4421993-05-25  Ken Raeburn  (raeburn@cambridge.cygnus.com)
    302443
    303444        * Makefile.in (libbfd.h): Use elfcode.h, not elf32.c.
    304445
    305 Mon May 24 15:50:07 1993  Ken Raeburn  (raeburn@cygnus.com)
     4461993-05-24  Ken Raeburn  (raeburn@cygnus.com)
    306447
    307448        * chew.c (compile): Add a couple of missing casts.
    308449
    309 Wed May 12 14:45:14 1993  Ian Lance Taylor  (ian@cygnus.com)
     4501993-05-12  Ian Lance Taylor  (ian@cygnus.com)
    310451
    311452        * Makefile.in (CC_FOR_BUILD): New variable, define to be $(CC).
     
    313454        it must run on the build machine.
    314455
    315 Tue Apr  6 22:38:10 1993  John Gilmore  (gnu@cygnus.com)
     4561993-04-07  John Gilmore  (gnu@cygnus.com)
    316457
    317458        * Makefile.in (chew):  Don't compile from .c to executable in a
     
    320461        chew.o, and link that, which makes identical executables every time.
    321462
    322 Wed Mar 24 17:26:29 1993  david d `zoo' zuhn  (zoo at poseidon.cygnus.com)
     4631993-03-24  david d `zoo' zuhn  (zoo at poseidon.cygnus.com)
    323464
    324465        * Makefile.in: fix typo (bfd.texinfo not bfd.texino)
    325466
    326 Fri Mar 19 01:13:00 1993  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
     4671993-03-19  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
    327468
    328469        * bfd.texinfo: Since BFD version number has been bumped, do same
     
    330471        fixed to extract real version number.
    331472
    332 Tue Mar 16 12:15:13 1993  Per Bothner  (bothner@rtl.cygnus.com)
     4731993-03-16  Per Bothner  (bothner@rtl.cygnus.com)
    333474
    334475        * Makefile.in:  Add *clean rules.
    335476
    336 Mon Jan 11 18:43:56 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
     4771993-01-11  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
    337478
    338479        * Makefile.in (libbfd.h): Removed duplicate init.c and libbfd.c.
     
    341482        to build.
    342483
    343 Thu Dec 17 19:35:43 1992  david d `zoo' zuhn  (zoo at cirdan.cygnus.com)
     4841992-12-17  david d `zoo' zuhn  (zoo at cirdan.cygnus.com)
    344485
    345486        * Makefile.in: added dvi target, define and use $(TEXI2DVI)
    346487
    347 Thu Dec  3 17:42:48 1992  Ken Raeburn  (raeburn@cambridge.cygnus.com)
     4881992-12-03  Ken Raeburn  (raeburn@cambridge.cygnus.com)
    348489
    349490        * Makefile.in (TEXIDIR): New variable.
     
    352493        * bfd.texinfo: Minor doc fixes.
    353494
    354 Thu Nov  5 03:13:55 1992  John Gilmore  (gnu@cygnus.com)
     4951992-11-05  John Gilmore  (gnu@cygnus.com)
    355496
    356497        Cleanup:  Replace all uses of EXFUN in the BFD sources, with PARAMS.
    357498
    358         * doc/chew.c (exfunstuff):  Eliminate.
     499        * chew.c (exfunstuff):  Eliminate.
    359500        (paramstuff):  Replace exfunstuff with function to generate PARAMS.
    360         * doc/proto.str:  Use paramstuff rather than exfunstuff.
    361 
    362 Mon Aug 17 12:40:32 1992  Steve Chamberlain  (sac@thepub.cygnus.com)
     501        * proto.str:  Use paramstuff rather than exfunstuff.
     502
     5031992-08-17  Steve Chamberlain  (sac@thepub.cygnus.com)
    363504
    364505        * chew.c: various patches provided by Howard Chu.
    365506
    366 Fri Jun 19 18:59:54 1992  John Gilmore  (gnu at cygnus.com)
     5071992-06-19  John Gilmore  (gnu at cygnus.com)
    367508
    368509        * Makefile.in (libbfd.h):  Add elf.c as a source of prototypes.
    369510
    370 Mon May 11 18:55:59 1992  John Gilmore  (gnu at cygnus.com)
     5111992-05-11  John Gilmore  (gnu at cygnus.com)
    371512
    372513        * chew.c:  exit() should be declared by config files, not by
    373         portable source code.  Its type could be int or void function. 
    374 
    375 Mon May  4 13:45:57 1992  K. Richard Pixley  (rich@rtl.cygnus.com)
     514        portable source code.  Its type could be int or void function.
     515
     5161992-05-04  K. Richard Pixley  (rich@rtl.cygnus.com)
    376517
    377518        * Makefile.in: another CFLAGS correction.
    378519
    379 Tue Apr 28 10:21:32 1992  K. Richard Pixley  (rich@rtl.cygnus.com)
     5201992-04-28  K. Richard Pixley  (rich@rtl.cygnus.com)
    380521
    381522        * Makefile.in: Do the CFLAGS thing.
    382523
    383 Fri Apr 10 22:34:52 1992  Fred Fish  (fnf@cygnus.com)
     5241992-04-11  Fred Fish  (fnf@cygnus.com)
    384525
    385526        * Makefile.in (MINUS_G):  Add macro and default to -g.
    386527
    387 Fri Mar  6 18:53:18 1992  Steve Chamberlain  (sac@thepub.cygnus.com)
     5281992-03-06  Steve Chamberlain  (sac@thepub.cygnus.com)
    388529
    389530        * chew.c: now has -w switch turn on warnings
    390531
    391 Wed Feb 26 18:04:40 1992  K. Richard Pixley  (rich@cygnus.com)
     5321992-02-26  K. Richard Pixley  (rich@cygnus.com)
    392533
    393534        * Makefile.in, configure.in: removed traces of namesubdir,
     
    395536          copyrights to '92, changed some from Cygnus to FSF.
    396537
    397 Tue Dec 10 22:11:05 1991  K. Richard Pixley  (rich at rtl.cygnus.com)
     5381991-12-10  K. Richard Pixley  (rich at rtl.cygnus.com)
    398539
    399540        * Makefile.in: build chew into the current directory.  Complete
    400541          the MKDOC macro transition.
    401542
    402 Tue Dec 10 08:26:28 1991  Steve Chamberlain  (sac at rtl.cygnus.com)
     5431991-12-10  Steve Chamberlain  (sac at rtl.cygnus.com)
    403544
    404545        * chew.c: don't core dump when can't open file
     
    406547        odd directories
    407548
    408 Tue Dec 10 04:07:25 1991  K. Richard Pixley  (rich at rtl.cygnus.com)
     5491991-12-10  K. Richard Pixley  (rich at rtl.cygnus.com)
    409550
    410551        * Makefile.in: infodir belongs in datadir.
    411552
    412 Sat Dec  7 17:01:23 1991  Steve Chamberlain  (sac at rtl.cygnus.com)
     5531991-12-07  Steve Chamberlain  (sac at rtl.cygnus.com)
    413554
    414555        * chew.c: Much modified
     
    417558
    418559
    419 Fri Dec  6 22:57:12 1991  K. Richard Pixley  (rich at rtl.cygnus.com)
     5601991-12-06  K. Richard Pixley  (rich at rtl.cygnus.com)
    420561
    421562        * Makefile.in: added standards.text support, host/site/target
     
    423564          don't echo on install.
    424565
    425 Thu Dec  5 22:46:17 1991  K. Richard Pixley  (rich at rtl.cygnus.com)
     5661991-12-05  K. Richard Pixley  (rich at rtl.cygnus.com)
    426567
    427568        * Makefile.in: idestdir and ddestdir go away.  Added copyrights
  • branches/GNU/src/binutils/bfd/doc/Makefile.am

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    55DOCFILES = aoutx.texi  archive.texi archures.texi \
    66        bfdt.texi  cache.texi coffcode.texi \
    7         core.texi elf.texi elfcode.texi  format.texi  libbfd.texi  \
     7        core.texi elf.texi elfcode.texi  format.texi \
     8        libbfd.texi bfdwin.texi bfdio.texi \
    89        opncls.texi  reloc.texi  section.texi  \
    9         syms.texi  targets.texi init.texi hash.texi linker.texi
     10        syms.texi  targets.texi init.texi hash.texi linker.texi \
     11        mmo.texi
    1012
    1113PROTOS = archive.p archures.p bfd.p \
    1214         core.p format.p \
     15        bfdio.p bfdwin.p \
    1316        libbfd.p opncls.p reloc.p \
    1417        section.p syms.p targets.p  \
     
    2225SRCDOC = $(srcdir)/../aoutx.h  $(srcdir)/../archive.c \
    2326        $(srcdir)/../archures.c $(srcdir)/../bfd.c \
     27        $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
    2428        $(srcdir)/../cache.c $(srcdir)/../coffcode.h \
    2529        $(srcdir)/../corefile.c $(srcdir)/../elf.c \
     
    2832        $(srcdir)/../reloc.c  $(srcdir)/../section.c \
    2933        $(srcdir)/../syms.c  $(srcdir)/../targets.c \
    30         $(srcdir)/../hash.c $(srcdir)/../linker.c
     34        $(srcdir)/../hash.c $(srcdir)/../linker.c \
     35        $(srcdir)/../mmo.c
    3136
    3237SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
    3338        $(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c \
    3439        $(srcdir)/../format.c $(srcdir)/../libbfd.c \
     40        $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
    3541        $(srcdir)/../opncls.c $(srcdir)/../reloc.c \
    3642        $(srcdir)/../section.c $(srcdir)/../syms.c \
     
    3844
    3945SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
     46        $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
    4047        $(srcdir)/../reloc.c $(srcdir)/../cpu-h8300.c \
    4148        $(srcdir)/../cpu-i960.c $(srcdir)/../archures.c \
     
    124131elfcode.texi: s-elfcode
    125132
     133s-mmo: $(MKDOC) $(srcdir)/../mmo.c $(srcdir)/doc.str
     134        ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../mmo.c >mmo.tmp
     135        $(srcdir)/../../move-if-change mmo.tmp mmo.texi
     136        touch s-mmo
     137mmo.texi: s-mmo
     138
    126139s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
    127140        ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
     
    136149libbfd.texi: s-libbfd
    137150
     151s-bfdio: $(MKDOC) $(srcdir)/../bfdio.c $(srcdir)/doc.str
     152        ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdio.c >bfdio.tmp
     153        $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi
     154        touch s-bfdio
     155bfdio.texi: s-bfdio
     156
     157s-bfdwin: $(MKDOC) $(srcdir)/../bfdwin.c $(srcdir)/doc.str
     158        ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdwin.c >bfdwin.tmp
     159        $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi
     160        touch s-bfdwin
     161bfdwin.texi: s-bfdwin
     162
    138163s-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
    139164        ./$(MKDOC) -f $(srcdir)/doc.str  <$(srcdir)/../opncls.c >opncls.tmp
     
    184209linker.texi: s-linker
    185210
    186 libbfd.h: $(srcdir)/../libbfd-in.h      \
     211LIBBFD_H_DEP = \
     212        $(srcdir)/../libbfd-in.h        \
    187213        $(srcdir)/../init.c             \
    188214        $(srcdir)/../libbfd.c           \
     215        $(srcdir)/../bfdio.c            \
     216        $(srcdir)/../bfdwin.c           \
    189217        $(srcdir)/../cache.c            \
    190218        $(srcdir)/../reloc.c            \
    191219        $(srcdir)/../archures.c         \
     220        $(srcdir)/../elf.c              \
     221        $(srcdir)/header.sed            \
    192222        $(srcdir)/proto.str             \
    193223        $(MKDOC)
    194         cat $(srcdir)/../libbfd-in.h >libbfd.h
    195         ./$(MKDOC) -i -f $(srcdir)/proto.str  < $(srcdir)/../init.c >>libbfd.h
    196         ./$(MKDOC) -i -f $(srcdir)/proto.str  < $(srcdir)/../libbfd.c >>libbfd.h
    197         ./$(MKDOC) -i -f $(srcdir)/proto.str  < $(srcdir)/../cache.c >>libbfd.h
    198         ./$(MKDOC) -i -f $(srcdir)/proto.str  < $(srcdir)/../reloc.c >>libbfd.h
    199         ./$(MKDOC) -i -f $(srcdir)/proto.str  < $(srcdir)/../archures.c >>libbfd.h
    200         ./$(MKDOC) -i -f $(srcdir)/proto.str  < $(srcdir)/../elf.c >>libbfd.h
    201 
    202 libcoff.h: $(srcdir)/../libcoff-in.h    \
     224
     225libbfd.h: $(LIBBFD_H_DEP)
     226        echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
     227        for file in $(LIBBFD_H_DEP); do \
     228          case $$file in \
     229            *-in.h) cat $$file >> $@ ;; \
     230            */header.sed) break ;; \
     231            *)  echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
     232                                -e 's,$$,.  */,' >> $@ ; \
     233                ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
     234          esac; \
     235        done
     236
     237LIBCOFF_H_DEP = \
     238        $(srcdir)/../libcoff-in.h       \
    203239        $(srcdir)/../coffcode.h         \
     240        $(srcdir)/header.sed            \
    204241        $(srcdir)/proto.str             \
    205242        $(MKDOC)
    206         cat $(srcdir)/../libcoff-in.h >libcoff.h
    207         ./$(MKDOC) -i -f $(srcdir)/proto.str  < $(srcdir)/../coffcode.h >>libcoff.h
    208 
    209 bfd.h: $(srcdir)/../bfd-in.h            \
     243
     244libcoff.h: $(LIBCOFF_H_DEP)
     245        echo "$(LIBCOFF_H_DEP)" | sed -f $(srcdir)/header.sed > $@
     246        for file in $(LIBCOFF_H_DEP); do \
     247          case $$file in \
     248            *-in.h) cat $$file >> $@ ;; \
     249            */header.sed) break ;; \
     250            *)  echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
     251                                -e 's,$$,.  */,' >> $@ ; \
     252                ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
     253          esac; \
     254        done
     255
     256BFD_H_DEP = \
     257        $(srcdir)/../bfd-in.h           \
    210258        $(srcdir)/../init.c             \
    211259        $(srcdir)/../opncls.c           \
    212260        $(srcdir)/../libbfd.c           \
     261        $(srcdir)/../bfdio.c            \
     262        $(srcdir)/../bfdwin.c           \
    213263        $(srcdir)/../section.c          \
    214264        $(srcdir)/../archures.c         \
     
    220270        $(srcdir)/../targets.c          \
    221271        $(srcdir)/../format.c           \
     272        $(srcdir)/../linker.c           \
     273        $(srcdir)/../simple.c           \
     274        $(srcdir)/header.sed            \
    222275        $(srcdir)/proto.str             \
     276        $(srcdir)/../version.h          \
    223277        $(MKDOC)
    224         cat $(srcdir)/../bfd-in.h >bfd.h
    225         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../init.c >>bfd.h
    226         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../opncls.c >>bfd.h
    227         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../libbfd.c >>bfd.h
    228         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../section.c >>bfd.h
    229         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archures.c >>bfd.h
    230         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../reloc.c >>bfd.h
    231         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../syms.c >>bfd.h
    232         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../bfd.c >>bfd.h
    233         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archive.c >>bfd.h
    234         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../corefile.c >>bfd.h
    235         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../targets.c >>bfd.h
    236         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../format.c >>bfd.h
    237         echo "#ifdef __cplusplus" >>bfd.h
    238         echo "}" >>bfd.h
    239         echo "#endif" >>bfd.h
    240         echo "#endif" >>bfd.h
     278
     279bfd.h: $(BFD_H_DEP)
     280        echo "$(BFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
     281        for file in $(BFD_H_DEP); do \
     282          case $$file in \
     283            *-in.h) cat $$file >> $@ ;; \
     284            */header.sed) break ;; \
     285            *)  echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
     286                                -e 's,$$,.  */,' >> $@ ; \
     287                ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
     288          esac; \
     289        done
     290        echo "#ifdef __cplusplus" >> $@
     291        echo "}" >> $@
     292        echo "#endif" >> $@
     293        echo "#endif" >> $@
    241294
    242295noinst_TEXINFOS = bfdint.texi
     
    249302
    250303MAINTAINERCLEANFILES = $(DOCFILES)
     304
     305# We want install to imply install-info as per GNU standards, despite the
     306# cygnus option.
     307install: install-info
  • branches/GNU/src/binutils/bfd/doc/Makefile.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 # Makefile.in generated automatically by automake 1.4 from Makefile.am
    2 
    3 # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
     1# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
     2
     3# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
    44# This Makefile.in is free software; the Free Software Foundation
    55# gives unlimited permission to copy and/or distribute it,
     
    116116all_backends = @all_backends@
    117117bfd_backends = @bfd_backends@
     118bfd_default_target_size = @bfd_default_target_size@
     119bfd_libs = @bfd_libs@
    118120bfd_machines = @bfd_machines@
     121bfd_version = @bfd_version@
     122bfd_version_string = @bfd_version_string@
     123bfdincludedir = @bfdincludedir@
     124bfdlibdir = @bfdlibdir@
    119125l = @l@
    120126tdefaults = @tdefaults@
     
    125131DOCFILES = aoutx.texi  archive.texi archures.texi \
    126132        bfdt.texi  cache.texi coffcode.texi \
    127         core.texi elf.texi elfcode.texi  format.texi  libbfd.texi  \
     133        core.texi elf.texi elfcode.texi  format.texi \
     134        libbfd.texi bfdwin.texi bfdio.texi \
    128135        opncls.texi  reloc.texi  section.texi  \
    129         syms.texi  targets.texi init.texi hash.texi linker.texi
     136        syms.texi  targets.texi init.texi hash.texi linker.texi \
     137        mmo.texi
    130138
    131139
    132140PROTOS = archive.p archures.p bfd.p \
    133141         core.p format.p \
     142        bfdio.p bfdwin.p \
    134143        libbfd.p opncls.p reloc.p \
    135144        section.p syms.p targets.p  \
     
    144153SRCDOC = $(srcdir)/../aoutx.h  $(srcdir)/../archive.c \
    145154        $(srcdir)/../archures.c $(srcdir)/../bfd.c \
     155        $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
    146156        $(srcdir)/../cache.c $(srcdir)/../coffcode.h \
    147157        $(srcdir)/../corefile.c $(srcdir)/../elf.c \
     
    150160        $(srcdir)/../reloc.c  $(srcdir)/../section.c \
    151161        $(srcdir)/../syms.c  $(srcdir)/../targets.c \
    152         $(srcdir)/../hash.c $(srcdir)/../linker.c
     162        $(srcdir)/../hash.c $(srcdir)/../linker.c \
     163        $(srcdir)/../mmo.c
    153164
    154165
     
    156167        $(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c \
    157168        $(srcdir)/../format.c $(srcdir)/../libbfd.c \
     169        $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
    158170        $(srcdir)/../opncls.c $(srcdir)/../reloc.c \
    159171        $(srcdir)/../section.c $(srcdir)/../syms.c \
     
    162174
    163175SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
     176        $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
    164177        $(srcdir)/../reloc.c $(srcdir)/../cpu-h8300.c \
    165178        $(srcdir)/../cpu-i960.c $(srcdir)/../archures.c \
     
    172185
    173186MKDOC = chew$(EXEEXT_FOR_BUILD)
     187
     188LIBBFD_H_DEP = \
     189        $(srcdir)/../libbfd-in.h        \
     190        $(srcdir)/../init.c             \
     191        $(srcdir)/../libbfd.c           \
     192        $(srcdir)/../bfdio.c            \
     193        $(srcdir)/../bfdwin.c           \
     194        $(srcdir)/../cache.c            \
     195        $(srcdir)/../reloc.c            \
     196        $(srcdir)/../archures.c         \
     197        $(srcdir)/../elf.c              \
     198        $(srcdir)/header.sed            \
     199        $(srcdir)/proto.str             \
     200        $(MKDOC)
     201
     202
     203LIBCOFF_H_DEP = \
     204        $(srcdir)/../libcoff-in.h       \
     205        $(srcdir)/../coffcode.h         \
     206        $(srcdir)/header.sed            \
     207        $(srcdir)/proto.str             \
     208        $(MKDOC)
     209
     210
     211BFD_H_DEP = \
     212        $(srcdir)/../bfd-in.h           \
     213        $(srcdir)/../init.c             \
     214        $(srcdir)/../opncls.c           \
     215        $(srcdir)/../libbfd.c           \
     216        $(srcdir)/../bfdio.c            \
     217        $(srcdir)/../bfdwin.c           \
     218        $(srcdir)/../section.c          \
     219        $(srcdir)/../archures.c         \
     220        $(srcdir)/../reloc.c            \
     221        $(srcdir)/../syms.c             \
     222        $(srcdir)/../bfd.c              \
     223        $(srcdir)/../archive.c          \
     224        $(srcdir)/../corefile.c         \
     225        $(srcdir)/../targets.c          \
     226        $(srcdir)/../format.c           \
     227        $(srcdir)/../linker.c           \
     228        $(srcdir)/../simple.c           \
     229        $(srcdir)/header.sed            \
     230        $(srcdir)/proto.str             \
     231        $(srcdir)/../version.h          \
     232        $(MKDOC)
     233
    174234
    175235noinst_TEXINFOS = bfdint.texi
     
    195255DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
    196256
    197 TAR = tar
     257TAR = gtar
    198258GZIP_ENV = --best
    199259all: all-redirect
     
    281341        list='$(INFO_DEPS)'; \
    282342        for file in $$list; do \
    283           test -z "$ii" \
     343          test -z "$$ii" \
    284344            || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
    285345        done
     
    485545elfcode.texi: s-elfcode
    486546
     547s-mmo: $(MKDOC) $(srcdir)/../mmo.c $(srcdir)/doc.str
     548        ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../mmo.c >mmo.tmp
     549        $(srcdir)/../../move-if-change mmo.tmp mmo.texi
     550        touch s-mmo
     551mmo.texi: s-mmo
     552
    487553s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
    488554        ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
     
    497563libbfd.texi: s-libbfd
    498564
     565s-bfdio: $(MKDOC) $(srcdir)/../bfdio.c $(srcdir)/doc.str
     566        ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdio.c >bfdio.tmp
     567        $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi
     568        touch s-bfdio
     569bfdio.texi: s-bfdio
     570
     571s-bfdwin: $(MKDOC) $(srcdir)/../bfdwin.c $(srcdir)/doc.str
     572        ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdwin.c >bfdwin.tmp
     573        $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi
     574        touch s-bfdwin
     575bfdwin.texi: s-bfdwin
     576
    499577s-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
    500578        ./$(MKDOC) -f $(srcdir)/doc.str  <$(srcdir)/../opncls.c >opncls.tmp
     
    545623linker.texi: s-linker
    546624
    547 libbfd.h: $(srcdir)/../libbfd-in.h      \
    548         $(srcdir)/../init.c             \
    549         $(srcdir)/../libbfd.c           \
    550         $(srcdir)/../cache.c            \
    551         $(srcdir)/../reloc.c            \
    552         $(srcdir)/../archures.c         \
    553         $(srcdir)/proto.str             \
    554         $(MKDOC)
    555         cat $(srcdir)/../libbfd-in.h >libbfd.h
    556         ./$(MKDOC) -i -f $(srcdir)/proto.str  < $(srcdir)/../init.c >>libbfd.h
    557         ./$(MKDOC) -i -f $(srcdir)/proto.str  < $(srcdir)/../libbfd.c >>libbfd.h
    558         ./$(MKDOC) -i -f $(srcdir)/proto.str  < $(srcdir)/../cache.c >>libbfd.h
    559         ./$(MKDOC) -i -f $(srcdir)/proto.str  < $(srcdir)/../reloc.c >>libbfd.h
    560         ./$(MKDOC) -i -f $(srcdir)/proto.str  < $(srcdir)/../archures.c >>libbfd.h
    561         ./$(MKDOC) -i -f $(srcdir)/proto.str  < $(srcdir)/../elf.c >>libbfd.h
    562 
    563 libcoff.h: $(srcdir)/../libcoff-in.h    \
    564         $(srcdir)/../coffcode.h         \
    565         $(srcdir)/proto.str             \
    566         $(MKDOC)
    567         cat $(srcdir)/../libcoff-in.h >libcoff.h
    568         ./$(MKDOC) -i -f $(srcdir)/proto.str  < $(srcdir)/../coffcode.h >>libcoff.h
    569 
    570 bfd.h: $(srcdir)/../bfd-in.h            \
    571         $(srcdir)/../init.c             \
    572         $(srcdir)/../opncls.c           \
    573         $(srcdir)/../libbfd.c           \
    574         $(srcdir)/../section.c          \
    575         $(srcdir)/../archures.c         \
    576         $(srcdir)/../reloc.c            \
    577         $(srcdir)/../syms.c             \
    578         $(srcdir)/../bfd.c              \
    579         $(srcdir)/../archive.c          \
    580         $(srcdir)/../corefile.c         \
    581         $(srcdir)/../targets.c          \
    582         $(srcdir)/../format.c           \
    583         $(srcdir)/proto.str             \
    584         $(MKDOC)
    585         cat $(srcdir)/../bfd-in.h >bfd.h
    586         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../init.c >>bfd.h
    587         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../opncls.c >>bfd.h
    588         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../libbfd.c >>bfd.h
    589         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../section.c >>bfd.h
    590         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archures.c >>bfd.h
    591         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../reloc.c >>bfd.h
    592         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../syms.c >>bfd.h
    593         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../bfd.c >>bfd.h
    594         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archive.c >>bfd.h
    595         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../corefile.c >>bfd.h
    596         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../targets.c >>bfd.h
    597         ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../format.c >>bfd.h
    598         echo "#ifdef __cplusplus" >>bfd.h
    599         echo "}" >>bfd.h
    600         echo "#endif" >>bfd.h
    601         echo "#endif" >>bfd.h
     625libbfd.h: $(LIBBFD_H_DEP)
     626        echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
     627        for file in $(LIBBFD_H_DEP); do \
     628          case $$file in \
     629            *-in.h) cat $$file >> $@ ;; \
     630            */header.sed) break ;; \
     631            *)  echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
     632                                -e 's,$$,.  */,' >> $@ ; \
     633                ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
     634          esac; \
     635        done
     636
     637libcoff.h: $(LIBCOFF_H_DEP)
     638        echo "$(LIBCOFF_H_DEP)" | sed -f $(srcdir)/header.sed > $@
     639        for file in $(LIBCOFF_H_DEP); do \
     640          case $$file in \
     641            *-in.h) cat $$file >> $@ ;; \
     642            */header.sed) break ;; \
     643            *)  echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
     644                                -e 's,$$,.  */,' >> $@ ; \
     645                ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
     646          esac; \
     647        done
     648
     649bfd.h: $(BFD_H_DEP)
     650        echo "$(BFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
     651        for file in $(BFD_H_DEP); do \
     652          case $$file in \
     653            *-in.h) cat $$file >> $@ ;; \
     654            */header.sed) break ;; \
     655            *)  echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
     656                                -e 's,$$,.  */,' >> $@ ; \
     657                ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
     658          esac; \
     659        done
     660        echo "#ifdef __cplusplus" >> $@
     661        echo "}" >> $@
     662        echo "#endif" >> $@
     663        echo "#endif" >> $@
     664
     665# We want install to imply install-info as per GNU standards, despite the
     666# cygnus option.
     667install: install-info
    602668
    603669# Tell versions [3.59,3.63) of GNU make to not export all variables.
  • branches/GNU/src/binutils/bfd/doc/aoutx.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    162162@strong{Synopsis}
    163163@example
    164 boolean aout_@var{size}_mkobject, (bfd *abfd);
     164bfd_boolean aout_@var{size}_mkobject, (bfd *abfd);
    165165@end example
    166166@strong{Description}@*
     
    188188@strong{Synopsis}
    189189@example
    190 boolean aout_@var{size}_set_arch_mach,
     190bfd_boolean aout_@var{size}_set_arch_mach,
    191191   (bfd *,
    192192    enum bfd_architecture arch,
     
    202202@strong{Synopsis}
    203203@example
    204 boolean aout_@var{size}_new_section_hook,
     204bfd_boolean aout_@var{size}_new_section_hook,
    205205   (bfd *abfd,
    206206    asection *newsect));
  • branches/GNU/src/binutils/bfd/doc/archive.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    7474@strong{Synopsis}
    7575@example
    76 boolean bfd_set_archive_head(bfd *output, bfd *new_head);
     76bfd_boolean bfd_set_archive_head(bfd *output, bfd *new_head);
    7777@end example
    7878@strong{Description}@*
  • branches/GNU/src/binutils/bfd/doc/archures.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    3636enum bfd_architecture
    3737@{
    38   bfd_arch_unknown,   /* File arch not known */
    39   bfd_arch_obscure,   /* Arch known, not one of these */
     38  bfd_arch_unknown,   /* File arch not known. */
     39  bfd_arch_obscure,   /* Arch known, not one of these. */
    4040  bfd_arch_m68k,      /* Motorola 68xxx */
    4141#define bfd_mach_m68000 1
     
    5959       The exception is the "ca", which is
    6060       incompatible with all other machines except
    61        "core". */
     61       "core".  */
    6262
    6363#define bfd_mach_i960_core      1
     
    7070#define bfd_mach_i960_hx        8
    7171
     72  bfd_arch_or32,      /* OpenRISC 32 */
     73
    7274  bfd_arch_a29k,      /* AMD 29000 */
    7375  bfd_arch_sparc,     /* SPARC */
     
    7779#define bfd_mach_sparc_sparclite       3
    7880#define bfd_mach_sparc_v8plus          4
    79 #define bfd_mach_sparc_v8plusa         5 /* with ultrasparc add'ns */
     81#define bfd_mach_sparc_v8plusa         5 /* with ultrasparc add'ns. */
    8082#define bfd_mach_sparc_sparclite_le    6
    8183#define bfd_mach_sparc_v9              7
    82 #define bfd_mach_sparc_v9a             8 /* with ultrasparc add'ns */
    83 #define bfd_mach_sparc_v8plusb         9 /* with cheetah add'ns */
    84 #define bfd_mach_sparc_v9b             10 /* with cheetah add'ns */
     84#define bfd_mach_sparc_v9a             8 /* with ultrasparc add'ns. */
     85#define bfd_mach_sparc_v8plusb         9 /* with cheetah add'ns. */
     86#define bfd_mach_sparc_v9b             10 /* with cheetah add'ns. */
    8587/* Nonzero if MACH has the v9 instruction set.  */
    8688#define bfd_mach_sparc_v9_p(mach) \
     
    9496#define bfd_mach_mips4100              4100
    9597#define bfd_mach_mips4111              4111
     98#define bfd_mach_mips4120              4120
    9699#define bfd_mach_mips4300              4300
    97100#define bfd_mach_mips4400              4400
     
    99102#define bfd_mach_mips4650              4650
    100103#define bfd_mach_mips5000              5000
     104#define bfd_mach_mips5400              5400
     105#define bfd_mach_mips5500              5500
    101106#define bfd_mach_mips6000              6000
    102107#define bfd_mach_mips8000              8000
     
    104109#define bfd_mach_mips12000             12000
    105110#define bfd_mach_mips16                16
    106 #define bfd_mach_mips32                32
    107 #define bfd_mach_mips32_4k             3204113 /* 32, 04, octal 'K' */
    108111#define bfd_mach_mips5                 5
    109 #define bfd_mach_mips64                64
    110112#define bfd_mach_mips_sb1              12310201 /* octal 'SB', 01 */
     113#define bfd_mach_mipsisa32             32
     114#define bfd_mach_mipsisa32r2           33
     115#define bfd_mach_mipsisa64             64
    111116  bfd_arch_i386,      /* Intel 386 */
    112 #define bfd_mach_i386_i386 0
    113 #define bfd_mach_i386_i8086 1
    114 #define bfd_mach_i386_i386_intel_syntax 2
    115 #define bfd_mach_x86_64 3
    116 #define bfd_mach_x86_64_intel_syntax 4
     117#define bfd_mach_i386_i386 1
     118#define bfd_mach_i386_i8086 2
     119#define bfd_mach_i386_i386_intel_syntax 3
     120#define bfd_mach_x86_64 64
     121#define bfd_mach_x86_64_intel_syntax 65
    117122  bfd_arch_we32k,     /* AT&T WE32xxx */
    118123  bfd_arch_tahoe,     /* CCI/Harris Tahoe */
     
    123128  bfd_arch_convex,    /* Convex */
    124129  bfd_arch_m88k,      /* Motorola 88xxx */
     130  bfd_arch_m98k,      /* Motorola 98xxx */
    125131  bfd_arch_pyramid,   /* Pyramid Technology */
    126   bfd_arch_h8300,     /* Hitachi H8/300 */
    127 #define bfd_mach_h8300   1
    128 #define bfd_mach_h8300h  2
    129 #define bfd_mach_h8300s  3
     132  bfd_arch_h8300,     /* Renesas H8/300 (formerly Hitachi H8/300) */
     133#define bfd_mach_h8300    1
     134#define bfd_mach_h8300h   2
     135#define bfd_mach_h8300s   3
     136#define bfd_mach_h8300hn  4
     137#define bfd_mach_h8300sn  5
     138  bfd_arch_pdp11,     /* DEC PDP-11 */
    130139  bfd_arch_powerpc,   /* PowerPC */
    131 #define bfd_mach_ppc           0
     140#define bfd_mach_ppc           32
     141#define bfd_mach_ppc64         64
    132142#define bfd_mach_ppc_403       403
    133143#define bfd_mach_ppc_403gc     4030
     
    146156#define bfd_mach_ppc_rs64iii   643
    147157#define bfd_mach_ppc_7400      7400
     158#define bfd_mach_ppc_e500      500
    148159  bfd_arch_rs6000,    /* IBM RS/6000 */
    149 #define bfd_mach_rs6k          0
     160#define bfd_mach_rs6k          6000
    150161#define bfd_mach_rs6k_rs1      6001
    151162#define bfd_mach_rs6k_rsc      6003
     
    153164  bfd_arch_hppa,      /* HP PA RISC */
    154165  bfd_arch_d10v,      /* Mitsubishi D10V */
    155 #define bfd_mach_d10v          0
     166#define bfd_mach_d10v          1
    156167#define bfd_mach_d10v_ts2      2
    157168#define bfd_mach_d10v_ts3      3
    158169  bfd_arch_d30v,      /* Mitsubishi D30V */
     170  bfd_arch_dlx,       /* DLX */
    159171  bfd_arch_m68hc11,   /* Motorola 68HC11 */
    160172  bfd_arch_m68hc12,   /* Motorola 68HC12 */
     173#define bfd_mach_m6812_default 0
     174#define bfd_mach_m6812         1
     175#define bfd_mach_m6812s        2
    161176  bfd_arch_z8k,       /* Zilog Z8000 */
    162177#define bfd_mach_z8001         1
    163178#define bfd_mach_z8002         2
    164   bfd_arch_h8500,     /* Hitachi H8/500 */
    165   bfd_arch_sh,        /* Hitachi SH */
    166 #define bfd_mach_sh            0
     179  bfd_arch_h8500,     /* Renesas H8/500 (formerly Hitachi H8/500) */
     180  bfd_arch_sh,        /* Renesas / SuperH SH (formerly Hitachi SH) */
     181#define bfd_mach_sh            1
    167182#define bfd_mach_sh2        0x20
    168183#define bfd_mach_sh_dsp     0x2d
     184#define bfd_mach_sh2e       0x2e
    169185#define bfd_mach_sh3        0x30
    170186#define bfd_mach_sh3_dsp    0x3d
    171187#define bfd_mach_sh3e       0x3e
    172188#define bfd_mach_sh4        0x40
     189#define bfd_mach_sh5        0x50
    173190  bfd_arch_alpha,     /* Dec Alpha */
    174191#define bfd_mach_alpha_ev4  0x10
    175192#define bfd_mach_alpha_ev5  0x20
    176193#define bfd_mach_alpha_ev6  0x30
    177   bfd_arch_arm,       /* Advanced Risc Machines ARM */
     194  bfd_arch_arm,       /* Advanced Risc Machines ARM.  */
     195#define bfd_mach_arm_unknown   0
    178196#define bfd_mach_arm_2         1
    179197#define bfd_mach_arm_2a        2
     
    186204#define bfd_mach_arm_5TE       9
    187205#define bfd_mach_arm_XScale    10
     206#define bfd_mach_arm_ep9312    11
     207#define bfd_mach_arm_iWMMXt    12
    188208  bfd_arch_ns32k,     /* National Semiconductors ns32000 */
    189209  bfd_arch_w65,       /* WDC 65816 */
    190210  bfd_arch_tic30,     /* Texas Instruments TMS320C30 */
     211  bfd_arch_tic4x,     /* Texas Instruments TMS320C3X/4X */
     212#define bfd_mach_tic3x         30
     213#define bfd_mach_tic4x         40
    191214  bfd_arch_tic54x,    /* Texas Instruments TMS320C54X */
    192215  bfd_arch_tic80,     /* TI TMS320c80 (MVP) */
    193216  bfd_arch_v850,      /* NEC V850 */
    194 #define bfd_mach_v850          0
     217#define bfd_mach_v850          1
    195218#define bfd_mach_v850e         'E'
    196 #define bfd_mach_v850ea        'A'
    197219  bfd_arch_arc,       /* ARC Cores */
    198 #define bfd_mach_arc_5         0
    199 #define bfd_mach_arc_6         1
    200 #define bfd_mach_arc_7         2
    201 #define bfd_mach_arc_8         3
    202   bfd_arch_m32r,      /* Mitsubishi M32R/D */
    203 #define bfd_mach_m32r          0 /* backwards compatibility */
     220#define bfd_mach_arc_5         5
     221#define bfd_mach_arc_6         6
     222#define bfd_mach_arc_7         7
     223#define bfd_mach_arc_8         8
     224  bfd_arch_m32r,      /* Renesas M32R (formerly Mitsubishi M32R/D) */
     225#define bfd_mach_m32r          1 /* For backwards compatibility. */
    204226#define bfd_mach_m32rx         'x'
    205227  bfd_arch_mn10200,   /* Matsushita MN10200 */
     
    209231  bfd_arch_fr30,
    210232#define bfd_mach_fr30          0x46523330
     233  bfd_arch_frv,
     234#define bfd_mach_frv           1
     235#define bfd_mach_frvsimple     2
     236#define bfd_mach_fr300         300
     237#define bfd_mach_fr400         400
     238#define bfd_mach_frvtomcat     499     /* fr500 prototype */
     239#define bfd_mach_fr500         500
    211240  bfd_arch_mcore,
    212241  bfd_arch_ia64,      /* HP/Intel ia64 */
    213 #define bfd_mach_ia64_elf64    0
    214 #define bfd_mach_ia64_elf32    1
     242#define bfd_mach_ia64_elf64    64
     243#define bfd_mach_ia64_elf32    32
     244  bfd_arch_ip2k,      /* Ubicom IP2K microcontrollers. */
     245#define bfd_mach_ip2022        1
     246#define bfd_mach_ip2022ext     2
     247 bfd_arch_iq2000,     /* Vitesse IQ2000.  */
     248#define bfd_mach_iq2000        1
     249#define bfd_mach_iq10          2
    215250  bfd_arch_pj,
    216   bfd_arch_avr,       /* Atmel AVR microcontrollers */
     251  bfd_arch_avr,       /* Atmel AVR microcontrollers. */
    217252#define bfd_mach_avr1          1
    218253#define bfd_mach_avr2          2
     
    221256#define bfd_mach_avr5          5
    222257  bfd_arch_cris,      /* Axis CRIS */
     258  bfd_arch_s390,      /* IBM s390 */
     259#define bfd_mach_s390_31       31
     260#define bfd_mach_s390_64       64
     261  bfd_arch_openrisc,  /* OpenRISC */
     262  bfd_arch_mmix,      /* Donald Knuth's educational processor.  */
     263  bfd_arch_xstormy16,
     264#define bfd_mach_xstormy16     1
     265  bfd_arch_msp430,    /* Texas Instruments MSP430 architecture.  */
     266#define bfd_mach_msp110         110
     267#define bfd_mach_msp11          11
     268#define bfd_mach_msp12          12
     269#define bfd_mach_msp13          13
     270#define bfd_mach_msp14          14
     271#define bfd_mach_msp41          41
     272#define bfd_mach_msp31          31
     273#define bfd_mach_msp32          32
     274#define bfd_mach_msp33          33
     275#define bfd_mach_msp43          43
     276#define bfd_mach_msp44          44
     277#define bfd_mach_msp15          15
     278#define bfd_mach_msp16          16 
     279  bfd_arch_xtensa,    /* Tensilica's Xtensa cores.  */
     280#define bfd_mach_xtensa        1
    223281  bfd_arch_last
    224282  @};
     
    243301  const char *printable_name;
    244302  unsigned int section_align_power;
    245   /* True if this is the default machine for the architecture.  */
    246   boolean the_default;
     303  /* TRUE if this is the default machine for the architecture.
     304     The default arch should be the first entry for an arch so that
     305     all the entries for that arch can be accessed via @code{next}.  */
     306  bfd_boolean the_default;
    247307  const struct bfd_arch_info * (*compatible)
    248308       PARAMS ((const struct bfd_arch_info *a,
    249309                const struct bfd_arch_info *b));
    250310
    251   boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
     311  bfd_boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
    252312
    253313  const struct bfd_arch_info *next;
    254 @} bfd_arch_info_type;
     314@}
     315bfd_arch_info_type;
     316
    255317@end example
    256318
     
    292354const bfd_arch_info_type *bfd_arch_get_compatible(
    293355    const bfd *abfd,
    294     const bfd *bbfd);
    295 @end example
    296 @strong{Description}@*
    297 Determine whether two BFDs'
    298 architectures and machine types are compatible.  Calculates
    299 the lowest common denominator between the two architectures
    300 and machine types implied by the BFDs and returns a pointer to
    301 an @code{arch_info} structure describing the compatible machine.
     356    const bfd *bbfd,
     357    bfd_boolean accept_unknowns);
     358@end example
     359@strong{Description}@*
     360Determine whether two BFDs' architectures and machine types
     361are compatible.  Calculates the lowest common denominator
     362between the two architectures and machine types implied by
     363the BFDs and returns a pointer to an @code{arch_info} structure
     364describing the compatible machine.
    302365
    303366@findex bfd_default_arch_struct
     
    326389@strong{Synopsis}
    327390@example
    328 boolean bfd_default_set_arch_mach(bfd *abfd,
     391bfd_boolean bfd_default_set_arch_mach(bfd *abfd,
    329392    enum bfd_architecture arch,
    330393    unsigned long mach);
     
    391454@strong{Synopsis}
    392455@example
    393 boolean bfd_default_scan(const struct bfd_arch_info *info, const char *string);
     456bfd_boolean bfd_default_scan(const struct bfd_arch_info *info, const char *string);
    394457@end example
    395458@strong{Description}@*
  • branches/GNU/src/binutils/bfd/doc/bfd.info

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 This is bfd.info, produced by makeinfo version 4.0 from bfd.texinfo.
     1This is bfd.info, produced by makeinfo version 4.3 from bfd.texinfo.
    22
    33START-INFO-DIR-ENTRY
     
    77   This file documents the BFD library.
    88
    9    Copyright (C) 1991, 2000 Free Software Foundation, Inc.
     9   Copyright (C) 1991, 2000, 2001, 2003 Free Software Foundation, Inc.
    1010
    1111   Permission is granted to copy, distribute and/or modify this document
     
    1818
    1919Indirect:
    20 bfd.info-1: 680
    21 bfd.info-2: 38513
    22 bfd.info-3: 83193
    23 bfd.info-4: 131325
    24 bfd.info-5: 180785
    25 bfd.info-6: 215030
    26 bfd.info-7: 261441
     20bfd.info-1: 692
     21bfd.info-2: 41803
     22bfd.info-3: 90229
     23bfd.info-4: 106012
     24bfd.info-5: 155933
     25bfd.info-6: 200434
     26bfd.info-7: 244988
     27bfd.info-8: 284745
     28bfd.info-9: 304445
    2729
    2830Tag Table:
    2931(Indirect)
    30 Node: Top680
    31 Node: Overview1012
    32 Node: History2062
    33 Node: How It Works3003
    34 Node: What BFD Version 2 Can Do4541
    35 Node: BFD information loss5855
    36 Node: Canonical format8378
    37 Node: BFD front end12739
    38 Node: Memory Usage32611
    39 Node: Initialization33834
    40 Node: Sections34211
    41 Node: Section Input34689
    42 Node: Section Output36045
    43 Node: typedef asection38513
    44 Node: section prototypes54385
    45 Node: Symbols61070
    46 Node: Reading Symbols62660
    47 Node: Writing Symbols63834
    48 Node: Mini Symbols65524
    49 Node: typedef asymbol66489
    50 Node: symbol handling functions71718
    51 Node: Archives76045
    52 Node: Formats79663
    53 Node: Relocations82473
    54 Node: typedef arelent83193
    55 Node: howto manager99352
    56 Node: Core Files130304
    57 Node: Targets131325
    58 Node: bfd_target133288
    59 Node: Architectures152202
    60 Node: Opening and Closing167609
    61 Node: Internal172006
    62 Node: File Caching178006
    63 Node: Linker Functions180785
    64 Node: Creating a Linker Hash Table182451
    65 Node: Adding Symbols to the Hash Table184179
    66 Node: Differing file formats185069
    67 Node: Adding symbols from an object file186802
    68 Node: Adding symbols from an archive188938
    69 Node: Performing the Final Link191337
    70 Node: Information provided by the linker192568
    71 Node: Relocating the section contents193704
    72 Node: Writing the symbol table195441
    73 Node: Hash Tables198035
    74 Node: Creating and Freeing a Hash Table199226
    75 Node: Looking Up or Entering a String200383
    76 Node: Traversing a Hash Table201625
    77 Node: Deriving a New Hash Table Type202403
    78 Node: Define the Derived Structures203458
    79 Node: Write the Derived Creation Routine204524
    80 Node: Write Other Derived Routines207223
    81 Node: BFD back ends208523
    82 Node: What to Put Where208767
    83 Node: aout208905
    84 Node: coff215030
    85 Node: elf242186
    86 Node: GNU Free Documentation License243019
    87 Node: Index261441
     32Node: Top692
     33Node: Overview1024
     34Node: History2074
     35Node: How It Works3015
     36Node: What BFD Version 2 Can Do4555
     37Node: BFD information loss5865
     38Node: Canonical format8388
     39Node: BFD front end12749
     40Node: Memory Usage35901
     41Node: Initialization37124
     42Node: Sections37501
     43Node: Section Input37979
     44Node: Section Output39335
     45Node: typedef asection41803
     46Node: section prototypes60730
     47Node: Symbols67894
     48Node: Reading Symbols69484
     49Node: Writing Symbols70625
     50Node: Mini Symbols72354
     51Node: typedef asymbol73319
     52Node: symbol handling functions78360
     53Node: Archives83052
     54Node: Formats86674
     55Node: Relocations89509
     56Node: typedef arelent90229
     57Node: howto manager106012
     58Node: Core Files152945
     59Node: Targets153970
     60Node: bfd_target155933
     61Node: Architectures175846
     62Node: Opening and Closing193984
     63Node: Internal200434
     64Node: File Caching207918
     65Node: Linker Functions210705
     66Node: Creating a Linker Hash Table212371
     67Node: Adding Symbols to the Hash Table214099
     68Node: Differing file formats214989
     69Node: Adding symbols from an object file216722
     70Node: Adding symbols from an archive218858
     71Node: Performing the Final Link221257
     72Node: Information provided by the linker222488
     73Node: Relocating the section contents223624
     74Node: Writing the symbol table225361
     75Node: Hash Tables227959
     76Node: Creating and Freeing a Hash Table229150
     77Node: Looking Up or Entering a String230307
     78Node: Traversing a Hash Table231549
     79Node: Deriving a New Hash Table Type232327
     80Node: Define the Derived Structures233382
     81Node: Write the Derived Creation Routine234448
     82Node: Write Other Derived Routines237147
     83Node: BFD back ends238447
     84Node: What to Put Where238713
     85Node: aout238851
     86Node: coff244988
     87Node: elf269909
     88Node: mmo270746
     89Node: File layout271669
     90Node: Symbol-table277307
     91Node: mmo section mapping281102
     92Node: GNU Free Documentation License284745
     93Node: Index304445
    8894
    8995End Tag Table
  • branches/GNU/src/binutils/bfd/doc/bfd.info-1

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 This is bfd.info, produced by makeinfo version 4.0 from bfd.texinfo.
     1This is bfd.info, produced by makeinfo version 4.3 from bfd.texinfo.
    22
    33START-INFO-DIR-ENTRY
     
    77   This file documents the BFD library.
    88
    9    Copyright (C) 1991, 2000 Free Software Foundation, Inc.
     9   Copyright (C) 1991, 2000, 2001, 2003 Free Software Foundation, Inc.
    1010
    1111   Permission is granted to copy, distribute and/or modify this document
     
    107107     #include "bfd.h"
    108108     
    109      unsigned int number_of_sections(abfd)
     109     unsigned int number_of_sections (abfd)
    110110     bfd *abfd;
    111111     {
    112        return bfd_count_sections(abfd);
     112       return bfd_count_sections (abfd);
    113113     }
    114114
     
    139139access elements of the object file's data structures.
    140140
    141    As different information from the the object files is required, BFD
     141   As different information from the object files is required, BFD
    142142reads from different sections of the file and processes them.  For
    143143example, a very common operation for the linker is processing symbol
     
    288288File: bfd.info,  Node: BFD front end,  Next: BFD back ends,  Prev: Overview,  Up: Top
    289289
    290 BFD front end
     290BFD Front End
    291291*************
    292292
     
    302302
    303303
    304      struct _bfd
     304     struct bfd
    305305     {
    306          /* The filename the application opened the BFD with.  */
    307          CONST char *filename;
    308      
    309          /* A pointer to the target jump table.             */
    310          const struct bfd_target *xvec;
    311      
    312          /* To avoid dragging too many header files into every file that
    313             includes ``bfd.h'', IOSTREAM has been declared as a "char
    314             *", and MTIME as a "long".  Their correct types, to which they
    315             are cast when used, are "FILE *" and "time_t".    The iostream
    316             is the result of an fopen on the filename.  However, if the
    317             BFD_IN_MEMORY flag is set, then iostream is actually a pointer
    318             to a bfd_in_memory struct.  */
    319          PTR iostream;
    320      
    321          /* Is the file descriptor being cached?  That is, can it be closed as
    322             needed, and re-opened when accessed later?  */
    323      
    324          boolean cacheable;
    325      
    326          /* Marks whether there was a default target specified when the
    327             BFD was opened. This is used to select which matching algorithm
    328             to use to choose the back end. */
    329      
    330          boolean target_defaulted;
    331      
    332          /* The caching routines use these to maintain a
    333             least-recently-used list of BFDs */
    334      
    335          struct _bfd *lru_prev, *lru_next;
    336      
    337          /* When a file is closed by the caching routines, BFD retains
    338             state information on the file here: */
    339      
    340          file_ptr where;
    341      
    342          /* and here: (``once'' means at least once) */
    343      
    344          boolean opened_once;
    345      
    346          /* Set if we have a locally maintained mtime value, rather than
    347             getting it from the file each time: */
    348      
    349          boolean mtime_set;
    350      
    351          /* File modified time, if mtime_set is true: */
    352      
    353          long mtime;
    354      
    355          /* Reserved for an unimplemented file locking extension.*/
    356      
    357          int ifd;
    358      
    359          /* The format which belongs to the BFD. (object, core, etc.) */
    360      
    361          bfd_format format;
    362      
    363          /* The direction the BFD was opened with*/
    364      
    365          enum bfd_direction {no_direction = 0,
    366                              read_direction = 1,
    367                              write_direction = 2,
    368                              both_direction = 3} direction;
    369      
    370          /* Format_specific flags*/
    371      
    372          flagword flags;
    373      
    374          /* Currently my_archive is tested before adding origin to
    375             anything. I believe that this can become always an add of
    376             origin, with origin set to 0 for non archive files.   */
    377      
    378          file_ptr origin;
    379      
    380          /* Remember when output has begun, to stop strange things
    381             from happening. */
    382          boolean output_has_begun;
    383      
    384          /* Pointer to linked list of sections*/
    385          struct sec  *sections;
    386      
    387          /* The number of sections */
    388          unsigned int section_count;
    389      
    390          /* Stuff only useful for object files:
    391             The start address. */
    392          bfd_vma start_address;
    393      
    394          /* Used for input and output*/
    395          unsigned int symcount;
    396      
    397          /* Symbol table for output BFD (with symcount entries) */
    398          struct symbol_cache_entry  **outsymbols;
    399      
    400          /* Pointer to structure which contains architecture information*/
    401          const struct bfd_arch_info *arch_info;
    402      
    403          /* Stuff only useful for archives:*/
    404          PTR arelt_data;
    405          struct _bfd *my_archive;     /* The containing archive BFD.  */
    406          struct _bfd *next;           /* The next BFD in the archive.  */
    407          struct _bfd *archive_head;   /* The first BFD in the archive.  */
    408          boolean has_armap;
    409      
    410          /* A chain of BFD structures involved in a link.  */
    411          struct _bfd *link_next;
    412      
    413          /* A field used by _bfd_generic_link_add_archive_symbols.  This will
    414             be used only for archive elements.  */
    415          int archive_pass;
    416      
    417          /* Used by the back end to hold private data. */
    418      
    419          union
    420            {
     306       /* A unique identifier of the BFD  */
     307       unsigned int id;
     308     
     309       /* The filename the application opened the BFD with.  */
     310       const char *filename;
     311     
     312       /* A pointer to the target jump table.  */
     313       const struct bfd_target *xvec;
     314     
     315       /* To avoid dragging too many header files into every file that
     316          includes ``bfd.h'', IOSTREAM has been declared as a "char *",
     317          and MTIME as a "long".  Their correct types, to which they
     318          are cast when used, are "FILE *" and "time_t".    The iostream
     319          is the result of an fopen on the filename.  However, if the
     320          BFD_IN_MEMORY flag is set, then iostream is actually a pointer
     321          to a bfd_in_memory struct.  */
     322       PTR iostream;
     323     
     324       /* Is the file descriptor being cached?  That is, can it be closed as
     325          needed, and re-opened when accessed later?  */
     326       bfd_boolean cacheable;
     327     
     328       /* Marks whether there was a default target specified when the
     329          BFD was opened. This is used to select which matching algorithm
     330          to use to choose the back end.  */
     331       bfd_boolean target_defaulted;
     332     
     333       /* The caching routines use these to maintain a
     334          least-recently-used list of BFDs.  */
     335       struct bfd *lru_prev, *lru_next;
     336     
     337       /* When a file is closed by the caching routines, BFD retains
     338          state information on the file here...  */
     339       ufile_ptr where;
     340     
     341       /* ... and here: (``once'' means at least once).  */
     342       bfd_boolean opened_once;
     343     
     344       /* Set if we have a locally maintained mtime value, rather than
     345          getting it from the file each time.  */
     346       bfd_boolean mtime_set;
     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
     359         {
     360           no_direction = 0,
     361           read_direction = 1,
     362           write_direction = 2,
     363           both_direction = 3
     364         }
     365       direction;
     366     
     367       /* Format_specific flags.  */
     368       flagword flags;
     369     
     370       /* Currently my_archive is tested before adding origin to
     371          anything. I believe that this can become always an add of
     372          origin, with origin set to 0 for non archive files.  */
     373       ufile_ptr origin;
     374     
     375       /* Remember when output has begun, to stop strange things
     376          from happening.  */
     377       bfd_boolean output_has_begun;
     378     
     379       /* A hash table for section names.  */
     380       struct bfd_hash_table section_htab;
     381     
     382       /* Pointer to linked list of sections.  */
     383       struct sec *sections;
     384     
     385       /* The place where we add to the section list.  */
     386       struct sec **section_tail;
     387     
     388       /* The number of sections.  */
     389       unsigned int section_count;
     390     
     391       /* Stuff only useful for object files:
     392          The start address.  */
     393       bfd_vma start_address;
     394     
     395       /* Used for input and output.  */
     396       unsigned int symcount;
     397     
     398       /* Symbol table for output BFD (with symcount entries).  */
     399       struct symbol_cache_entry  **outsymbols;
     400     
     401       /* Used for slurped dynamic symbol tables.  */
     402       unsigned int dynsymcount;
     403     
     404       /* Pointer to structure which contains architecture information.  */
     405       const struct bfd_arch_info *arch_info;
     406     
     407       /* Stuff only useful for archives.  */
     408       PTR arelt_data;
     409       struct bfd *my_archive;      /* The containing archive BFD.  */
     410       struct bfd *next;            /* The next BFD in the archive.  */
     411       struct bfd *archive_head;    /* The first BFD in the archive.  */
     412       bfd_boolean has_armap;
     413     
     414       /* A chain of BFD structures involved in a link.  */
     415       struct bfd *link_next;
     416     
     417       /* A field used by _bfd_generic_link_add_archive_symbols.  This will
     418          be used only for archive elements.  */
     419       int archive_pass;
     420     
     421       /* Used by the back end to hold private data.  */
     422       union
     423         {
    421424           struct aout_data_struct *aout_data;
    422425           struct artdata *aout_ar_data;
     
    435438           struct nlm_obj_tdata *nlm_obj_data;
    436439           struct bout_data_struct *bout_data;
     440           struct mmo_data_struct *mmo_data;
    437441           struct sun_core_struct *sun_core_data;
    438442           struct sco5_core_struct *sco5_core_data;
     
    447451           struct versados_data_struct *versados_data;
    448452           struct netbsd_core_struct *netbsd_core_data;
     453           struct mach_o_data_struct *mach_o_data;
     454           struct mach_o_fat_data_struct *mach_o_fat_data;
     455           struct bfd_pef_data_struct *pef_data;
     456           struct bfd_pef_xlib_data_struct *pef_xlib_data;
     457           struct bfd_sym_data_struct *sym_data;
    449458           PTR any;
    450            } tdata;
    451      
    452          /* Used by the application to hold private data*/
    453          PTR usrdata;
     459         }
     460       tdata;
     461     
     462       /* Used by the application to hold private data.  */
     463       PTR usrdata;
    454464     
    455465       /* Where all the allocated stuff under this BFD goes.  This is a
    456466          struct objalloc *, but we use PTR to avoid requiring the inclusion of
    457467          objalloc.h.  */
    458          PTR memory;
     468       PTR memory;
    459469     };
    460470
     
    484494       bfd_error_invalid_target,
    485495       bfd_error_wrong_format,
     496       bfd_error_wrong_object_format,
    486497       bfd_error_invalid_operation,
    487498       bfd_error_no_memory,
     
    499510       bfd_error_file_too_big,
    500511       bfd_error_invalid_error_code
    501      } bfd_error_type;
     512     }
     513     bfd_error_type;
    502514
    503515`bfd_get_error'
     
    521533
    522534   *Synopsis*
    523      CONST char *bfd_errmsg (bfd_error_type error_tag);
     535     const char *bfd_errmsg (bfd_error_type error_tag);
    524536   *Description*
    525537Return a string describing the error ERROR_TAG, or the system error if
     
    530542
    531543   *Synopsis*
    532      void bfd_perror (CONST char *message);
     544     void bfd_perror (const char *message);
    533545   *Description*
    534546Print to the standard error stream a string describing the last BFD
     
    576588Return the BFD error handler function.
    577589
     590`bfd_archive_filename'
     591......................
     592
     593   *Synopsis*
     594     const char *bfd_archive_filename (bfd *);
     595   *Description*
     596For a BFD that is a component of an archive, returns a string with both
     597the archive name and file name.  For other BFDs, just returns the file
     598name.
     599
    578600Symbols
    579601=======
     
    583605
    584606   *Synopsis*
    585      long bfd_get_reloc_upper_bound(bfd *abfd, asection *sect);
     607     long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
    586608   *Description*
    587609Return the number of bytes required to store the relocation information
     
    612634   *Synopsis*
    613635     void bfd_set_reloc
    614         (bfd *abfd, asection *sec, arelent **rel, unsigned int count)
     636        (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
    615637   *Description*
    616638Set the relocation pointer and count within section SEC to the values
     
    621643
    622644   *Synopsis*
    623      boolean bfd_set_file_flags(bfd *abfd, flagword flags);
     645     bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
    624646   *Description*
    625647Set the flag word in the BFD ABFD to the value FLAGS.
     
    670692
    671693   *Synopsis*
    672      boolean bfd_set_start_address(bfd *abfd, bfd_vma vma);
     694     bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
    673695   *Description*
    674696Make VMA the entry point of output BFD ABFD.
    675697
    676698   *Returns*
    677 Returns `true' on success, `false' otherwise.
     699Returns `TRUE' on success, `FALSE' otherwise.
     700
     701`bfd_get_gp_size'
     702.................
     703
     704   *Synopsis*
     705     unsigned int bfd_get_gp_size (bfd *abfd);
     706   *Description*
     707Return the maximum size of objects to be optimized using the GP
     708register under MIPS ECOFF.  This is typically set by the `-G' argument
     709to the compiler, assembler or linker.
     710
     711`bfd_set_gp_size'
     712.................
     713
     714   *Synopsis*
     715     void bfd_set_gp_size (bfd *abfd, unsigned int i);
     716   *Description*
     717Set the maximum size of objects to be optimized using the GP register
     718under ECOFF or MIPS ELF.  This is typically set by the `-G' argument to
     719the compiler, assembler or linker.
     720
     721`bfd_scan_vma'
     722..............
     723
     724   *Synopsis*
     725     bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
     726   *Description*
     727Convert, like `strtoul', a numerical expression STRING into a `bfd_vma'
     728integer, and return that integer.  (Though without as many bells and
     729whistles as `strtoul'.)  The expression is assumed to be unsigned
     730(i.e., positive).  If given a BASE, it is used as the base for
     731conversion.  A base of 0 causes the function to interpret the string in
     732hex if a leading "0x" or "0X" is found, otherwise in octal if a leading
     733zero is found, otherwise in decimal.
     734
     735   If the value would overflow, the maximum `bfd_vma' value is returned.
     736
     737`bfd_copy_private_bfd_data'
     738...........................
     739
     740   *Synopsis*
     741     bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
     742   *Description*
     743Copy private BFD information from the BFD IBFD to the the BFD OBFD.
     744Return `TRUE' on success, `FALSE' on error.  Possible error returns are:
     745
     746   * `bfd_error_no_memory' - Not enough memory exists to create private
     747     data for OBFD.
     748
     749     #define bfd_copy_private_bfd_data(ibfd, obfd) \
     750          BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
     751                    (ibfd, obfd))
     752
     753`bfd_merge_private_bfd_data'
     754............................
     755
     756   *Synopsis*
     757     bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
     758   *Description*
     759Merge private BFD information from the BFD IBFD to the the output file
     760BFD OBFD when linking.  Return `TRUE' on success, `FALSE' on error.
     761Possible error returns are:
     762
     763   * `bfd_error_no_memory' - Not enough memory exists to create private
     764     data for OBFD.
     765
     766     #define bfd_merge_private_bfd_data(ibfd, obfd) \
     767          BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
     768                    (ibfd, obfd))
     769
     770`bfd_set_private_flags'
     771.......................
     772
     773   *Synopsis*
     774     bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
     775   *Description*
     776Set private BFD flag information in the BFD ABFD.  Return `TRUE' on
     777success, `FALSE' on error.  Possible error returns are:
     778
     779   * `bfd_error_no_memory' - Not enough memory exists to create private
     780     data for OBFD.
     781
     782     #define bfd_set_private_flags(abfd, flags) \
     783          BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
     784
     785`Other functions'
     786.................
     787
     788   *Description*
     789The following functions exist but have not yet been documented.
     790     #define bfd_sizeof_headers(abfd, reloc) \
     791            BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
     792     
     793     #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
     794            BFD_SEND (abfd, _bfd_find_nearest_line, \
     795                      (abfd, sec, syms, off, file, func, line))
     796     
     797     #define bfd_debug_info_start(abfd) \
     798            BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
     799     
     800     #define bfd_debug_info_end(abfd) \
     801            BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
     802     
     803     #define bfd_debug_info_accumulate(abfd, section) \
     804            BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
     805     
     806     #define bfd_stat_arch_elt(abfd, stat) \
     807            BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
     808     
     809     #define bfd_update_armap_timestamp(abfd) \
     810            BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
     811     
     812     #define bfd_set_arch_mach(abfd, arch, mach)\
     813            BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
     814     
     815     #define bfd_relax_section(abfd, section, link_info, again) \
     816            BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
     817     
     818     #define bfd_gc_sections(abfd, link_info) \
     819            BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
     820     
     821     #define bfd_merge_sections(abfd, link_info) \
     822            BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
     823     
     824     #define bfd_discard_group(abfd, sec) \
     825            BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
     826     
     827     #define bfd_link_hash_table_create(abfd) \
     828            BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
     829     
     830     #define bfd_link_hash_table_free(abfd, hash) \
     831            BFD_SEND (abfd, _bfd_link_hash_table_free, (hash))
     832     
     833     #define bfd_link_add_symbols(abfd, info) \
     834            BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
     835     
     836     #define bfd_link_just_syms(sec, info) \
     837            BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
     838     
     839     #define bfd_final_link(abfd, info) \
     840            BFD_SEND (abfd, _bfd_final_link, (abfd, info))
     841     
     842     #define bfd_free_cached_info(abfd) \
     843            BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
     844     
     845     #define bfd_get_dynamic_symtab_upper_bound(abfd) \
     846            BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
     847     
     848     #define bfd_print_private_bfd_data(abfd, file)\
     849            BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
     850     
     851     #define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
     852            BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
     853     
     854     #define bfd_get_dynamic_reloc_upper_bound(abfd) \
     855            BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
     856     
     857     #define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
     858            BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
     859     
     860     extern bfd_byte *bfd_get_relocated_section_contents
     861            PARAMS ((bfd *, struct bfd_link_info *,
     862                      struct bfd_link_order *, bfd_byte *,
     863                      bfd_boolean, asymbol **));
     864
     865`bfd_alt_mach_code'
     866...................
     867
     868   *Synopsis*
     869     bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
     870   *Description*
     871When more than one machine code number is available for the same
     872machine type, this function can be used to switch between the preferred
     873one (alternative == 0) and any others.  Currently, only ELF supports
     874this feature, with up to two alternate machine codes.
     875
     876     struct bfd_preserve
     877     {
     878       PTR marker;
     879       PTR tdata;
     880       flagword flags;
     881       const struct bfd_arch_info *arch_info;
     882       struct sec *sections;
     883       struct sec **section_tail;
     884       unsigned int section_count;
     885       struct bfd_hash_table section_htab;
     886     };
     887
     888`bfd_preserve_save'
     889...................
     890
     891   *Synopsis*
     892     bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
     893   *Description*
     894When testing an object for compatibility with a particular target
     895back-end, the back-end object_p function needs to set up certain fields
     896in the bfd on successfully recognizing the object.  This typically
     897happens in a piecemeal fashion, with failures possible at many points.
     898On failure, the bfd is supposed to be restored to its initial state,
     899which is virtually impossible.  However, restoring a subset of the bfd
     900state works in practice.  This function stores the subset and
     901reinitializes the bfd.
     902
     903`bfd_preserve_restore'
     904......................
     905
     906   *Synopsis*
     907     void bfd_preserve_restore (bfd *, struct bfd_preserve *);
     908   *Description*
     909This function restores bfd state saved by bfd_preserve_save.  If MARKER
     910is non-NULL in struct bfd_preserve then that block and all subsequently
     911bfd_alloc'd memory is freed.
     912
     913`bfd_preserve_finish'
     914.....................
     915
     916   *Synopsis*
     917     void bfd_preserve_finish (bfd *, struct bfd_preserve *);
     918   *Description*
     919This function should be called when the bfd state saved by
     920bfd_preserve_save is no longer needed.  ie. when the back-end object_p
     921function returns with success.
    678922
    679923`bfd_get_mtime'
     
    714958to read.  This function at least allows us to answer the quesion, "is
    715959the size reasonable?".
    716 
    717 `bfd_get_gp_size'
    718 .................
    719 
    720    *Synopsis*
    721      int bfd_get_gp_size(bfd *abfd);
    722    *Description*
    723 Return the maximum size of objects to be optimized using the GP
    724 register under MIPS ECOFF.  This is typically set by the `-G' argument
    725 to the compiler, assembler or linker.
    726 
    727 `bfd_set_gp_size'
    728 .................
    729 
    730    *Synopsis*
    731      void bfd_set_gp_size(bfd *abfd, int i);
    732    *Description*
    733 Set the maximum size of objects to be optimized using the GP register
    734 under ECOFF or MIPS ELF.  This is typically set by the `-G' argument to
    735 the compiler, assembler or linker.
    736 
    737 `bfd_scan_vma'
    738 ..............
    739 
    740    *Synopsis*
    741      bfd_vma bfd_scan_vma(CONST char *string, CONST char **end, int base);
    742    *Description*
    743 Convert, like `strtoul', a numerical expression STRING into a `bfd_vma'
    744 integer, and return that integer.  (Though without as many bells and
    745 whistles as `strtoul'.)  The expression is assumed to be unsigned
    746 (i.e., positive).  If given a BASE, it is used as the base for
    747 conversion.  A base of 0 causes the function to interpret the string in
    748 hex if a leading "0x" or "0X" is found, otherwise in octal if a leading
    749 zero is found, otherwise in decimal.
    750 
    751    Overflow is not detected.
    752 
    753 `bfd_copy_private_bfd_data'
    754 ...........................
    755 
    756    *Synopsis*
    757      boolean bfd_copy_private_bfd_data(bfd *ibfd, bfd *obfd);
    758    *Description*
    759 Copy private BFD information from the BFD IBFD to the the BFD OBFD.
    760 Return `true' on success, `false' on error.  Possible error returns are:
    761 
    762    * `bfd_error_no_memory' - Not enough memory exists to create private
    763      data for OBFD.
    764 
    765      #define bfd_copy_private_bfd_data(ibfd, obfd) \
    766           BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
    767                     (ibfd, obfd))
    768 
    769 `bfd_merge_private_bfd_data'
    770 ............................
    771 
    772    *Synopsis*
    773      boolean bfd_merge_private_bfd_data(bfd *ibfd, bfd *obfd);
    774    *Description*
    775 Merge private BFD information from the BFD IBFD to the the output file
    776 BFD OBFD when linking.  Return `true' on success, `false' on error.
    777 Possible error returns are:
    778 
    779    * `bfd_error_no_memory' - Not enough memory exists to create private
    780      data for OBFD.
    781 
    782      #define bfd_merge_private_bfd_data(ibfd, obfd) \
    783           BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
    784                     (ibfd, obfd))
    785 
    786 `bfd_set_private_flags'
    787 .......................
    788 
    789    *Synopsis*
    790      boolean bfd_set_private_flags(bfd *abfd, flagword flags);
    791    *Description*
    792 Set private BFD flag information in the BFD ABFD.  Return `true' on
    793 success, `false' on error.  Possible error returns are:
    794 
    795    * `bfd_error_no_memory' - Not enough memory exists to create private
    796      data for OBFD.
    797 
    798      #define bfd_set_private_flags(abfd, flags) \
    799           BFD_SEND (abfd, _bfd_set_private_flags, \
    800                     (abfd, flags))
    801 
    802 `stuff'
    803 .......
    804 
    805    *Description*
    806 Stuff which should be documented:
    807      #define bfd_sizeof_headers(abfd, reloc) \
    808           BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
    809      
    810      #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
    811           BFD_SEND (abfd, _bfd_find_nearest_line,  (abfd, sec, syms, off, file, func, line))
    812      
    813             /* Do these three do anything useful at all, for any back end?  */
    814      #define bfd_debug_info_start(abfd) \
    815              BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
    816      
    817      #define bfd_debug_info_end(abfd) \
    818              BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
    819      
    820      #define bfd_debug_info_accumulate(abfd, section) \
    821              BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
    822      
    823      
    824      #define bfd_stat_arch_elt(abfd, stat) \
    825              BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
    826      
    827      #define bfd_update_armap_timestamp(abfd) \
    828              BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
    829      
    830      #define bfd_set_arch_mach(abfd, arch, mach)\
    831              BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
    832      
    833      #define bfd_relax_section(abfd, section, link_info, again) \
    834             BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
    835      
    836      #define bfd_gc_sections(abfd, link_info) \
    837             BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
    838      
    839      #define bfd_link_hash_table_create(abfd) \
    840             BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
    841      
    842      #define bfd_link_add_symbols(abfd, info) \
    843             BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
    844      
    845      #define bfd_final_link(abfd, info) \
    846             BFD_SEND (abfd, _bfd_final_link, (abfd, info))
    847      
    848      #define bfd_free_cached_info(abfd) \
    849             BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
    850      
    851      #define bfd_get_dynamic_symtab_upper_bound(abfd) \
    852             BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
    853      
    854      #define bfd_print_private_bfd_data(abfd, file)\
    855             BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
    856      
    857      #define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
    858             BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
    859      
    860      #define bfd_get_dynamic_reloc_upper_bound(abfd) \
    861             BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
    862      
    863      #define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
    864             BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
    865      
    866      extern bfd_byte *bfd_get_relocated_section_contents
    867             PARAMS ((bfd *, struct bfd_link_info *,
    868                       struct bfd_link_order *, bfd_byte *,
    869                       boolean, asymbol **));
    870960
    871961* Menu:
     
    890980File: bfd.info,  Node: Memory Usage,  Next: Initialization,  Prev: BFD front end,  Up: BFD front end
    891981
    892 Memory usage
     982Memory Usage
    893983============
    894984
  • branches/GNU/src/binutils/bfd/doc/bfd.info-2

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 This is bfd.info, produced by makeinfo version 4.0 from bfd.texinfo.
     1This is bfd.info, produced by makeinfo version 4.3 from bfd.texinfo.
    22
    33START-INFO-DIR-ENTRY
     
    77   This file documents the BFD library.
    88
    9    Copyright (C) 1991, 2000 Free Software Foundation, Inc.
     9   Copyright (C) 1991, 2000, 2001, 2003 Free Software Foundation, Inc.
    1010
    1111   Permission is granted to copy, distribute and/or modify this document
     
    4646       /* The name of the section; the name isn't a copy, the pointer is
    4747          the same as that passed to bfd_make_section.  */
    48      
    4948       const char *name;
    5049     
    5150       /* A unique sequence number.  */
    52      
    5351       int id;
    5452     
    55        /* Which section is it; 0..nth.  */
    56      
     53       /* Which section in the bfd; 0..n-1 as sections are created in a bfd.  */
    5754       int index;
    5855     
    5956       /* The next section in the list belonging to the BFD, or NULL.  */
    60      
    6157       struct sec *next;
    6258     
     
    6460          flags are read in from the object file, and some are
    6561          synthesized from other information.  */
    66      
    6762       flagword flags;
    6863     
     
    8176     #define SEC_RELOC      0x004
    8277     
    83      #if 0   /* Obsolete ? */
    84      #define SEC_BALIGN     0x008
    85      #endif
     78       /* ELF reserves 4 processor specific bits and 8 operating system
     79          specific bits in sh_flags; at present we can get away with just
     80          one in communicating between the assembler and BFD, but this
     81          isn't a good long-term solution.  */
     82     #define SEC_ARCH_BIT_0 0x008
    8683     
    8784       /* A signal to the OS that the section contains read only data.  */
     
    109106     #define SEC_CONSTRUCTOR 0x100
    110107     
    111        /* The section is a constructor, and should be placed at the
    112           end of the text, data, or bss section(?).  */
    113      #define SEC_CONSTRUCTOR_TEXT 0x1100
    114      #define SEC_CONSTRUCTOR_DATA 0x2100
    115      #define SEC_CONSTRUCTOR_BSS  0x3100
    116      
    117108       /* The section has contents - a data section could be
    118109          `SEC_ALLOC' | `SEC_HAS_CONTENTS'; a debug section could be
     
    135126     #define SEC_COFF_SHARED_LIBRARY 0x800
    136127     
     128       /* The section contains thread local data.  */
     129     #define SEC_THREAD_LOCAL 0x1000
     130     
    137131       /* The section has GOT references.  This flag is only for the
    138132          linker, and is currently only used by the elf32-hppa back end.
     
    166160     #define SEC_EXCLUDE 0x40000
    167161     
    168        /* The contents of this section are to be sorted by the
    169           based on the address specified in the associated symbol
    170           table.  */
     162       /* The contents of this section are to be sorted based on the sum of
     163          the symbol and addend values specified by the associated relocation
     164          entries.  Entries without associated relocation entries will be
     165          appended to the end of the section in an unspecified order.  */
    171166     #define SEC_SORT_ENTRIES 0x80000
    172167     
     
    226221     #define SEC_CLINK 0x10000000
    227222     
     223       /* Attempt to merge identical entities in the section.
     224          Entity size is given in the entsize field.  */
     225     #define SEC_MERGE 0x20000000
     226     
     227       /* If given with SEC_MERGE, entities to merge are zero terminated
     228          strings where entsize specifies character size instead of fixed
     229          size entries.  */
     230     #define SEC_STRINGS 0x40000000
     231     
     232       /* This section contains data about section groups.  */
     233     #define SEC_GROUP 0x80000000
     234     
    228235       /*  End of section flags.  */
    229236     
     
    240247     
    241248       /* Another mark flag used by some of the linker backends.  Set for
    242           output sections that have a input section.  */
     249          output sections that have an input section.  */
    243250       unsigned int linker_has_input : 1;
    244251     
     
    246253       unsigned int gc_mark : 1;
    247254     
    248        /* Used by the ELF code to mark sections which have been allocated to segments.  */
     255       /* The following flags are used by the ELF linker. */
     256     
     257       /* Mark sections which have been allocated to segments.  */
    249258       unsigned int segment_mark : 1;
     259     
     260       /* Type of sec_info information.  */
     261       unsigned int sec_info_type:3;
     262     #define ELF_INFO_TYPE_NONE      0
     263     #define ELF_INFO_TYPE_STABS     1
     264     #define ELF_INFO_TYPE_MERGE     2
     265     #define ELF_INFO_TYPE_EH_FRAME  3
     266     #define ELF_INFO_TYPE_JUST_SYMS 4
     267     
     268       /* Nonzero if this section uses RELA relocations, rather than REL.  */
     269       unsigned int use_rela_p:1;
     270     
     271       /* Bits used by various backends.  */
     272       unsigned int has_tls_reloc:1;
     273     
     274       /* Nonzero if this section needs the relax finalize pass.  */
     275       unsigned int need_finalize_relax:1;
     276     
     277       /* Usused bits.  */
     278       unsigned int flag12:1;
     279       unsigned int flag13:1;
     280       unsigned int flag14:1;
     281       unsigned int flag15:1;
     282       unsigned int flag16:4;
     283       unsigned int flag20:4;
     284       unsigned int flag24:8;
    250285     
    251286       /* End of internal packed boolean fields.  */
     
    257292           the default address for `.data' is dependent on the specific
    258293           target and various flags).  */
    259      
    260294       bfd_vma vma;
    261295     
    262296       /*  The load address of the section - where it would be in a
    263297           rom image; really only used for writing section header
    264            information. */
    265      
     298           information.  */
    266299       bfd_vma lma;
    267300     
     
    269302          Contains a value even if the section has no contents (e.g., the
    270303          size of `.bss').  This will be filled in after relocation.  */
    271      
    272304       bfd_size_type _cooked_size;
    273305     
     
    275307          value is the same as the size, but if some relaxing has
    276308          been done, then this value will be bigger.  */
    277      
    278309       bfd_size_type _raw_size;
    279310     
     
    285316          would be 100.  However, if the target byte size is 16 bits
    286317          (bfd_octets_per_byte is "2"), this value would be 50.  */
    287      
    288318       bfd_vma output_offset;
    289319     
    290320       /* The output section through which to map on output.  */
    291      
    292321       struct sec *output_section;
    293322     
    294323       /* The alignment requirement of the section, as an exponent of 2 -
    295324          e.g., 3 aligns to 2^3 (or 8).  */
    296      
    297325       unsigned int alignment_power;
    298326     
    299327       /* If an input section, a pointer to a vector of relocation
    300328          records for the data in this section.  */
    301      
    302329       struct reloc_cache_entry *relocation;
    303330     
    304331       /* If an output section, a pointer to a vector of pointers to
    305332          relocation records for the data in this section.  */
    306      
    307333       struct reloc_cache_entry **orelocation;
    308334     
    309        /* The number of relocation records in one of the above  */
    310      
     335       /* The number of relocation records in one of the above.  */
    311336       unsigned reloc_count;
    312337     
     
    315340     
    316341       /* File position of section data.  */
    317      
    318342       file_ptr filepos;
    319343     
    320344       /* File position of relocation info.  */
    321      
    322345       file_ptr rel_filepos;
    323346     
    324347       /* File position of line data.  */
    325      
    326348       file_ptr line_filepos;
    327349     
    328350       /* Pointer to data for applications.  */
    329      
    330351       PTR userdata;
    331352     
     
    335356     
    336357       /* Attached line number information.  */
    337      
    338358       alent *lineno;
    339359     
    340360       /* Number of line number records.  */
    341      
    342361       unsigned int lineno_count;
    343362     
     363       /* Entity size for merging purposes.  */
     364       unsigned int entsize;
     365     
    344366       /* Optional information about a COMDAT entry; NULL if not COMDAT.  */
    345      
    346367       struct bfd_comdat_info *comdat;
    347      
    348        /* Points to the kept section if this section is a link-once section,
    349           and is discarded.  */
    350        struct sec *kept_section;
    351368     
    352369       /* When a section is being output, this value changes as more
    353370          linenumbers are written out.  */
    354      
    355371       file_ptr moving_line_filepos;
    356372     
    357373       /* What the section number is in the target world.  */
    358      
    359374       int target_index;
    360375     
     
    363378       /* If this is a constructor section then here is a list of the
    364379          relocations created to relocate items within it.  */
    365      
    366380       struct relent_chain *constructor_chain;
    367381     
    368382       /* The BFD which owns the section.  */
    369      
    370383       bfd *owner;
    371384     
    372        /* A symbol which points at this section only */
     385       /* A symbol which points at this section only. */
    373386       struct symbol_cache_entry *symbol;
    374387       struct symbol_cache_entry **symbol_ptr_ptr;
     
    376389       struct bfd_link_order *link_order_head;
    377390       struct bfd_link_order *link_order_tail;
    378      } asection ;
     391     } asection;
    379392     
    380393     /* These sections are global, and are managed by BFD.  The application
     
    388401     #define BFD_IND_SECTION_NAME "*IND*"
    389402     
    390      /* the absolute section */
     403     /* The absolute section. */
    391404     extern const asection bfd_abs_section;
    392405     #define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
    393406     #define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
    394      /* Pointer to the undefined section */
     407     /* Pointer to the undefined section. */
    395408     extern const asection bfd_und_section;
    396409     #define bfd_und_section_ptr ((asection *) &bfd_und_section)
    397410     #define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
    398      /* Pointer to the common section */
     411     /* Pointer to the common section. */
    399412     extern const asection bfd_com_section;
    400413     #define bfd_com_section_ptr ((asection *) &bfd_com_section)
    401      /* Pointer to the indirect section */
     414     /* Pointer to the indirect section. */
    402415     extern const asection bfd_ind_section;
    403416     #define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
    404417     #define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
     418     
     419     #define bfd_is_const_section(SEC)              \
     420      (   ((SEC) == bfd_abs_section_ptr)            \
     421       || ((SEC) == bfd_und_section_ptr)            \
     422       || ((SEC) == bfd_com_section_ptr)            \
     423       || ((SEC) == bfd_ind_section_ptr))
    405424     
    406425     extern const struct symbol_cache_entry * const bfd_abs_symbol;
     
    414433          ((section)->reloc_done ? (section)->_cooked_size \
    415434                                 : (abort (), (bfd_size_type) 1))
     435     
     436     /* Macros to handle insertion and deletion of a bfd's sections.  These
     437        only handle the list pointers, ie. do not adjust section_count,
     438        target_index etc.  */
     439     #define bfd_section_list_remove(ABFD, PS) \
     440       do                                                   \
     441         {                                                  \
     442           asection **_ps = PS;                             \
     443           asection *_s = *_ps;                             \
     444           *_ps = _s->next;                                 \
     445           if (_s->next == NULL)                            \
     446             (ABFD)->section_tail = _ps;                    \
     447         }                                                  \
     448       while (0)
     449     #define bfd_section_list_insert(ABFD, PS, S) \
     450       do                                                   \
     451         {                                                  \
     452           asection **_ps = PS;                             \
     453           asection *_s = S;                                \
     454           _s->next = *_ps;                                 \
     455           *_ps = _s;                                       \
     456           if (_s->next == NULL)                            \
     457             (ABFD)->section_tail = &_s->next;              \
     458         }                                                  \
     459       while (0)
    416460
    417461
     
    422466
    423467   These are the functions exported by the section handling part of BFD.
     468
     469`bfd_section_list_clear'
     470........................
     471
     472   *Synopsis*
     473     void bfd_section_list_clear (bfd *);
     474   *Description*
     475Clears the section list, and also resets the section count and hash
     476table entries.
    424477
    425478`bfd_get_section_by_name'
     
    501554
    502555   *Synopsis*
    503      boolean bfd_set_section_flags(bfd *abfd, asection *sec, flagword flags);
     556     bfd_boolean bfd_set_section_flags (bfd *abfd, asection *sec, flagword flags);
    504557   *Description*
    505558Set the attributes of the section SEC in the BFD ABFD to the value
    506 FLAGS. Return `true' on success, `false' on error. Possible error
     559FLAGS. Return `TRUE' on success, `FALSE' on error. Possible error
    507560returns are:
    508561
     
    537590
    538591   *Synopsis*
    539      boolean bfd_set_section_size(bfd *abfd, asection *sec, bfd_size_type val);
    540    *Description*
    541 Set SEC to the size VAL. If the operation is ok, then `true' is
    542 returned, else `false'.
     592     bfd_boolean bfd_set_section_size (bfd *abfd, asection *sec, bfd_size_type val);
     593   *Description*
     594Set SEC to the size VAL. If the operation is ok, then `TRUE' is
     595returned, else `FALSE'.
    543596
    544597   Possible error returns:
     
    550603
    551604   *Synopsis*
    552      boolean bfd_set_section_contents
    553         (bfd *abfd,
    554          asection *section,
    555          PTR data,
    556          file_ptr offset,
     605     bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section,
     606         PTR data, file_ptr offset,
    557607         bfd_size_type count);
    558608   *Description*
     
    561611starting at offset OFFSET for COUNT octets.
    562612
    563    Normally `true' is returned, else `false'. Possible error returns
     613   Normally `TRUE' is returned, else `FALSE'. Possible error returns
    564614are:
    565615   * `bfd_error_no_contents' - The output section does not have the
     
    574624
    575625   *Synopsis*
    576      boolean bfd_get_section_contents
    577         (bfd *abfd, asection *section, PTR location,
    578          file_ptr offset, bfd_size_type count);
     626     bfd_boolean bfd_get_section_contents (bfd *abfd, asection *section,
     627         PTR location, file_ptr offset,
     628         bfd_size_type count);
    579629   *Description*
    580630Read data from SECTION in BFD ABFD into memory starting at LOCATION.
     
    585635are requested or if the section does not have the `SEC_HAS_CONTENTS'
    586636flag set, then the LOCATION is filled with zeroes. If no errors occur,
    587 `true' is returned, else `false'.
     637`TRUE' is returned, else `FALSE'.
    588638
    589639`bfd_copy_private_section_data'
     
    591641
    592642   *Synopsis*
    593      boolean bfd_copy_private_section_data(bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
     643     bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec,
     644         bfd *obfd, asection *osec);
    594645   *Description*
    595646Copy private section information from ISEC in the BFD IBFD to the
    596 section OSEC in the BFD OBFD.  Return `true' on success, `false' on
     647section OSEC in the BFD OBFD.  Return `TRUE' on success, `FALSE' on
    597648error.  Possible error returns are:
    598649
     
    612663   *Description*
    613664Remove SECTION from the output.  If the output section becomes empty,
    614 remove it from the output bfd.  INFO may be NULL; if it is not, it is
    615 used to decide whether the output section is empty.
     665remove it from the output bfd.
     666
     667   This function won't actually do anything except twiddle flags if
     668called too late in the linking process, when it's not safe to remove
     669sections.
     670
     671`bfd_generic_discard_group'
     672...........................
     673
     674   *Synopsis*
     675     bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
     676   *Description*
     677Remove all members of GROUP from the output.
    616678
    617679
     
    670732                FAIL
    671733     
    672               if (storage_needed == 0) {
    673                  return ;
    674               }
     734              if (storage_needed == 0)
     735                return;
     736     
    675737              symbol_table = (asymbol **) xmalloc (storage_needed);
    676738                ...
     
    681743                FAIL
    682744     
    683               for (i = 0; i < number_of_symbols; i++) {
    684                  process_symbol (symbol_table[i]);
    685               }
     745              for (i = 0; i < number_of_symbols; i++)
     746                process_symbol (symbol_table[i]);
    686747
    687748   All storage for the symbols themselves is in an objalloc connected
     
    704765
    705766            #include "bfd.h"
    706             main()
     767            int main (void)
    707768            {
    708769              bfd *abfd;
     
    710771              asymbol *new;
    711772     
    712               abfd = bfd_openw("foo","a.out-sunos-big");
    713               bfd_set_format(abfd, bfd_object);
    714               new = bfd_make_empty_symbol(abfd);
     773              abfd = bfd_openw ("foo","a.out-sunos-big");
     774              bfd_set_format (abfd, bfd_object);
     775              new = bfd_make_empty_symbol (abfd);
    715776              new->name = "dummy_symbol";
    716               new->section = bfd_make_section_old_way(abfd, ".text");
     777              new->section = bfd_make_section_old_way (abfd, ".text");
    717778              new->flags = BSF_GLOBAL;
    718779              new->value = 0x12345;
     
    721782              ptrs[1] = (asymbol *)0;
    722783     
    723               bfd_set_symtab(abfd, ptrs, 1);
    724               bfd_close(abfd);
     784              bfd_set_symtab (abfd, ptrs, 1);
     785              bfd_close (abfd);
     786              return 0;
    725787            }
    726788     
     
    768830     typedef struct symbol_cache_entry
    769831     {
    770             /* A pointer to the BFD which owns the symbol. This information
    771                is necessary so that a back end can work out what additional
    772                information (invisible to the application writer) is carried
    773                with the symbol.
    774      
    775                This field is *almost* redundant, since you can use section->owner
    776                instead, except that some symbols point to the global sections
    777                bfd_{abs,com,und}_section.  This could be fixed by making
    778                these globals be per-bfd (or per-target-flavor).  FIXME. */
    779      
    780        struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
    781      
    782             /* The text of the symbol. The name is left alone, and not copied; the
    783                application may not alter it. */
    784        CONST char *name;
    785      
    786             /* The value of the symbol.  This really should be a union of a
    787                numeric value with a pointer, since some flags indicate that
    788                a pointer to another symbol is stored here.  */
     832       /* A pointer to the BFD which owns the symbol. This information
     833          is necessary so that a back end can work out what additional
     834          information (invisible to the application writer) is carried
     835          with the symbol.
     836     
     837          This field is *almost* redundant, since you can use section->owner
     838          instead, except that some symbols point to the global sections
     839          bfd_{abs,com,und}_section.  This could be fixed by making
     840          these globals be per-bfd (or per-target-flavor).  FIXME.  */
     841       struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field.  */
     842     
     843       /* The text of the symbol. The name is left alone, and not copied; the
     844          application may not alter it.  */
     845       const char *name;
     846     
     847       /* The value of the symbol.  This really should be a union of a
     848          numeric value with a pointer, since some flags indicate that
     849          a pointer to another symbol is stored here.  */
    789850       symvalue value;
    790851     
    791             /* Attributes of a symbol: */
    792      
     852       /* Attributes of a symbol.  */
    793853     #define BSF_NO_FLAGS    0x00
    794854     
    795             /* The symbol has local scope; `static' in `C'. The value
    796                is the offset into the section of the data. */
     855       /* The symbol has local scope; `static' in `C'. The value
     856          is the offset into the section of the data. */
    797857     #define BSF_LOCAL      0x01
    798858     
    799             /* The symbol has global scope; initialized data in `C'. The
    800                value is the offset into the section of the data. */
     859       /* The symbol has global scope; initialized data in `C'. The
     860          value is the offset into the section of the data. */
    801861     #define BSF_GLOBAL     0x02
    802862     
    803             /* The symbol has global scope and is exported. The value is
    804                the offset into the section of the data. */
    805      #define BSF_EXPORT     BSF_GLOBAL /* no real difference */
    806      
    807             /* A normal C symbol would be one of:
    808                `BSF_LOCAL', `BSF_FORT_COMM',  `BSF_UNDEFINED' or
    809                `BSF_GLOBAL' */
    810      
    811             /* The symbol is a debugging record. The value has an arbitary
    812                meaning, unless BSF_DEBUGGING_RELOC is also set.  */
     863       /* The symbol has global scope and is exported. The value is
     864          the offset into the section of the data. */
     865     #define BSF_EXPORT     BSF_GLOBAL /* No real difference. */
     866     
     867       /* A normal C symbol would be one of:
     868          `BSF_LOCAL', `BSF_FORT_COMM',  `BSF_UNDEFINED' or
     869          `BSF_GLOBAL'. */
     870     
     871       /* The symbol is a debugging record. The value has an arbitary
     872          meaning, unless BSF_DEBUGGING_RELOC is also set.  */
    813873     #define BSF_DEBUGGING  0x08
    814874     
    815             /* The symbol denotes a function entry point.  Used in ELF,
    816                perhaps others someday.  */
     875       /* The symbol denotes a function entry point.  Used in ELF,
     876          perhaps others someday.  */
    817877     #define BSF_FUNCTION    0x10
    818878     
    819             /* Used by the linker. */
     879       /* Used by the linker. */
    820880     #define BSF_KEEP        0x20
    821881     #define BSF_KEEP_G      0x40
    822882     
    823             /* A weak global symbol, overridable without warnings by
    824                a regular global symbol of the same name.  */
     883       /* A weak global symbol, overridable without warnings by
     884          a regular global symbol of the same name.  */
    825885     #define BSF_WEAK        0x80
    826886     
    827             /* This symbol was created to point to a section, e.g. ELF's
    828                STT_SECTION symbols.  */
     887       /* This symbol was created to point to a section, e.g. ELF's
     888          STT_SECTION symbols.  */
    829889     #define BSF_SECTION_SYM 0x100
    830890     
    831             /* The symbol used to be a common symbol, but now it is
    832                allocated. */
     891       /* The symbol used to be a common symbol, but now it is
     892          allocated. */
    833893     #define BSF_OLD_COMMON  0x200
    834894     
    835             /* The default value for common data. */
     895       /* The default value for common data. */
    836896     #define BFD_FORT_COMM_DEFAULT_VALUE 0
    837897     
    838             /* In some files the type of a symbol sometimes alters its
    839                location in an output file - ie in coff a `ISFCN' symbol
    840                which is also `C_EXT' symbol appears where it was
    841                declared and not at the end of a section.  This bit is set
    842                by the target BFD part to convey this information. */
    843      
     898       /* In some files the type of a symbol sometimes alters its
     899          location in an output file - ie in coff a `ISFCN' symbol
     900          which is also `C_EXT' symbol appears where it was
     901          declared and not at the end of a section.  This bit is set
     902          by the target BFD part to convey this information.  */
    844903     #define BSF_NOT_AT_END    0x400
    845904     
    846             /* Signal that the symbol is the label of constructor section. */
     905       /* Signal that the symbol is the label of constructor section. */
    847906     #define BSF_CONSTRUCTOR   0x800
    848907     
    849             /* Signal that the symbol is a warning symbol.  The name is a
    850                warning.  The name of the next symbol is the one to warn about;
    851                if a reference is made to a symbol with the same name as the next
    852                symbol, a warning is issued by the linker. */
     908       /* Signal that the symbol is a warning symbol.  The name is a
     909          warning.  The name of the next symbol is the one to warn about;
     910          if a reference is made to a symbol with the same name as the next
     911          symbol, a warning is issued by the linker. */
    853912     #define BSF_WARNING       0x1000
    854913     
    855             /* Signal that the symbol is indirect.  This symbol is an indirect
    856                pointer to the symbol with the same name as the next symbol. */
     914       /* Signal that the symbol is indirect.  This symbol is an indirect
     915          pointer to the symbol with the same name as the next symbol. */
    857916     #define BSF_INDIRECT      0x2000
    858917     
    859             /* BSF_FILE marks symbols that contain a file name.  This is used
    860                for ELF STT_FILE symbols.  */
     918       /* BSF_FILE marks symbols that contain a file name.  This is used
     919          for ELF STT_FILE symbols.  */
    861920     #define BSF_FILE          0x4000
    862921     
    863             /* Symbol is from dynamic linking information.  */
     922       /* Symbol is from dynamic linking information.  */
    864923     #define BSF_DYNAMIC       0x8000
    865924     
    866             /* The symbol denotes a data object.  Used in ELF, and perhaps
    867                others someday.  */
     925       /* The symbol denotes a data object.  Used in ELF, and perhaps
     926          others someday.  */
    868927     #define BSF_OBJECT        0x10000
    869928     
    870             /* This symbol is a debugging symbol.  The value is the offset
    871                into the section of the data.  BSF_DEBUGGING should be set
    872                as well.  */
     929       /* This symbol is a debugging symbol.  The value is the offset
     930          into the section of the data.  BSF_DEBUGGING should be set
     931          as well.  */
    873932     #define BSF_DEBUGGING_RELOC 0x20000
    874933     
     934       /* This symbol is thread local.  Used in ELF.  */
     935     #define BSF_THREAD_LOCAL  0x40000
     936     
    875937       flagword flags;
    876938     
    877             /* A pointer to the section to which this symbol is
    878                relative.  This will always be non NULL, there are special
    879                sections for undefined and absolute symbols.  */
     939       /* A pointer to the section to which this symbol is
     940          relative.  This will always be non NULL, there are special
     941          sections for undefined and absolute symbols.  */
    880942       struct sec *section;
    881943     
    882             /* Back end special data.  */
     944       /* Back end special data.  */
    883945       union
    884946         {
    885947           PTR p;
    886948           bfd_vma i;
    887          } udata;
    888      
    889      } asymbol;
     949         }
     950       udata;
     951     }
     952     asymbol;
    890953
    891954
     
    910973
    911974   *Synopsis*
    912      boolean bfd_is_local_label(bfd *abfd, asymbol *sym);
    913    *Description*
    914 Return true if the given symbol SYM in the BFD ABFD is a compiler
    915 generated local label, else return false.
     975     bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
     976   *Description*
     977Return TRUE if the given symbol SYM in the BFD ABFD is a compiler
     978generated local label, else return FALSE.
    916979
    917980`bfd_is_local_label_name'
     
    919982
    920983   *Synopsis*
    921      boolean bfd_is_local_label_name(bfd *abfd, const char *name);
    922    *Description*
    923 Return true if a symbol with the name NAME in the BFD ABFD is a
    924 compiler generated local label, else return false.  This just checks
     984     bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
     985   *Description*
     986Return TRUE if a symbol with the name NAME in the BFD ABFD is a
     987compiler generated local label, else return FALSE.  This just checks
    925988whether the name has the form of a local label.
    926989     #define bfd_is_local_label_name(abfd, name) \
     
    9421005
    9431006   *Synopsis*
    944      boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count);
     1007     bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count);
    9451008   *Description*
    9461009Arrange that when the output BFD ABFD is closed, the table LOCATION of
     
    9511014
    9521015   *Synopsis*
    953      void bfd_print_symbol_vandf(PTR file, asymbol *symbol);
     1016     void bfd_print_symbol_vandf (bfd *abfd, PTR file, asymbol *symbol);
    9541017   *Description*
    9551018Print the value and flags of the SYMBOL supplied to the stream FILE.
     
    9691032          BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
    9701033
     1034`_bfd_generic_make_empty_symbol'
     1035................................
     1036
     1037   *Synopsis*
     1038     asymbol * _bfd_generic_make_empty_symbol (bfd *);
     1039   *Description*
     1040Create a new `asymbol' structure for the BFD ABFD and return a pointer
     1041to it.  Used by core file routines, binary back-end and anywhere else
     1042where no private info is needed.
     1043
    9711044`bfd_make_debug_symbol'
    9721045.......................
     
    9861059
    9871060   *Synopsis*
    988      int bfd_decode_symclass(asymbol *symbol);
     1061     int bfd_decode_symclass (asymbol *symbol);
    9891062
    9901063`bfd_is_undefined_symclass'
     
    9961069
    9971070   *Synopsis*
    998      boolean bfd_is_undefined_symclass (int symclass);
     1071     bfd_boolean bfd_is_undefined_symclass (int symclass);
    9991072
    10001073`bfd_symbol_info'
     
    10061079
    10071080   *Synopsis*
    1008      void bfd_symbol_info(asymbol *symbol, symbol_info *ret);
     1081     void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
    10091082
    10101083`bfd_copy_private_symbol_data'
     
    10121085
    10131086   *Synopsis*
    1014      boolean bfd_copy_private_symbol_data(bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
     1087     bfd_boolean bfd_copy_private_symbol_data (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
    10151088   *Description*
    10161089Copy private symbol information from ISYM in the BFD IBFD to the symbol
    1017 OSYM in the BFD OBFD.  Return `true' on success, `false' on error.
     1090OSYM in the BFD OBFD.  Return `TRUE' on success, `FALSE' on error.
    10181091Possible error returns are:
    10191092
     
    10941167
    10951168   *Synopsis*
    1096      boolean bfd_set_archive_head(bfd *output, bfd *new_head);
     1169     bfd_boolean bfd_set_archive_head(bfd *output, bfd *new_head);
    10971170   *Description*
    10981171Set the head of the chain of BFDs contained in the archive OUTPUT to
     
    11331206
    11341207   *Synopsis*
    1135      boolean bfd_check_format(bfd *abfd, bfd_format format);
     1208     bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
    11361209   *Description*
    11371210Verify if the file attached to the BFD ABFD is compatible with the
     
    11451218file, or an error results.
    11461219
    1147    The function returns `true' on success, otherwise `false' with one
     1220   The function returns `TRUE' on success, otherwise `FALSE' with one
    11481221of the following error codes:
    11491222
     
    11641237
    11651238   *Synopsis*
    1166      boolean bfd_check_format_matches(bfd *abfd, bfd_format format, char ***matching);
    1167    *Description*
    1168 Like `bfd_check_format', except when it returns false with `bfd_errno'
     1239     bfd_boolean bfd_check_format_matches (bfd *abfd, bfd_format format,
     1240         char ***matching);
     1241   *Description*
     1242Like `bfd_check_format', except when it returns FALSE with `bfd_errno'
    11691243set to `bfd_error_file_ambiguously_recognized'.  In that case, if
    11701244MATCHING is not NULL, it will be filled in with a NULL-terminated list
     
    11791253
    11801254   *Synopsis*
    1181      boolean bfd_set_format(bfd *abfd, bfd_format format);
     1255     bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
    11821256   *Description*
    11831257This function sets the file format of the BFD ABFD to the format
     
    11901264
    11911265   *Synopsis*
    1192      CONST char *bfd_format_string(bfd_format format);
     1266     const char *bfd_format_string (bfd_format format);
    11931267   *Description*
    11941268Return a pointer to a const string `invalid', `object', `archive',
  • branches/GNU/src/binutils/bfd/doc/bfd.info-3

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 This is bfd.info, produced by makeinfo version 4.0 from bfd.texinfo.
     1This is bfd.info, produced by makeinfo version 4.3 from bfd.texinfo.
    22
    33START-INFO-DIR-ENTRY
     
    77   This file documents the BFD library.
    88
    9    Copyright (C) 1991, 2000 Free Software Foundation, Inc.
     9   Copyright (C) 1991, 2000, 2001, 2003 Free Software Foundation, Inc.
    1010
    1111   Permission is granted to copy, distribute and/or modify this document
     
    2727     typedef enum bfd_reloc_status
    2828     {
    29             /* No errors detected */
     29       /* No errors detected. */
    3030       bfd_reloc_ok,
    3131     
    32             /* The relocation was performed, but there was an overflow. */
     32       /* The relocation was performed, but there was an overflow. */
    3333       bfd_reloc_overflow,
    3434     
    35             /* The address to relocate was not within the section supplied. */
     35       /* The address to relocate was not within the section supplied. */
    3636       bfd_reloc_outofrange,
    3737     
    38             /* Used by special functions */
     38       /* Used by special functions. */
    3939       bfd_reloc_continue,
    4040     
    41             /* Unsupported relocation size requested. */
     41       /* Unsupported relocation size requested. */
    4242       bfd_reloc_notsupported,
    4343     
    44             /* Unused */
     44       /* Unused. */
    4545       bfd_reloc_other,
    4646     
    47             /* The symbol to relocate against was undefined. */
     47       /* The symbol to relocate against was undefined. */
    4848       bfd_reloc_undefined,
    4949     
    50             /* The relocation was performed, but may not be ok - presently
    51                generated only when linking i960 coff files with i960 b.out
    52                symbols.  If this type is returned, the error_message argument
    53                to bfd_perform_relocation will be set.  */
     50       /* The relocation was performed, but may not be ok - presently
     51          generated only when linking i960 coff files with i960 b.out
     52          symbols.  If this type is returned, the error_message argument
     53          to bfd_perform_relocation will be set.  */
    5454       bfd_reloc_dangerous
    5555      }
     
    5959     typedef struct reloc_cache_entry
    6060     {
    61             /* A pointer into the canonical table of pointers  */
     61       /* A pointer into the canonical table of pointers.  */
    6262       struct symbol_cache_entry **sym_ptr_ptr;
    6363     
    64             /* offset in section */
     64       /* offset in section. */
    6565       bfd_size_type address;
    6666     
    67             /* addend for relocation value */
     67       /* addend for relocation value. */
    6868       bfd_vma addend;
    6969     
    70             /* Pointer to how to perform the required relocation */
     70       /* Pointer to how to perform the required relocation. */
    7171       reloc_howto_type *howto;
    7272     
    73      } arelent;
     73     }
     74     arelent;
    7475   *Description*
    7576Here is a description of each of the fields within an `arelent':
     
    194195     enum complain_overflow
    195196     {
    196             /* Do not complain on overflow. */
     197       /* Do not complain on overflow. */
    197198       complain_overflow_dont,
    198199     
    199             /* Complain if the bitfield overflows, whether it is considered
    200                as signed or unsigned. */
     200       /* Complain if the bitfield overflows, whether it is considered
     201          as signed or unsigned. */
    201202       complain_overflow_bitfield,
    202203     
    203             /* Complain if the value overflows when considered as signed
    204                number. */
     204       /* Complain if the value overflows when considered as signed
     205          number. */
    205206       complain_overflow_signed,
    206207     
    207             /* Complain if the value overflows when considered as an
    208                unsigned number. */
     208       /* Complain if the value overflows when considered as an
     209          unsigned number. */
    209210       complain_overflow_unsigned
    210211     };
     
    216217information that libbfd needs to know to tie up a back end's data.
    217218
    218      struct symbol_cache_entry;             /* Forward declaration */
     219     struct symbol_cache_entry;             /* Forward declaration. */
    219220     
    220221     struct reloc_howto_struct
    221222     {
    222             /*  The type field has mainly a documentary use - the back end can
    223                 do what it wants with it, though normally the back end's
    224                 external idea of what a reloc number is stored
    225                 in this field. For example, a PC relative word relocation
    226                 in a coff environment has the type 023 - because that's
    227                 what the outside world calls a R_PCRWORD reloc. */
     223       /*  The type field has mainly a documentary use - the back end can
     224           do what it wants with it, though normally the back end's
     225           external idea of what a reloc number is stored
     226           in this field. For example, a PC relative word relocation
     227           in a coff environment has the type 023 - because that's
     228           what the outside world calls a R_PCRWORD reloc. */
    228229       unsigned int type;
    229230     
    230             /*  The value the final relocation is shifted right by. This drops
    231                 unwanted data from the relocation.  */
     231       /*  The value the final relocation is shifted right by. This drops
     232           unwanted data from the relocation.  */
    232233       unsigned int rightshift;
    233234     
    234             /*  The size of the item to be relocated.  This is *not* a
    235                 power-of-two measure.  To get the number of bytes operated
    236                 on by a type of relocation, use bfd_get_reloc_size.  */
     235       /*  The size of the item to be relocated.  This is *not* a
     236           power-of-two measure.  To get the number of bytes operated
     237           on by a type of relocation, use bfd_get_reloc_size.  */
    237238       int size;
    238239     
    239             /*  The number of bits in the item to be relocated.  This is used
    240                 when doing overflow checking.  */
     240       /*  The number of bits in the item to be relocated.  This is used
     241           when doing overflow checking.  */
    241242       unsigned int bitsize;
    242243     
    243             /*  Notes that the relocation is relative to the location in the
    244                 data section of the addend. The relocation function will
    245                 subtract from the relocation value the address of the location
    246                 being relocated. */
    247        boolean pc_relative;
    248      
    249             /*  The bit position of the reloc value in the destination.
    250                 The relocated value is left shifted by this amount. */
     244       /*  Notes that the relocation is relative to the location in the
     245           data section of the addend. The relocation function will
     246           subtract from the relocation value the address of the location
     247           being relocated. */
     248       bfd_boolean pc_relative;
     249     
     250       /*  The bit position of the reloc value in the destination.
     251           The relocated value is left shifted by this amount. */
    251252       unsigned int bitpos;
    252253     
    253             /* What type of overflow error should be checked for when
    254                relocating. */
     254       /* What type of overflow error should be checked for when
     255          relocating. */
    255256       enum complain_overflow complain_on_overflow;
    256257     
    257             /* If this field is non null, then the supplied function is
    258                called rather than the normal function. This allows really
    259                strange relocation methods to be accomodated (e.g., i960 callj
    260                instructions). */
     258       /* If this field is non null, then the supplied function is
     259          called rather than the normal function. This allows really
     260          strange relocation methods to be accomodated (e.g., i960 callj
     261          instructions). */
    261262       bfd_reloc_status_type (*special_function)
    262                                         PARAMS ((bfd *abfd,
    263                                                  arelent *reloc_entry,
    264                                                  struct symbol_cache_entry *symbol,
    265                                                  PTR data,
    266                                                  asection *input_section,
    267                                                  bfd *output_bfd,
    268                                                  char **error_message));
    269      
    270             /* The textual name of the relocation type. */
     263         PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
     264                  bfd *, char **));
     265     
     266       /* The textual name of the relocation type.  */
    271267       char *name;
    272268     
    273             /* Some formats record a relocation addend in the section contents
    274                rather than with the relocation.  For ELF formats this is the
    275                distinction between USE_REL and USE_RELA (though the code checks
    276                for USE_REL == 1/0).  The value of this field is TRUE if the
    277                addend is recorded with the section contents; when performing a
    278                partial link (ld -r) the section contents (the data) will be
    279                modified.  The value of this field is FALSE if addends are
    280                recorded with the relocation (in arelent.addend); when performing
    281                a partial link the relocation will be modified.
    282                All relocations for all ELF USE_RELA targets should set this field
    283                to FALSE (values of TRUE should be looked on with suspicion).
    284                However, the converse is not true: not all relocations of all ELF
    285                USE_REL targets set this field to TRUE.  Why this is so is peculiar
    286                to each particular target.  For relocs that aren't used in partial
    287                links (e.g. GOT stuff) it doesn't matter what this is set to.  */
    288        boolean partial_inplace;
    289      
    290             /* The src_mask selects which parts of the read in data
    291                are to be used in the relocation sum.  E.g., if this was an 8 bit
    292                byte of data which we read and relocated, this would be
    293                0x000000ff. When we have relocs which have an addend, such as
    294                sun4 extended relocs, the value in the offset part of a
    295                relocating field is garbage so we never use it. In this case
    296                the mask would be 0x00000000. */
     269       /* Some formats record a relocation addend in the section contents
     270          rather than with the relocation.  For ELF formats this is the
     271          distinction between USE_REL and USE_RELA (though the code checks
     272          for USE_REL == 1/0).  The value of this field is TRUE if the
     273          addend is recorded with the section contents; when performing a
     274          partial link (ld -r) the section contents (the data) will be
     275          modified.  The value of this field is FALSE if addends are
     276          recorded with the relocation (in arelent.addend); when performing
     277          a partial link the relocation will be modified.
     278          All relocations for all ELF USE_RELA targets should set this field
     279          to FALSE (values of TRUE should be looked on with suspicion).
     280          However, the converse is not true: not all relocations of all ELF
     281          USE_REL targets set this field to TRUE.  Why this is so is peculiar
     282          to each particular target.  For relocs that aren't used in partial
     283          links (e.g. GOT stuff) it doesn't matter what this is set to.  */
     284       bfd_boolean partial_inplace;
     285     
     286       /* src_mask selects the part of the instruction (or data) to be used
     287          in the relocation sum.  If the target relocations don't have an
     288          addend in the reloc, eg. ELF USE_REL, src_mask will normally equal
     289          dst_mask to extract the addend from the section contents.  If
     290          relocations do have an addend in the reloc, eg. ELF USE_RELA, this
     291          field should be zero.  Non-zero values for ELF USE_RELA targets are
     292          bogus as in those cases the value in the dst_mask part of the
     293          section contents should be treated as garbage.  */
    297294       bfd_vma src_mask;
    298295     
    299             /* The dst_mask selects which parts of the instruction are replaced
    300                into the instruction. In most cases src_mask == dst_mask,
    301                except in the above special case, where dst_mask would be
    302                0x000000ff, and src_mask would be 0x00000000.   */
     296       /* dst_mask selects which parts of the instruction (or data) are
     297          replaced with a relocated value.  */
    303298       bfd_vma dst_mask;
    304299     
    305             /* When some formats create PC relative instructions, they leave
    306                the value of the pc of the place being relocated in the offset
    307                slot of the instruction, so that a PC relative relocation can
    308                be made just by adding in an ordinary offset (e.g., sun3 a.out).
    309                Some formats leave the displacement part of an instruction
    310                empty (e.g., m88k bcs); this flag signals the fact.*/
    311        boolean pcrel_offset;
    312      
     300       /* When some formats create PC relative instructions, they leave
     301          the value of the pc of the place being relocated in the offset
     302          slot of the instruction, so that a PC relative relocation can
     303          be made just by adding in an ordinary offset (e.g., sun3 a.out).
     304          Some formats leave the displacement part of an instruction
     305          empty (e.g., m88k bcs); this flag signals the fact.  */
     306       bfd_boolean pcrel_offset;
    313307     };
    314308
     
    318312   *Description*
    319313The HOWTO define is horrible and will go away.
    320      #define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
    321        {(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC}
     314     #define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
     315       { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC }
    322316
    323317   *Description*
    324318And will be replaced with the totally magic way. But for the moment, we
    325319are compatible, so do it this way.
    326      #define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN)
     320     #define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \
     321       HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \
     322              NAME, FALSE, 0, 0, IN)
    327323
    328324   *Description*
    329325This is used to fill in an empty howto entry in an array.
    330326     #define EMPTY_HOWTO(C) \
    331        HOWTO((C),0,0,0,false,0,complain_overflow_dont,NULL,NULL,false,0,0,false)
     327       HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \
     328              NULL, FALSE, 0, 0, FALSE)
    332329
    333330   *Description*
    334331Helper routine to turn a symbol into a relocation value.
    335      #define HOWTO_PREPARE(relocation, symbol)      \
    336        {                                            \
    337        if (symbol != (asymbol *)NULL) {             \
    338          if (bfd_is_com_section (symbol->section)) { \
    339            relocation = 0;                          \
    340          }                                          \
    341          else {                                     \
    342            relocation = symbol->value;              \
    343          }                                          \
    344        }                                            \
    345      }
     332     #define HOWTO_PREPARE(relocation, symbol)               \
     333       {                                                     \
     334         if (symbol != (asymbol *) NULL)                     \
     335           {                                                 \
     336             if (bfd_is_com_section (symbol->section))       \
     337               {                                             \
     338                 relocation = 0;                             \
     339               }                                             \
     340             else                                            \
     341               {                                             \
     342                 relocation = symbol->value;                 \
     343               }                                             \
     344           }                                                 \
     345       }
    346346
    347347`bfd_get_reloc_size'
     
    359359   *Description*
    360360How relocs are tied together in an `asection':
    361      typedef struct relent_chain {
     361     typedef struct relent_chain
     362     {
    362363       arelent relent;
    363        struct   relent_chain *next;
    364      } arelent_chain;
     364       struct relent_chain *next;
     365     }
     366     arelent_chain;
    365367
    366368`bfd_check_overflow'
     
    426428assembler.
    427429
    428 
    429 File: bfd.info,  Node: howto manager,  Prev: typedef arelent,  Up: Relocations
    430 
    431 The howto manager
    432 =================
    433 
    434    When an application wants to create a relocation, but doesn't know
    435 what the target machine might call it, it can find out by using this
    436 bit of code.
    437 
    438 `bfd_reloc_code_type'
    439 .....................
    440 
    441    *Description*
    442 The insides of a reloc code.  The idea is that, eventually, there will
    443 be one enumerator for every type of relocation we ever do.  Pass one of
    444 these values to `bfd_reloc_type_lookup', and it'll return a howto
    445 pointer.
    446 
    447    This does mean that the application must determine the correct
    448 enumerator value; you can't get a howto pointer from a random set of
    449 attributes.
    450 
    451    Here are the possible values for `enum bfd_reloc_code_real':
    452 
    453  - : BFD_RELOC_64
    454  - : BFD_RELOC_32
    455  - : BFD_RELOC_26
    456  - : BFD_RELOC_24
    457  - : BFD_RELOC_16
    458  - : BFD_RELOC_14
    459  - : BFD_RELOC_8
    460      Basic absolute relocations of N bits.
    461 
    462  - : BFD_RELOC_64_PCREL
    463  - : BFD_RELOC_32_PCREL
    464  - : BFD_RELOC_24_PCREL
    465  - : BFD_RELOC_16_PCREL
    466  - : BFD_RELOC_12_PCREL
    467  - : BFD_RELOC_8_PCREL
    468      PC-relative relocations.  Sometimes these are relative to the
    469      address of the relocation itself; sometimes they are relative to
    470      the start of the section containing the relocation.  It depends on
    471      the specific target.
    472 
    473      The 24-bit relocation is used in some Intel 960 configurations.
    474 
    475  - : BFD_RELOC_32_GOT_PCREL
    476  - : BFD_RELOC_16_GOT_PCREL
    477  - : BFD_RELOC_8_GOT_PCREL
    478  - : BFD_RELOC_32_GOTOFF
    479  - : BFD_RELOC_16_GOTOFF
    480  - : BFD_RELOC_LO16_GOTOFF
    481  - : BFD_RELOC_HI16_GOTOFF
    482  - : BFD_RELOC_HI16_S_GOTOFF
    483  - : BFD_RELOC_8_GOTOFF
    484  - : BFD_RELOC_32_PLT_PCREL
    485  - : BFD_RELOC_24_PLT_PCREL
    486  - : BFD_RELOC_16_PLT_PCREL
    487  - : BFD_RELOC_8_PLT_PCREL
    488  - : BFD_RELOC_32_PLTOFF
    489  - : BFD_RELOC_16_PLTOFF
    490  - : BFD_RELOC_LO16_PLTOFF
    491  - : BFD_RELOC_HI16_PLTOFF
    492  - : BFD_RELOC_HI16_S_PLTOFF
    493  - : BFD_RELOC_8_PLTOFF
    494      For ELF.
    495 
    496  - : BFD_RELOC_68K_GLOB_DAT
    497  - : BFD_RELOC_68K_JMP_SLOT
    498  - : BFD_RELOC_68K_RELATIVE
    499      Relocations used by 68K ELF.
    500 
    501  - : BFD_RELOC_32_BASEREL
    502  - : BFD_RELOC_16_BASEREL
    503  - : BFD_RELOC_LO16_BASEREL
    504  - : BFD_RELOC_HI16_BASEREL
    505  - : BFD_RELOC_HI16_S_BASEREL
    506  - : BFD_RELOC_8_BASEREL
    507  - : BFD_RELOC_RVA
    508      Linkage-table relative.
    509 
    510  - : BFD_RELOC_8_FFnn
    511      Absolute 8-bit relocation, but used to form an address like 0xFFnn.
    512 
    513  - : BFD_RELOC_32_PCREL_S2
    514  - : BFD_RELOC_16_PCREL_S2
    515  - : BFD_RELOC_23_PCREL_S2
    516      These PC-relative relocations are stored as word displacements -
    517      i.e., byte displacements shifted right two bits.  The 30-bit word
    518      displacement (<<32_PCREL_S2>> - 32 bits, shifted 2) is used on the
    519      SPARC.  (SPARC tools generally refer to this as <<WDISP30>>.)  The
    520      signed 16-bit displacement is used on the MIPS, and the 23-bit
    521      displacement is used on the Alpha.
    522 
    523  - : BFD_RELOC_HI22
    524  - : BFD_RELOC_LO10
    525      High 22 bits and low 10 bits of 32-bit value, placed into lower
    526      bits of the target word.  These are used on the SPARC.
    527 
    528  - : BFD_RELOC_GPREL16
    529  - : BFD_RELOC_GPREL32
    530      For systems that allocate a Global Pointer register, these are
    531      displacements off that register.  These relocation types are
    532      handled specially, because the value the register will have is
    533      decided relatively late.
    534 
    535  - : BFD_RELOC_I960_CALLJ
    536      Reloc types used for i960/b.out.
    537 
    538  - : BFD_RELOC_NONE
    539  - : BFD_RELOC_SPARC_WDISP22
    540  - : BFD_RELOC_SPARC22
    541  - : BFD_RELOC_SPARC13
    542  - : BFD_RELOC_SPARC_GOT10
    543  - : BFD_RELOC_SPARC_GOT13
    544  - : BFD_RELOC_SPARC_GOT22
    545  - : BFD_RELOC_SPARC_PC10
    546  - : BFD_RELOC_SPARC_PC22
    547  - : BFD_RELOC_SPARC_WPLT30
    548  - : BFD_RELOC_SPARC_COPY
    549  - : BFD_RELOC_SPARC_GLOB_DAT
    550  - : BFD_RELOC_SPARC_JMP_SLOT
    551  - : BFD_RELOC_SPARC_RELATIVE
    552  - : BFD_RELOC_SPARC_UA16
    553  - : BFD_RELOC_SPARC_UA32
    554  - : BFD_RELOC_SPARC_UA64
    555      SPARC ELF relocations.  There is probably some overlap with other
    556      relocation types already defined.
    557 
    558  - : BFD_RELOC_SPARC_BASE13
    559  - : BFD_RELOC_SPARC_BASE22
    560      I think these are specific to SPARC a.out (e.g., Sun 4).
    561 
    562  - : BFD_RELOC_SPARC_64
    563  - : BFD_RELOC_SPARC_10
    564  - : BFD_RELOC_SPARC_11
    565  - : BFD_RELOC_SPARC_OLO10
    566  - : BFD_RELOC_SPARC_HH22
    567  - : BFD_RELOC_SPARC_HM10
    568  - : BFD_RELOC_SPARC_LM22
    569  - : BFD_RELOC_SPARC_PC_HH22
    570  - : BFD_RELOC_SPARC_PC_HM10
    571  - : BFD_RELOC_SPARC_PC_LM22
    572  - : BFD_RELOC_SPARC_WDISP16
    573  - : BFD_RELOC_SPARC_WDISP19
    574  - : BFD_RELOC_SPARC_7
    575  - : BFD_RELOC_SPARC_6
    576  - : BFD_RELOC_SPARC_5
    577  - : BFD_RELOC_SPARC_DISP64
    578  - : BFD_RELOC_SPARC_PLT64
    579  - : BFD_RELOC_SPARC_HIX22
    580  - : BFD_RELOC_SPARC_LOX10
    581  - : BFD_RELOC_SPARC_H44
    582  - : BFD_RELOC_SPARC_M44
    583  - : BFD_RELOC_SPARC_L44
    584  - : BFD_RELOC_SPARC_REGISTER
    585      SPARC64 relocations
    586 
    587  - : BFD_RELOC_SPARC_REV32
    588      SPARC little endian relocation
    589 
    590  - : BFD_RELOC_ALPHA_GPDISP_HI16
    591      Alpha ECOFF and ELF relocations.  Some of these treat the symbol or
    592      "addend" in some special way.  For GPDISP_HI16 ("gpdisp")
    593      relocations, the symbol is ignored when writing; when reading, it
    594      will be the absolute section symbol.  The addend is the
    595      displacement in bytes of the "lda" instruction from the "ldah"
    596      instruction (which is at the address of this reloc).
    597 
    598  - : BFD_RELOC_ALPHA_GPDISP_LO16
    599      For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
    600      with GPDISP_HI16 relocs.  The addend is ignored when writing the
    601      relocations out, and is filled in with the file's GP value on
    602      reading, for convenience.
    603 
    604  - : BFD_RELOC_ALPHA_GPDISP
    605      The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
    606      relocation except that there is no accompanying GPDISP_LO16
    607      relocation.
    608 
    609  - : BFD_RELOC_ALPHA_LITERAL
    610  - : BFD_RELOC_ALPHA_ELF_LITERAL
    611  - : BFD_RELOC_ALPHA_LITUSE
    612      The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
    613      the assembler turns it into a LDQ instruction to load the address
    614      of the symbol, and then fills in a register in the real
    615      instruction.
    616 
    617      The LITERAL reloc, at the LDQ instruction, refers to the .lita
    618      section symbol.  The addend is ignored when writing, but is filled
    619      in with the file's GP value on reading, for convenience, as with
    620      the GPDISP_LO16 reloc.
    621 
    622      The ELF_LITERAL reloc is somewhere between 16_GOTOFF and
    623      GPDISP_LO16.  It should refer to the symbol to be referenced, as
    624      with 16_GOTOFF, but it generates output not based on the position
    625      within the .got section, but relative to the GP value chosen for
    626      the file during the final link stage.
    627 
    628      The LITUSE reloc, on the instruction using the loaded address,
    629      gives information to the linker that it might be able to use to
    630      optimize away some literal section references.  The symbol is
    631      ignored (read as the absolute section symbol), and the "addend"
    632      indicates the type of instruction using the register: 1 - "memory"
    633      fmt insn 2 - byte-manipulation (byte offset reg) 3 - jsr (target
    634      of branch)
    635 
    636      The GNU linker currently doesn't do any of this optimizing.
    637 
    638  - : BFD_RELOC_ALPHA_USER_LITERAL
    639  - : BFD_RELOC_ALPHA_USER_LITUSE_BASE
    640  - : BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF
    641  - : BFD_RELOC_ALPHA_USER_LITUSE_JSR
    642  - : BFD_RELOC_ALPHA_USER_GPDISP
    643  - : BFD_RELOC_ALPHA_USER_GPRELHIGH
    644  - : BFD_RELOC_ALPHA_USER_GPRELLOW
    645      The BFD_RELOC_ALPHA_USER_* relocations are used by the assembler to
    646      process the explicit !<reloc>!sequence relocations, and are mapped
    647      into the normal relocations at the end of processing.
    648 
    649  - : BFD_RELOC_ALPHA_HINT
    650      The HINT relocation indicates a value that should be filled into
    651      the "hint" field of a jmp/jsr/ret instruction, for possible branch-
    652      prediction logic which may be provided on some processors.
    653 
    654  - : BFD_RELOC_ALPHA_LINKAGE
    655      The LINKAGE relocation outputs a linkage pair in the object file,
    656      which is filled by the linker.
    657 
    658  - : BFD_RELOC_ALPHA_CODEADDR
    659      The CODEADDR relocation outputs a STO_CA in the object file, which
    660      is filled by the linker.
    661 
    662  - : BFD_RELOC_MIPS_JMP
    663      Bits 27..2 of the relocation address shifted right 2 bits; simple
    664      reloc otherwise.
    665 
    666  - : BFD_RELOC_MIPS16_JMP
    667      The MIPS16 jump instruction.
    668 
    669  - : BFD_RELOC_MIPS16_GPREL
    670      MIPS16 GP relative reloc.
    671 
    672  - : BFD_RELOC_HI16
    673      High 16 bits of 32-bit value; simple reloc.
    674 
    675  - : BFD_RELOC_HI16_S
    676      High 16 bits of 32-bit value but the low 16 bits will be sign
    677      extended and added to form the final result.  If the low 16 bits
    678      form a negative number, we need to add one to the high value to
    679      compensate for the borrow when the low bits are added.
    680 
    681  - : BFD_RELOC_LO16
    682      Low 16 bits.
    683 
    684  - : BFD_RELOC_PCREL_HI16_S
    685      Like BFD_RELOC_HI16_S, but PC relative.
    686 
    687  - : BFD_RELOC_PCREL_LO16
    688      Like BFD_RELOC_LO16, but PC relative.
    689 
    690  - : BFD_RELOC_MIPS_GPREL
    691      Relocation relative to the global pointer.
    692 
    693  - : BFD_RELOC_MIPS_LITERAL
    694      Relocation against a MIPS literal section.
    695 
    696  - : BFD_RELOC_MIPS_GOT16
    697  - : BFD_RELOC_MIPS_CALL16
    698  - : BFD_RELOC_MIPS_GPREL32
    699  - : BFD_RELOC_MIPS_GOT_HI16
    700  - : BFD_RELOC_MIPS_GOT_LO16
    701  - : BFD_RELOC_MIPS_CALL_HI16
    702  - : BFD_RELOC_MIPS_CALL_LO16
    703  - : BFD_RELOC_MIPS_SUB
    704  - : BFD_RELOC_MIPS_GOT_PAGE
    705  - : BFD_RELOC_MIPS_GOT_OFST
    706  - : BFD_RELOC_MIPS_GOT_DISP
    707  - : BFD_RELOC_MIPS_SHIFT5
    708  - : BFD_RELOC_MIPS_SHIFT6
    709  - : BFD_RELOC_MIPS_INSERT_A
    710  - : BFD_RELOC_MIPS_INSERT_B
    711  - : BFD_RELOC_MIPS_DELETE
    712  - : BFD_RELOC_MIPS_HIGHEST
    713  - : BFD_RELOC_MIPS_HIGHER
    714  - : BFD_RELOC_MIPS_SCN_DISP
    715  - : BFD_RELOC_MIPS_REL16
    716  - : BFD_RELOC_MIPS_RELGOT
    717  - : BFD_RELOC_MIPS_JALR
    718      MIPS ELF relocations.
    719 
    720  - : BFD_RELOC_386_GOT32
    721  - : BFD_RELOC_386_PLT32
    722  - : BFD_RELOC_386_COPY
    723  - : BFD_RELOC_386_GLOB_DAT
    724  - : BFD_RELOC_386_JUMP_SLOT
    725  - : BFD_RELOC_386_RELATIVE
    726  - : BFD_RELOC_386_GOTOFF
    727  - : BFD_RELOC_386_GOTPC
    728      i386/elf relocations
    729 
    730  - : BFD_RELOC_X86_64_GOT32
    731  - : BFD_RELOC_X86_64_PLT32
    732  - : BFD_RELOC_X86_64_COPY
    733  - : BFD_RELOC_X86_64_GLOB_DAT
    734  - : BFD_RELOC_X86_64_JUMP_SLOT
    735  - : BFD_RELOC_X86_64_RELATIVE
    736  - : BFD_RELOC_X86_64_GOTPCREL
    737  - : BFD_RELOC_X86_64_32S
    738      x86-64/elf relocations
    739 
    740  - : BFD_RELOC_NS32K_IMM_8
    741  - : BFD_RELOC_NS32K_IMM_16
    742  - : BFD_RELOC_NS32K_IMM_32
    743  - : BFD_RELOC_NS32K_IMM_8_PCREL
    744  - : BFD_RELOC_NS32K_IMM_16_PCREL
    745  - : BFD_RELOC_NS32K_IMM_32_PCREL
    746  - : BFD_RELOC_NS32K_DISP_8
    747  - : BFD_RELOC_NS32K_DISP_16
    748  - : BFD_RELOC_NS32K_DISP_32
    749  - : BFD_RELOC_NS32K_DISP_8_PCREL
    750  - : BFD_RELOC_NS32K_DISP_16_PCREL
    751  - : BFD_RELOC_NS32K_DISP_32_PCREL
    752      ns32k relocations
    753 
    754  - : BFD_RELOC_PJ_CODE_HI16
    755  - : BFD_RELOC_PJ_CODE_LO16
    756  - : BFD_RELOC_PJ_CODE_DIR16
    757  - : BFD_RELOC_PJ_CODE_DIR32
    758  - : BFD_RELOC_PJ_CODE_REL16
    759  - : BFD_RELOC_PJ_CODE_REL32
    760      Picojava relocs.  Not all of these appear in object files.
    761 
    762  - : BFD_RELOC_PPC_B26
    763  - : BFD_RELOC_PPC_BA26
    764  - : BFD_RELOC_PPC_TOC16
    765  - : BFD_RELOC_PPC_B16
    766  - : BFD_RELOC_PPC_B16_BRTAKEN
    767  - : BFD_RELOC_PPC_B16_BRNTAKEN
    768  - : BFD_RELOC_PPC_BA16
    769  - : BFD_RELOC_PPC_BA16_BRTAKEN
    770  - : BFD_RELOC_PPC_BA16_BRNTAKEN
    771  - : BFD_RELOC_PPC_COPY
    772  - : BFD_RELOC_PPC_GLOB_DAT
    773  - : BFD_RELOC_PPC_JMP_SLOT
    774  - : BFD_RELOC_PPC_RELATIVE
    775  - : BFD_RELOC_PPC_LOCAL24PC
    776  - : BFD_RELOC_PPC_EMB_NADDR32
    777  - : BFD_RELOC_PPC_EMB_NADDR16
    778  - : BFD_RELOC_PPC_EMB_NADDR16_LO
    779  - : BFD_RELOC_PPC_EMB_NADDR16_HI
    780  - : BFD_RELOC_PPC_EMB_NADDR16_HA
    781  - : BFD_RELOC_PPC_EMB_SDAI16
    782  - : BFD_RELOC_PPC_EMB_SDA2I16
    783  - : BFD_RELOC_PPC_EMB_SDA2REL
    784  - : BFD_RELOC_PPC_EMB_SDA21
    785  - : BFD_RELOC_PPC_EMB_MRKREF
    786  - : BFD_RELOC_PPC_EMB_RELSEC16
    787  - : BFD_RELOC_PPC_EMB_RELST_LO
    788  - : BFD_RELOC_PPC_EMB_RELST_HI
    789  - : BFD_RELOC_PPC_EMB_RELST_HA
    790  - : BFD_RELOC_PPC_EMB_BIT_FLD
    791  - : BFD_RELOC_PPC_EMB_RELSDA
    792      Power(rs6000) and PowerPC relocations.
    793 
    794  - : BFD_RELOC_I370_D12
    795      IBM 370/390 relocations
    796 
    797  - : BFD_RELOC_CTOR
    798      The type of reloc used to build a contructor table - at the moment
    799      probably a 32 bit wide absolute relocation, but the target can
    800      choose.  It generally does map to one of the other relocation
    801      types.
    802 
    803  - : BFD_RELOC_ARM_PCREL_BRANCH
    804      ARM 26 bit pc-relative branch.  The lowest two bits must be zero
    805      and are not stored in the instruction.
    806 
    807  - : BFD_RELOC_ARM_PCREL_BLX
    808      ARM 26 bit pc-relative branch.  The lowest bit must be zero and is
    809      not stored in the instruction.  The 2nd lowest bit comes from a 1
    810      bit field in the instruction.
    811 
    812  - : BFD_RELOC_THUMB_PCREL_BLX
    813      Thumb 22 bit pc-relative branch.  The lowest bit must be zero and
    814      is not stored in the instruction.  The 2nd lowest bit comes from a
    815      1 bit field in the instruction.
    816 
    817  - : BFD_RELOC_ARM_IMMEDIATE
    818  - : BFD_RELOC_ARM_ADRL_IMMEDIATE
    819  - : BFD_RELOC_ARM_OFFSET_IMM
    820  - : BFD_RELOC_ARM_SHIFT_IMM
    821  - : BFD_RELOC_ARM_SWI
    822  - : BFD_RELOC_ARM_MULTI
    823  - : BFD_RELOC_ARM_CP_OFF_IMM
    824  - : BFD_RELOC_ARM_ADR_IMM
    825  - : BFD_RELOC_ARM_LDR_IMM
    826  - : BFD_RELOC_ARM_LITERAL
    827  - : BFD_RELOC_ARM_IN_POOL
    828  - : BFD_RELOC_ARM_OFFSET_IMM8
    829  - : BFD_RELOC_ARM_HWLITERAL
    830  - : BFD_RELOC_ARM_THUMB_ADD
    831  - : BFD_RELOC_ARM_THUMB_IMM
    832  - : BFD_RELOC_ARM_THUMB_SHIFT
    833  - : BFD_RELOC_ARM_THUMB_OFFSET
    834  - : BFD_RELOC_ARM_GOT12
    835  - : BFD_RELOC_ARM_GOT32
    836  - : BFD_RELOC_ARM_JUMP_SLOT
    837  - : BFD_RELOC_ARM_COPY
    838  - : BFD_RELOC_ARM_GLOB_DAT
    839  - : BFD_RELOC_ARM_PLT32
    840  - : BFD_RELOC_ARM_RELATIVE
    841  - : BFD_RELOC_ARM_GOTOFF
    842  - : BFD_RELOC_ARM_GOTPC
    843      These relocs are only used within the ARM assembler.  They are not
    844      (at present) written to any object files.
    845 
    846  - : BFD_RELOC_SH_PCDISP8BY2
    847  - : BFD_RELOC_SH_PCDISP12BY2
    848  - : BFD_RELOC_SH_IMM4
    849  - : BFD_RELOC_SH_IMM4BY2
    850  - : BFD_RELOC_SH_IMM4BY4
    851  - : BFD_RELOC_SH_IMM8
    852  - : BFD_RELOC_SH_IMM8BY2
    853  - : BFD_RELOC_SH_IMM8BY4
    854  - : BFD_RELOC_SH_PCRELIMM8BY2
    855  - : BFD_RELOC_SH_PCRELIMM8BY4
    856  - : BFD_RELOC_SH_SWITCH16
    857  - : BFD_RELOC_SH_SWITCH32
    858  - : BFD_RELOC_SH_USES
    859  - : BFD_RELOC_SH_COUNT
    860  - : BFD_RELOC_SH_ALIGN
    861  - : BFD_RELOC_SH_CODE
    862  - : BFD_RELOC_SH_DATA
    863  - : BFD_RELOC_SH_LABEL
    864  - : BFD_RELOC_SH_LOOP_START
    865  - : BFD_RELOC_SH_LOOP_END
    866  - : BFD_RELOC_SH_COPY
    867  - : BFD_RELOC_SH_GLOB_DAT
    868  - : BFD_RELOC_SH_JMP_SLOT
    869  - : BFD_RELOC_SH_RELATIVE
    870  - : BFD_RELOC_SH_GOTPC
    871      Hitachi SH relocs.  Not all of these appear in object files.
    872 
    873  - : BFD_RELOC_THUMB_PCREL_BRANCH9
    874  - : BFD_RELOC_THUMB_PCREL_BRANCH12
    875  - : BFD_RELOC_THUMB_PCREL_BRANCH23
    876      Thumb 23-, 12- and 9-bit pc-relative branches.  The lowest bit must
    877      be zero and is not stored in the instruction.
    878 
    879  - : BFD_RELOC_ARC_B22_PCREL
    880      ARC Cores relocs.  ARC 22 bit pc-relative branch.  The lowest two
    881      bits must be zero and are not stored in the instruction.  The high
    882      20 bits are installed in bits 26 through 7 of the instruction.
    883 
    884  - : BFD_RELOC_ARC_B26
    885      ARC 26 bit absolute branch.  The lowest two bits must be zero and
    886      are not stored in the instruction.  The high 24 bits are installed
    887      in bits 23 through 0.
    888 
    889  - : BFD_RELOC_D10V_10_PCREL_R
    890      Mitsubishi D10V relocs.  This is a 10-bit reloc with the right 2
    891      bits assumed to be 0.
    892 
    893  - : BFD_RELOC_D10V_10_PCREL_L
    894      Mitsubishi D10V relocs.  This is a 10-bit reloc with the right 2
    895      bits assumed to be 0.  This is the same as the previous reloc
    896      except it is in the left container, i.e., shifted left 15 bits.
    897 
    898  - : BFD_RELOC_D10V_18
    899      This is an 18-bit reloc with the right 2 bits assumed to be 0.
    900 
    901  - : BFD_RELOC_D10V_18_PCREL
    902      This is an 18-bit reloc with the right 2 bits assumed to be 0.
    903 
    904  - : BFD_RELOC_D30V_6
    905      Mitsubishi D30V relocs.  This is a 6-bit absolute reloc.
    906 
    907  - : BFD_RELOC_D30V_9_PCREL
    908      This is a 6-bit pc-relative reloc with the right 3 bits assumed to
    909      be 0.
    910 
    911  - : BFD_RELOC_D30V_9_PCREL_R
    912      This is a 6-bit pc-relative reloc with the right 3 bits assumed to
    913      be 0. Same as the previous reloc but on the right side of the
    914      container.
    915 
    916  - : BFD_RELOC_D30V_15
    917      This is a 12-bit absolute reloc with the right 3 bitsassumed to be
    918      0.
    919 
    920  - : BFD_RELOC_D30V_15_PCREL
    921      This is a 12-bit pc-relative reloc with the right 3 bits assumed
    922      to be 0.
    923 
    924  - : BFD_RELOC_D30V_15_PCREL_R
    925      This is a 12-bit pc-relative reloc with the right 3 bits assumed
    926      to be 0. Same as the previous reloc but on the right side of the
    927      container.
    928 
    929  - : BFD_RELOC_D30V_21
    930      This is an 18-bit absolute reloc with the right 3 bits assumed to
    931      be 0.
    932 
    933  - : BFD_RELOC_D30V_21_PCREL
    934      This is an 18-bit pc-relative reloc with the right 3 bits assumed
    935      to be 0.
    936 
    937  - : BFD_RELOC_D30V_21_PCREL_R
    938      This is an 18-bit pc-relative reloc with the right 3 bits assumed
    939      to be 0. Same as the previous reloc but on the right side of the
    940      container.
    941 
    942  - : BFD_RELOC_D30V_32
    943      This is a 32-bit absolute reloc.
    944 
    945  - : BFD_RELOC_D30V_32_PCREL
    946      This is a 32-bit pc-relative reloc.
    947 
    948  - : BFD_RELOC_M32R_24
    949      Mitsubishi M32R relocs.  This is a 24 bit absolute address.
    950 
    951  - : BFD_RELOC_M32R_10_PCREL
    952      This is a 10-bit pc-relative reloc with the right 2 bits assumed
    953      to be 0.
    954 
    955  - : BFD_RELOC_M32R_18_PCREL
    956      This is an 18-bit reloc with the right 2 bits assumed to be 0.
    957 
    958  - : BFD_RELOC_M32R_26_PCREL
    959      This is a 26-bit reloc with the right 2 bits assumed to be 0.
    960 
    961  - : BFD_RELOC_M32R_HI16_ULO
    962      This is a 16-bit reloc containing the high 16 bits of an address
    963      used when the lower 16 bits are treated as unsigned.
    964 
    965  - : BFD_RELOC_M32R_HI16_SLO
    966      This is a 16-bit reloc containing the high 16 bits of an address
    967      used when the lower 16 bits are treated as signed.
    968 
    969  - : BFD_RELOC_M32R_LO16
    970      This is a 16-bit reloc containing the lower 16 bits of an address.
    971 
    972  - : BFD_RELOC_M32R_SDA16
    973      This is a 16-bit reloc containing the small data area offset for
    974      use in add3, load, and store instructions.
    975 
    976  - : BFD_RELOC_V850_9_PCREL
    977      This is a 9-bit reloc
    978 
    979  - : BFD_RELOC_V850_22_PCREL
    980      This is a 22-bit reloc
    981 
    982  - : BFD_RELOC_V850_SDA_16_16_OFFSET
    983      This is a 16 bit offset from the short data area pointer.
    984 
    985  - : BFD_RELOC_V850_SDA_15_16_OFFSET
    986      This is a 16 bit offset (of which only 15 bits are used) from the
    987      short data area pointer.
    988 
    989  - : BFD_RELOC_V850_ZDA_16_16_OFFSET
    990      This is a 16 bit offset from the zero data area pointer.
    991 
    992  - : BFD_RELOC_V850_ZDA_15_16_OFFSET
    993      This is a 16 bit offset (of which only 15 bits are used) from the
    994      zero data area pointer.
    995 
    996  - : BFD_RELOC_V850_TDA_6_8_OFFSET
    997      This is an 8 bit offset (of which only 6 bits are used) from the
    998      tiny data area pointer.
    999 
    1000  - : BFD_RELOC_V850_TDA_7_8_OFFSET
    1001      This is an 8bit offset (of which only 7 bits are used) from the
    1002      tiny data area pointer.
    1003 
    1004  - : BFD_RELOC_V850_TDA_7_7_OFFSET
    1005      This is a 7 bit offset from the tiny data area pointer.
    1006 
    1007  - : BFD_RELOC_V850_TDA_16_16_OFFSET
    1008      This is a 16 bit offset from the tiny data area pointer.
    1009 
    1010  - : BFD_RELOC_V850_TDA_4_5_OFFSET
    1011      This is a 5 bit offset (of which only 4 bits are used) from the
    1012      tiny data area pointer.
    1013 
    1014  - : BFD_RELOC_V850_TDA_4_4_OFFSET
    1015      This is a 4 bit offset from the tiny data area pointer.
    1016 
    1017  - : BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET
    1018      This is a 16 bit offset from the short data area pointer, with the
    1019      bits placed non-contigously in the instruction.
    1020 
    1021  - : BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET
    1022      This is a 16 bit offset from the zero data area pointer, with the
    1023      bits placed non-contigously in the instruction.
    1024 
    1025  - : BFD_RELOC_V850_CALLT_6_7_OFFSET
    1026      This is a 6 bit offset from the call table base pointer.
    1027 
    1028  - : BFD_RELOC_V850_CALLT_16_16_OFFSET
    1029      This is a 16 bit offset from the call table base pointer.
    1030 
    1031  - : BFD_RELOC_MN10300_32_PCREL
    1032      This is a 32bit pcrel reloc for the mn10300, offset by two bytes
    1033      in the instruction.
    1034 
    1035  - : BFD_RELOC_MN10300_16_PCREL
    1036      This is a 16bit pcrel reloc for the mn10300, offset by two bytes
    1037      in the instruction.
    1038 
    1039  - : BFD_RELOC_TIC30_LDP
    1040      This is a 8bit DP reloc for the tms320c30, where the most
    1041      significant 8 bits of a 24 bit word are placed into the least
    1042      significant 8 bits of the opcode.
    1043 
    1044  - : BFD_RELOC_TIC54X_PARTLS7
    1045      This is a 7bit reloc for the tms320c54x, where the least
    1046      significant 7 bits of a 16 bit word are placed into the least
    1047      significant 7 bits of the opcode.
    1048 
    1049  - : BFD_RELOC_TIC54X_PARTMS9
    1050      This is a 9bit DP reloc for the tms320c54x, where the most
    1051      significant 9 bits of a 16 bit word are placed into the least
    1052      significant 9 bits of the opcode.
    1053 
    1054  - : BFD_RELOC_TIC54X_23
    1055      This is an extended address 23-bit reloc for the tms320c54x.
    1056 
    1057  - : BFD_RELOC_TIC54X_16_OF_23
    1058      This is a 16-bit reloc for the tms320c54x, where the least
    1059      significant 16 bits of a 23-bit extended address are placed into
    1060      the opcode.
    1061 
    1062  - : BFD_RELOC_TIC54X_MS7_OF_23
    1063      This is a reloc for the tms320c54x, where the most significant 7
    1064      bits of a 23-bit extended address are placed into the opcode.
    1065 
    1066  - : BFD_RELOC_FR30_48
    1067      This is a 48 bit reloc for the FR30 that stores 32 bits.
    1068 
    1069  - : BFD_RELOC_FR30_20
    1070      This is a 32 bit reloc for the FR30 that stores 20 bits split up
    1071      into two sections.
    1072 
    1073  - : BFD_RELOC_FR30_6_IN_4
    1074      This is a 16 bit reloc for the FR30 that stores a 6 bit word
    1075      offset in 4 bits.
    1076 
    1077  - : BFD_RELOC_FR30_8_IN_8
    1078      This is a 16 bit reloc for the FR30 that stores an 8 bit byte
    1079      offset into 8 bits.
    1080 
    1081  - : BFD_RELOC_FR30_9_IN_8
    1082      This is a 16 bit reloc for the FR30 that stores a 9 bit short
    1083      offset into 8 bits.
    1084 
    1085  - : BFD_RELOC_FR30_10_IN_8
    1086      This is a 16 bit reloc for the FR30 that stores a 10 bit word
    1087      offset into 8 bits.
    1088 
    1089  - : BFD_RELOC_FR30_9_PCREL
    1090      This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
    1091      short offset into 8 bits.
    1092 
    1093  - : BFD_RELOC_FR30_12_PCREL
    1094      This is a 16 bit reloc for the FR30 that stores a 12 bit pc
    1095      relative short offset into 11 bits.
    1096 
    1097  - : BFD_RELOC_MCORE_PCREL_IMM8BY4
    1098  - : BFD_RELOC_MCORE_PCREL_IMM11BY2
    1099  - : BFD_RELOC_MCORE_PCREL_IMM4BY2
    1100  - : BFD_RELOC_MCORE_PCREL_32
    1101  - : BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2
    1102  - : BFD_RELOC_MCORE_RVA
    1103      Motorola Mcore relocations.
    1104 
    1105  - : BFD_RELOC_AVR_7_PCREL
    1106      This is a 16 bit reloc for the AVR that stores 8 bit pc relative
    1107      short offset into 7 bits.
    1108 
    1109  - : BFD_RELOC_AVR_13_PCREL
    1110      This is a 16 bit reloc for the AVR that stores 13 bit pc relative
    1111      short offset into 12 bits.
    1112 
    1113  - : BFD_RELOC_AVR_16_PM
    1114      This is a 16 bit reloc for the AVR that stores 17 bit value
    1115      (usually program memory address) into 16 bits.
    1116 
    1117  - : BFD_RELOC_AVR_LO8_LDI
    1118      This is a 16 bit reloc for the AVR that stores 8 bit value (usually
    1119      data memory address) into 8 bit immediate value of LDI insn.
    1120 
    1121  - : BFD_RELOC_AVR_HI8_LDI
    1122      This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
    1123      bit of data memory address) into 8 bit immediate value of LDI insn.
    1124 
    1125  - : BFD_RELOC_AVR_HH8_LDI
    1126      This is a 16 bit reloc for the AVR that stores 8 bit value (most
    1127      high 8 bit of program memory address) into 8 bit immediate value
    1128      of LDI insn.
    1129 
    1130  - : BFD_RELOC_AVR_LO8_LDI_NEG
    1131      This is a 16 bit reloc for the AVR that stores negated 8 bit value
    1132      (usually data memory address) into 8 bit immediate value of SUBI
    1133      insn.
    1134 
    1135  - : BFD_RELOC_AVR_HI8_LDI_NEG
    1136      This is a 16 bit reloc for the AVR that stores negated 8 bit value
    1137      (high 8 bit of data memory address) into 8 bit immediate value of
    1138      SUBI insn.
    1139 
    1140  - : BFD_RELOC_AVR_HH8_LDI_NEG
    1141      This is a 16 bit reloc for the AVR that stores negated 8 bit value
    1142      (most high 8 bit of program memory address) into 8 bit immediate
    1143      value of LDI or SUBI insn.
    1144 
    1145  - : BFD_RELOC_AVR_LO8_LDI_PM
    1146      This is a 16 bit reloc for the AVR that stores 8 bit value (usually
    1147      command address) into 8 bit immediate value of LDI insn.
    1148 
    1149  - : BFD_RELOC_AVR_HI8_LDI_PM
    1150      This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
    1151      bit of command address) into 8 bit immediate value of LDI insn.
    1152 
    1153  - : BFD_RELOC_AVR_HH8_LDI_PM
    1154      This is a 16 bit reloc for the AVR that stores 8 bit value (most
    1155      high 8 bit of command address) into 8 bit immediate value of LDI
    1156      insn.
    1157 
    1158  - : BFD_RELOC_AVR_LO8_LDI_PM_NEG
    1159      This is a 16 bit reloc for the AVR that stores negated 8 bit value
    1160      (usually command address) into 8 bit immediate value of SUBI insn.
    1161 
    1162  - : BFD_RELOC_AVR_HI8_LDI_PM_NEG
    1163      This is a 16 bit reloc for the AVR that stores negated 8 bit value
    1164      (high 8 bit of 16 bit command address) into 8 bit immediate value
    1165      of SUBI insn.
    1166 
    1167  - : BFD_RELOC_AVR_HH8_LDI_PM_NEG
    1168      This is a 16 bit reloc for the AVR that stores negated 8 bit value
    1169      (high 6 bit of 22 bit command address) into 8 bit immediate value
    1170      of SUBI insn.
    1171 
    1172  - : BFD_RELOC_AVR_CALL
    1173      This is a 32 bit reloc for the AVR that stores 23 bit value into
    1174      22 bits.
    1175 
    1176  - : BFD_RELOC_VTABLE_INHERIT
    1177  - : BFD_RELOC_VTABLE_ENTRY
    1178      These two relocations are used by the linker to determine which of
    1179      the entries in a C++ virtual function table are actually used.
    1180      When the -gc-sections option is given, the linker will zero out
    1181      the entries that are not used, so that the code for those
    1182      functions need not be included in the output.
    1183 
    1184      VTABLE_INHERIT is a zero-space relocation used to describe to the
    1185      linker the inheritence tree of a C++ virtual function table.  The
    1186      relocation's symbol should be the parent class' vtable, and the
    1187      relocation should be located at the child vtable.
    1188 
    1189      VTABLE_ENTRY is a zero-space relocation that describes the use of a
    1190      virtual function table entry.  The reloc's symbol should refer to
    1191      the table of the class mentioned in the code.  Off of that base,
    1192      an offset describes the entry that is being used.  For Rela hosts,
    1193      this offset is stored in the reloc's addend.  For Rel hosts, we
    1194      are forced to put this offset in the reloc's section offset.
    1195 
    1196  - : BFD_RELOC_IA64_IMM14
    1197  - : BFD_RELOC_IA64_IMM22
    1198  - : BFD_RELOC_IA64_IMM64
    1199  - : BFD_RELOC_IA64_DIR32MSB
    1200  - : BFD_RELOC_IA64_DIR32LSB
    1201  - : BFD_RELOC_IA64_DIR64MSB
    1202  - : BFD_RELOC_IA64_DIR64LSB
    1203  - : BFD_RELOC_IA64_GPREL22
    1204  - : BFD_RELOC_IA64_GPREL64I
    1205  - : BFD_RELOC_IA64_GPREL32MSB
    1206  - : BFD_RELOC_IA64_GPREL32LSB
    1207  - : BFD_RELOC_IA64_GPREL64MSB
    1208  - : BFD_RELOC_IA64_GPREL64LSB
    1209  - : BFD_RELOC_IA64_LTOFF22
    1210  - : BFD_RELOC_IA64_LTOFF64I
    1211  - : BFD_RELOC_IA64_PLTOFF22
    1212  - : BFD_RELOC_IA64_PLTOFF64I
    1213  - : BFD_RELOC_IA64_PLTOFF64MSB
    1214  - : BFD_RELOC_IA64_PLTOFF64LSB
    1215  - : BFD_RELOC_IA64_FPTR64I
    1216  - : BFD_RELOC_IA64_FPTR32MSB
    1217  - : BFD_RELOC_IA64_FPTR32LSB
    1218  - : BFD_RELOC_IA64_FPTR64MSB
    1219  - : BFD_RELOC_IA64_FPTR64LSB
    1220  - : BFD_RELOC_IA64_PCREL21B
    1221  - : BFD_RELOC_IA64_PCREL21BI
    1222  - : BFD_RELOC_IA64_PCREL21M
    1223  - : BFD_RELOC_IA64_PCREL21F
    1224  - : BFD_RELOC_IA64_PCREL22
    1225  - : BFD_RELOC_IA64_PCREL60B
    1226  - : BFD_RELOC_IA64_PCREL64I
    1227  - : BFD_RELOC_IA64_PCREL32MSB
    1228  - : BFD_RELOC_IA64_PCREL32LSB
    1229  - : BFD_RELOC_IA64_PCREL64MSB
    1230  - : BFD_RELOC_IA64_PCREL64LSB
    1231  - : BFD_RELOC_IA64_LTOFF_FPTR22
    1232  - : BFD_RELOC_IA64_LTOFF_FPTR64I
    1233  - : BFD_RELOC_IA64_LTOFF_FPTR64MSB
    1234  - : BFD_RELOC_IA64_LTOFF_FPTR64LSB
    1235  - : BFD_RELOC_IA64_SEGREL32MSB
    1236  - : BFD_RELOC_IA64_SEGREL32LSB
    1237  - : BFD_RELOC_IA64_SEGREL64MSB
    1238  - : BFD_RELOC_IA64_SEGREL64LSB
    1239  - : BFD_RELOC_IA64_SECREL32MSB
    1240  - : BFD_RELOC_IA64_SECREL32LSB
    1241  - : BFD_RELOC_IA64_SECREL64MSB
    1242  - : BFD_RELOC_IA64_SECREL64LSB
    1243  - : BFD_RELOC_IA64_REL32MSB
    1244  - : BFD_RELOC_IA64_REL32LSB
    1245  - : BFD_RELOC_IA64_REL64MSB
    1246  - : BFD_RELOC_IA64_REL64LSB
    1247  - : BFD_RELOC_IA64_LTV32MSB
    1248  - : BFD_RELOC_IA64_LTV32LSB
    1249  - : BFD_RELOC_IA64_LTV64MSB
    1250  - : BFD_RELOC_IA64_LTV64LSB
    1251  - : BFD_RELOC_IA64_IPLTMSB
    1252  - : BFD_RELOC_IA64_IPLTLSB
    1253  - : BFD_RELOC_IA64_COPY
    1254  - : BFD_RELOC_IA64_TPREL22
    1255  - : BFD_RELOC_IA64_TPREL64MSB
    1256  - : BFD_RELOC_IA64_TPREL64LSB
    1257  - : BFD_RELOC_IA64_LTOFF_TP22
    1258  - : BFD_RELOC_IA64_LTOFF22X
    1259  - : BFD_RELOC_IA64_LDXMOV
    1260      Intel IA64 Relocations.
    1261 
    1262  - : BFD_RELOC_M68HC11_HI8
    1263      Motorola 68HC11 reloc.  This is the 8 bits high part of an
    1264      absolute address.
    1265 
    1266  - : BFD_RELOC_M68HC11_LO8
    1267      Motorola 68HC11 reloc.  This is the 8 bits low part of an absolute
    1268      address.
    1269 
    1270  - : BFD_RELOC_M68HC11_3B
    1271      Motorola 68HC11 reloc.  This is the 3 bits of a value.
    1272 
    1273  - : BFD_RELOC_CRIS_BDISP8
    1274  - : BFD_RELOC_CRIS_UNSIGNED_5
    1275  - : BFD_RELOC_CRIS_SIGNED_6
    1276  - : BFD_RELOC_CRIS_UNSIGNED_6
    1277  - : BFD_RELOC_CRIS_UNSIGNED_4
    1278      These relocs are only used within the CRIS assembler.  They are not
    1279      (at present) written to any object files.
    1280 
    1281  - : BFD_RELOC_860_COPY
    1282  - : BFD_RELOC_860_GLOB_DAT
    1283  - : BFD_RELOC_860_JUMP_SLOT
    1284  - : BFD_RELOC_860_RELATIVE
    1285  - : BFD_RELOC_860_PC26
    1286  - : BFD_RELOC_860_PLT26
    1287  - : BFD_RELOC_860_PC16
    1288  - : BFD_RELOC_860_LOW0
    1289  - : BFD_RELOC_860_SPLIT0
    1290  - : BFD_RELOC_860_LOW1
    1291  - : BFD_RELOC_860_SPLIT1
    1292  - : BFD_RELOC_860_LOW2
    1293  - : BFD_RELOC_860_SPLIT2
    1294  - : BFD_RELOC_860_LOW3
    1295  - : BFD_RELOC_860_LOGOT0
    1296  - : BFD_RELOC_860_SPGOT0
    1297  - : BFD_RELOC_860_LOGOT1
    1298  - : BFD_RELOC_860_SPGOT1
    1299  - : BFD_RELOC_860_LOGOTOFF0
    1300  - : BFD_RELOC_860_SPGOTOFF0
    1301  - : BFD_RELOC_860_LOGOTOFF1
    1302  - : BFD_RELOC_860_SPGOTOFF1
    1303  - : BFD_RELOC_860_LOGOTOFF2
    1304  - : BFD_RELOC_860_LOGOTOFF3
    1305  - : BFD_RELOC_860_LOPC
    1306  - : BFD_RELOC_860_HIGHADJ
    1307  - : BFD_RELOC_860_HAGOT
    1308  - : BFD_RELOC_860_HAGOTOFF
    1309  - : BFD_RELOC_860_HAPC
    1310  - : BFD_RELOC_860_HIGH
    1311  - : BFD_RELOC_860_HIGOT
    1312  - : BFD_RELOC_860_HIGOTOFF
    1313      Intel i860 Relocations.
    1314 
    1315 
    1316      typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
    1317 
    1318 `bfd_reloc_type_lookup'
    1319 .......................
    1320 
    1321    *Synopsis*
    1322      reloc_howto_type *
    1323      bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code);
    1324    *Description*
    1325 Return a pointer to a howto structure which, when invoked, will perform
    1326 the relocation CODE on data from the architecture noted.
    1327 
    1328 `bfd_default_reloc_type_lookup'
    1329 ...............................
    1330 
    1331    *Synopsis*
    1332      reloc_howto_type *bfd_default_reloc_type_lookup
    1333         (bfd *abfd, bfd_reloc_code_real_type  code);
    1334    *Description*
    1335 Provides a default relocation lookup routine for any architecture.
    1336 
    1337 `bfd_get_reloc_code_name'
    1338 .........................
    1339 
    1340    *Synopsis*
    1341      const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
    1342    *Description*
    1343 Provides a printable name for the supplied relocation code.  Useful
    1344 mainly for printing error messages.
    1345 
    1346 `bfd_generic_relax_section'
    1347 ...........................
    1348 
    1349    *Synopsis*
    1350      boolean bfd_generic_relax_section
    1351         (bfd *abfd,
    1352          asection *section,
    1353          struct bfd_link_info *,
    1354          boolean *);
    1355    *Description*
    1356 Provides default handling for relaxing for back ends which don't do
    1357 relaxing - i.e., does nothing.
    1358 
    1359 `bfd_generic_gc_sections'
    1360 .........................
    1361 
    1362    *Synopsis*
    1363      boolean bfd_generic_gc_sections
    1364         (bfd *, struct bfd_link_info *);
    1365    *Description*
    1366 Provides default handling for relaxing for back ends which don't do
    1367 section gc - i.e., does nothing.
    1368 
    1369 `bfd_generic_get_relocated_section_contents'
    1370 ............................................
    1371 
    1372    *Synopsis*
    1373      bfd_byte *
    1374      bfd_generic_get_relocated_section_contents (bfd *abfd,
    1375          struct bfd_link_info *link_info,
    1376          struct bfd_link_order *link_order,
    1377          bfd_byte *data,
    1378          boolean relocateable,
    1379          asymbol **symbols);
    1380    *Description*
    1381 Provides default handling of relocation effort for back ends which
    1382 can't be bothered to do it efficiently.
    1383 
    1384 
    1385 File: bfd.info,  Node: Core Files,  Next: Targets,  Prev: Relocations,  Up: BFD front end
    1386 
    1387 Core files
    1388 ==========
    1389 
    1390    *Description*
    1391 These are functions pertaining to core files.
    1392 
    1393 `bfd_core_file_failing_command'
    1394 ...............................
    1395 
    1396    *Synopsis*
    1397      CONST char *bfd_core_file_failing_command(bfd *abfd);
    1398    *Description*
    1399 Return a read-only string explaining which program was running when it
    1400 failed and produced the core file ABFD.
    1401 
    1402 `bfd_core_file_failing_signal'
    1403 ..............................
    1404 
    1405    *Synopsis*
    1406      int bfd_core_file_failing_signal(bfd *abfd);
    1407    *Description*
    1408 Returns the signal number which caused the core dump which generated
    1409 the file the BFD ABFD is attached to.
    1410 
    1411 `core_file_matches_executable_p'
    1412 ................................
    1413 
    1414    *Synopsis*
    1415      boolean core_file_matches_executable_p
    1416         (bfd *core_bfd, bfd *exec_bfd);
    1417    *Description*
    1418 Return `true' if the core file attached to CORE_BFD was generated by a
    1419 run of the executable file attached to EXEC_BFD, `false' otherwise.
    1420 
  • branches/GNU/src/binutils/bfd/doc/bfd.info-4

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 This is bfd.info, produced by makeinfo version 4.0 from bfd.texinfo.
     1This is bfd.info, produced by makeinfo version 4.3 from bfd.texinfo.
    22
    33START-INFO-DIR-ENTRY
     
    77   This file documents the BFD library.
    88
    9    Copyright (C) 1991, 2000 Free Software Foundation, Inc.
     9   Copyright (C) 1991, 2000, 2001, 2003 Free Software Foundation, Inc.
    1010
    1111   Permission is granted to copy, distribute and/or modify this document
     
    1717
    1818
     19File: bfd.info,  Node: howto manager,  Prev: typedef arelent,  Up: Relocations
     20
     21The howto manager
     22=================
     23
     24   When an application wants to create a relocation, but doesn't know
     25what the target machine might call it, it can find out by using this
     26bit of code.
     27
     28`bfd_reloc_code_type'
     29.....................
     30
     31   *Description*
     32The insides of a reloc code.  The idea is that, eventually, there will
     33be one enumerator for every type of relocation we ever do.  Pass one of
     34these values to `bfd_reloc_type_lookup', and it'll return a howto
     35pointer.
     36
     37   This does mean that the application must determine the correct
     38enumerator value; you can't get a howto pointer from a random set of
     39attributes.
     40
     41   Here are the possible values for `enum bfd_reloc_code_real':
     42
     43 - : BFD_RELOC_64
     44 - : BFD_RELOC_32
     45 - : BFD_RELOC_26
     46 - : BFD_RELOC_24
     47 - : BFD_RELOC_16
     48 - : BFD_RELOC_14
     49 - : BFD_RELOC_8
     50     Basic absolute relocations of N bits.
     51
     52 - : BFD_RELOC_64_PCREL
     53 - : BFD_RELOC_32_PCREL
     54 - : BFD_RELOC_24_PCREL
     55 - : BFD_RELOC_16_PCREL
     56 - : BFD_RELOC_12_PCREL
     57 - : BFD_RELOC_8_PCREL
     58     PC-relative relocations.  Sometimes these are relative to the
     59     address of the relocation itself; sometimes they are relative to
     60     the start of the section containing the relocation.  It depends on
     61     the specific target.
     62
     63     The 24-bit relocation is used in some Intel 960 configurations.
     64
     65 - : BFD_RELOC_32_GOT_PCREL
     66 - : BFD_RELOC_16_GOT_PCREL
     67 - : BFD_RELOC_8_GOT_PCREL
     68 - : BFD_RELOC_32_GOTOFF
     69 - : BFD_RELOC_16_GOTOFF
     70 - : BFD_RELOC_LO16_GOTOFF
     71 - : BFD_RELOC_HI16_GOTOFF
     72 - : BFD_RELOC_HI16_S_GOTOFF
     73 - : BFD_RELOC_8_GOTOFF
     74 - : BFD_RELOC_64_PLT_PCREL
     75 - : BFD_RELOC_32_PLT_PCREL
     76 - : BFD_RELOC_24_PLT_PCREL
     77 - : BFD_RELOC_16_PLT_PCREL
     78 - : BFD_RELOC_8_PLT_PCREL
     79 - : BFD_RELOC_64_PLTOFF
     80 - : BFD_RELOC_32_PLTOFF
     81 - : BFD_RELOC_16_PLTOFF
     82 - : BFD_RELOC_LO16_PLTOFF
     83 - : BFD_RELOC_HI16_PLTOFF
     84 - : BFD_RELOC_HI16_S_PLTOFF
     85 - : BFD_RELOC_8_PLTOFF
     86     For ELF.
     87
     88 - : BFD_RELOC_68K_GLOB_DAT
     89 - : BFD_RELOC_68K_JMP_SLOT
     90 - : BFD_RELOC_68K_RELATIVE
     91     Relocations used by 68K ELF.
     92
     93 - : BFD_RELOC_32_BASEREL
     94 - : BFD_RELOC_16_BASEREL
     95 - : BFD_RELOC_LO16_BASEREL
     96 - : BFD_RELOC_HI16_BASEREL
     97 - : BFD_RELOC_HI16_S_BASEREL
     98 - : BFD_RELOC_8_BASEREL
     99 - : BFD_RELOC_RVA
     100     Linkage-table relative.
     101
     102 - : BFD_RELOC_8_FFnn
     103     Absolute 8-bit relocation, but used to form an address like 0xFFnn.
     104
     105 - : BFD_RELOC_32_PCREL_S2
     106 - : BFD_RELOC_16_PCREL_S2
     107 - : BFD_RELOC_23_PCREL_S2
     108     These PC-relative relocations are stored as word displacements -
     109     i.e., byte displacements shifted right two bits.  The 30-bit word
     110     displacement (<<32_PCREL_S2>> - 32 bits, shifted 2) is used on the
     111     SPARC.  (SPARC tools generally refer to this as <<WDISP30>>.)  The
     112     signed 16-bit displacement is used on the MIPS, and the 23-bit
     113     displacement is used on the Alpha.
     114
     115 - : BFD_RELOC_HI22
     116 - : BFD_RELOC_LO10
     117     High 22 bits and low 10 bits of 32-bit value, placed into lower
     118     bits of the target word.  These are used on the SPARC.
     119
     120 - : BFD_RELOC_GPREL16
     121 - : BFD_RELOC_GPREL32
     122     For systems that allocate a Global Pointer register, these are
     123     displacements off that register.  These relocation types are
     124     handled specially, because the value the register will have is
     125     decided relatively late.
     126
     127 - : BFD_RELOC_I960_CALLJ
     128     Reloc types used for i960/b.out.
     129
     130 - : BFD_RELOC_NONE
     131 - : BFD_RELOC_SPARC_WDISP22
     132 - : BFD_RELOC_SPARC22
     133 - : BFD_RELOC_SPARC13
     134 - : BFD_RELOC_SPARC_GOT10
     135 - : BFD_RELOC_SPARC_GOT13
     136 - : BFD_RELOC_SPARC_GOT22
     137 - : BFD_RELOC_SPARC_PC10
     138 - : BFD_RELOC_SPARC_PC22
     139 - : BFD_RELOC_SPARC_WPLT30
     140 - : BFD_RELOC_SPARC_COPY
     141 - : BFD_RELOC_SPARC_GLOB_DAT
     142 - : BFD_RELOC_SPARC_JMP_SLOT
     143 - : BFD_RELOC_SPARC_RELATIVE
     144 - : BFD_RELOC_SPARC_UA16
     145 - : BFD_RELOC_SPARC_UA32
     146 - : BFD_RELOC_SPARC_UA64
     147     SPARC ELF relocations.  There is probably some overlap with other
     148     relocation types already defined.
     149
     150 - : BFD_RELOC_SPARC_BASE13
     151 - : BFD_RELOC_SPARC_BASE22
     152     I think these are specific to SPARC a.out (e.g., Sun 4).
     153
     154 - : BFD_RELOC_SPARC_64
     155 - : BFD_RELOC_SPARC_10
     156 - : BFD_RELOC_SPARC_11
     157 - : BFD_RELOC_SPARC_OLO10
     158 - : BFD_RELOC_SPARC_HH22
     159 - : BFD_RELOC_SPARC_HM10
     160 - : BFD_RELOC_SPARC_LM22
     161 - : BFD_RELOC_SPARC_PC_HH22
     162 - : BFD_RELOC_SPARC_PC_HM10
     163 - : BFD_RELOC_SPARC_PC_LM22
     164 - : BFD_RELOC_SPARC_WDISP16
     165 - : BFD_RELOC_SPARC_WDISP19
     166 - : BFD_RELOC_SPARC_7
     167 - : BFD_RELOC_SPARC_6
     168 - : BFD_RELOC_SPARC_5
     169 - : BFD_RELOC_SPARC_DISP64
     170 - : BFD_RELOC_SPARC_PLT32
     171 - : BFD_RELOC_SPARC_PLT64
     172 - : BFD_RELOC_SPARC_HIX22
     173 - : BFD_RELOC_SPARC_LOX10
     174 - : BFD_RELOC_SPARC_H44
     175 - : BFD_RELOC_SPARC_M44
     176 - : BFD_RELOC_SPARC_L44
     177 - : BFD_RELOC_SPARC_REGISTER
     178     SPARC64 relocations
     179
     180 - : BFD_RELOC_SPARC_REV32
     181     SPARC little endian relocation
     182
     183 - : BFD_RELOC_SPARC_TLS_GD_HI22
     184 - : BFD_RELOC_SPARC_TLS_GD_LO10
     185 - : BFD_RELOC_SPARC_TLS_GD_ADD
     186 - : BFD_RELOC_SPARC_TLS_GD_CALL
     187 - : BFD_RELOC_SPARC_TLS_LDM_HI22
     188 - : BFD_RELOC_SPARC_TLS_LDM_LO10
     189 - : BFD_RELOC_SPARC_TLS_LDM_ADD
     190 - : BFD_RELOC_SPARC_TLS_LDM_CALL
     191 - : BFD_RELOC_SPARC_TLS_LDO_HIX22
     192 - : BFD_RELOC_SPARC_TLS_LDO_LOX10
     193 - : BFD_RELOC_SPARC_TLS_LDO_ADD
     194 - : BFD_RELOC_SPARC_TLS_IE_HI22
     195 - : BFD_RELOC_SPARC_TLS_IE_LO10
     196 - : BFD_RELOC_SPARC_TLS_IE_LD
     197 - : BFD_RELOC_SPARC_TLS_IE_LDX
     198 - : BFD_RELOC_SPARC_TLS_IE_ADD
     199 - : BFD_RELOC_SPARC_TLS_LE_HIX22
     200 - : BFD_RELOC_SPARC_TLS_LE_LOX10
     201 - : BFD_RELOC_SPARC_TLS_DTPMOD32
     202 - : BFD_RELOC_SPARC_TLS_DTPMOD64
     203 - : BFD_RELOC_SPARC_TLS_DTPOFF32
     204 - : BFD_RELOC_SPARC_TLS_DTPOFF64
     205 - : BFD_RELOC_SPARC_TLS_TPOFF32
     206 - : BFD_RELOC_SPARC_TLS_TPOFF64
     207     SPARC TLS relocations
     208
     209 - : BFD_RELOC_ALPHA_GPDISP_HI16
     210     Alpha ECOFF and ELF relocations.  Some of these treat the symbol or
     211     "addend" in some special way.  For GPDISP_HI16 ("gpdisp")
     212     relocations, the symbol is ignored when writing; when reading, it
     213     will be the absolute section symbol.  The addend is the
     214     displacement in bytes of the "lda" instruction from the "ldah"
     215     instruction (which is at the address of this reloc).
     216
     217 - : BFD_RELOC_ALPHA_GPDISP_LO16
     218     For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
     219     with GPDISP_HI16 relocs.  The addend is ignored when writing the
     220     relocations out, and is filled in with the file's GP value on
     221     reading, for convenience.
     222
     223 - : BFD_RELOC_ALPHA_GPDISP
     224     The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
     225     relocation except that there is no accompanying GPDISP_LO16
     226     relocation.
     227
     228 - : BFD_RELOC_ALPHA_LITERAL
     229 - : BFD_RELOC_ALPHA_ELF_LITERAL
     230 - : BFD_RELOC_ALPHA_LITUSE
     231     The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
     232     the assembler turns it into a LDQ instruction to load the address
     233     of the symbol, and then fills in a register in the real
     234     instruction.
     235
     236     The LITERAL reloc, at the LDQ instruction, refers to the .lita
     237     section symbol.  The addend is ignored when writing, but is filled
     238     in with the file's GP value on reading, for convenience, as with
     239     the GPDISP_LO16 reloc.
     240
     241     The ELF_LITERAL reloc is somewhere between 16_GOTOFF and
     242     GPDISP_LO16.  It should refer to the symbol to be referenced, as
     243     with 16_GOTOFF, but it generates output not based on the position
     244     within the .got section, but relative to the GP value chosen for
     245     the file during the final link stage.
     246
     247     The LITUSE reloc, on the instruction using the loaded address,
     248     gives information to the linker that it might be able to use to
     249     optimize away some literal section references.  The symbol is
     250     ignored (read as the absolute section symbol), and the "addend"
     251     indicates the type of instruction using the register: 1 - "memory"
     252     fmt insn 2 - byte-manipulation (byte offset reg) 3 - jsr (target
     253     of branch)
     254
     255 - : BFD_RELOC_ALPHA_HINT
     256     The HINT relocation indicates a value that should be filled into
     257     the "hint" field of a jmp/jsr/ret instruction, for possible branch-
     258     prediction logic which may be provided on some processors.
     259
     260 - : BFD_RELOC_ALPHA_LINKAGE
     261     The LINKAGE relocation outputs a linkage pair in the object file,
     262     which is filled by the linker.
     263
     264 - : BFD_RELOC_ALPHA_CODEADDR
     265     The CODEADDR relocation outputs a STO_CA in the object file, which
     266     is filled by the linker.
     267
     268 - : BFD_RELOC_ALPHA_GPREL_HI16
     269 - : BFD_RELOC_ALPHA_GPREL_LO16
     270     The GPREL_HI/LO relocations together form a 32-bit offset from the
     271     GP register.
     272
     273 - : BFD_RELOC_ALPHA_BRSGP
     274     Like BFD_RELOC_23_PCREL_S2, except that the source and target must
     275     share a common GP, and the target address is adjusted for
     276     STO_ALPHA_STD_GPLOAD.
     277
     278 - : BFD_RELOC_ALPHA_TLSGD
     279 - : BFD_RELOC_ALPHA_TLSLDM
     280 - : BFD_RELOC_ALPHA_DTPMOD64
     281 - : BFD_RELOC_ALPHA_GOTDTPREL16
     282 - : BFD_RELOC_ALPHA_DTPREL64
     283 - : BFD_RELOC_ALPHA_DTPREL_HI16
     284 - : BFD_RELOC_ALPHA_DTPREL_LO16
     285 - : BFD_RELOC_ALPHA_DTPREL16
     286 - : BFD_RELOC_ALPHA_GOTTPREL16
     287 - : BFD_RELOC_ALPHA_TPREL64
     288 - : BFD_RELOC_ALPHA_TPREL_HI16
     289 - : BFD_RELOC_ALPHA_TPREL_LO16
     290 - : BFD_RELOC_ALPHA_TPREL16
     291     Alpha thread-local storage relocations.
     292
     293 - : BFD_RELOC_MIPS_JMP
     294     Bits 27..2 of the relocation address shifted right 2 bits; simple
     295     reloc otherwise.
     296
     297 - : BFD_RELOC_MIPS16_JMP
     298     The MIPS16 jump instruction.
     299
     300 - : BFD_RELOC_MIPS16_GPREL
     301     MIPS16 GP relative reloc.
     302
     303 - : BFD_RELOC_HI16
     304     High 16 bits of 32-bit value; simple reloc.
     305
     306 - : BFD_RELOC_HI16_S
     307     High 16 bits of 32-bit value but the low 16 bits will be sign
     308     extended and added to form the final result.  If the low 16 bits
     309     form a negative number, we need to add one to the high value to
     310     compensate for the borrow when the low bits are added.
     311
     312 - : BFD_RELOC_LO16
     313     Low 16 bits.
     314
     315 - : BFD_RELOC_PCREL_HI16_S
     316     Like BFD_RELOC_HI16_S, but PC relative.
     317
     318 - : BFD_RELOC_PCREL_LO16
     319     Like BFD_RELOC_LO16, but PC relative.
     320
     321 - : BFD_RELOC_MIPS_LITERAL
     322     Relocation against a MIPS literal section.
     323
     324 - : BFD_RELOC_MIPS_GOT16
     325 - : BFD_RELOC_MIPS_CALL16
     326 - : BFD_RELOC_MIPS_GOT_HI16
     327 - : BFD_RELOC_MIPS_GOT_LO16
     328 - : BFD_RELOC_MIPS_CALL_HI16
     329 - : BFD_RELOC_MIPS_CALL_LO16
     330 - : BFD_RELOC_MIPS_SUB
     331 - : BFD_RELOC_MIPS_GOT_PAGE
     332 - : BFD_RELOC_MIPS_GOT_OFST
     333 - : BFD_RELOC_MIPS_GOT_DISP
     334 - : BFD_RELOC_MIPS_SHIFT5
     335 - : BFD_RELOC_MIPS_SHIFT6
     336 - : BFD_RELOC_MIPS_INSERT_A
     337 - : BFD_RELOC_MIPS_INSERT_B
     338 - : BFD_RELOC_MIPS_DELETE
     339 - : BFD_RELOC_MIPS_HIGHEST
     340 - : BFD_RELOC_MIPS_HIGHER
     341 - : BFD_RELOC_MIPS_SCN_DISP
     342 - : BFD_RELOC_MIPS_REL16
     343 - : BFD_RELOC_MIPS_RELGOT
     344 - : BFD_RELOC_MIPS_JALR
     345      - : BFD_RELOC_FRV_LABEL16
     346      - : BFD_RELOC_FRV_LABEL24
     347      - : BFD_RELOC_FRV_LO16
     348      - : BFD_RELOC_FRV_HI16
     349      - : BFD_RELOC_FRV_GPREL12
     350      - : BFD_RELOC_FRV_GPRELU12
     351      - : BFD_RELOC_FRV_GPREL32
     352      - : BFD_RELOC_FRV_GPRELHI
     353      - : BFD_RELOC_FRV_GPRELLO
     354          Fujitsu Frv Relocations.
     355     MIPS ELF relocations.
     356
     357 - : BFD_RELOC_386_GOT32
     358 - : BFD_RELOC_386_PLT32
     359 - : BFD_RELOC_386_COPY
     360 - : BFD_RELOC_386_GLOB_DAT
     361 - : BFD_RELOC_386_JUMP_SLOT
     362 - : BFD_RELOC_386_RELATIVE
     363 - : BFD_RELOC_386_GOTOFF
     364 - : BFD_RELOC_386_GOTPC
     365 - : BFD_RELOC_386_TLS_TPOFF
     366 - : BFD_RELOC_386_TLS_IE
     367 - : BFD_RELOC_386_TLS_GOTIE
     368 - : BFD_RELOC_386_TLS_LE
     369 - : BFD_RELOC_386_TLS_GD
     370 - : BFD_RELOC_386_TLS_LDM
     371 - : BFD_RELOC_386_TLS_LDO_32
     372 - : BFD_RELOC_386_TLS_IE_32
     373 - : BFD_RELOC_386_TLS_LE_32
     374 - : BFD_RELOC_386_TLS_DTPMOD32
     375 - : BFD_RELOC_386_TLS_DTPOFF32
     376 - : BFD_RELOC_386_TLS_TPOFF32
     377     i386/elf relocations
     378
     379 - : BFD_RELOC_X86_64_GOT32
     380 - : BFD_RELOC_X86_64_PLT32
     381 - : BFD_RELOC_X86_64_COPY
     382 - : BFD_RELOC_X86_64_GLOB_DAT
     383 - : BFD_RELOC_X86_64_JUMP_SLOT
     384 - : BFD_RELOC_X86_64_RELATIVE
     385 - : BFD_RELOC_X86_64_GOTPCREL
     386 - : BFD_RELOC_X86_64_32S
     387 - : BFD_RELOC_X86_64_DTPMOD64
     388 - : BFD_RELOC_X86_64_DTPOFF64
     389 - : BFD_RELOC_X86_64_TPOFF64
     390 - : BFD_RELOC_X86_64_TLSGD
     391 - : BFD_RELOC_X86_64_TLSLD
     392 - : BFD_RELOC_X86_64_DTPOFF32
     393 - : BFD_RELOC_X86_64_GOTTPOFF
     394 - : BFD_RELOC_X86_64_TPOFF32
     395     x86-64/elf relocations
     396
     397 - : BFD_RELOC_NS32K_IMM_8
     398 - : BFD_RELOC_NS32K_IMM_16
     399 - : BFD_RELOC_NS32K_IMM_32
     400 - : BFD_RELOC_NS32K_IMM_8_PCREL
     401 - : BFD_RELOC_NS32K_IMM_16_PCREL
     402 - : BFD_RELOC_NS32K_IMM_32_PCREL
     403 - : BFD_RELOC_NS32K_DISP_8
     404 - : BFD_RELOC_NS32K_DISP_16
     405 - : BFD_RELOC_NS32K_DISP_32
     406 - : BFD_RELOC_NS32K_DISP_8_PCREL
     407 - : BFD_RELOC_NS32K_DISP_16_PCREL
     408 - : BFD_RELOC_NS32K_DISP_32_PCREL
     409     ns32k relocations
     410
     411 - : BFD_RELOC_PDP11_DISP_8_PCREL
     412 - : BFD_RELOC_PDP11_DISP_6_PCREL
     413     PDP11 relocations
     414
     415 - : BFD_RELOC_PJ_CODE_HI16
     416 - : BFD_RELOC_PJ_CODE_LO16
     417 - : BFD_RELOC_PJ_CODE_DIR16
     418 - : BFD_RELOC_PJ_CODE_DIR32
     419 - : BFD_RELOC_PJ_CODE_REL16
     420 - : BFD_RELOC_PJ_CODE_REL32
     421     Picojava relocs.  Not all of these appear in object files.
     422
     423 - : BFD_RELOC_PPC_B26
     424 - : BFD_RELOC_PPC_BA26
     425 - : BFD_RELOC_PPC_TOC16
     426 - : BFD_RELOC_PPC_B16
     427 - : BFD_RELOC_PPC_B16_BRTAKEN
     428 - : BFD_RELOC_PPC_B16_BRNTAKEN
     429 - : BFD_RELOC_PPC_BA16
     430 - : BFD_RELOC_PPC_BA16_BRTAKEN
     431 - : BFD_RELOC_PPC_BA16_BRNTAKEN
     432 - : BFD_RELOC_PPC_COPY
     433 - : BFD_RELOC_PPC_GLOB_DAT
     434 - : BFD_RELOC_PPC_JMP_SLOT
     435 - : BFD_RELOC_PPC_RELATIVE
     436 - : BFD_RELOC_PPC_LOCAL24PC
     437 - : BFD_RELOC_PPC_EMB_NADDR32
     438 - : BFD_RELOC_PPC_EMB_NADDR16
     439 - : BFD_RELOC_PPC_EMB_NADDR16_LO
     440 - : BFD_RELOC_PPC_EMB_NADDR16_HI
     441 - : BFD_RELOC_PPC_EMB_NADDR16_HA
     442 - : BFD_RELOC_PPC_EMB_SDAI16
     443 - : BFD_RELOC_PPC_EMB_SDA2I16
     444 - : BFD_RELOC_PPC_EMB_SDA2REL
     445 - : BFD_RELOC_PPC_EMB_SDA21
     446 - : BFD_RELOC_PPC_EMB_MRKREF
     447 - : BFD_RELOC_PPC_EMB_RELSEC16
     448 - : BFD_RELOC_PPC_EMB_RELST_LO
     449 - : BFD_RELOC_PPC_EMB_RELST_HI
     450 - : BFD_RELOC_PPC_EMB_RELST_HA
     451 - : BFD_RELOC_PPC_EMB_BIT_FLD
     452 - : BFD_RELOC_PPC_EMB_RELSDA
     453 - : BFD_RELOC_PPC64_HIGHER
     454 - : BFD_RELOC_PPC64_HIGHER_S
     455 - : BFD_RELOC_PPC64_HIGHEST
     456 - : BFD_RELOC_PPC64_HIGHEST_S
     457 - : BFD_RELOC_PPC64_TOC16_LO
     458 - : BFD_RELOC_PPC64_TOC16_HI
     459 - : BFD_RELOC_PPC64_TOC16_HA
     460 - : BFD_RELOC_PPC64_TOC
     461 - : BFD_RELOC_PPC64_PLTGOT16
     462 - : BFD_RELOC_PPC64_PLTGOT16_LO
     463 - : BFD_RELOC_PPC64_PLTGOT16_HI
     464 - : BFD_RELOC_PPC64_PLTGOT16_HA
     465 - : BFD_RELOC_PPC64_ADDR16_DS
     466 - : BFD_RELOC_PPC64_ADDR16_LO_DS
     467 - : BFD_RELOC_PPC64_GOT16_DS
     468 - : BFD_RELOC_PPC64_GOT16_LO_DS
     469 - : BFD_RELOC_PPC64_PLT16_LO_DS
     470 - : BFD_RELOC_PPC64_SECTOFF_DS
     471 - : BFD_RELOC_PPC64_SECTOFF_LO_DS
     472 - : BFD_RELOC_PPC64_TOC16_DS
     473 - : BFD_RELOC_PPC64_TOC16_LO_DS
     474 - : BFD_RELOC_PPC64_PLTGOT16_DS
     475 - : BFD_RELOC_PPC64_PLTGOT16_LO_DS
     476     Power(rs6000) and PowerPC relocations.
     477
     478 - : BFD_RELOC_PPC_TLS
     479 - : BFD_RELOC_PPC_DTPMOD
     480 - : BFD_RELOC_PPC_TPREL16
     481 - : BFD_RELOC_PPC_TPREL16_LO
     482 - : BFD_RELOC_PPC_TPREL16_HI
     483 - : BFD_RELOC_PPC_TPREL16_HA
     484 - : BFD_RELOC_PPC_TPREL
     485 - : BFD_RELOC_PPC_DTPREL16
     486 - : BFD_RELOC_PPC_DTPREL16_LO
     487 - : BFD_RELOC_PPC_DTPREL16_HI
     488 - : BFD_RELOC_PPC_DTPREL16_HA
     489 - : BFD_RELOC_PPC_DTPREL
     490 - : BFD_RELOC_PPC_GOT_TLSGD16
     491 - : BFD_RELOC_PPC_GOT_TLSGD16_LO
     492 - : BFD_RELOC_PPC_GOT_TLSGD16_HI
     493 - : BFD_RELOC_PPC_GOT_TLSGD16_HA
     494 - : BFD_RELOC_PPC_GOT_TLSLD16
     495 - : BFD_RELOC_PPC_GOT_TLSLD16_LO
     496 - : BFD_RELOC_PPC_GOT_TLSLD16_HI
     497 - : BFD_RELOC_PPC_GOT_TLSLD16_HA
     498 - : BFD_RELOC_PPC_GOT_TPREL16
     499 - : BFD_RELOC_PPC_GOT_TPREL16_LO
     500 - : BFD_RELOC_PPC_GOT_TPREL16_HI
     501 - : BFD_RELOC_PPC_GOT_TPREL16_HA
     502 - : BFD_RELOC_PPC_GOT_DTPREL16
     503 - : BFD_RELOC_PPC_GOT_DTPREL16_LO
     504 - : BFD_RELOC_PPC_GOT_DTPREL16_HI
     505 - : BFD_RELOC_PPC_GOT_DTPREL16_HA
     506 - : BFD_RELOC_PPC64_TPREL16_DS
     507 - : BFD_RELOC_PPC64_TPREL16_LO_DS
     508 - : BFD_RELOC_PPC64_TPREL16_HIGHER
     509 - : BFD_RELOC_PPC64_TPREL16_HIGHERA
     510 - : BFD_RELOC_PPC64_TPREL16_HIGHEST
     511 - : BFD_RELOC_PPC64_TPREL16_HIGHESTA
     512 - : BFD_RELOC_PPC64_DTPREL16_DS
     513 - : BFD_RELOC_PPC64_DTPREL16_LO_DS
     514 - : BFD_RELOC_PPC64_DTPREL16_HIGHER
     515 - : BFD_RELOC_PPC64_DTPREL16_HIGHERA
     516 - : BFD_RELOC_PPC64_DTPREL16_HIGHEST
     517 - : BFD_RELOC_PPC64_DTPREL16_HIGHESTA
     518     PowerPC and PowerPC64 thread-local storage relocations.
     519
     520 - : BFD_RELOC_I370_D12
     521     IBM 370/390 relocations
     522
     523 - : BFD_RELOC_CTOR
     524     The type of reloc used to build a contructor table - at the moment
     525     probably a 32 bit wide absolute relocation, but the target can
     526     choose.  It generally does map to one of the other relocation
     527     types.
     528
     529 - : BFD_RELOC_ARM_PCREL_BRANCH
     530     ARM 26 bit pc-relative branch.  The lowest two bits must be zero
     531     and are not stored in the instruction.
     532
     533 - : BFD_RELOC_ARM_PCREL_BLX
     534     ARM 26 bit pc-relative branch.  The lowest bit must be zero and is
     535     not stored in the instruction.  The 2nd lowest bit comes from a 1
     536     bit field in the instruction.
     537
     538 - : BFD_RELOC_THUMB_PCREL_BLX
     539     Thumb 22 bit pc-relative branch.  The lowest bit must be zero and
     540     is not stored in the instruction.  The 2nd lowest bit comes from a
     541     1 bit field in the instruction.
     542
     543 - : BFD_RELOC_ARM_IMMEDIATE
     544 - : BFD_RELOC_ARM_ADRL_IMMEDIATE
     545 - : BFD_RELOC_ARM_OFFSET_IMM
     546 - : BFD_RELOC_ARM_SHIFT_IMM
     547 - : BFD_RELOC_ARM_SWI
     548 - : BFD_RELOC_ARM_MULTI
     549 - : BFD_RELOC_ARM_CP_OFF_IMM
     550 - : BFD_RELOC_ARM_CP_OFF_IMM_S2
     551 - : BFD_RELOC_ARM_ADR_IMM
     552 - : BFD_RELOC_ARM_LDR_IMM
     553 - : BFD_RELOC_ARM_LITERAL
     554 - : BFD_RELOC_ARM_IN_POOL
     555 - : BFD_RELOC_ARM_OFFSET_IMM8
     556 - : BFD_RELOC_ARM_HWLITERAL
     557 - : BFD_RELOC_ARM_THUMB_ADD
     558 - : BFD_RELOC_ARM_THUMB_IMM
     559 - : BFD_RELOC_ARM_THUMB_SHIFT
     560 - : BFD_RELOC_ARM_THUMB_OFFSET
     561 - : BFD_RELOC_ARM_GOT12
     562 - : BFD_RELOC_ARM_GOT32
     563 - : BFD_RELOC_ARM_JUMP_SLOT
     564 - : BFD_RELOC_ARM_COPY
     565 - : BFD_RELOC_ARM_GLOB_DAT
     566 - : BFD_RELOC_ARM_PLT32
     567 - : BFD_RELOC_ARM_RELATIVE
     568 - : BFD_RELOC_ARM_GOTOFF
     569 - : BFD_RELOC_ARM_GOTPC
     570     These relocs are only used within the ARM assembler.  They are not
     571     (at present) written to any object files.
     572
     573 - : BFD_RELOC_SH_PCDISP8BY2
     574 - : BFD_RELOC_SH_PCDISP12BY2
     575 - : BFD_RELOC_SH_IMM4
     576 - : BFD_RELOC_SH_IMM4BY2
     577 - : BFD_RELOC_SH_IMM4BY4
     578 - : BFD_RELOC_SH_IMM8
     579 - : BFD_RELOC_SH_IMM8BY2
     580 - : BFD_RELOC_SH_IMM8BY4
     581 - : BFD_RELOC_SH_PCRELIMM8BY2
     582 - : BFD_RELOC_SH_PCRELIMM8BY4
     583 - : BFD_RELOC_SH_SWITCH16
     584 - : BFD_RELOC_SH_SWITCH32
     585 - : BFD_RELOC_SH_USES
     586 - : BFD_RELOC_SH_COUNT
     587 - : BFD_RELOC_SH_ALIGN
     588 - : BFD_RELOC_SH_CODE
     589 - : BFD_RELOC_SH_DATA
     590 - : BFD_RELOC_SH_LABEL
     591 - : BFD_RELOC_SH_LOOP_START
     592 - : BFD_RELOC_SH_LOOP_END
     593 - : BFD_RELOC_SH_COPY
     594 - : BFD_RELOC_SH_GLOB_DAT
     595 - : BFD_RELOC_SH_JMP_SLOT
     596 - : BFD_RELOC_SH_RELATIVE
     597 - : BFD_RELOC_SH_GOTPC
     598 - : BFD_RELOC_SH_GOT_LOW16
     599 - : BFD_RELOC_SH_GOT_MEDLOW16
     600 - : BFD_RELOC_SH_GOT_MEDHI16
     601 - : BFD_RELOC_SH_GOT_HI16
     602 - : BFD_RELOC_SH_GOTPLT_LOW16
     603 - : BFD_RELOC_SH_GOTPLT_MEDLOW16
     604 - : BFD_RELOC_SH_GOTPLT_MEDHI16
     605 - : BFD_RELOC_SH_GOTPLT_HI16
     606 - : BFD_RELOC_SH_PLT_LOW16
     607 - : BFD_RELOC_SH_PLT_MEDLOW16
     608 - : BFD_RELOC_SH_PLT_MEDHI16
     609 - : BFD_RELOC_SH_PLT_HI16
     610 - : BFD_RELOC_SH_GOTOFF_LOW16
     611 - : BFD_RELOC_SH_GOTOFF_MEDLOW16
     612 - : BFD_RELOC_SH_GOTOFF_MEDHI16
     613 - : BFD_RELOC_SH_GOTOFF_HI16
     614 - : BFD_RELOC_SH_GOTPC_LOW16
     615 - : BFD_RELOC_SH_GOTPC_MEDLOW16
     616 - : BFD_RELOC_SH_GOTPC_MEDHI16
     617 - : BFD_RELOC_SH_GOTPC_HI16
     618 - : BFD_RELOC_SH_COPY64
     619 - : BFD_RELOC_SH_GLOB_DAT64
     620 - : BFD_RELOC_SH_JMP_SLOT64
     621 - : BFD_RELOC_SH_RELATIVE64
     622 - : BFD_RELOC_SH_GOT10BY4
     623 - : BFD_RELOC_SH_GOT10BY8
     624 - : BFD_RELOC_SH_GOTPLT10BY4
     625 - : BFD_RELOC_SH_GOTPLT10BY8
     626 - : BFD_RELOC_SH_GOTPLT32
     627 - : BFD_RELOC_SH_SHMEDIA_CODE
     628 - : BFD_RELOC_SH_IMMU5
     629 - : BFD_RELOC_SH_IMMS6
     630 - : BFD_RELOC_SH_IMMS6BY32
     631 - : BFD_RELOC_SH_IMMU6
     632 - : BFD_RELOC_SH_IMMS10
     633 - : BFD_RELOC_SH_IMMS10BY2
     634 - : BFD_RELOC_SH_IMMS10BY4
     635 - : BFD_RELOC_SH_IMMS10BY8
     636 - : BFD_RELOC_SH_IMMS16
     637 - : BFD_RELOC_SH_IMMU16
     638 - : BFD_RELOC_SH_IMM_LOW16
     639 - : BFD_RELOC_SH_IMM_LOW16_PCREL
     640 - : BFD_RELOC_SH_IMM_MEDLOW16
     641 - : BFD_RELOC_SH_IMM_MEDLOW16_PCREL
     642 - : BFD_RELOC_SH_IMM_MEDHI16
     643 - : BFD_RELOC_SH_IMM_MEDHI16_PCREL
     644 - : BFD_RELOC_SH_IMM_HI16
     645 - : BFD_RELOC_SH_IMM_HI16_PCREL
     646 - : BFD_RELOC_SH_PT_16
     647 - : BFD_RELOC_SH_TLS_GD_32
     648 - : BFD_RELOC_SH_TLS_LD_32
     649 - : BFD_RELOC_SH_TLS_LDO_32
     650 - : BFD_RELOC_SH_TLS_IE_32
     651 - : BFD_RELOC_SH_TLS_LE_32
     652 - : BFD_RELOC_SH_TLS_DTPMOD32
     653 - : BFD_RELOC_SH_TLS_DTPOFF32
     654 - : BFD_RELOC_SH_TLS_TPOFF32
     655     Renesas / SuperH SH relocs.  Not all of these appear in object
     656     files.
     657
     658 - : BFD_RELOC_THUMB_PCREL_BRANCH9
     659 - : BFD_RELOC_THUMB_PCREL_BRANCH12
     660 - : BFD_RELOC_THUMB_PCREL_BRANCH23
     661     Thumb 23-, 12- and 9-bit pc-relative branches.  The lowest bit must
     662     be zero and is not stored in the instruction.
     663
     664 - : BFD_RELOC_ARC_B22_PCREL
     665     ARC Cores relocs.  ARC 22 bit pc-relative branch.  The lowest two
     666     bits must be zero and are not stored in the instruction.  The high
     667     20 bits are installed in bits 26 through 7 of the instruction.
     668
     669 - : BFD_RELOC_ARC_B26
     670     ARC 26 bit absolute branch.  The lowest two bits must be zero and
     671     are not stored in the instruction.  The high 24 bits are installed
     672     in bits 23 through 0.
     673
     674 - : BFD_RELOC_D10V_10_PCREL_R
     675     Mitsubishi D10V relocs.  This is a 10-bit reloc with the right 2
     676     bits assumed to be 0.
     677
     678 - : BFD_RELOC_D10V_10_PCREL_L
     679     Mitsubishi D10V relocs.  This is a 10-bit reloc with the right 2
     680     bits assumed to be 0.  This is the same as the previous reloc
     681     except it is in the left container, i.e., shifted left 15 bits.
     682
     683 - : BFD_RELOC_D10V_18
     684     This is an 18-bit reloc with the right 2 bits assumed to be 0.
     685
     686 - : BFD_RELOC_D10V_18_PCREL
     687     This is an 18-bit reloc with the right 2 bits assumed to be 0.
     688
     689 - : BFD_RELOC_D30V_6
     690     Mitsubishi D30V relocs.  This is a 6-bit absolute reloc.
     691
     692 - : BFD_RELOC_D30V_9_PCREL
     693     This is a 6-bit pc-relative reloc with the right 3 bits assumed to
     694     be 0.
     695
     696 - : BFD_RELOC_D30V_9_PCREL_R
     697     This is a 6-bit pc-relative reloc with the right 3 bits assumed to
     698     be 0. Same as the previous reloc but on the right side of the
     699     container.
     700
     701 - : BFD_RELOC_D30V_15
     702     This is a 12-bit absolute reloc with the right 3 bitsassumed to be
     703     0.
     704
     705 - : BFD_RELOC_D30V_15_PCREL
     706     This is a 12-bit pc-relative reloc with the right 3 bits assumed
     707     to be 0.
     708
     709 - : BFD_RELOC_D30V_15_PCREL_R
     710     This is a 12-bit pc-relative reloc with the right 3 bits assumed
     711     to be 0. Same as the previous reloc but on the right side of the
     712     container.
     713
     714 - : BFD_RELOC_D30V_21
     715     This is an 18-bit absolute reloc with the right 3 bits assumed to
     716     be 0.
     717
     718 - : BFD_RELOC_D30V_21_PCREL
     719     This is an 18-bit pc-relative reloc with the right 3 bits assumed
     720     to be 0.
     721
     722 - : BFD_RELOC_D30V_21_PCREL_R
     723     This is an 18-bit pc-relative reloc with the right 3 bits assumed
     724     to be 0. Same as the previous reloc but on the right side of the
     725     container.
     726
     727 - : BFD_RELOC_D30V_32
     728     This is a 32-bit absolute reloc.
     729
     730 - : BFD_RELOC_D30V_32_PCREL
     731     This is a 32-bit pc-relative reloc.
     732
     733 - : BFD_RELOC_DLX_HI16_S
     734     DLX relocs
     735
     736 - : BFD_RELOC_DLX_LO16
     737     DLX relocs
     738
     739 - : BFD_RELOC_DLX_JMP26
     740     DLX relocs
     741
     742 - : BFD_RELOC_M32R_24
     743     Renesas M32R (formerly Mitsubishi M32R) relocs.  This is a 24 bit
     744     absolute address.
     745
     746 - : BFD_RELOC_M32R_10_PCREL
     747     This is a 10-bit pc-relative reloc with the right 2 bits assumed
     748     to be 0.
     749
     750 - : BFD_RELOC_M32R_18_PCREL
     751     This is an 18-bit reloc with the right 2 bits assumed to be 0.
     752
     753 - : BFD_RELOC_M32R_26_PCREL
     754     This is a 26-bit reloc with the right 2 bits assumed to be 0.
     755
     756 - : BFD_RELOC_M32R_HI16_ULO
     757     This is a 16-bit reloc containing the high 16 bits of an address
     758     used when the lower 16 bits are treated as unsigned.
     759
     760 - : BFD_RELOC_M32R_HI16_SLO
     761     This is a 16-bit reloc containing the high 16 bits of an address
     762     used when the lower 16 bits are treated as signed.
     763
     764 - : BFD_RELOC_M32R_LO16
     765     This is a 16-bit reloc containing the lower 16 bits of an address.
     766
     767 - : BFD_RELOC_M32R_SDA16
     768     This is a 16-bit reloc containing the small data area offset for
     769     use in add3, load, and store instructions.
     770
     771 - : BFD_RELOC_V850_9_PCREL
     772     This is a 9-bit reloc
     773
     774 - : BFD_RELOC_V850_22_PCREL
     775     This is a 22-bit reloc
     776
     777 - : BFD_RELOC_V850_SDA_16_16_OFFSET
     778     This is a 16 bit offset from the short data area pointer.
     779
     780 - : BFD_RELOC_V850_SDA_15_16_OFFSET
     781     This is a 16 bit offset (of which only 15 bits are used) from the
     782     short data area pointer.
     783
     784 - : BFD_RELOC_V850_ZDA_16_16_OFFSET
     785     This is a 16 bit offset from the zero data area pointer.
     786
     787 - : BFD_RELOC_V850_ZDA_15_16_OFFSET
     788     This is a 16 bit offset (of which only 15 bits are used) from the
     789     zero data area pointer.
     790
     791 - : BFD_RELOC_V850_TDA_6_8_OFFSET
     792     This is an 8 bit offset (of which only 6 bits are used) from the
     793     tiny data area pointer.
     794
     795 - : BFD_RELOC_V850_TDA_7_8_OFFSET
     796     This is an 8bit offset (of which only 7 bits are used) from the
     797     tiny data area pointer.
     798
     799 - : BFD_RELOC_V850_TDA_7_7_OFFSET
     800     This is a 7 bit offset from the tiny data area pointer.
     801
     802 - : BFD_RELOC_V850_TDA_16_16_OFFSET
     803     This is a 16 bit offset from the tiny data area pointer.
     804
     805 - : BFD_RELOC_V850_TDA_4_5_OFFSET
     806     This is a 5 bit offset (of which only 4 bits are used) from the
     807     tiny data area pointer.
     808
     809 - : BFD_RELOC_V850_TDA_4_4_OFFSET
     810     This is a 4 bit offset from the tiny data area pointer.
     811
     812 - : BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET
     813     This is a 16 bit offset from the short data area pointer, with the
     814     bits placed non-contigously in the instruction.
     815
     816 - : BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET
     817     This is a 16 bit offset from the zero data area pointer, with the
     818     bits placed non-contigously in the instruction.
     819
     820 - : BFD_RELOC_V850_CALLT_6_7_OFFSET
     821     This is a 6 bit offset from the call table base pointer.
     822
     823 - : BFD_RELOC_V850_CALLT_16_16_OFFSET
     824     This is a 16 bit offset from the call table base pointer.
     825
     826 - : BFD_RELOC_V850_LONGCALL
     827     Used for relaxing indirect function calls.
     828
     829 - : BFD_RELOC_V850_LONGJUMP
     830     Used for relaxing indirect jumps.
     831
     832 - : BFD_RELOC_V850_ALIGN
     833     Used to maintain alignment whilst relaxing.
     834
     835 - : BFD_RELOC_MN10300_32_PCREL
     836     This is a 32bit pcrel reloc for the mn10300, offset by two bytes
     837     in the instruction.
     838
     839 - : BFD_RELOC_MN10300_16_PCREL
     840     This is a 16bit pcrel reloc for the mn10300, offset by two bytes
     841     in the instruction.
     842
     843 - : BFD_RELOC_TIC30_LDP
     844     This is a 8bit DP reloc for the tms320c30, where the most
     845     significant 8 bits of a 24 bit word are placed into the least
     846     significant 8 bits of the opcode.
     847
     848 - : BFD_RELOC_TIC54X_PARTLS7
     849     This is a 7bit reloc for the tms320c54x, where the least
     850     significant 7 bits of a 16 bit word are placed into the least
     851     significant 7 bits of the opcode.
     852
     853 - : BFD_RELOC_TIC54X_PARTMS9
     854     This is a 9bit DP reloc for the tms320c54x, where the most
     855     significant 9 bits of a 16 bit word are placed into the least
     856     significant 9 bits of the opcode.
     857
     858 - : BFD_RELOC_TIC54X_23
     859     This is an extended address 23-bit reloc for the tms320c54x.
     860
     861 - : BFD_RELOC_TIC54X_16_OF_23
     862     This is a 16-bit reloc for the tms320c54x, where the least
     863     significant 16 bits of a 23-bit extended address are placed into
     864     the opcode.
     865
     866 - : BFD_RELOC_TIC54X_MS7_OF_23
     867     This is a reloc for the tms320c54x, where the most significant 7
     868     bits of a 23-bit extended address are placed into the opcode.
     869
     870 - : BFD_RELOC_FR30_48
     871     This is a 48 bit reloc for the FR30 that stores 32 bits.
     872
     873 - : BFD_RELOC_FR30_20
     874     This is a 32 bit reloc for the FR30 that stores 20 bits split up
     875     into two sections.
     876
     877 - : BFD_RELOC_FR30_6_IN_4
     878     This is a 16 bit reloc for the FR30 that stores a 6 bit word
     879     offset in 4 bits.
     880
     881 - : BFD_RELOC_FR30_8_IN_8
     882     This is a 16 bit reloc for the FR30 that stores an 8 bit byte
     883     offset into 8 bits.
     884
     885 - : BFD_RELOC_FR30_9_IN_8
     886     This is a 16 bit reloc for the FR30 that stores a 9 bit short
     887     offset into 8 bits.
     888
     889 - : BFD_RELOC_FR30_10_IN_8
     890     This is a 16 bit reloc for the FR30 that stores a 10 bit word
     891     offset into 8 bits.
     892
     893 - : BFD_RELOC_FR30_9_PCREL
     894     This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
     895     short offset into 8 bits.
     896
     897 - : BFD_RELOC_FR30_12_PCREL
     898     This is a 16 bit reloc for the FR30 that stores a 12 bit pc
     899     relative short offset into 11 bits.
     900
     901 - : BFD_RELOC_MCORE_PCREL_IMM8BY4
     902 - : BFD_RELOC_MCORE_PCREL_IMM11BY2
     903 - : BFD_RELOC_MCORE_PCREL_IMM4BY2
     904 - : BFD_RELOC_MCORE_PCREL_32
     905 - : BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2
     906 - : BFD_RELOC_MCORE_RVA
     907     Motorola Mcore relocations.
     908
     909 - : BFD_RELOC_MMIX_GETA
     910 - : BFD_RELOC_MMIX_GETA_1
     911 - : BFD_RELOC_MMIX_GETA_2
     912 - : BFD_RELOC_MMIX_GETA_3
     913     These are relocations for the GETA instruction.
     914
     915 - : BFD_RELOC_MMIX_CBRANCH
     916 - : BFD_RELOC_MMIX_CBRANCH_J
     917 - : BFD_RELOC_MMIX_CBRANCH_1
     918 - : BFD_RELOC_MMIX_CBRANCH_2
     919 - : BFD_RELOC_MMIX_CBRANCH_3
     920     These are relocations for a conditional branch instruction.
     921
     922 - : BFD_RELOC_MMIX_PUSHJ
     923 - : BFD_RELOC_MMIX_PUSHJ_1
     924 - : BFD_RELOC_MMIX_PUSHJ_2
     925 - : BFD_RELOC_MMIX_PUSHJ_3
     926     These are relocations for the PUSHJ instruction.
     927
     928 - : BFD_RELOC_MMIX_JMP
     929 - : BFD_RELOC_MMIX_JMP_1
     930 - : BFD_RELOC_MMIX_JMP_2
     931 - : BFD_RELOC_MMIX_JMP_3
     932     These are relocations for the JMP instruction.
     933
     934 - : BFD_RELOC_MMIX_ADDR19
     935     This is a relocation for a relative address as in a GETA
     936     instruction or a branch.
     937
     938 - : BFD_RELOC_MMIX_ADDR27
     939     This is a relocation for a relative address as in a JMP
     940     instruction.
     941
     942 - : BFD_RELOC_MMIX_REG_OR_BYTE
     943     This is a relocation for an instruction field that may be a general
     944     register or a value 0..255.
     945
     946 - : BFD_RELOC_MMIX_REG
     947     This is a relocation for an instruction field that may be a general
     948     register.
     949
     950 - : BFD_RELOC_MMIX_BASE_PLUS_OFFSET
     951     This is a relocation for two instruction fields holding a register
     952     and an offset, the equivalent of the relocation.
     953
     954 - : BFD_RELOC_MMIX_LOCAL
     955     This relocation is an assertion that the expression is not
     956     allocated as a global register.  It does not modify contents.
     957
     958 - : BFD_RELOC_AVR_7_PCREL
     959     This is a 16 bit reloc for the AVR that stores 8 bit pc relative
     960     short offset into 7 bits.
     961
     962 - : BFD_RELOC_AVR_13_PCREL
     963     This is a 16 bit reloc for the AVR that stores 13 bit pc relative
     964     short offset into 12 bits.
     965
     966 - : BFD_RELOC_AVR_16_PM
     967     This is a 16 bit reloc for the AVR that stores 17 bit value
     968     (usually program memory address) into 16 bits.
     969
     970 - : BFD_RELOC_AVR_LO8_LDI
     971     This is a 16 bit reloc for the AVR that stores 8 bit value (usually
     972     data memory address) into 8 bit immediate value of LDI insn.
     973
     974 - : BFD_RELOC_AVR_HI8_LDI
     975     This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
     976     bit of data memory address) into 8 bit immediate value of LDI insn.
     977
     978 - : BFD_RELOC_AVR_HH8_LDI
     979     This is a 16 bit reloc for the AVR that stores 8 bit value (most
     980     high 8 bit of program memory address) into 8 bit immediate value
     981     of LDI insn.
     982
     983 - : BFD_RELOC_AVR_LO8_LDI_NEG
     984     This is a 16 bit reloc for the AVR that stores negated 8 bit value
     985     (usually data memory address) into 8 bit immediate value of SUBI
     986     insn.
     987
     988 - : BFD_RELOC_AVR_HI8_LDI_NEG
     989     This is a 16 bit reloc for the AVR that stores negated 8 bit value
     990     (high 8 bit of data memory address) into 8 bit immediate value of
     991     SUBI insn.
     992
     993 - : BFD_RELOC_AVR_HH8_LDI_NEG
     994     This is a 16 bit reloc for the AVR that stores negated 8 bit value
     995     (most high 8 bit of program memory address) into 8 bit immediate
     996     value of LDI or SUBI insn.
     997
     998 - : BFD_RELOC_AVR_LO8_LDI_PM
     999     This is a 16 bit reloc for the AVR that stores 8 bit value (usually
     1000     command address) into 8 bit immediate value of LDI insn.
     1001
     1002 - : BFD_RELOC_AVR_HI8_LDI_PM
     1003     This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
     1004     bit of command address) into 8 bit immediate value of LDI insn.
     1005
     1006 - : BFD_RELOC_AVR_HH8_LDI_PM
     1007     This is a 16 bit reloc for the AVR that stores 8 bit value (most
     1008     high 8 bit of command address) into 8 bit immediate value of LDI
     1009     insn.
     1010
     1011 - : BFD_RELOC_AVR_LO8_LDI_PM_NEG
     1012     This is a 16 bit reloc for the AVR that stores negated 8 bit value
     1013     (usually command address) into 8 bit immediate value of SUBI insn.
     1014
     1015 - : BFD_RELOC_AVR_HI8_LDI_PM_NEG
     1016     This is a 16 bit reloc for the AVR that stores negated 8 bit value
     1017     (high 8 bit of 16 bit command address) into 8 bit immediate value
     1018     of SUBI insn.
     1019
     1020 - : BFD_RELOC_AVR_HH8_LDI_PM_NEG
     1021     This is a 16 bit reloc for the AVR that stores negated 8 bit value
     1022     (high 6 bit of 22 bit command address) into 8 bit immediate value
     1023     of SUBI insn.
     1024
     1025 - : BFD_RELOC_AVR_CALL
     1026     This is a 32 bit reloc for the AVR that stores 23 bit value into
     1027     22 bits.
     1028
     1029 - : BFD_RELOC_390_12
     1030     Direct 12 bit.
     1031
     1032 - : BFD_RELOC_390_GOT12
     1033     12 bit GOT offset.
     1034
     1035 - : BFD_RELOC_390_PLT32
     1036     32 bit PC relative PLT address.
     1037
     1038 - : BFD_RELOC_390_COPY
     1039     Copy symbol at runtime.
     1040
     1041 - : BFD_RELOC_390_GLOB_DAT
     1042     Create GOT entry.
     1043
     1044 - : BFD_RELOC_390_JMP_SLOT
     1045     Create PLT entry.
     1046
     1047 - : BFD_RELOC_390_RELATIVE
     1048     Adjust by program base.
     1049
     1050 - : BFD_RELOC_390_GOTPC
     1051     32 bit PC relative offset to GOT.
     1052
     1053 - : BFD_RELOC_390_GOT16
     1054     16 bit GOT offset.
     1055
     1056 - : BFD_RELOC_390_PC16DBL
     1057     PC relative 16 bit shifted by 1.
     1058
     1059 - : BFD_RELOC_390_PLT16DBL
     1060     16 bit PC rel. PLT shifted by 1.
     1061
     1062 - : BFD_RELOC_390_PC32DBL
     1063     PC relative 32 bit shifted by 1.
     1064
     1065 - : BFD_RELOC_390_PLT32DBL
     1066     32 bit PC rel. PLT shifted by 1.
     1067
     1068 - : BFD_RELOC_390_GOTPCDBL
     1069     32 bit PC rel. GOT shifted by 1.
     1070
     1071 - : BFD_RELOC_390_GOT64
     1072     64 bit GOT offset.
     1073
     1074 - : BFD_RELOC_390_PLT64
     1075     64 bit PC relative PLT address.
     1076
     1077 - : BFD_RELOC_390_GOTENT
     1078     32 bit rel. offset to GOT entry.
     1079
     1080 - : BFD_RELOC_390_GOTOFF64
     1081     64 bit offset to GOT.
     1082
     1083 - : BFD_RELOC_390_GOTPLT12
     1084     12-bit offset to symbol-entry within GOT, with PLT handling.
     1085
     1086 - : BFD_RELOC_390_GOTPLT16
     1087     16-bit offset to symbol-entry within GOT, with PLT handling.
     1088
     1089 - : BFD_RELOC_390_GOTPLT32
     1090     32-bit offset to symbol-entry within GOT, with PLT handling.
     1091
     1092 - : BFD_RELOC_390_GOTPLT64
     1093     64-bit offset to symbol-entry within GOT, with PLT handling.
     1094
     1095 - : BFD_RELOC_390_GOTPLTENT
     1096     32-bit rel. offset to symbol-entry within GOT, with PLT handling.
     1097
     1098 - : BFD_RELOC_390_PLTOFF16
     1099     16-bit rel. offset from the GOT to a PLT entry.
     1100
     1101 - : BFD_RELOC_390_PLTOFF32
     1102     32-bit rel. offset from the GOT to a PLT entry.
     1103
     1104 - : BFD_RELOC_390_PLTOFF64
     1105     64-bit rel. offset from the GOT to a PLT entry.
     1106
     1107 - : BFD_RELOC_390_TLS_LOAD
     1108 - : BFD_RELOC_390_TLS_GDCALL
     1109 - : BFD_RELOC_390_TLS_LDCALL
     1110 - : BFD_RELOC_390_TLS_GD32
     1111 - : BFD_RELOC_390_TLS_GD64
     1112 - : BFD_RELOC_390_TLS_GOTIE12
     1113 - : BFD_RELOC_390_TLS_GOTIE32
     1114 - : BFD_RELOC_390_TLS_GOTIE64
     1115 - : BFD_RELOC_390_TLS_LDM32
     1116 - : BFD_RELOC_390_TLS_LDM64
     1117 - : BFD_RELOC_390_TLS_IE32
     1118 - : BFD_RELOC_390_TLS_IE64
     1119 - : BFD_RELOC_390_TLS_IEENT
     1120 - : BFD_RELOC_390_TLS_LE32
     1121 - : BFD_RELOC_390_TLS_LE64
     1122 - : BFD_RELOC_390_TLS_LDO32
     1123 - : BFD_RELOC_390_TLS_LDO64
     1124 - : BFD_RELOC_390_TLS_DTPMOD
     1125 - : BFD_RELOC_390_TLS_DTPOFF
     1126 - : BFD_RELOC_390_TLS_TPOFF
     1127     s390 tls relocations.
     1128
     1129 - : BFD_RELOC_IP2K_FR9
     1130     Scenix IP2K - 9-bit register number / data address
     1131
     1132 - : BFD_RELOC_IP2K_BANK
     1133     Scenix IP2K - 4-bit register/data bank number
     1134
     1135 - : BFD_RELOC_IP2K_ADDR16CJP
     1136     Scenix IP2K - low 13 bits of instruction word address
     1137
     1138 - : BFD_RELOC_IP2K_PAGE3
     1139     Scenix IP2K - high 3 bits of instruction word address
     1140
     1141 - : BFD_RELOC_IP2K_LO8DATA
     1142 - : BFD_RELOC_IP2K_HI8DATA
     1143 - : BFD_RELOC_IP2K_EX8DATA
     1144     Scenix IP2K - ext/low/high 8 bits of data address
     1145
     1146 - : BFD_RELOC_IP2K_LO8INSN
     1147 - : BFD_RELOC_IP2K_HI8INSN
     1148     Scenix IP2K - low/high 8 bits of instruction word address
     1149
     1150 - : BFD_RELOC_IP2K_PC_SKIP
     1151     Scenix IP2K - even/odd PC modifier to modify snb pcl.0
     1152
     1153 - : BFD_RELOC_IP2K_TEXT
     1154     Scenix IP2K - 16 bit word address in text section.
     1155
     1156 - : BFD_RELOC_IP2K_FR_OFFSET
     1157     Scenix IP2K - 7-bit sp or dp offset
     1158
     1159 - : BFD_RELOC_VPE4KMATH_DATA
     1160 - : BFD_RELOC_VPE4KMATH_INSN
     1161     Scenix VPE4K coprocessor - data/insn-space addressing
     1162
     1163 - : BFD_RELOC_VTABLE_INHERIT
     1164 - : BFD_RELOC_VTABLE_ENTRY
     1165     These two relocations are used by the linker to determine which of
     1166     the entries in a C++ virtual function table are actually used.
     1167     When the -gc-sections option is given, the linker will zero out
     1168     the entries that are not used, so that the code for those
     1169     functions need not be included in the output.
     1170
     1171     VTABLE_INHERIT is a zero-space relocation used to describe to the
     1172     linker the inheritence tree of a C++ virtual function table.  The
     1173     relocation's symbol should be the parent class' vtable, and the
     1174     relocation should be located at the child vtable.
     1175
     1176     VTABLE_ENTRY is a zero-space relocation that describes the use of a
     1177     virtual function table entry.  The reloc's symbol should refer to
     1178     the table of the class mentioned in the code.  Off of that base,
     1179     an offset describes the entry that is being used.  For Rela hosts,
     1180     this offset is stored in the reloc's addend.  For Rel hosts, we
     1181     are forced to put this offset in the reloc's section offset.
     1182
     1183 - : BFD_RELOC_IA64_IMM14
     1184 - : BFD_RELOC_IA64_IMM22
     1185 - : BFD_RELOC_IA64_IMM64
     1186 - : BFD_RELOC_IA64_DIR32MSB
     1187 - : BFD_RELOC_IA64_DIR32LSB
     1188 - : BFD_RELOC_IA64_DIR64MSB
     1189 - : BFD_RELOC_IA64_DIR64LSB
     1190 - : BFD_RELOC_IA64_GPREL22
     1191 - : BFD_RELOC_IA64_GPREL64I
     1192 - : BFD_RELOC_IA64_GPREL32MSB
     1193 - : BFD_RELOC_IA64_GPREL32LSB
     1194 - : BFD_RELOC_IA64_GPREL64MSB
     1195 - : BFD_RELOC_IA64_GPREL64LSB
     1196 - : BFD_RELOC_IA64_LTOFF22
     1197 - : BFD_RELOC_IA64_LTOFF64I
     1198 - : BFD_RELOC_IA64_PLTOFF22
     1199 - : BFD_RELOC_IA64_PLTOFF64I
     1200 - : BFD_RELOC_IA64_PLTOFF64MSB
     1201 - : BFD_RELOC_IA64_PLTOFF64LSB
     1202 - : BFD_RELOC_IA64_FPTR64I
     1203 - : BFD_RELOC_IA64_FPTR32MSB
     1204 - : BFD_RELOC_IA64_FPTR32LSB
     1205 - : BFD_RELOC_IA64_FPTR64MSB
     1206 - : BFD_RELOC_IA64_FPTR64LSB
     1207 - : BFD_RELOC_IA64_PCREL21B
     1208 - : BFD_RELOC_IA64_PCREL21BI
     1209 - : BFD_RELOC_IA64_PCREL21M
     1210 - : BFD_RELOC_IA64_PCREL21F
     1211 - : BFD_RELOC_IA64_PCREL22
     1212 - : BFD_RELOC_IA64_PCREL60B
     1213 - : BFD_RELOC_IA64_PCREL64I
     1214 - : BFD_RELOC_IA64_PCREL32MSB
     1215 - : BFD_RELOC_IA64_PCREL32LSB
     1216 - : BFD_RELOC_IA64_PCREL64MSB
     1217 - : BFD_RELOC_IA64_PCREL64LSB
     1218 - : BFD_RELOC_IA64_LTOFF_FPTR22
     1219 - : BFD_RELOC_IA64_LTOFF_FPTR64I
     1220 - : BFD_RELOC_IA64_LTOFF_FPTR32MSB
     1221 - : BFD_RELOC_IA64_LTOFF_FPTR32LSB
     1222 - : BFD_RELOC_IA64_LTOFF_FPTR64MSB
     1223 - : BFD_RELOC_IA64_LTOFF_FPTR64LSB
     1224 - : BFD_RELOC_IA64_SEGREL32MSB
     1225 - : BFD_RELOC_IA64_SEGREL32LSB
     1226 - : BFD_RELOC_IA64_SEGREL64MSB
     1227 - : BFD_RELOC_IA64_SEGREL64LSB
     1228 - : BFD_RELOC_IA64_SECREL32MSB
     1229 - : BFD_RELOC_IA64_SECREL32LSB
     1230 - : BFD_RELOC_IA64_SECREL64MSB
     1231 - : BFD_RELOC_IA64_SECREL64LSB
     1232 - : BFD_RELOC_IA64_REL32MSB
     1233 - : BFD_RELOC_IA64_REL32LSB
     1234 - : BFD_RELOC_IA64_REL64MSB
     1235 - : BFD_RELOC_IA64_REL64LSB
     1236 - : BFD_RELOC_IA64_LTV32MSB
     1237 - : BFD_RELOC_IA64_LTV32LSB
     1238 - : BFD_RELOC_IA64_LTV64MSB
     1239 - : BFD_RELOC_IA64_LTV64LSB
     1240 - : BFD_RELOC_IA64_IPLTMSB
     1241 - : BFD_RELOC_IA64_IPLTLSB
     1242 - : BFD_RELOC_IA64_COPY
     1243 - : BFD_RELOC_IA64_LTOFF22X
     1244 - : BFD_RELOC_IA64_LDXMOV
     1245 - : BFD_RELOC_IA64_TPREL14
     1246 - : BFD_RELOC_IA64_TPREL22
     1247 - : BFD_RELOC_IA64_TPREL64I
     1248 - : BFD_RELOC_IA64_TPREL64MSB
     1249 - : BFD_RELOC_IA64_TPREL64LSB
     1250 - : BFD_RELOC_IA64_LTOFF_TPREL22
     1251 - : BFD_RELOC_IA64_DTPMOD64MSB
     1252 - : BFD_RELOC_IA64_DTPMOD64LSB
     1253 - : BFD_RELOC_IA64_LTOFF_DTPMOD22
     1254 - : BFD_RELOC_IA64_DTPREL14
     1255 - : BFD_RELOC_IA64_DTPREL22
     1256 - : BFD_RELOC_IA64_DTPREL64I
     1257 - : BFD_RELOC_IA64_DTPREL32MSB
     1258 - : BFD_RELOC_IA64_DTPREL32LSB
     1259 - : BFD_RELOC_IA64_DTPREL64MSB
     1260 - : BFD_RELOC_IA64_DTPREL64LSB
     1261 - : BFD_RELOC_IA64_LTOFF_DTPREL22
     1262     Intel IA64 Relocations.
     1263
     1264 - : BFD_RELOC_M68HC11_HI8
     1265     Motorola 68HC11 reloc.  This is the 8 bit high part of an absolute
     1266     address.
     1267
     1268 - : BFD_RELOC_M68HC11_LO8
     1269     Motorola 68HC11 reloc.  This is the 8 bit low part of an absolute
     1270     address.
     1271
     1272 - : BFD_RELOC_M68HC11_3B
     1273     Motorola 68HC11 reloc.  This is the 3 bit of a value.
     1274
     1275 - : BFD_RELOC_M68HC11_RL_JUMP
     1276     Motorola 68HC11 reloc.  This reloc marks the beginning of a
     1277     jump/call instruction.  It is used for linker relaxation to
     1278     correctly identify beginning of instruction and change some
     1279     branchs to use PC-relative addressing mode.
     1280
     1281 - : BFD_RELOC_M68HC11_RL_GROUP
     1282     Motorola 68HC11 reloc.  This reloc marks a group of several
     1283     instructions that gcc generates and for which the linker
     1284     relaxation pass can modify and/or remove some of them.
     1285
     1286 - : BFD_RELOC_M68HC11_LO16
     1287     Motorola 68HC11 reloc.  This is the 16-bit lower part of an
     1288     address.  It is used for 'call' instruction to specify the symbol
     1289     address without any special transformation (due to memory bank
     1290     window).
     1291
     1292 - : BFD_RELOC_M68HC11_PAGE
     1293     Motorola 68HC11 reloc.  This is a 8-bit reloc that specifies the
     1294     page number of an address.  It is used by 'call' instruction to
     1295     specify the page number of the symbol.
     1296
     1297 - : BFD_RELOC_M68HC11_24
     1298     Motorola 68HC11 reloc.  This is a 24-bit reloc that represents the
     1299     address with a 16-bit value and a 8-bit page number.  The symbol
     1300     address is transformed to follow the 16K memory bank of 68HC12
     1301     (seen as mapped in the window).
     1302
     1303 - : BFD_RELOC_CRIS_BDISP8
     1304 - : BFD_RELOC_CRIS_UNSIGNED_5
     1305 - : BFD_RELOC_CRIS_SIGNED_6
     1306 - : BFD_RELOC_CRIS_UNSIGNED_6
     1307 - : BFD_RELOC_CRIS_UNSIGNED_4
     1308     These relocs are only used within the CRIS assembler.  They are not
     1309     (at present) written to any object files.
     1310
     1311 - : BFD_RELOC_CRIS_COPY
     1312 - : BFD_RELOC_CRIS_GLOB_DAT
     1313 - : BFD_RELOC_CRIS_JUMP_SLOT
     1314 - : BFD_RELOC_CRIS_RELATIVE
     1315     Relocs used in ELF shared libraries for CRIS.
     1316
     1317 - : BFD_RELOC_CRIS_32_GOT
     1318     32-bit offset to symbol-entry within GOT.
     1319
     1320 - : BFD_RELOC_CRIS_16_GOT
     1321     16-bit offset to symbol-entry within GOT.
     1322
     1323 - : BFD_RELOC_CRIS_32_GOTPLT
     1324     32-bit offset to symbol-entry within GOT, with PLT handling.
     1325
     1326 - : BFD_RELOC_CRIS_16_GOTPLT
     1327     16-bit offset to symbol-entry within GOT, with PLT handling.
     1328
     1329 - : BFD_RELOC_CRIS_32_GOTREL
     1330     32-bit offset to symbol, relative to GOT.
     1331
     1332 - : BFD_RELOC_CRIS_32_PLT_GOTREL
     1333     32-bit offset to symbol with PLT entry, relative to GOT.
     1334
     1335 - : BFD_RELOC_CRIS_32_PLT_PCREL
     1336     32-bit offset to symbol with PLT entry, relative to this
     1337     relocation.
     1338
     1339 - : BFD_RELOC_860_COPY
     1340 - : BFD_RELOC_860_GLOB_DAT
     1341 - : BFD_RELOC_860_JUMP_SLOT
     1342 - : BFD_RELOC_860_RELATIVE
     1343 - : BFD_RELOC_860_PC26
     1344 - : BFD_RELOC_860_PLT26
     1345 - : BFD_RELOC_860_PC16
     1346 - : BFD_RELOC_860_LOW0
     1347 - : BFD_RELOC_860_SPLIT0
     1348 - : BFD_RELOC_860_LOW1
     1349 - : BFD_RELOC_860_SPLIT1
     1350 - : BFD_RELOC_860_LOW2
     1351 - : BFD_RELOC_860_SPLIT2
     1352 - : BFD_RELOC_860_LOW3
     1353 - : BFD_RELOC_860_LOGOT0
     1354 - : BFD_RELOC_860_SPGOT0
     1355 - : BFD_RELOC_860_LOGOT1
     1356 - : BFD_RELOC_860_SPGOT1
     1357 - : BFD_RELOC_860_LOGOTOFF0
     1358 - : BFD_RELOC_860_SPGOTOFF0
     1359 - : BFD_RELOC_860_LOGOTOFF1
     1360 - : BFD_RELOC_860_SPGOTOFF1
     1361 - : BFD_RELOC_860_LOGOTOFF2
     1362 - : BFD_RELOC_860_LOGOTOFF3
     1363 - : BFD_RELOC_860_LOPC
     1364 - : BFD_RELOC_860_HIGHADJ
     1365 - : BFD_RELOC_860_HAGOT
     1366 - : BFD_RELOC_860_HAGOTOFF
     1367 - : BFD_RELOC_860_HAPC
     1368 - : BFD_RELOC_860_HIGH
     1369 - : BFD_RELOC_860_HIGOT
     1370 - : BFD_RELOC_860_HIGOTOFF
     1371     Intel i860 Relocations.
     1372
     1373 - : BFD_RELOC_OPENRISC_ABS_26
     1374 - : BFD_RELOC_OPENRISC_REL_26
     1375     OpenRISC Relocations.
     1376
     1377 - : BFD_RELOC_H8_DIR16A8
     1378 - : BFD_RELOC_H8_DIR16R8
     1379 - : BFD_RELOC_H8_DIR24A8
     1380 - : BFD_RELOC_H8_DIR24R8
     1381 - : BFD_RELOC_H8_DIR32A16
     1382     H8 elf Relocations.
     1383
     1384 - : BFD_RELOC_XSTORMY16_REL_12
     1385 - : BFD_RELOC_XSTORMY16_12
     1386 - : BFD_RELOC_XSTORMY16_24
     1387 - : BFD_RELOC_XSTORMY16_FPTR16
     1388     Sony Xstormy16 Relocations.
     1389
     1390 - : BFD_RELOC_VAX_GLOB_DAT
     1391 - : BFD_RELOC_VAX_JMP_SLOT
     1392 - : BFD_RELOC_VAX_RELATIVE
     1393     Relocations used by VAX ELF.
     1394
     1395 - : BFD_RELOC_MSP430_10_PCREL
     1396 - : BFD_RELOC_MSP430_16_PCREL
     1397 - : BFD_RELOC_MSP430_16
     1398 - : BFD_RELOC_MSP430_16_PCREL_BYTE
     1399 - : BFD_RELOC_MSP430_16_BYTE
     1400     msp430 specific relocation codes
     1401
     1402 - : BFD_RELOC_IQ2000_OFFSET_16
     1403 - : BFD_RELOC_IQ2000_OFFSET_21
     1404 - : BFD_RELOC_IQ2000_UHI16
     1405     IQ2000 Relocations.
     1406
     1407 - : BFD_RELOC_XTENSA_RTLD
     1408     Special Xtensa relocation used only by PLT entries in ELF shared
     1409     objects to indicate that the runtime linker should set the value
     1410     to one of its own internal functions or data structures.
     1411
     1412 - : BFD_RELOC_XTENSA_GLOB_DAT
     1413 - : BFD_RELOC_XTENSA_JMP_SLOT
     1414 - : BFD_RELOC_XTENSA_RELATIVE
     1415     Xtensa relocations for ELF shared objects.
     1416
     1417 - : BFD_RELOC_XTENSA_PLT
     1418     Xtensa relocation used in ELF object files for symbols that may
     1419     require PLT entries.  Otherwise, this is just a generic 32-bit
     1420     relocation.
     1421
     1422 - : BFD_RELOC_XTENSA_OP0
     1423 - : BFD_RELOC_XTENSA_OP1
     1424 - : BFD_RELOC_XTENSA_OP2
     1425     Generic Xtensa relocations.  Only the operand number is encoded in
     1426     the relocation.  The details are determined by extracting the
     1427     instruction opcode.
     1428
     1429 - : BFD_RELOC_XTENSA_ASM_EXPAND
     1430     Xtensa relocation to mark that the assembler expanded the
     1431     instructions from an original target.  The expansion size is
     1432     encoded in the reloc size.
     1433
     1434 - : BFD_RELOC_XTENSA_ASM_SIMPLIFY
     1435     Xtensa relocation to mark that the linker should simplify
     1436     assembler-expanded instructions.  This is commonly used internally
     1437     by the linker after analysis of a BFD_RELOC_XTENSA_ASM_EXPAND.
     1438
     1439
     1440     typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
     1441
     1442`bfd_reloc_type_lookup'
     1443.......................
     1444
     1445   *Synopsis*
     1446     reloc_howto_type *
     1447     bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code);
     1448   *Description*
     1449Return a pointer to a howto structure which, when invoked, will perform
     1450the relocation CODE on data from the architecture noted.
     1451
     1452`bfd_default_reloc_type_lookup'
     1453...............................
     1454
     1455   *Synopsis*
     1456     reloc_howto_type *bfd_default_reloc_type_lookup
     1457        (bfd *abfd, bfd_reloc_code_real_type  code);
     1458   *Description*
     1459Provides a default relocation lookup routine for any architecture.
     1460
     1461`bfd_get_reloc_code_name'
     1462.........................
     1463
     1464   *Synopsis*
     1465     const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
     1466   *Description*
     1467Provides a printable name for the supplied relocation code.  Useful
     1468mainly for printing error messages.
     1469
     1470`bfd_generic_relax_section'
     1471...........................
     1472
     1473   *Synopsis*
     1474     bfd_boolean bfd_generic_relax_section
     1475        (bfd *abfd,
     1476         asection *section,
     1477         struct bfd_link_info *,
     1478         bfd_boolean *);
     1479   *Description*
     1480Provides default handling for relaxing for back ends which don't do
     1481relaxing - i.e., does nothing.
     1482
     1483`bfd_generic_gc_sections'
     1484.........................
     1485
     1486   *Synopsis*
     1487     bfd_boolean bfd_generic_gc_sections
     1488        (bfd *, struct bfd_link_info *);
     1489   *Description*
     1490Provides default handling for relaxing for back ends which don't do
     1491section gc - i.e., does nothing.
     1492
     1493`bfd_generic_merge_sections'
     1494............................
     1495
     1496   *Synopsis*
     1497     bfd_boolean bfd_generic_merge_sections
     1498        (bfd *, struct bfd_link_info *);
     1499   *Description*
     1500Provides default handling for SEC_MERGE section merging for back ends
     1501which don't have SEC_MERGE support - i.e., does nothing.
     1502
     1503`bfd_generic_get_relocated_section_contents'
     1504............................................
     1505
     1506   *Synopsis*
     1507     bfd_byte *
     1508     bfd_generic_get_relocated_section_contents (bfd *abfd,
     1509         struct bfd_link_info *link_info,
     1510         struct bfd_link_order *link_order,
     1511         bfd_byte *data,
     1512         bfd_boolean relocateable,
     1513         asymbol **symbols);
     1514   *Description*
     1515Provides default handling of relocation effort for back ends which
     1516can't be bothered to do it efficiently.
     1517
     1518
     1519File: bfd.info,  Node: Core Files,  Next: Targets,  Prev: Relocations,  Up: BFD front end
     1520
     1521Core files
     1522==========
     1523
     1524   *Description*
     1525These are functions pertaining to core files.
     1526
     1527`bfd_core_file_failing_command'
     1528...............................
     1529
     1530   *Synopsis*
     1531     const char *bfd_core_file_failing_command(bfd *abfd);
     1532   *Description*
     1533Return a read-only string explaining which program was running when it
     1534failed and produced the core file ABFD.
     1535
     1536`bfd_core_file_failing_signal'
     1537..............................
     1538
     1539   *Synopsis*
     1540     int bfd_core_file_failing_signal(bfd *abfd);
     1541   *Description*
     1542Returns the signal number which caused the core dump which generated
     1543the file the BFD ABFD is attached to.
     1544
     1545`core_file_matches_executable_p'
     1546................................
     1547
     1548   *Synopsis*
     1549     bfd_boolean core_file_matches_executable_p
     1550        (bfd *core_bfd, bfd *exec_bfd);
     1551   *Description*
     1552Return `TRUE' if the core file attached to CORE_BFD was generated by a
     1553run of the executable file attached to EXEC_BFD, `FALSE' otherwise.
     1554
     1555
    191556File: bfd.info,  Node: Targets,  Next: Architectures,  Prev: Core Files,  Up: BFD front end
    201557
     
    591596the BFD with a suggested format.  If `target_defaulted' has been set,
    601597each possible target type is tried to see if it recognizes the
    61 specified format.  `bfd_check_format' returns `true' when the caller
     1598specified format.  `bfd_check_format' returns `TRUE' when the caller
    621599guesses right.
    631600
     
    661603* bfd_target::
    671604
    68 
    69 File: bfd.info,  Node: bfd_target,  Prev: Targets,  Up: Targets
    70 
    71 bfd_target
    72 ----------
    73 
    74    *Description*
    75 This structure contains everything that BFD knows about a target. It
    76 includes things like its byte order, name, and which routines to call
    77 to do various operations.
    78 
    79    Every BFD points to a target structure with its `xvec' member.
    80 
    81    The macros below are used to dispatch to functions through the
    82 `bfd_target' vector. They are used in a number of macros further down
    83 in `bfd.h', and are also used when calling various routines by hand
    84 inside the BFD implementation.  The ARGLIST argument must be
    85 parenthesized; it contains all the arguments to the called function.
    86 
    87    They make the documentation (more) unpleasant to read, so if someone
    88 wants to fix this and not break the above, please do.
    89      #define BFD_SEND(bfd, message, arglist) \
    90                     ((*((bfd)->xvec->message)) arglist)
    91      
    92      #ifdef DEBUG_BFD_SEND
    93      #undef BFD_SEND
    94      #define BFD_SEND(bfd, message, arglist) \
    95        (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
    96          ((*((bfd)->xvec->message)) arglist) : \
    97          (bfd_assert (__FILE__,__LINE__), NULL))
    98      #endif
    99    For operations which index on the BFD format:
    100      #define BFD_SEND_FMT(bfd, message, arglist) \
    101                  (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
    102      
    103      #ifdef DEBUG_BFD_SEND
    104      #undef BFD_SEND_FMT
    105      #define BFD_SEND_FMT(bfd, message, arglist) \
    106        (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
    107         (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
    108         (bfd_assert (__FILE__,__LINE__), NULL))
    109      #endif
    110    This is the structure which defines the type of BFD this is.  The
    111 `xvec' member of the struct `bfd' itself points here.  Each module that
    112 implements access to a different target under BFD, defines one of these.
    113 
    114    FIXME, these names should be rationalised with the names of the
    115 entry points which call them. Too bad we can't have one macro to define
    116 them both!
    117      enum bfd_flavour {
    118        bfd_target_unknown_flavour,
    119        bfd_target_aout_flavour,
    120        bfd_target_coff_flavour,
    121        bfd_target_ecoff_flavour,
    122        bfd_target_xcoff_flavour,
    123        bfd_target_elf_flavour,
    124        bfd_target_ieee_flavour,
    125        bfd_target_nlm_flavour,
    126        bfd_target_oasys_flavour,
    127        bfd_target_tekhex_flavour,
    128        bfd_target_srec_flavour,
    129        bfd_target_ihex_flavour,
    130        bfd_target_som_flavour,
    131        bfd_target_os9k_flavour,
    132        bfd_target_versados_flavour,
    133        bfd_target_msdos_flavour,
    134        bfd_target_ovax_flavour,
    135        bfd_target_evax_flavour
    136      };
    137      
    138      enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
    139      
    140      /* Forward declaration.  */
    141      typedef struct bfd_link_info _bfd_link_info;
    142      
    143      typedef struct bfd_target
    144      {
    145    Identifies the kind of target, e.g., SunOS4, Ultrix, etc.
    146        char *name;
    147    The "flavour" of a back end is a general indication about the
    148 contents of a file.
    149        enum bfd_flavour flavour;
    150    The order of bytes within the data area of a file.
    151        enum bfd_endian byteorder;
    152    The order of bytes within the header parts of a file.
    153        enum bfd_endian header_byteorder;
    154    A mask of all the flags which an executable may have set - from the
    155 set `BFD_NO_FLAGS', `HAS_RELOC', ...`D_PAGED'.
    156        flagword object_flags;
    157    A mask of all the flags which a section may have set - from the set
    158 `SEC_NO_FLAGS', `SEC_ALLOC', ...`SET_NEVER_LOAD'.
    159        flagword section_flags;
    160    The character normally found at the front of a symbol (if any),
    161 perhaps `_'.
    162        char symbol_leading_char;
    163    The pad character for file names within an archive header.
    164        char ar_pad_char;
    165    The maximum number of characters in an archive header.
    166        unsigned short ar_max_namelen;
    167    Entries for byte swapping for data. These are different from the
    168 other entry points, since they don't take a BFD asthe first argument.
    169 Certain other handlers could do the same.
    170        bfd_vma      (*bfd_getx64) PARAMS ((const bfd_byte *));
    171        bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *));
    172        void         (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
    173        bfd_vma      (*bfd_getx32) PARAMS ((const bfd_byte *));
    174        bfd_signed_vma (*bfd_getx_signed_32) PARAMS ((const bfd_byte *));
    175        void         (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
    176        bfd_vma      (*bfd_getx16) PARAMS ((const bfd_byte *));
    177        bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *));
    178        void         (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
    179    Byte swapping for the headers
    180        bfd_vma      (*bfd_h_getx64) PARAMS ((const bfd_byte *));
    181        bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *));
    182        void         (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
    183        bfd_vma      (*bfd_h_getx32) PARAMS ((const bfd_byte *));
    184        bfd_signed_vma (*bfd_h_getx_signed_32) PARAMS ((const bfd_byte *));
    185        void         (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
    186        bfd_vma      (*bfd_h_getx16) PARAMS ((const bfd_byte *));
    187        bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *));
    188        void         (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
    189    Format dependent routines: these are vectors of entry points within
    190 the target vector structure, one for each format to check.
    191 
    192    Check the format of a file being read.  Return a `bfd_target *' or
    193 zero.
    194        const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
    195    Set the format of a file being written.
    196        boolean             (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
    197    Write cached information into a file being written, at `bfd_close'.
    198        boolean             (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
    199    The general target vector.  These vectors are initialized using the
    200 BFD_JUMP_TABLE macros.
    201 
    202        /* Generic entry points.  */
    203      #define BFD_JUMP_TABLE_GENERIC(NAME)\
    204      CAT(NAME,_close_and_cleanup),\
    205      CAT(NAME,_bfd_free_cached_info),\
    206      CAT(NAME,_new_section_hook),\
    207      CAT(NAME,_get_section_contents),\
    208      CAT(NAME,_get_section_contents_in_window)
    209      
    210        /* Called when the BFD is being closed to do any necessary cleanup.  */
    211        boolean       (*_close_and_cleanup) PARAMS ((bfd *));
    212        /* Ask the BFD to free all cached information.  */
    213        boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
    214        /* Called when a new section is created.  */
    215        boolean       (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
    216        /* Read the contents of a section.  */
    217        boolean       (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
    218                                                  file_ptr, bfd_size_type));
    219        boolean       (*_bfd_get_section_contents_in_window)
    220                                PARAMS ((bfd *, sec_ptr, bfd_window *,
    221                                         file_ptr, bfd_size_type));
    222      
    223        /* Entry points to copy private data.  */
    224      #define BFD_JUMP_TABLE_COPY(NAME)\
    225      CAT(NAME,_bfd_copy_private_bfd_data),\
    226      CAT(NAME,_bfd_merge_private_bfd_data),\
    227      CAT(NAME,_bfd_copy_private_section_data),\
    228      CAT(NAME,_bfd_copy_private_symbol_data),\
    229      CAT(NAME,_bfd_set_private_flags),\
    230      CAT(NAME,_bfd_print_private_bfd_data)\
    231        /* Called to copy BFD general private data from one object file
    232           to another.  */
    233        boolean       (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
    234        /* Called to merge BFD general private data from one object file
    235           to a common output file when linking.  */
    236        boolean       (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
    237        /* Called to copy BFD private section data from one object file
    238           to another.  */
    239        boolean       (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
    240                                                             bfd *, sec_ptr));
    241        /* Called to copy BFD private symbol data from one symbol
    242           to another.  */
    243        boolean       (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
    244                                                                bfd *, asymbol *));
    245        /* Called to set private backend flags */
    246        boolean       (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
    247      
    248        /* Called to print private BFD data */
    249        boolean       (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
    250      
    251        /* Core file entry points.  */
    252      #define BFD_JUMP_TABLE_CORE(NAME)\
    253      CAT(NAME,_core_file_failing_command),\
    254      CAT(NAME,_core_file_failing_signal),\
    255      CAT(NAME,_core_file_matches_executable_p)
    256        char *   (*_core_file_failing_command) PARAMS ((bfd *));
    257        int      (*_core_file_failing_signal) PARAMS ((bfd *));
    258        boolean  (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *));
    259      
    260        /* Archive entry points.  */
    261      #define BFD_JUMP_TABLE_ARCHIVE(NAME)\
    262      CAT(NAME,_slurp_armap),\
    263      CAT(NAME,_slurp_extended_name_table),\
    264      CAT(NAME,_construct_extended_name_table),\
    265      CAT(NAME,_truncate_arname),\
    266      CAT(NAME,_write_armap),\
    267      CAT(NAME,_read_ar_hdr),\
    268      CAT(NAME,_openr_next_archived_file),\
    269      CAT(NAME,_get_elt_at_index),\
    270      CAT(NAME,_generic_stat_arch_elt),\
    271      CAT(NAME,_update_armap_timestamp)
    272        boolean  (*_bfd_slurp_armap) PARAMS ((bfd *));
    273        boolean  (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
    274        boolean  (*_bfd_construct_extended_name_table)
    275                   PARAMS ((bfd *, char **, bfd_size_type *, const char **));
    276        void     (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *));
    277        boolean  (*write_armap) PARAMS ((bfd *arch,
    278                                    unsigned int elength,
    279                                    struct orl *map,
    280                                    unsigned int orl_count,
    281                                    int stridx));
    282        PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
    283        bfd *    (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev));
    284      #define bfd_get_elt_at_index(b,i) BFD_SEND(b, _bfd_get_elt_at_index, (b,i))
    285        bfd *    (*_bfd_get_elt_at_index) PARAMS ((bfd *, symindex));
    286        int      (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
    287        boolean  (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
    288      
    289        /* Entry points used for symbols.  */
    290      #define BFD_JUMP_TABLE_SYMBOLS(NAME)\
    291      CAT(NAME,_get_symtab_upper_bound),\
    292      CAT(NAME,_get_symtab),\
    293      CAT(NAME,_make_empty_symbol),\
    294      CAT(NAME,_print_symbol),\
    295      CAT(NAME,_get_symbol_info),\
    296      CAT(NAME,_bfd_is_local_label_name),\
    297      CAT(NAME,_get_lineno),\
    298      CAT(NAME,_find_nearest_line),\
    299      CAT(NAME,_bfd_make_debug_symbol),\
    300      CAT(NAME,_read_minisymbols),\
    301      CAT(NAME,_minisymbol_to_symbol)
    302        long  (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
    303        long  (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
    304                                                   struct symbol_cache_entry **));
    305        struct symbol_cache_entry  *
    306                      (*_bfd_make_empty_symbol) PARAMS ((bfd *));
    307        void          (*_bfd_print_symbol) PARAMS ((bfd *, PTR,
    308                                            struct symbol_cache_entry *,
    309                                            bfd_print_symbol_type));
    310      #define bfd_print_symbol(b,p,s,e) BFD_SEND(b, _bfd_print_symbol, (b,p,s,e))
    311        void          (*_bfd_get_symbol_info) PARAMS ((bfd *,
    312                                            struct symbol_cache_entry *,
    313                                            symbol_info *));
    314      #define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e))
    315        boolean       (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
    316      
    317        alent *    (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
    318        boolean    (*_bfd_find_nearest_line) PARAMS ((bfd *abfd,
    319                          struct sec *section, struct symbol_cache_entry **symbols,
    320                          bfd_vma offset, CONST char **file, CONST char **func,
    321                          unsigned int *line));
    322       /* Back-door to allow format-aware applications to create debug symbols
    323          while using BFD for everything else.  Currently used by the assembler
    324          when creating COFF files.  */
    325        asymbol *  (*_bfd_make_debug_symbol) PARAMS ((
    326             bfd *abfd,
    327             void *ptr,
    328             unsigned long size));
    329      #define bfd_read_minisymbols(b, d, m, s) \
    330        BFD_SEND (b, _read_minisymbols, (b, d, m, s))
    331        long  (*_read_minisymbols) PARAMS ((bfd *, boolean, PTR *,
    332                                            unsigned int *));
    333      #define bfd_minisymbol_to_symbol(b, d, m, f) \
    334        BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
    335        asymbol *(*_minisymbol_to_symbol) PARAMS ((bfd *, boolean, const PTR,
    336                                                   asymbol *));
    337      
    338        /* Routines for relocs.  */
    339      #define BFD_JUMP_TABLE_RELOCS(NAME)\
    340      CAT(NAME,_get_reloc_upper_bound),\
    341      CAT(NAME,_canonicalize_reloc),\
    342      CAT(NAME,_bfd_reloc_type_lookup)
    343        long  (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
    344        long  (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
    345                                                  struct symbol_cache_entry **));
    346        /* See documentation on reloc types.  */
    347        reloc_howto_type *
    348             (*reloc_type_lookup) PARAMS ((bfd *abfd,
    349                                           bfd_reloc_code_real_type code));
    350      
    351        /* Routines used when writing an object file.  */
    352      #define BFD_JUMP_TABLE_WRITE(NAME)\
    353      CAT(NAME,_set_arch_mach),\
    354      CAT(NAME,_set_section_contents)
    355        boolean    (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture,
    356                          unsigned long));
    357        boolean       (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
    358                                                  file_ptr, bfd_size_type));
    359      
    360        /* Routines used by the linker.  */
    361      #define BFD_JUMP_TABLE_LINK(NAME)\
    362      CAT(NAME,_sizeof_headers),\
    363      CAT(NAME,_bfd_get_relocated_section_contents),\
    364      CAT(NAME,_bfd_relax_section),\
    365      CAT(NAME,_bfd_link_hash_table_create),\
    366      CAT(NAME,_bfd_link_add_symbols),\
    367      CAT(NAME,_bfd_final_link),\
    368      CAT(NAME,_bfd_link_split_section),\
    369      CAT(NAME,_bfd_gc_sections)
    370        int        (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
    371        bfd_byte * (*_bfd_get_relocated_section_contents) PARAMS ((bfd *,
    372                          struct bfd_link_info *, struct bfd_link_order *,
    373                          bfd_byte *data, boolean relocateable,
    374                          struct symbol_cache_entry **));
    375      
    376        boolean    (*_bfd_relax_section) PARAMS ((bfd *, struct sec *,
    377                          struct bfd_link_info *, boolean *again));
    378      
    379        /* Create a hash table for the linker.  Different backends store
    380           different information in this table.  */
    381        struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *));
    382      
    383        /* Add symbols from this object file into the hash table.  */
    384        boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
    385      
    386        /* Do a link based on the link_order structures attached to each
    387           section of the BFD.  */
    388        boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
    389      
    390        /* Should this section be split up into smaller pieces during linking.  */
    391        boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
    392      
    393        /* Remove sections that are not referenced from the output.  */
    394        boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
    395      
    396        /* Routines to handle dynamic symbols and relocs.  */
    397      #define BFD_JUMP_TABLE_DYNAMIC(NAME)\
    398      CAT(NAME,_get_dynamic_symtab_upper_bound),\
    399      CAT(NAME,_canonicalize_dynamic_symtab),\
    400      CAT(NAME,_get_dynamic_reloc_upper_bound),\
    401      CAT(NAME,_canonicalize_dynamic_reloc)
    402        /* Get the amount of memory required to hold the dynamic symbols. */
    403        long  (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
    404        /* Read in the dynamic symbols.  */
    405        long  (*_bfd_canonicalize_dynamic_symtab)
    406          PARAMS ((bfd *, struct symbol_cache_entry **));
    407        /* Get the amount of memory required to hold the dynamic relocs.  */
    408        long  (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
    409        /* Read in the dynamic relocs.  */
    410        long  (*_bfd_canonicalize_dynamic_reloc)
    411          PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
    412    A pointer to an alternative bfd_target in case the current one is not
    413 satisfactory.  This can happen when the target cpu supports both big
    414 and little endian code, and target chosen by the linker has the wrong
    415 endianness.  The function open_output() in ld/ldlang.c uses this field
    416 to find an alternative output format that is suitable.
    417       /* Opposite endian version of this target.  */
    418       const struct bfd_target * alternative_target;
    419    Data for use by back-end routines, which isn't generic enough to
    420 belong in this structure.
    421       PTR backend_data;
    422      
    423      } bfd_target;
    424 
    425 `bfd_set_default_target'
    426 ........................
    427 
    428    *Synopsis*
    429      boolean bfd_set_default_target (const char *name);
    430    *Description*
    431 Set the default target vector to use when recognizing a BFD.  This
    432 takes the name of the target, which may be a BFD target name or a
    433 configuration triplet.
    434 
    435 `bfd_find_target'
    436 .................
    437 
    438    *Synopsis*
    439      const bfd_target *bfd_find_target(CONST char *target_name, bfd *abfd);
    440    *Description*
    441 Return a pointer to the transfer vector for the object target named
    442 TARGET_NAME.  If TARGET_NAME is `NULL', choose the one in the
    443 environment variable `GNUTARGET'; if that is null or not defined, then
    444 choose the first entry in the target list.  Passing in the string
    445 "default" or setting the environment variable to "default" will cause
    446 the first entry in the target list to be returned, and
    447 "target_defaulted" will be set in the BFD.  This causes
    448 `bfd_check_format' to loop over all the targets to find the one that
    449 matches the file being read.
    450 
    451 `bfd_target_list'
    452 .................
    453 
    454    *Synopsis*
    455      const char **bfd_target_list(void);
    456    *Description*
    457 Return a freshly malloced NULL-terminated vector of the names of all
    458 the valid BFD targets. Do not modify the names.
    459 
    460 `bfd_seach_for_target'
    461 ......................
    462 
    463    *Synopsis*
    464      const bfd_target * bfd_search_for_target (int (* search_func) (const bfd_target *, void *), void *);
    465    *Description*
    466 Return a pointer to the first transfer vector in the list of transfer
    467 vectors maintained by BFD that produces a non-zero result when passed
    468 to the function SEARCH_FUNC.  The parameter DATA is passed, unexamined,
    469 to the search function.
    470 
    471 
    472 File: bfd.info,  Node: Architectures,  Next: Opening and Closing,  Prev: Targets,  Up: BFD front end
    473 
    474 Architectures
    475 =============
    476 
    477    BFD keeps one atom in a BFD describing the architecture of the data
    478 attached to the BFD: a pointer to a `bfd_arch_info_type'.
    479 
    480    Pointers to structures can be requested independently of a BFD so
    481 that an architecture's information can be interrogated without access
    482 to an open BFD.
    483 
    484    The architecture information is provided by each architecture
    485 package.  The set of default architectures is selected by the macro
    486 `SELECT_ARCHITECTURES'.  This is normally set up in the
    487 `config/TARGET.mt' file of your choice.  If the name is not defined,
    488 then all the architectures supported are included.
    489 
    490    When BFD starts up, all the architectures are called with an
    491 initialize method.  It is up to the architecture back end to insert as
    492 many items into the list of architectures as it wants to; generally
    493 this would be one for each machine and one for the default case (an
    494 item with a machine field of 0).
    495 
    496    BFD's idea of an architecture is implemented in `archures.c'.
    497 
    498 bfd_architecture
    499 ----------------
    500 
    501    *Description*
    502 This enum gives the object file's CPU architecture, in a global
    503 sense--i.e., what processor family does it belong to?  Another field
    504 indicates which processor within the family is in use.  The machine
    505 gives a number which distinguishes different versions of the
    506 architecture, containing, for example, 2 and 3 for Intel i960 KA and
    507 i960 KB, and 68020 and 68030 for Motorola 68020 and 68030.
    508      enum bfd_architecture
    509      {
    510        bfd_arch_unknown,   /* File arch not known */
    511        bfd_arch_obscure,   /* Arch known, not one of these */
    512        bfd_arch_m68k,      /* Motorola 68xxx */
    513      #define bfd_mach_m68000 1
    514      #define bfd_mach_m68008 2
    515      #define bfd_mach_m68010 3
    516      #define bfd_mach_m68020 4
    517      #define bfd_mach_m68030 5
    518      #define bfd_mach_m68040 6
    519      #define bfd_mach_m68060 7
    520      #define bfd_mach_cpu32  8
    521      #define bfd_mach_mcf5200  9
    522      #define bfd_mach_mcf5206e 10
    523      #define bfd_mach_mcf5307  11
    524      #define bfd_mach_mcf5407  12
    525        bfd_arch_vax,       /* DEC Vax */
    526        bfd_arch_i960,      /* Intel 960 */
    527          /* The order of the following is important.
    528             lower number indicates a machine type that
    529             only accepts a subset of the instructions
    530             available to machines with higher numbers.
    531             The exception is the "ca", which is
    532             incompatible with all other machines except
    533             "core". */
    534      
    535      #define bfd_mach_i960_core      1
    536      #define bfd_mach_i960_ka_sa     2
    537      #define bfd_mach_i960_kb_sb     3
    538      #define bfd_mach_i960_mc        4
    539      #define bfd_mach_i960_xa        5
    540      #define bfd_mach_i960_ca        6
    541      #define bfd_mach_i960_jx        7
    542      #define bfd_mach_i960_hx        8
    543      
    544        bfd_arch_a29k,      /* AMD 29000 */
    545        bfd_arch_sparc,     /* SPARC */
    546      #define bfd_mach_sparc                 1
    547      /* The difference between v8plus and v9 is that v9 is a true 64 bit env.  */
    548      #define bfd_mach_sparc_sparclet        2
    549      #define bfd_mach_sparc_sparclite       3
    550      #define bfd_mach_sparc_v8plus          4
    551      #define bfd_mach_sparc_v8plusa         5 /* with ultrasparc add'ns */
    552      #define bfd_mach_sparc_sparclite_le    6
    553      #define bfd_mach_sparc_v9              7
    554      #define bfd_mach_sparc_v9a             8 /* with ultrasparc add'ns */
    555      #define bfd_mach_sparc_v8plusb         9 /* with cheetah add'ns */
    556      #define bfd_mach_sparc_v9b             10 /* with cheetah add'ns */
    557      /* Nonzero if MACH has the v9 instruction set.  */
    558      #define bfd_mach_sparc_v9_p(mach) \
    559        ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
    560         && (mach) != bfd_mach_sparc_sparclite_le)
    561        bfd_arch_mips,      /* MIPS Rxxxx */
    562      #define bfd_mach_mips3000              3000
    563      #define bfd_mach_mips3900              3900
    564      #define bfd_mach_mips4000              4000
    565      #define bfd_mach_mips4010              4010
    566      #define bfd_mach_mips4100              4100
    567      #define bfd_mach_mips4111              4111
    568      #define bfd_mach_mips4300              4300
    569      #define bfd_mach_mips4400              4400
    570      #define bfd_mach_mips4600              4600
    571      #define bfd_mach_mips4650              4650
    572      #define bfd_mach_mips5000              5000
    573      #define bfd_mach_mips6000              6000
    574      #define bfd_mach_mips8000              8000
    575      #define bfd_mach_mips10000             10000
    576      #define bfd_mach_mips12000             12000
    577      #define bfd_mach_mips16                16
    578      #define bfd_mach_mips32                32
    579      #define bfd_mach_mips32_4k             3204113 /* 32, 04, octal 'K' */
    580      #define bfd_mach_mips5                 5
    581      #define bfd_mach_mips64                64
    582      #define bfd_mach_mips_sb1              12310201 /* octal 'SB', 01 */
    583        bfd_arch_i386,      /* Intel 386 */
    584      #define bfd_mach_i386_i386 0
    585      #define bfd_mach_i386_i8086 1
    586      #define bfd_mach_i386_i386_intel_syntax 2
    587      #define bfd_mach_x86_64 3
    588      #define bfd_mach_x86_64_intel_syntax 4
    589        bfd_arch_we32k,     /* AT&T WE32xxx */
    590        bfd_arch_tahoe,     /* CCI/Harris Tahoe */
    591        bfd_arch_i860,      /* Intel 860 */
    592        bfd_arch_i370,      /* IBM 360/370 Mainframes */
    593        bfd_arch_romp,      /* IBM ROMP PC/RT */
    594        bfd_arch_alliant,   /* Alliant */
    595        bfd_arch_convex,    /* Convex */
    596        bfd_arch_m88k,      /* Motorola 88xxx */
    597        bfd_arch_pyramid,   /* Pyramid Technology */
    598        bfd_arch_h8300,     /* Hitachi H8/300 */
    599      #define bfd_mach_h8300   1
    600      #define bfd_mach_h8300h  2
    601      #define bfd_mach_h8300s  3
    602        bfd_arch_powerpc,   /* PowerPC */
    603      #define bfd_mach_ppc           0
    604      #define bfd_mach_ppc_403       403
    605      #define bfd_mach_ppc_403gc     4030
    606      #define bfd_mach_ppc_505       505
    607      #define bfd_mach_ppc_601       601
    608      #define bfd_mach_ppc_602       602
    609      #define bfd_mach_ppc_603       603
    610      #define bfd_mach_ppc_ec603e    6031
    611      #define bfd_mach_ppc_604       604
    612      #define bfd_mach_ppc_620       620
    613      #define bfd_mach_ppc_630       630
    614      #define bfd_mach_ppc_750       750
    615      #define bfd_mach_ppc_860       860
    616      #define bfd_mach_ppc_a35       35
    617      #define bfd_mach_ppc_rs64ii    642
    618      #define bfd_mach_ppc_rs64iii   643
    619      #define bfd_mach_ppc_7400      7400
    620        bfd_arch_rs6000,    /* IBM RS/6000 */
    621      #define bfd_mach_rs6k          0
    622      #define bfd_mach_rs6k_rs1      6001
    623      #define bfd_mach_rs6k_rsc      6003
    624      #define bfd_mach_rs6k_rs2      6002
    625        bfd_arch_hppa,      /* HP PA RISC */
    626        bfd_arch_d10v,      /* Mitsubishi D10V */
    627      #define bfd_mach_d10v          0
    628      #define bfd_mach_d10v_ts2      2
    629      #define bfd_mach_d10v_ts3      3
    630        bfd_arch_d30v,      /* Mitsubishi D30V */
    631        bfd_arch_m68hc11,   /* Motorola 68HC11 */
    632        bfd_arch_m68hc12,   /* Motorola 68HC12 */
    633        bfd_arch_z8k,       /* Zilog Z8000 */
    634      #define bfd_mach_z8001         1
    635      #define bfd_mach_z8002         2
    636        bfd_arch_h8500,     /* Hitachi H8/500 */
    637        bfd_arch_sh,        /* Hitachi SH */
    638      #define bfd_mach_sh            0
    639      #define bfd_mach_sh2        0x20
    640      #define bfd_mach_sh_dsp     0x2d
    641      #define bfd_mach_sh3        0x30
    642      #define bfd_mach_sh3_dsp    0x3d
    643      #define bfd_mach_sh3e       0x3e
    644      #define bfd_mach_sh4        0x40
    645        bfd_arch_alpha,     /* Dec Alpha */
    646      #define bfd_mach_alpha_ev4  0x10
    647      #define bfd_mach_alpha_ev5  0x20
    648      #define bfd_mach_alpha_ev6  0x30
    649        bfd_arch_arm,       /* Advanced Risc Machines ARM */
    650      #define bfd_mach_arm_2         1
    651      #define bfd_mach_arm_2a        2
    652      #define bfd_mach_arm_3         3
    653      #define bfd_mach_arm_3M        4
    654      #define bfd_mach_arm_4         5
    655      #define bfd_mach_arm_4T        6
    656      #define bfd_mach_arm_5         7
    657      #define bfd_mach_arm_5T        8
    658      #define bfd_mach_arm_5TE       9
    659      #define bfd_mach_arm_XScale    10
    660        bfd_arch_ns32k,     /* National Semiconductors ns32000 */
    661        bfd_arch_w65,       /* WDC 65816 */
    662        bfd_arch_tic30,     /* Texas Instruments TMS320C30 */
    663        bfd_arch_tic54x,    /* Texas Instruments TMS320C54X */
    664        bfd_arch_tic80,     /* TI TMS320c80 (MVP) */
    665        bfd_arch_v850,      /* NEC V850 */
    666      #define bfd_mach_v850          0
    667      #define bfd_mach_v850e         'E'
    668      #define bfd_mach_v850ea        'A'
    669        bfd_arch_arc,       /* ARC Cores */
    670      #define bfd_mach_arc_5         0
    671      #define bfd_mach_arc_6         1
    672      #define bfd_mach_arc_7         2
    673      #define bfd_mach_arc_8         3
    674        bfd_arch_m32r,      /* Mitsubishi M32R/D */
    675      #define bfd_mach_m32r          0 /* backwards compatibility */
    676      #define bfd_mach_m32rx         'x'
    677        bfd_arch_mn10200,   /* Matsushita MN10200 */
    678        bfd_arch_mn10300,   /* Matsushita MN10300 */
    679      #define bfd_mach_mn10300               300
    680      #define bfd_mach_am33          330
    681        bfd_arch_fr30,
    682      #define bfd_mach_fr30          0x46523330
    683        bfd_arch_mcore,
    684        bfd_arch_ia64,      /* HP/Intel ia64 */
    685      #define bfd_mach_ia64_elf64    0
    686      #define bfd_mach_ia64_elf32    1
    687        bfd_arch_pj,
    688        bfd_arch_avr,       /* Atmel AVR microcontrollers */
    689      #define bfd_mach_avr1          1
    690      #define bfd_mach_avr2          2
    691      #define bfd_mach_avr3          3
    692      #define bfd_mach_avr4          4
    693      #define bfd_mach_avr5          5
    694        bfd_arch_cris,      /* Axis CRIS */
    695        bfd_arch_last
    696        };
    697 
    698 bfd_arch_info
    699 -------------
    700 
    701    *Description*
    702 This structure contains information on architectures for use within BFD.
    703 
    704      typedef struct bfd_arch_info
    705      {
    706        int bits_per_word;
    707        int bits_per_address;
    708        int bits_per_byte;
    709        enum bfd_architecture arch;
    710        unsigned long mach;
    711        const char *arch_name;
    712        const char *printable_name;
    713        unsigned int section_align_power;
    714        /* True if this is the default machine for the architecture.  */
    715        boolean the_default;
    716        const struct bfd_arch_info * (*compatible)
    717             PARAMS ((const struct bfd_arch_info *a,
    718                      const struct bfd_arch_info *b));
    719      
    720        boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
    721      
    722        const struct bfd_arch_info *next;
    723      } bfd_arch_info_type;
    724 
    725 `bfd_printable_name'
    726 ....................
    727 
    728    *Synopsis*
    729      const char *bfd_printable_name(bfd *abfd);
    730    *Description*
    731 Return a printable string representing the architecture and machine
    732 from the pointer to the architecture info structure.
    733 
    734 `bfd_scan_arch'
    735 ...............
    736 
    737    *Synopsis*
    738      const bfd_arch_info_type *bfd_scan_arch(const char *string);
    739    *Description*
    740 Figure out if BFD supports any cpu which could be described with the
    741 name STRING.  Return a pointer to an `arch_info' structure if a machine
    742 is found, otherwise NULL.
    743 
    744 `bfd_arch_list'
    745 ...............
    746 
    747    *Synopsis*
    748      const char **bfd_arch_list(void);
    749    *Description*
    750 Return a freshly malloced NULL-terminated vector of the names of all
    751 the valid BFD architectures.  Do not modify the names.
    752 
    753 `bfd_arch_get_compatible'
    754 .........................
    755 
    756    *Synopsis*
    757      const bfd_arch_info_type *bfd_arch_get_compatible(
    758          const bfd *abfd,
    759          const bfd *bbfd);
    760    *Description*
    761 Determine whether two BFDs' architectures and machine types are
    762 compatible.  Calculates the lowest common denominator between the two
    763 architectures and machine types implied by the BFDs and returns a
    764 pointer to an `arch_info' structure describing the compatible machine.
    765 
    766 `bfd_default_arch_struct'
    767 .........................
    768 
    769    *Description*
    770 The `bfd_default_arch_struct' is an item of `bfd_arch_info_type' which
    771 has been initialized to a fairly generic state.  A BFD starts life by
    772 pointing to this structure, until the correct back end has determined
    773 the real architecture of the file.
    774      extern const bfd_arch_info_type bfd_default_arch_struct;
    775 
    776 `bfd_set_arch_info'
    777 ...................
    778 
    779    *Synopsis*
    780      void bfd_set_arch_info(bfd *abfd, const bfd_arch_info_type *arg);
    781    *Description*
    782 Set the architecture info of ABFD to ARG.
    783 
    784 `bfd_default_set_arch_mach'
    785 ...........................
    786 
    787    *Synopsis*
    788      boolean bfd_default_set_arch_mach(bfd *abfd,
    789          enum bfd_architecture arch,
    790          unsigned long mach);
    791    *Description*
    792 Set the architecture and machine type in BFD ABFD to ARCH and MACH.
    793 Find the correct pointer to a structure and insert it into the
    794 `arch_info' pointer.
    795 
    796 `bfd_get_arch'
    797 ..............
    798 
    799    *Synopsis*
    800      enum bfd_architecture bfd_get_arch(bfd *abfd);
    801    *Description*
    802 Return the enumerated type which describes the BFD ABFD's architecture.
    803 
    804 `bfd_get_mach'
    805 ..............
    806 
    807    *Synopsis*
    808      unsigned long bfd_get_mach(bfd *abfd);
    809    *Description*
    810 Return the long type which describes the BFD ABFD's machine.
    811 
    812 `bfd_arch_bits_per_byte'
    813 ........................
    814 
    815    *Synopsis*
    816      unsigned int bfd_arch_bits_per_byte(bfd *abfd);
    817    *Description*
    818 Return the number of bits in one of the BFD ABFD's architecture's bytes.
    819 
    820 `bfd_arch_bits_per_address'
    821 ...........................
    822 
    823    *Synopsis*
    824      unsigned int bfd_arch_bits_per_address(bfd *abfd);
    825    *Description*
    826 Return the number of bits in one of the BFD ABFD's architecture's
    827 addresses.
    828 
    829 `bfd_default_compatible'
    830 ........................
    831 
    832    *Synopsis*
    833      const bfd_arch_info_type *bfd_default_compatible
    834         (const bfd_arch_info_type *a,
    835          const bfd_arch_info_type *b);
    836    *Description*
    837 The default function for testing for compatibility.
    838 
    839 `bfd_default_scan'
    840 ..................
    841 
    842    *Synopsis*
    843      boolean bfd_default_scan(const struct bfd_arch_info *info, const char *string);
    844    *Description*
    845 The default function for working out whether this is an architecture
    846 hit and a machine hit.
    847 
    848 `bfd_get_arch_info'
    849 ...................
    850 
    851    *Synopsis*
    852      const bfd_arch_info_type * bfd_get_arch_info(bfd *abfd);
    853    *Description*
    854 Return the architecture info struct in ABFD.
    855 
    856 `bfd_lookup_arch'
    857 .................
    858 
    859    *Synopsis*
    860      const bfd_arch_info_type *bfd_lookup_arch
    861         (enum bfd_architecture
    862          arch,
    863          unsigned long machine);
    864    *Description*
    865 Look for the architecure info structure which matches the arguments
    866 ARCH and MACHINE. A machine of 0 matches the machine/architecture
    867 structure which marks itself as the default.
    868 
    869 `bfd_printable_arch_mach'
    870 .........................
    871 
    872    *Synopsis*
    873      const char *bfd_printable_arch_mach
    874         (enum bfd_architecture arch, unsigned long machine);
    875    *Description*
    876 Return a printable string representing the architecture and machine
    877 type.
    878 
    879    This routine is depreciated.
    880 
    881 `bfd_octets_per_byte'
    882 .....................
    883 
    884    *Synopsis*
    885      unsigned int bfd_octets_per_byte(bfd *abfd);
    886    *Description*
    887 Return the number of octets (8-bit quantities) per target byte (minimum
    888 addressable unit).  In most cases, this will be one, but some DSP
    889 targets have 16, 32, or even 48 bits per byte.
    890 
    891 `bfd_arch_mach_octets_per_byte'
    892 ...............................
    893 
    894    *Synopsis*
    895      unsigned int bfd_arch_mach_octets_per_byte(enum bfd_architecture arch,
    896          unsigned long machine);
    897    *Description*
    898 See bfd_octets_per_byte.
    899 
    900    This routine is provided for those cases where a bfd * is not
    901 available
    902 
    903 
    904 File: bfd.info,  Node: Opening and Closing,  Next: Internal,  Prev: Architectures,  Up: BFD front end
    905 
    906 Opening and closing BFDs
    907 ========================
    908 
    909 `bfd_openr'
    910 ...........
    911 
    912    *Synopsis*
    913      bfd *bfd_openr(CONST char *filename, CONST char *target);
    914    *Description*
    915 Open the file FILENAME (using `fopen') with the target TARGET.  Return
    916 a pointer to the created BFD.
    917 
    918    Calls `bfd_find_target', so TARGET is interpreted as by that
    919 function.
    920 
    921    If `NULL' is returned then an error has occured.   Possible errors
    922 are `bfd_error_no_memory', `bfd_error_invalid_target' or `system_call'
    923 error.
    924 
    925 `bfd_fdopenr'
    926 .............
    927 
    928    *Synopsis*
    929      bfd *bfd_fdopenr(CONST char *filename, CONST char *target, int fd);
    930    *Description*
    931 `bfd_fdopenr' is to `bfd_fopenr' much like `fdopen' is to `fopen'.  It
    932 opens a BFD on a file already described by the FD supplied.
    933 
    934    When the file is later `bfd_close'd, the file descriptor will be
    935 closed.
    936 
    937    If the caller desires that this file descriptor be cached by BFD
    938 (opened as needed, closed as needed to free descriptors for other
    939 opens), with the supplied FD used as an initial file descriptor (but
    940 subject to closure at any time), call bfd_set_cacheable(bfd, 1) on the
    941 returned BFD.  The default is to assume no cacheing; the file
    942 descriptor will remain open until `bfd_close', and will not be affected
    943 by BFD operations on other files.
    944 
    945    Possible errors are `bfd_error_no_memory',
    946 `bfd_error_invalid_target' and `bfd_error_system_call'.
    947 
    948 `bfd_openstreamr'
    949 .................
    950 
    951    *Synopsis*
    952      bfd *bfd_openstreamr(const char *, const char *, PTR);
    953    *Description*
    954 Open a BFD for read access on an existing stdio stream.  When the BFD
    955 is passed to `bfd_close', the stream will be closed.
    956 
    957 `bfd_openw'
    958 ...........
    959 
    960    *Synopsis*
    961      bfd *bfd_openw(CONST char *filename, CONST char *target);
    962    *Description*
    963 Create a BFD, associated with file FILENAME, using the file format
    964 TARGET, and return a pointer to it.
    965 
    966    Possible errors are `bfd_error_system_call', `bfd_error_no_memory',
    967 `bfd_error_invalid_target'.
    968 
    969 `bfd_close'
    970 ...........
    971 
    972    *Synopsis*
    973      boolean bfd_close(bfd *abfd);
    974    *Description*
    975 Close a BFD. If the BFD was open for writing, then pending operations
    976 are completed and the file written out and closed. If the created file
    977 is executable, then `chmod' is called to mark it as such.
    978 
    979    All memory attached to the BFD is released.
    980 
    981    The file descriptor associated with the BFD is closed (even if it
    982 was passed in to BFD by `bfd_fdopenr').
    983 
    984    *Returns*
    985 `true' is returned if all is ok, otherwise `false'.
    986 
    987 `bfd_close_all_done'
    988 ....................
    989 
    990    *Synopsis*
    991      boolean bfd_close_all_done(bfd *);
    992    *Description*
    993 Close a BFD.  Differs from `bfd_close' since it does not complete any
    994 pending operations.  This routine would be used if the application had
    995 just used BFD for swapping and didn't want to use any of the writing
    996 code.
    997 
    998    If the created file is executable, then `chmod' is called to mark it
    999 as such.
    1000 
    1001    All memory attached to the BFD is released.
    1002 
    1003    *Returns*
    1004 `true' is returned if all is ok, otherwise `false'.
    1005 
    1006 `bfd_create'
    1007 ............
    1008 
    1009    *Synopsis*
    1010      bfd *bfd_create(CONST char *filename, bfd *templ);
    1011    *Description*
    1012 Create a new BFD in the manner of `bfd_openw', but without opening a
    1013 file. The new BFD takes the target from the target used by TEMPLATE. The
    1014 format is always set to `bfd_object'.
    1015 
    1016 `bfd_make_writable'
    1017 ...................
    1018 
    1019    *Synopsis*
    1020      boolean bfd_make_writable(bfd *abfd);
    1021    *Description*
    1022 Takes a BFD as created by `bfd_create' and converts it into one like as
    1023 returned by `bfd_openw'.  It does this by converting the BFD to
    1024 BFD_IN_MEMORY.  It's assumed that you will call `bfd_make_readable' on
    1025 this bfd later.
    1026 
    1027    *Returns*
    1028 `true' is returned if all is ok, otherwise `false'.
    1029 
    1030 `bfd_make_readable'
    1031 ...................
    1032 
    1033    *Synopsis*
    1034      boolean bfd_make_readable(bfd *abfd);
    1035    *Description*
    1036 Takes a BFD as created by `bfd_create' and `bfd_make_writable' and
    1037 converts it into one like as returned by `bfd_openr'.  It does this by
    1038 writing the contents out to the memory buffer, then reversing the
    1039 direction.
    1040 
    1041    *Returns*
    1042 `true' is returned if all is ok, otherwise `false'.
    1043 
    1044 `bfd_alloc'
    1045 ...........
    1046 
    1047    *Synopsis*
    1048      PTR bfd_alloc (bfd *abfd, size_t wanted);
    1049    *Description*
    1050 Allocate a block of WANTED bytes of memory attached to `abfd' and
    1051 return a pointer to it.
    1052 
    1053 
    1054 File: bfd.info,  Node: Internal,  Next: File Caching,  Prev: Opening and Closing,  Up: BFD front end
    1055 
    1056 Internal functions
    1057 ==================
    1058 
    1059    *Description*
    1060 These routines are used within BFD.  They are not intended for export,
    1061 but are documented here for completeness.
    1062 
    1063 `bfd_write_bigendian_4byte_int'
    1064 ...............................
    1065 
    1066    *Synopsis*
    1067      void bfd_write_bigendian_4byte_int(bfd *abfd,  int i);
    1068    *Description*
    1069 Write a 4 byte integer I to the output BFD ABFD, in big endian order
    1070 regardless of what else is going on.  This is useful in archives.
    1071 
    1072 `bfd_put_size'
    1073 ..............
    1074 
    1075 `bfd_get_size'
    1076 ..............
    1077 
    1078    *Description*
    1079 These macros as used for reading and writing raw data in sections; each
    1080 access (except for bytes) is vectored through the target format of the
    1081 BFD and mangled accordingly. The mangling performs any necessary endian
    1082 translations and removes alignment restrictions.  Note that types
    1083 accepted and returned by these macros are identical so they can be
    1084 swapped around in macros--for example, `libaout.h' defines `GET_WORD'
    1085 to either `bfd_get_32' or `bfd_get_64'.
    1086 
    1087    In the put routines, VAL must be a `bfd_vma'.  If we are on a system
    1088 without prototypes, the caller is responsible for making sure that is
    1089 true, with a cast if necessary.  We don't cast them in the macro
    1090 definitions because that would prevent `lint' or `gcc -Wall' from
    1091 detecting sins such as passing a pointer.  To detect calling these with
    1092 less than a `bfd_vma', use `gcc -Wconversion' on a host with 64 bit
    1093 `bfd_vma''s.
    1094 
    1095      /* Byte swapping macros for user section data.  */
    1096      
    1097      #define bfd_put_8(abfd, val, ptr) \
    1098                      ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val)))
    1099      #define bfd_put_signed_8 \
    1100                     bfd_put_8
    1101      #define bfd_get_8(abfd, ptr) \
    1102                      (*(unsigned char *) (ptr))
    1103      #define bfd_get_signed_8(abfd, ptr) \
    1104                     ((*(unsigned char *) (ptr) ^ 0x80) - 0x80)
    1105      
    1106      #define bfd_put_16(abfd, val, ptr) \
    1107                      BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
    1108      #define bfd_put_signed_16 \
    1109                      bfd_put_16
    1110      #define bfd_get_16(abfd, ptr) \
    1111                      BFD_SEND(abfd, bfd_getx16, (ptr))
    1112      #define bfd_get_signed_16(abfd, ptr) \
    1113                      BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
    1114      
    1115      #define bfd_put_32(abfd, val, ptr) \
    1116                      BFD_SEND(abfd, bfd_putx32, ((val),(ptr)))
    1117      #define bfd_put_signed_32 \
    1118                      bfd_put_32
    1119      #define bfd_get_32(abfd, ptr) \
    1120                      BFD_SEND(abfd, bfd_getx32, (ptr))
    1121      #define bfd_get_signed_32(abfd, ptr) \
    1122                      BFD_SEND(abfd, bfd_getx_signed_32, (ptr))
    1123      
    1124      #define bfd_put_64(abfd, val, ptr) \
    1125                      BFD_SEND(abfd, bfd_putx64, ((val), (ptr)))
    1126      #define bfd_put_signed_64 \
    1127                      bfd_put_64
    1128      #define bfd_get_64(abfd, ptr) \
    1129                      BFD_SEND(abfd, bfd_getx64, (ptr))
    1130      #define bfd_get_signed_64(abfd, ptr) \
    1131                      BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
    1132      
    1133      #define bfd_get(bits, abfd, ptr)                               \
    1134                      ((bits) == 8 ? bfd_get_8 (abfd, ptr)           \
    1135                      : (bits) == 16 ? bfd_get_16 (abfd, ptr)        \
    1136                      : (bits) == 32 ? bfd_get_32 (abfd, ptr)        \
    1137                      : (bits) == 64 ? bfd_get_64 (abfd, ptr)        \
    1138                      : (abort (), (bfd_vma) - 1))
    1139      
    1140      #define bfd_put(bits, abfd, val, ptr)                          \
    1141                      ((bits) == 8 ? bfd_put_8 (abfd, val, ptr)      \
    1142                      : (bits) == 16 ? bfd_put_16 (abfd, val, ptr)   \
    1143                      : (bits) == 32 ? bfd_put_32 (abfd, val, ptr)   \
    1144                      : (bits) == 64 ? bfd_put_64 (abfd, val, ptr)   \
    1145                      : (abort (), (void) 0))
    1146 
    1147 `bfd_h_put_size'
    1148 ................
    1149 
    1150    *Description*
    1151 These macros have the same function as their `bfd_get_x' bretheren,
    1152 except that they are used for removing information for the header
    1153 records of object files. Believe it or not, some object files keep
    1154 their header records in big endian order and their data in little
    1155 endian order.
    1156 
    1157      /* Byte swapping macros for file header data.  */
    1158      
    1159      #define bfd_h_put_8(abfd, val, ptr) \
    1160                     bfd_put_8 (abfd, val, ptr)
    1161      #define bfd_h_put_signed_8(abfd, val, ptr) \
    1162                     bfd_put_8 (abfd, val, ptr)
    1163      #define bfd_h_get_8(abfd, ptr) \
    1164                     bfd_get_8 (abfd, ptr)
    1165      #define bfd_h_get_signed_8(abfd, ptr) \
    1166                     bfd_get_signed_8 (abfd, ptr)
    1167      
    1168      #define bfd_h_put_16(abfd, val, ptr) \
    1169                      BFD_SEND(abfd, bfd_h_putx16,(val,ptr))
    1170      #define bfd_h_put_signed_16 \
    1171                      bfd_h_put_16
    1172      #define bfd_h_get_16(abfd, ptr) \
    1173                      BFD_SEND(abfd, bfd_h_getx16,(ptr))
    1174      #define bfd_h_get_signed_16(abfd, ptr) \
    1175                      BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr))
    1176      
    1177      #define bfd_h_put_32(abfd, val, ptr) \
    1178                      BFD_SEND(abfd, bfd_h_putx32,(val,ptr))
    1179      #define bfd_h_put_signed_32 \
    1180                      bfd_h_put_32
    1181      #define bfd_h_get_32(abfd, ptr) \
    1182                      BFD_SEND(abfd, bfd_h_getx32,(ptr))
    1183      #define bfd_h_get_signed_32(abfd, ptr) \
    1184                      BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr))
    1185      
    1186      #define bfd_h_put_64(abfd, val, ptr) \
    1187                      BFD_SEND(abfd, bfd_h_putx64,(val, ptr))
    1188      #define bfd_h_put_signed_64 \
    1189                      bfd_h_put_64
    1190      #define bfd_h_get_64(abfd, ptr) \
    1191                      BFD_SEND(abfd, bfd_h_getx64,(ptr))
    1192      #define bfd_h_get_signed_64(abfd, ptr) \
    1193                      BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
    1194 
    1195 `bfd_log2'
    1196 ..........
    1197 
    1198    *Synopsis*
    1199      unsigned int bfd_log2(bfd_vma x);
    1200    *Description*
    1201 Return the log base 2 of the value supplied, rounded up.  E.g., an X of
    1202 1025 returns 11.
    1203 
    1204 
    1205 File: bfd.info,  Node: File Caching,  Next: Linker Functions,  Prev: Internal,  Up: BFD front end
    1206 
    1207 File caching
    1208 ============
    1209 
    1210    The file caching mechanism is embedded within BFD and allows the
    1211 application to open as many BFDs as it wants without regard to the
    1212 underlying operating system's file descriptor limit (often as low as 20
    1213 open files).  The module in `cache.c' maintains a least recently used
    1214 list of `BFD_CACHE_MAX_OPEN' files, and exports the name
    1215 `bfd_cache_lookup', which runs around and makes sure that the required
    1216 BFD is open. If not, then it chooses a file to close, closes it and
    1217 opens the one wanted, returning its file handle.
    1218 
    1219 `BFD_CACHE_MAX_OPEN macro'
    1220 ..........................
    1221 
    1222    *Description*
    1223 The maximum number of files which the cache will keep open at one time.
    1224      #define BFD_CACHE_MAX_OPEN 10
    1225 
    1226 `bfd_last_cache'
    1227 ................
    1228 
    1229    *Synopsis*
    1230      extern bfd *bfd_last_cache;
    1231    *Description*
    1232 Zero, or a pointer to the topmost BFD on the chain.  This is used by
    1233 the `bfd_cache_lookup' macro in `libbfd.h' to determine when it can
    1234 avoid a function call.
    1235 
    1236 `bfd_cache_lookup'
    1237 ..................
    1238 
    1239    *Description*
    1240 Check to see if the required BFD is the same as the last one looked up.
    1241 If so, then it can use the stream in the BFD with impunity, since it
    1242 can't have changed since the last lookup; otherwise, it has to perform
    1243 the complicated lookup function.
    1244      #define bfd_cache_lookup(x) \
    1245          ((x)==bfd_last_cache? \
    1246            (FILE*) (bfd_last_cache->iostream): \
    1247             bfd_cache_lookup_worker(x))
    1248 
    1249 `bfd_cache_init'
    1250 ................
    1251 
    1252    *Synopsis*
    1253      boolean bfd_cache_init (bfd *abfd);
    1254    *Description*
    1255 Add a newly opened BFD to the cache.
    1256 
    1257 `bfd_cache_close'
    1258 .................
    1259 
    1260    *Synopsis*
    1261      boolean bfd_cache_close (bfd *abfd);
    1262    *Description*
    1263 Remove the BFD ABFD from the cache. If the attached file is open, then
    1264 close it too.
    1265 
    1266    *Returns*
    1267 `false' is returned if closing the file fails, `true' is returned if
    1268 all is well.
    1269 
    1270 `bfd_open_file'
    1271 ...............
    1272 
    1273    *Synopsis*
    1274      FILE* bfd_open_file(bfd *abfd);
    1275    *Description*
    1276 Call the OS to open a file for ABFD.  Return the `FILE *' (possibly
    1277 `NULL') that results from this operation.  Set up the BFD so that
    1278 future accesses know the file is open. If the `FILE *' returned is
    1279 `NULL', then it won't have been put in the cache, so it won't have to
    1280 be removed from it.
    1281 
    1282 `bfd_cache_lookup_worker'
    1283 .........................
    1284 
    1285    *Synopsis*
    1286      FILE *bfd_cache_lookup_worker(bfd *abfd);
    1287    *Description*
    1288 Called when the macro `bfd_cache_lookup' fails to find a quick answer.
    1289 Find a file descriptor for ABFD.  If necessary, it open it.  If there
    1290 are already more than `BFD_CACHE_MAX_OPEN' files open, it tries to
    1291 close one first, to avoid running out of file descriptors.
    1292 
  • branches/GNU/src/binutils/bfd/doc/bfd.info-5

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 This is bfd.info, produced by makeinfo version 4.0 from bfd.texinfo.
     1This is bfd.info, produced by makeinfo version 4.3 from bfd.texinfo.
    22
    33START-INFO-DIR-ENTRY
     
    77   This file documents the BFD library.
    88
    9    Copyright (C) 1991, 2000 Free Software Foundation, Inc.
     9   Copyright (C) 1991, 2000, 2001, 2003 Free Software Foundation, Inc.
    1010
    1111   Permission is granted to copy, distribute and/or modify this document
     
    1717
    1818
    19 File: bfd.info,  Node: Linker Functions,  Next: Hash Tables,  Prev: File Caching,  Up: BFD front end
    20 
    21 Linker Functions
    22 ================
    23 
    24    The linker uses three special entry points in the BFD target vector.
    25 It is not necessary to write special routines for these entry points
    26 when creating a new BFD back end, since generic versions are provided.
    27 However, writing them can speed up linking and make it use
    28 significantly less runtime memory.
    29 
    30    The first routine creates a hash table used by the other routines.
    31 The second routine adds the symbols from an object file to the hash
    32 table.  The third routine takes all the object files and links them
    33 together to create the output file.  These routines are designed so
    34 that the linker proper does not need to know anything about the symbols
    35 in the object files that it is linking.  The linker merely arranges the
    36 sections as directed by the linker script and lets BFD handle the
    37 details of symbols and relocs.
    38 
    39    The second routine and third routines are passed a pointer to a
    40 `struct bfd_link_info' structure (defined in `bfdlink.h') which holds
    41 information relevant to the link, including the linker hash table
    42 (which was created by the first routine) and a set of callback
    43 functions to the linker proper.
    44 
    45    The generic linker routines are in `linker.c', and use the header
    46 file `genlink.h'.  As of this writing, the only back ends which have
    47 implemented versions of these routines are a.out (in `aoutx.h') and
    48 ECOFF (in `ecoff.c').  The a.out routines are used as examples
    49 throughout this section.
    50 
    51 * Menu:
    52 
    53 * Creating a Linker Hash Table::
    54 * Adding Symbols to the Hash Table::
    55 * Performing the Final Link::
     19File: bfd.info,  Node: bfd_target,  Prev: Targets,  Up: Targets
     20
     21bfd_target
     22----------
     23
     24   *Description*
     25This structure contains everything that BFD knows about a target. It
     26includes things like its byte order, name, and which routines to call
     27to do various operations.
     28
     29   Every BFD points to a target structure with its `xvec' member.
     30
     31   The macros below are used to dispatch to functions through the
     32`bfd_target' vector. They are used in a number of macros further down
     33in `bfd.h', and are also used when calling various routines by hand
     34inside the BFD implementation.  The ARGLIST argument must be
     35parenthesized; it contains all the arguments to the called function.
     36
     37   They make the documentation (more) unpleasant to read, so if someone
     38wants to fix this and not break the above, please do.
     39     #define BFD_SEND(bfd, message, arglist) \
     40                    ((*((bfd)->xvec->message)) arglist)
     41     
     42     #ifdef DEBUG_BFD_SEND
     43     #undef BFD_SEND
     44     #define BFD_SEND(bfd, message, arglist) \
     45       (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
     46         ((*((bfd)->xvec->message)) arglist) : \
     47         (bfd_assert (__FILE__,__LINE__), NULL))
     48     #endif
     49   For operations which index on the BFD format:
     50     #define BFD_SEND_FMT(bfd, message, arglist) \
     51                 (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
     52     
     53     #ifdef DEBUG_BFD_SEND
     54     #undef BFD_SEND_FMT
     55     #define BFD_SEND_FMT(bfd, message, arglist) \
     56       (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
     57        (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
     58        (bfd_assert (__FILE__,__LINE__), NULL))
     59     #endif
     60   This is the structure which defines the type of BFD this is.  The
     61`xvec' member of the struct `bfd' itself points here.  Each module that
     62implements access to a different target under BFD, defines one of these.
     63
     64   FIXME, these names should be rationalised with the names of the
     65entry points which call them. Too bad we can't have one macro to define
     66them both!
     67     enum bfd_flavour
     68     {
     69       bfd_target_unknown_flavour,
     70       bfd_target_aout_flavour,
     71       bfd_target_coff_flavour,
     72       bfd_target_ecoff_flavour,
     73       bfd_target_xcoff_flavour,
     74       bfd_target_elf_flavour,
     75       bfd_target_ieee_flavour,
     76       bfd_target_nlm_flavour,
     77       bfd_target_oasys_flavour,
     78       bfd_target_tekhex_flavour,
     79       bfd_target_srec_flavour,
     80       bfd_target_ihex_flavour,
     81       bfd_target_som_flavour,
     82       bfd_target_os9k_flavour,
     83       bfd_target_versados_flavour,
     84       bfd_target_msdos_flavour,
     85       bfd_target_ovax_flavour,
     86       bfd_target_evax_flavour,
     87       bfd_target_mmo_flavour,
     88       bfd_target_mach_o_flavour,
     89       bfd_target_pef_flavour,
     90       bfd_target_pef_xlib_flavour,
     91       bfd_target_sym_flavour
     92     };
     93     
     94     enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
     95     
     96     /* Forward declaration.  */
     97     typedef struct bfd_link_info _bfd_link_info;
     98     
     99     typedef struct bfd_target
     100     {
     101       /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc.  */
     102       char *name;
     103     
     104      /* The "flavour" of a back end is a general indication about
     105         the contents of a file.  */
     106       enum bfd_flavour flavour;
     107     
     108       /* The order of bytes within the data area of a file.  */
     109       enum bfd_endian byteorder;
     110     
     111      /* The order of bytes within the header parts of a file.  */
     112       enum bfd_endian header_byteorder;
     113     
     114       /* A mask of all the flags which an executable may have set -
     115          from the set `BFD_NO_FLAGS', `HAS_RELOC', ...`D_PAGED'.  */
     116       flagword object_flags;
     117     
     118      /* A mask of all the flags which a section may have set - from
     119         the set `SEC_NO_FLAGS', `SEC_ALLOC', ...`SET_NEVER_LOAD'.  */
     120       flagword section_flags;
     121     
     122      /* The character normally found at the front of a symbol.
     123         (if any), perhaps `_'.  */
     124       char symbol_leading_char;
     125     
     126      /* The pad character for file names within an archive header.  */
     127       char ar_pad_char;
     128     
     129       /* The maximum number of characters in an archive header.  */
     130       unsigned short ar_max_namelen;
     131     
     132       /* Entries for byte swapping for data. These are different from the
     133          other entry points, since they don't take a BFD asthe first argument.
     134          Certain other handlers could do the same.  */
     135       bfd_vma        (*bfd_getx64) PARAMS ((const bfd_byte *));
     136       bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *));
     137       void           (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
     138       bfd_vma        (*bfd_getx32) PARAMS ((const bfd_byte *));
     139       bfd_signed_vma (*bfd_getx_signed_32) PARAMS ((const bfd_byte *));
     140       void           (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
     141       bfd_vma        (*bfd_getx16) PARAMS ((const bfd_byte *));
     142       bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *));
     143       void           (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
     144     
     145       /* Byte swapping for the headers.  */
     146       bfd_vma        (*bfd_h_getx64) PARAMS ((const bfd_byte *));
     147       bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *));
     148       void           (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
     149       bfd_vma        (*bfd_h_getx32) PARAMS ((const bfd_byte *));
     150       bfd_signed_vma (*bfd_h_getx_signed_32) PARAMS ((const bfd_byte *));
     151       void           (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
     152       bfd_vma        (*bfd_h_getx16) PARAMS ((const bfd_byte *));
     153       bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *));
     154       void           (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
     155     
     156       /* Format dependent routines: these are vectors of entry points
     157          within the target vector structure, one for each format to check.  */
     158     
     159       /* Check the format of a file being read.  Return a `bfd_target *' or zero.  */
     160       const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
     161     
     162       /* Set the format of a file being written.  */
     163       bfd_boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
     164     
     165       /* Write cached information into a file being written, at `bfd_close'.  */
     166       bfd_boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
     167   The general target vector.  These vectors are initialized using the
     168BFD_JUMP_TABLE macros.
     169
     170       /* Generic entry points.  */
     171   Do not "beautify" the CONCAT* macro args.  Traditional C will not
     172remove whitespace added here, and thus will fail to concatenate the
     173tokens.
     174     #define BFD_JUMP_TABLE_GENERIC(NAME) \
     175     CONCAT2 (NAME,_close_and_cleanup), \
     176     CONCAT2 (NAME,_bfd_free_cached_info), \
     177     CONCAT2 (NAME,_new_section_hook), \
     178     CONCAT2 (NAME,_get_section_contents), \
     179     CONCAT2 (NAME,_get_section_contents_in_window)
     180     
     181       /* Called when the BFD is being closed to do any necessary cleanup.  */
     182       bfd_boolean (*_close_and_cleanup) PARAMS ((bfd *));
     183       /* Ask the BFD to free all cached information.  */
     184       bfd_boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
     185       /* Called when a new section is created.  */
     186       bfd_boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
     187       /* Read the contents of a section.  */
     188       bfd_boolean (*_bfd_get_section_contents)
     189         PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
     190       bfd_boolean (*_bfd_get_section_contents_in_window)
     191         PARAMS ((bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type));
     192     
     193       /* Entry points to copy private data.  */
     194     #define BFD_JUMP_TABLE_COPY(NAME) \
     195     CONCAT2 (NAME,_bfd_copy_private_bfd_data), \
     196     CONCAT2 (NAME,_bfd_merge_private_bfd_data), \
     197     CONCAT2 (NAME,_bfd_copy_private_section_data), \
     198     CONCAT2 (NAME,_bfd_copy_private_symbol_data), \
     199     CONCAT2 (NAME,_bfd_set_private_flags), \
     200     CONCAT2 (NAME,_bfd_print_private_bfd_data) \
     201       /* Called to copy BFD general private data from one object file
     202          to another.  */
     203       bfd_boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
     204       /* Called to merge BFD general private data from one object file
     205          to a common output file when linking.  */
     206       bfd_boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
     207       /* Called to copy BFD private section data from one object file
     208          to another.  */
     209       bfd_boolean (*_bfd_copy_private_section_data)
     210         PARAMS ((bfd *, sec_ptr, bfd *, sec_ptr));
     211       /* Called to copy BFD private symbol data from one symbol
     212          to another.  */
     213       bfd_boolean (*_bfd_copy_private_symbol_data)
     214         PARAMS ((bfd *, asymbol *, bfd *, asymbol *));
     215       /* Called to set private backend flags.  */
     216       bfd_boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
     217     
     218       /* Called to print private BFD data.  */
     219       bfd_boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
     220     
     221       /* Core file entry points.  */
     222     #define BFD_JUMP_TABLE_CORE(NAME) \
     223     CONCAT2 (NAME,_core_file_failing_command), \
     224     CONCAT2 (NAME,_core_file_failing_signal), \
     225     CONCAT2 (NAME,_core_file_matches_executable_p)
     226       char *      (*_core_file_failing_command) PARAMS ((bfd *));
     227       int         (*_core_file_failing_signal) PARAMS ((bfd *));
     228       bfd_boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *));
     229     
     230       /* Archive entry points.  */
     231     #define BFD_JUMP_TABLE_ARCHIVE(NAME) \
     232     CONCAT2 (NAME,_slurp_armap), \
     233     CONCAT2 (NAME,_slurp_extended_name_table), \
     234     CONCAT2 (NAME,_construct_extended_name_table), \
     235     CONCAT2 (NAME,_truncate_arname), \
     236     CONCAT2 (NAME,_write_armap), \
     237     CONCAT2 (NAME,_read_ar_hdr), \
     238     CONCAT2 (NAME,_openr_next_archived_file), \
     239     CONCAT2 (NAME,_get_elt_at_index), \
     240     CONCAT2 (NAME,_generic_stat_arch_elt), \
     241     CONCAT2 (NAME,_update_armap_timestamp)
     242       bfd_boolean (*_bfd_slurp_armap) PARAMS ((bfd *));
     243       bfd_boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
     244       bfd_boolean (*_bfd_construct_extended_name_table)
     245         PARAMS ((bfd *, char **, bfd_size_type *, const char **));
     246       void        (*_bfd_truncate_arname) PARAMS ((bfd *, const char *, char *));
     247       bfd_boolean (*write_armap)
     248         PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
     249       PTR         (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
     250       bfd *       (*openr_next_archived_file) PARAMS ((bfd *, bfd *));
     251     #define bfd_get_elt_at_index(b,i) BFD_SEND(b, _bfd_get_elt_at_index, (b,i))
     252       bfd *       (*_bfd_get_elt_at_index) PARAMS ((bfd *, symindex));
     253       int         (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
     254       bfd_boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
     255     
     256       /* Entry points used for symbols.  */
     257     #define BFD_JUMP_TABLE_SYMBOLS(NAME) \
     258     CONCAT2 (NAME,_get_symtab_upper_bound), \
     259     CONCAT2 (NAME,_get_symtab), \
     260     CONCAT2 (NAME,_make_empty_symbol), \
     261     CONCAT2 (NAME,_print_symbol), \
     262     CONCAT2 (NAME,_get_symbol_info), \
     263     CONCAT2 (NAME,_bfd_is_local_label_name), \
     264     CONCAT2 (NAME,_get_lineno), \
     265     CONCAT2 (NAME,_find_nearest_line), \
     266     CONCAT2 (NAME,_bfd_make_debug_symbol), \
     267     CONCAT2 (NAME,_read_minisymbols), \
     268     CONCAT2 (NAME,_minisymbol_to_symbol)
     269       long        (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
     270       long        (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
     271                                                     struct symbol_cache_entry **));
     272       struct symbol_cache_entry *
     273                   (*_bfd_make_empty_symbol) PARAMS ((bfd *));
     274       void        (*_bfd_print_symbol)
     275         PARAMS ((bfd *, PTR, struct symbol_cache_entry *, bfd_print_symbol_type));
     276     #define bfd_print_symbol(b,p,s,e) BFD_SEND(b, _bfd_print_symbol, (b,p,s,e))
     277       void        (*_bfd_get_symbol_info)
     278         PARAMS ((bfd *, struct symbol_cache_entry *, symbol_info *));
     279     #define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e))
     280       bfd_boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
     281     
     282       alent *     (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
     283       bfd_boolean (*_bfd_find_nearest_line)
     284         PARAMS ((bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma,
     285                  const char **, const char **, unsigned int *));
     286      /* Back-door to allow format-aware applications to create debug symbols
     287         while using BFD for everything else.  Currently used by the assembler
     288         when creating COFF files.  */
     289       asymbol *   (*_bfd_make_debug_symbol)
     290         PARAMS ((bfd *, void *, unsigned long size));
     291     #define bfd_read_minisymbols(b, d, m, s) \
     292       BFD_SEND (b, _read_minisymbols, (b, d, m, s))
     293       long        (*_read_minisymbols)
     294         PARAMS ((bfd *, bfd_boolean, PTR *, unsigned int *));
     295     #define bfd_minisymbol_to_symbol(b, d, m, f) \
     296       BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
     297       asymbol *   (*_minisymbol_to_symbol)
     298         PARAMS ((bfd *, bfd_boolean, const PTR, asymbol *));
     299     
     300       /* Routines for relocs.  */
     301     #define BFD_JUMP_TABLE_RELOCS(NAME) \
     302     CONCAT2 (NAME,_get_reloc_upper_bound), \
     303     CONCAT2 (NAME,_canonicalize_reloc), \
     304     CONCAT2 (NAME,_bfd_reloc_type_lookup)
     305       long        (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
     306       long        (*_bfd_canonicalize_reloc)
     307         PARAMS ((bfd *, sec_ptr, arelent **, struct symbol_cache_entry **));
     308       /* See documentation on reloc types.  */
     309       reloc_howto_type *
     310                   (*reloc_type_lookup) PARAMS ((bfd *, bfd_reloc_code_real_type));
     311     
     312       /* Routines used when writing an object file.  */
     313     #define BFD_JUMP_TABLE_WRITE(NAME) \
     314     CONCAT2 (NAME,_set_arch_mach), \
     315     CONCAT2 (NAME,_set_section_contents)
     316       bfd_boolean (*_bfd_set_arch_mach)
     317         PARAMS ((bfd *, enum bfd_architecture, unsigned long));
     318       bfd_boolean (*_bfd_set_section_contents)
     319         PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
     320     
     321       /* Routines used by the linker.  */
     322     #define BFD_JUMP_TABLE_LINK(NAME) \
     323     CONCAT2 (NAME,_sizeof_headers), \
     324     CONCAT2 (NAME,_bfd_get_relocated_section_contents), \
     325     CONCAT2 (NAME,_bfd_relax_section), \
     326     CONCAT2 (NAME,_bfd_link_hash_table_create), \
     327     CONCAT2 (NAME,_bfd_link_hash_table_free), \
     328     CONCAT2 (NAME,_bfd_link_add_symbols), \
     329     CONCAT2 (NAME,_bfd_link_just_syms), \
     330     CONCAT2 (NAME,_bfd_final_link), \
     331     CONCAT2 (NAME,_bfd_link_split_section), \
     332     CONCAT2 (NAME,_bfd_gc_sections), \
     333     CONCAT2 (NAME,_bfd_merge_sections), \
     334     CONCAT2 (NAME,_bfd_discard_group)
     335       int         (*_bfd_sizeof_headers) PARAMS ((bfd *, bfd_boolean));
     336       bfd_byte *  (*_bfd_get_relocated_section_contents)
     337         PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
     338                  bfd_byte *, bfd_boolean, struct symbol_cache_entry **));
     339     
     340       bfd_boolean (*_bfd_relax_section)
     341         PARAMS ((bfd *, struct sec *, struct bfd_link_info *, bfd_boolean *));
     342     
     343       /* Create a hash table for the linker.  Different backends store
     344          different information in this table.  */
     345       struct bfd_link_hash_table *
     346                   (*_bfd_link_hash_table_create) PARAMS ((bfd *));
     347     
     348       /* Release the memory associated with the linker hash table.  */
     349       void        (*_bfd_link_hash_table_free)
     350         PARAMS ((struct bfd_link_hash_table *));
     351     
     352       /* Add symbols from this object file into the hash table.  */
     353       bfd_boolean (*_bfd_link_add_symbols)
     354         PARAMS ((bfd *, struct bfd_link_info *));
     355     
     356       /* Indicate that we are only retrieving symbol values from this section.  */
     357       void        (*_bfd_link_just_syms)
     358         PARAMS ((asection *, struct bfd_link_info *));
     359     
     360       /* Do a link based on the link_order structures attached to each
     361          section of the BFD.  */
     362       bfd_boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
     363     
     364       /* Should this section be split up into smaller pieces during linking.  */
     365       bfd_boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
     366     
     367       /* Remove sections that are not referenced from the output.  */
     368       bfd_boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
     369     
     370       /* Attempt to merge SEC_MERGE sections.  */
     371       bfd_boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
     372     
     373       /* Discard members of a group.  */
     374       bfd_boolean (*_bfd_discard_group) PARAMS ((bfd *, struct sec *));
     375     
     376       /* Routines to handle dynamic symbols and relocs.  */
     377     #define BFD_JUMP_TABLE_DYNAMIC(NAME) \
     378     CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
     379     CONCAT2 (NAME,_canonicalize_dynamic_symtab), \
     380     CONCAT2 (NAME,_get_dynamic_reloc_upper_bound), \
     381     CONCAT2 (NAME,_canonicalize_dynamic_reloc)
     382       /* Get the amount of memory required to hold the dynamic symbols.  */
     383       long        (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
     384       /* Read in the dynamic symbols.  */
     385       long        (*_bfd_canonicalize_dynamic_symtab)
     386         PARAMS ((bfd *, struct symbol_cache_entry **));
     387       /* Get the amount of memory required to hold the dynamic relocs.  */
     388       long        (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
     389       /* Read in the dynamic relocs.  */
     390       long        (*_bfd_canonicalize_dynamic_reloc)
     391         PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
     392   A pointer to an alternative bfd_target in case the current one is not
     393satisfactory.  This can happen when the target cpu supports both big
     394and little endian code, and target chosen by the linker has the wrong
     395endianness.  The function open_output() in ld/ldlang.c uses this field
     396to find an alternative output format that is suitable.
     397       /* Opposite endian version of this target.  */
     398       const struct bfd_target * alternative_target;
     399     
     400       /* Data for use by back-end routines, which isn't
     401          generic enough to belong in this structure.  */
     402       PTR backend_data;
     403     
     404     } bfd_target;
     405
     406`bfd_set_default_target'
     407........................
     408
     409   *Synopsis*
     410     bfd_boolean bfd_set_default_target (const char *name);
     411   *Description*
     412Set the default target vector to use when recognizing a BFD.  This
     413takes the name of the target, which may be a BFD target name or a
     414configuration triplet.
     415
     416`bfd_find_target'
     417.................
     418
     419   *Synopsis*
     420     const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
     421   *Description*
     422Return a pointer to the transfer vector for the object target named
     423TARGET_NAME.  If TARGET_NAME is `NULL', choose the one in the
     424environment variable `GNUTARGET'; if that is null or not defined, then
     425choose the first entry in the target list.  Passing in the string
     426"default" or setting the environment variable to "default" will cause
     427the first entry in the target list to be returned, and
     428"target_defaulted" will be set in the BFD.  This causes
     429`bfd_check_format' to loop over all the targets to find the one that
     430matches the file being read.
     431
     432`bfd_target_list'
     433.................
     434
     435   *Synopsis*
     436     const char ** bfd_target_list (void);
     437   *Description*
     438Return a freshly malloced NULL-terminated vector of the names of all
     439the valid BFD targets. Do not modify the names.
     440
     441`bfd_seach_for_target'
     442......................
     443
     444   *Synopsis*
     445     const bfd_target * bfd_search_for_target (int (* search_func)
     446            (const bfd_target *, void *),
     447         void *);
     448   *Description*
     449Return a pointer to the first transfer vector in the list of transfer
     450vectors maintained by BFD that produces a non-zero result when passed
     451to the function SEARCH_FUNC.  The parameter DATA is passed, unexamined,
     452to the search function.
    56453
    57454
    58 File: bfd.info,  Node: Creating a Linker Hash Table,  Next: Adding Symbols to the Hash Table,  Prev: Linker Functions,  Up: Linker Functions
    59 
    60 Creating a linker hash table
    61 ----------------------------
    62 
    63    The linker routines must create a hash table, which must be derived
    64 from `struct bfd_link_hash_table' described in `bfdlink.c'.  *Note Hash
    65 Tables::, for information on how to create a derived hash table.  This
    66 entry point is called using the target vector of the linker output file.
    67 
    68    The `_bfd_link_hash_table_create' entry point must allocate and
    69 initialize an instance of the desired hash table.  If the back end does
    70 not require any additional information to be stored with the entries in
    71 the hash table, the entry point may simply create a `struct
    72 bfd_link_hash_table'.  Most likely, however, some additional
    73 information will be needed.
    74 
    75    For example, with each entry in the hash table the a.out linker
    76 keeps the index the symbol has in the final output file (this index
    77 number is used so that when doing a relocateable link the symbol index
    78 used in the output file can be quickly filled in when copying over a
    79 reloc).  The a.out linker code defines the required structures and
    80 functions for a hash table derived from `struct bfd_link_hash_table'.
    81 The a.out linker hash table is created by the function
    82 `NAME(aout,link_hash_table_create)'; it simply allocates space for the
    83 hash table, initializes it, and returns a pointer to it.
    84 
    85    When writing the linker routines for a new back end, you will
    86 generally not know exactly which fields will be required until you have
    87 finished.  You should simply create a new hash table which defines no
    88 additional fields, and then simply add fields as they become necessary.
     455File: bfd.info,  Node: Architectures,  Next: Opening and Closing,  Prev: Targets,  Up: BFD front end
     456
     457Architectures
     458=============
     459
     460   BFD keeps one atom in a BFD describing the architecture of the data
     461attached to the BFD: a pointer to a `bfd_arch_info_type'.
     462
     463   Pointers to structures can be requested independently of a BFD so
     464that an architecture's information can be interrogated without access
     465to an open BFD.
     466
     467   The architecture information is provided by each architecture
     468package.  The set of default architectures is selected by the macro
     469`SELECT_ARCHITECTURES'.  This is normally set up in the
     470`config/TARGET.mt' file of your choice.  If the name is not defined,
     471then all the architectures supported are included.
     472
     473   When BFD starts up, all the architectures are called with an
     474initialize method.  It is up to the architecture back end to insert as
     475many items into the list of architectures as it wants to; generally
     476this would be one for each machine and one for the default case (an
     477item with a machine field of 0).
     478
     479   BFD's idea of an architecture is implemented in `archures.c'.
     480
     481bfd_architecture
     482----------------
     483
     484   *Description*
     485This enum gives the object file's CPU architecture, in a global
     486sense--i.e., what processor family does it belong to?  Another field
     487indicates which processor within the family is in use.  The machine
     488gives a number which distinguishes different versions of the
     489architecture, containing, for example, 2 and 3 for Intel i960 KA and
     490i960 KB, and 68020 and 68030 for Motorola 68020 and 68030.
     491     enum bfd_architecture
     492     {
     493       bfd_arch_unknown,   /* File arch not known.  */
     494       bfd_arch_obscure,   /* Arch known, not one of these.  */
     495       bfd_arch_m68k,      /* Motorola 68xxx */
     496     #define bfd_mach_m68000 1
     497     #define bfd_mach_m68008 2
     498     #define bfd_mach_m68010 3
     499     #define bfd_mach_m68020 4
     500     #define bfd_mach_m68030 5
     501     #define bfd_mach_m68040 6
     502     #define bfd_mach_m68060 7
     503     #define bfd_mach_cpu32  8
     504     #define bfd_mach_mcf5200  9
     505     #define bfd_mach_mcf5206e 10
     506     #define bfd_mach_mcf5307  11
     507     #define bfd_mach_mcf5407  12
     508       bfd_arch_vax,       /* DEC Vax */
     509       bfd_arch_i960,      /* Intel 960 */
     510         /* The order of the following is important.
     511            lower number indicates a machine type that
     512            only accepts a subset of the instructions
     513            available to machines with higher numbers.
     514            The exception is the "ca", which is
     515            incompatible with all other machines except
     516            "core".  */
     517     
     518     #define bfd_mach_i960_core      1
     519     #define bfd_mach_i960_ka_sa     2
     520     #define bfd_mach_i960_kb_sb     3
     521     #define bfd_mach_i960_mc        4
     522     #define bfd_mach_i960_xa        5
     523     #define bfd_mach_i960_ca        6
     524     #define bfd_mach_i960_jx        7
     525     #define bfd_mach_i960_hx        8
     526     
     527       bfd_arch_or32,      /* OpenRISC 32 */
     528     
     529       bfd_arch_a29k,      /* AMD 29000 */
     530       bfd_arch_sparc,     /* SPARC */
     531     #define bfd_mach_sparc                 1
     532     /* The difference between v8plus and v9 is that v9 is a true 64 bit env.  */
     533     #define bfd_mach_sparc_sparclet        2
     534     #define bfd_mach_sparc_sparclite       3
     535     #define bfd_mach_sparc_v8plus          4
     536     #define bfd_mach_sparc_v8plusa         5 /* with ultrasparc add'ns.  */
     537     #define bfd_mach_sparc_sparclite_le    6
     538     #define bfd_mach_sparc_v9              7
     539     #define bfd_mach_sparc_v9a             8 /* with ultrasparc add'ns.  */
     540     #define bfd_mach_sparc_v8plusb         9 /* with cheetah add'ns.  */
     541     #define bfd_mach_sparc_v9b             10 /* with cheetah add'ns.  */
     542     /* Nonzero if MACH has the v9 instruction set.  */
     543     #define bfd_mach_sparc_v9_p(mach) \
     544       ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
     545        && (mach) != bfd_mach_sparc_sparclite_le)
     546       bfd_arch_mips,      /* MIPS Rxxxx */
     547     #define bfd_mach_mips3000              3000
     548     #define bfd_mach_mips3900              3900
     549     #define bfd_mach_mips4000              4000
     550     #define bfd_mach_mips4010              4010
     551     #define bfd_mach_mips4100              4100
     552     #define bfd_mach_mips4111              4111
     553     #define bfd_mach_mips4120              4120
     554     #define bfd_mach_mips4300              4300
     555     #define bfd_mach_mips4400              4400
     556     #define bfd_mach_mips4600              4600
     557     #define bfd_mach_mips4650              4650
     558     #define bfd_mach_mips5000              5000
     559     #define bfd_mach_mips5400              5400
     560     #define bfd_mach_mips5500              5500
     561     #define bfd_mach_mips6000              6000
     562     #define bfd_mach_mips8000              8000
     563     #define bfd_mach_mips10000             10000
     564     #define bfd_mach_mips12000             12000
     565     #define bfd_mach_mips16                16
     566     #define bfd_mach_mips5                 5
     567     #define bfd_mach_mips_sb1              12310201 /* octal 'SB', 01 */
     568     #define bfd_mach_mipsisa32             32
     569     #define bfd_mach_mipsisa32r2           33
     570     #define bfd_mach_mipsisa64             64
     571       bfd_arch_i386,      /* Intel 386 */
     572     #define bfd_mach_i386_i386 1
     573     #define bfd_mach_i386_i8086 2
     574     #define bfd_mach_i386_i386_intel_syntax 3
     575     #define bfd_mach_x86_64 64
     576     #define bfd_mach_x86_64_intel_syntax 65
     577       bfd_arch_we32k,     /* AT&T WE32xxx */
     578       bfd_arch_tahoe,     /* CCI/Harris Tahoe */
     579       bfd_arch_i860,      /* Intel 860 */
     580       bfd_arch_i370,      /* IBM 360/370 Mainframes */
     581       bfd_arch_romp,      /* IBM ROMP PC/RT */
     582       bfd_arch_alliant,   /* Alliant */
     583       bfd_arch_convex,    /* Convex */
     584       bfd_arch_m88k,      /* Motorola 88xxx */
     585       bfd_arch_m98k,      /* Motorola 98xxx */
     586       bfd_arch_pyramid,   /* Pyramid Technology */
     587       bfd_arch_h8300,     /* Renesas H8/300 (formerly Hitachi H8/300) */
     588     #define bfd_mach_h8300    1
     589     #define bfd_mach_h8300h   2
     590     #define bfd_mach_h8300s   3
     591     #define bfd_mach_h8300hn  4
     592     #define bfd_mach_h8300sn  5
     593       bfd_arch_pdp11,     /* DEC PDP-11 */
     594       bfd_arch_powerpc,   /* PowerPC */
     595     #define bfd_mach_ppc           32
     596     #define bfd_mach_ppc64         64
     597     #define bfd_mach_ppc_403       403
     598     #define bfd_mach_ppc_403gc     4030
     599     #define bfd_mach_ppc_505       505
     600     #define bfd_mach_ppc_601       601
     601     #define bfd_mach_ppc_602       602
     602     #define bfd_mach_ppc_603       603
     603     #define bfd_mach_ppc_ec603e    6031
     604     #define bfd_mach_ppc_604       604
     605     #define bfd_mach_ppc_620       620
     606     #define bfd_mach_ppc_630       630
     607     #define bfd_mach_ppc_750       750
     608     #define bfd_mach_ppc_860       860
     609     #define bfd_mach_ppc_a35       35
     610     #define bfd_mach_ppc_rs64ii    642
     611     #define bfd_mach_ppc_rs64iii   643
     612     #define bfd_mach_ppc_7400      7400
     613     #define bfd_mach_ppc_e500      500
     614       bfd_arch_rs6000,    /* IBM RS/6000 */
     615     #define bfd_mach_rs6k          6000
     616     #define bfd_mach_rs6k_rs1      6001
     617     #define bfd_mach_rs6k_rsc      6003
     618     #define bfd_mach_rs6k_rs2      6002
     619       bfd_arch_hppa,      /* HP PA RISC */
     620       bfd_arch_d10v,      /* Mitsubishi D10V */
     621     #define bfd_mach_d10v          1
     622     #define bfd_mach_d10v_ts2      2
     623     #define bfd_mach_d10v_ts3      3
     624       bfd_arch_d30v,      /* Mitsubishi D30V */
     625       bfd_arch_dlx,       /* DLX */
     626       bfd_arch_m68hc11,   /* Motorola 68HC11 */
     627       bfd_arch_m68hc12,   /* Motorola 68HC12 */
     628     #define bfd_mach_m6812_default 0
     629     #define bfd_mach_m6812         1
     630     #define bfd_mach_m6812s        2
     631       bfd_arch_z8k,       /* Zilog Z8000 */
     632     #define bfd_mach_z8001         1
     633     #define bfd_mach_z8002         2
     634       bfd_arch_h8500,     /* Renesas H8/500 (formerly Hitachi H8/500) */
     635       bfd_arch_sh,        /* Renesas / SuperH SH (formerly Hitachi SH) */
     636     #define bfd_mach_sh            1
     637     #define bfd_mach_sh2        0x20
     638     #define bfd_mach_sh_dsp     0x2d
     639     #define bfd_mach_sh2e       0x2e
     640     #define bfd_mach_sh3        0x30
     641     #define bfd_mach_sh3_dsp    0x3d
     642     #define bfd_mach_sh3e       0x3e
     643     #define bfd_mach_sh4        0x40
     644     #define bfd_mach_sh5        0x50
     645       bfd_arch_alpha,     /* Dec Alpha */
     646     #define bfd_mach_alpha_ev4  0x10
     647     #define bfd_mach_alpha_ev5  0x20
     648     #define bfd_mach_alpha_ev6  0x30
     649       bfd_arch_arm,       /* Advanced Risc Machines ARM.  */
     650     #define bfd_mach_arm_unknown   0
     651     #define bfd_mach_arm_2         1
     652     #define bfd_mach_arm_2a        2
     653     #define bfd_mach_arm_3         3
     654     #define bfd_mach_arm_3M        4
     655     #define bfd_mach_arm_4         5
     656     #define bfd_mach_arm_4T        6
     657     #define bfd_mach_arm_5         7
     658     #define bfd_mach_arm_5T        8
     659     #define bfd_mach_arm_5TE       9
     660     #define bfd_mach_arm_XScale    10
     661     #define bfd_mach_arm_ep9312    11
     662     #define bfd_mach_arm_iWMMXt    12
     663       bfd_arch_ns32k,     /* National Semiconductors ns32000 */
     664       bfd_arch_w65,       /* WDC 65816 */
     665       bfd_arch_tic30,     /* Texas Instruments TMS320C30 */
     666       bfd_arch_tic4x,     /* Texas Instruments TMS320C3X/4X */
     667     #define bfd_mach_tic3x         30
     668     #define bfd_mach_tic4x         40
     669       bfd_arch_tic54x,    /* Texas Instruments TMS320C54X */
     670       bfd_arch_tic80,     /* TI TMS320c80 (MVP) */
     671       bfd_arch_v850,      /* NEC V850 */
     672     #define bfd_mach_v850          1
     673     #define bfd_mach_v850e         'E'
     674       bfd_arch_arc,       /* ARC Cores */
     675     #define bfd_mach_arc_5         5
     676     #define bfd_mach_arc_6         6
     677     #define bfd_mach_arc_7         7
     678     #define bfd_mach_arc_8         8
     679       bfd_arch_m32r,      /* Renesas M32R (formerly Mitsubishi M32R/D) */
     680     #define bfd_mach_m32r          1 /* For backwards compatibility.  */
     681     #define bfd_mach_m32rx         'x'
     682       bfd_arch_mn10200,   /* Matsushita MN10200 */
     683       bfd_arch_mn10300,   /* Matsushita MN10300 */
     684     #define bfd_mach_mn10300               300
     685     #define bfd_mach_am33          330
     686       bfd_arch_fr30,
     687     #define bfd_mach_fr30          0x46523330
     688       bfd_arch_frv,
     689     #define bfd_mach_frv           1
     690     #define bfd_mach_frvsimple     2
     691     #define bfd_mach_fr300         300
     692     #define bfd_mach_fr400         400
     693     #define bfd_mach_frvtomcat     499     /* fr500 prototype */
     694     #define bfd_mach_fr500         500
     695       bfd_arch_mcore,
     696       bfd_arch_ia64,      /* HP/Intel ia64 */
     697     #define bfd_mach_ia64_elf64    64
     698     #define bfd_mach_ia64_elf32    32
     699       bfd_arch_ip2k,      /* Ubicom IP2K microcontrollers. */
     700     #define bfd_mach_ip2022        1
     701     #define bfd_mach_ip2022ext     2
     702      bfd_arch_iq2000,     /* Vitesse IQ2000.  */
     703     #define bfd_mach_iq2000        1
     704     #define bfd_mach_iq10          2
     705       bfd_arch_pj,
     706       bfd_arch_avr,       /* Atmel AVR microcontrollers.  */
     707     #define bfd_mach_avr1          1
     708     #define bfd_mach_avr2          2
     709     #define bfd_mach_avr3          3
     710     #define bfd_mach_avr4          4
     711     #define bfd_mach_avr5          5
     712       bfd_arch_cris,      /* Axis CRIS */
     713       bfd_arch_s390,      /* IBM s390 */
     714     #define bfd_mach_s390_31       31
     715     #define bfd_mach_s390_64       64
     716       bfd_arch_openrisc,  /* OpenRISC */
     717       bfd_arch_mmix,      /* Donald Knuth's educational processor.  */
     718       bfd_arch_xstormy16,
     719     #define bfd_mach_xstormy16     1
     720       bfd_arch_msp430,    /* Texas Instruments MSP430 architecture.  */
     721     #define bfd_mach_msp110         110
     722     #define bfd_mach_msp11          11
     723     #define bfd_mach_msp12          12
     724     #define bfd_mach_msp13          13
     725     #define bfd_mach_msp14          14
     726     #define bfd_mach_msp41          41
     727     #define bfd_mach_msp31          31
     728     #define bfd_mach_msp32          32
     729     #define bfd_mach_msp33          33
     730     #define bfd_mach_msp43          43
     731     #define bfd_mach_msp44          44
     732     #define bfd_mach_msp15          15
     733     #define bfd_mach_msp16          16
     734       bfd_arch_xtensa,    /* Tensilica's Xtensa cores.  */
     735     #define bfd_mach_xtensa        1
     736       bfd_arch_last
     737       };
     738
     739bfd_arch_info
     740-------------
     741
     742   *Description*
     743This structure contains information on architectures for use within BFD.
     744
     745     typedef struct bfd_arch_info
     746     {
     747       int bits_per_word;
     748       int bits_per_address;
     749       int bits_per_byte;
     750       enum bfd_architecture arch;
     751       unsigned long mach;
     752       const char *arch_name;
     753       const char *printable_name;
     754       unsigned int section_align_power;
     755       /* TRUE if this is the default machine for the architecture.
     756          The default arch should be the first entry for an arch so that
     757          all the entries for that arch can be accessed via `next'.  */
     758       bfd_boolean the_default;
     759       const struct bfd_arch_info * (*compatible)
     760            PARAMS ((const struct bfd_arch_info *a,
     761                     const struct bfd_arch_info *b));
     762     
     763       bfd_boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
     764     
     765       const struct bfd_arch_info *next;
     766     }
     767     bfd_arch_info_type;
     768
     769`bfd_printable_name'
     770....................
     771
     772   *Synopsis*
     773     const char *bfd_printable_name(bfd *abfd);
     774   *Description*
     775Return a printable string representing the architecture and machine
     776from the pointer to the architecture info structure.
     777
     778`bfd_scan_arch'
     779...............
     780
     781   *Synopsis*
     782     const bfd_arch_info_type *bfd_scan_arch(const char *string);
     783   *Description*
     784Figure out if BFD supports any cpu which could be described with the
     785name STRING.  Return a pointer to an `arch_info' structure if a machine
     786is found, otherwise NULL.
     787
     788`bfd_arch_list'
     789...............
     790
     791   *Synopsis*
     792     const char **bfd_arch_list(void);
     793   *Description*
     794Return a freshly malloced NULL-terminated vector of the names of all
     795the valid BFD architectures.  Do not modify the names.
     796
     797`bfd_arch_get_compatible'
     798.........................
     799
     800   *Synopsis*
     801     const bfd_arch_info_type *bfd_arch_get_compatible(
     802         const bfd *abfd,
     803         const bfd *bbfd,
     804         bfd_boolean accept_unknowns);
     805   *Description*
     806Determine whether two BFDs' architectures and machine types are
     807compatible.  Calculates the lowest common denominator between the two
     808architectures and machine types implied by the BFDs and returns a
     809pointer to an `arch_info' structure describing the compatible machine.
     810
     811`bfd_default_arch_struct'
     812.........................
     813
     814   *Description*
     815The `bfd_default_arch_struct' is an item of `bfd_arch_info_type' which
     816has been initialized to a fairly generic state.  A BFD starts life by
     817pointing to this structure, until the correct back end has determined
     818the real architecture of the file.
     819     extern const bfd_arch_info_type bfd_default_arch_struct;
     820
     821`bfd_set_arch_info'
     822...................
     823
     824   *Synopsis*
     825     void bfd_set_arch_info(bfd *abfd, const bfd_arch_info_type *arg);
     826   *Description*
     827Set the architecture info of ABFD to ARG.
     828
     829`bfd_default_set_arch_mach'
     830...........................
     831
     832   *Synopsis*
     833     bfd_boolean bfd_default_set_arch_mach(bfd *abfd,
     834         enum bfd_architecture arch,
     835         unsigned long mach);
     836   *Description*
     837Set the architecture and machine type in BFD ABFD to ARCH and MACH.
     838Find the correct pointer to a structure and insert it into the
     839`arch_info' pointer.
     840
     841`bfd_get_arch'
     842..............
     843
     844   *Synopsis*
     845     enum bfd_architecture bfd_get_arch(bfd *abfd);
     846   *Description*
     847Return the enumerated type which describes the BFD ABFD's architecture.
     848
     849`bfd_get_mach'
     850..............
     851
     852   *Synopsis*
     853     unsigned long bfd_get_mach(bfd *abfd);
     854   *Description*
     855Return the long type which describes the BFD ABFD's machine.
     856
     857`bfd_arch_bits_per_byte'
     858........................
     859
     860   *Synopsis*
     861     unsigned int bfd_arch_bits_per_byte(bfd *abfd);
     862   *Description*
     863Return the number of bits in one of the BFD ABFD's architecture's bytes.
     864
     865`bfd_arch_bits_per_address'
     866...........................
     867
     868   *Synopsis*
     869     unsigned int bfd_arch_bits_per_address(bfd *abfd);
     870   *Description*
     871Return the number of bits in one of the BFD ABFD's architecture's
     872addresses.
     873
     874`bfd_default_compatible'
     875........................
     876
     877   *Synopsis*
     878     const bfd_arch_info_type *bfd_default_compatible
     879        (const bfd_arch_info_type *a,
     880         const bfd_arch_info_type *b);
     881   *Description*
     882The default function for testing for compatibility.
     883
     884`bfd_default_scan'
     885..................
     886
     887   *Synopsis*
     888     bfd_boolean bfd_default_scan(const struct bfd_arch_info *info, const char *string);
     889   *Description*
     890The default function for working out whether this is an architecture
     891hit and a machine hit.
     892
     893`bfd_get_arch_info'
     894...................
     895
     896   *Synopsis*
     897     const bfd_arch_info_type * bfd_get_arch_info(bfd *abfd);
     898   *Description*
     899Return the architecture info struct in ABFD.
     900
     901`bfd_lookup_arch'
     902.................
     903
     904   *Synopsis*
     905     const bfd_arch_info_type *bfd_lookup_arch
     906        (enum bfd_architecture
     907         arch,
     908         unsigned long machine);
     909   *Description*
     910Look for the architecure info structure which matches the arguments
     911ARCH and MACHINE. A machine of 0 matches the machine/architecture
     912structure which marks itself as the default.
     913
     914`bfd_printable_arch_mach'
     915.........................
     916
     917   *Synopsis*
     918     const char *bfd_printable_arch_mach
     919        (enum bfd_architecture arch, unsigned long machine);
     920   *Description*
     921Return a printable string representing the architecture and machine
     922type.
     923
     924   This routine is depreciated.
     925
     926`bfd_octets_per_byte'
     927.....................
     928
     929   *Synopsis*
     930     unsigned int bfd_octets_per_byte(bfd *abfd);
     931   *Description*
     932Return the number of octets (8-bit quantities) per target byte (minimum
     933addressable unit).  In most cases, this will be one, but some DSP
     934targets have 16, 32, or even 48 bits per byte.
     935
     936`bfd_arch_mach_octets_per_byte'
     937...............................
     938
     939   *Synopsis*
     940     unsigned int bfd_arch_mach_octets_per_byte(enum bfd_architecture arch,
     941         unsigned long machine);
     942   *Description*
     943See bfd_octets_per_byte.
     944
     945   This routine is provided for those cases where a bfd * is not
     946available
    89947
    90948
    91 File: bfd.info,  Node: Adding Symbols to the Hash Table,  Next: Performing the Final Link,  Prev: Creating a Linker Hash Table,  Up: Linker Functions
    92 
    93 Adding symbols to the hash table
    94 --------------------------------
    95 
    96    The linker proper will call the `_bfd_link_add_symbols' entry point
    97 for each object file or archive which is to be linked (typically these
    98 are the files named on the command line, but some may also come from
    99 the linker script).  The entry point is responsible for examining the
    100 file.  For an object file, BFD must add any relevant symbol information
    101 to the hash table.  For an archive, BFD must determine which elements
    102 of the archive should be used and adding them to the link.
    103 
    104    The a.out version of this entry point is
    105 `NAME(aout,link_add_symbols)'.
    106 
    107 * Menu:
    108 
    109 * Differing file formats::
    110 * Adding symbols from an object file::
    111 * Adding symbols from an archive::
    112 
    113 
    114 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
    115 
    116 Differing file formats
    117 ......................
    118 
    119    Normally all the files involved in a link will be of the same
    120 format, but it is also possible to link together different format
    121 object files, and the back end must support that.  The
    122 `_bfd_link_add_symbols' entry point is called via the target vector of
    123 the file to be added.  This has an important consequence: the function
    124 may not assume that the hash table is the type created by the
    125 corresponding `_bfd_link_hash_table_create' vector.  All the
    126 `_bfd_link_add_symbols' function can assume about the hash table is
    127 that it is derived from `struct bfd_link_hash_table'.
    128 
    129    Sometimes the `_bfd_link_add_symbols' function must store some
    130 information in the hash table entry to be used by the `_bfd_final_link'
    131 function.  In such a case the `creator' field of the hash table must be
    132 checked to make sure that the hash table was created by an object file
    133 of the same format.
    134 
    135    The `_bfd_final_link' routine must be prepared to handle a hash
    136 entry without any extra information added by the
    137 `_bfd_link_add_symbols' function.  A hash entry without extra
    138 information will also occur when the linker script directs the linker
    139 to create a symbol.  Note that, regardless of how a hash table entry is
    140 added, all the fields will be initialized to some sort of null value by
    141 the hash table entry initialization function.
    142 
    143    See `ecoff_link_add_externals' for an example of how to check the
    144 `creator' field before saving information (in this case, the ECOFF
    145 external symbol debugging information) in a hash table entry.
    146 
    147 
    148 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
    149 
    150 Adding symbols from an object file
    151 ..................................
    152 
    153    When the `_bfd_link_add_symbols' routine is passed an object file,
    154 it must add all externally visible symbols in that object file to the
    155 hash table.  The actual work of adding the symbol to the hash table is
    156 normally handled by the function `_bfd_generic_link_add_one_symbol'.
    157 The `_bfd_link_add_symbols' routine is responsible for reading all the
    158 symbols from the object file and passing the correct information to
    159 `_bfd_generic_link_add_one_symbol'.
    160 
    161    The `_bfd_link_add_symbols' routine should not use
    162 `bfd_canonicalize_symtab' to read the symbols.  The point of providing
    163 this routine is to avoid the overhead of converting the symbols into
    164 generic `asymbol' structures.
    165 
    166    `_bfd_generic_link_add_one_symbol' handles the details of combining
    167 common symbols, warning about multiple definitions, and so forth.  It
    168 takes arguments which describe the symbol to add, notably symbol flags,
    169 a section, and an offset.  The symbol flags include such things as
    170 `BSF_WEAK' or `BSF_INDIRECT'.  The section is a section in the object
    171 file, or something like `bfd_und_section_ptr' for an undefined symbol
    172 or `bfd_com_section_ptr' for a common symbol.
    173 
    174    If the `_bfd_final_link' routine is also going to need to read the
    175 symbol information, the `_bfd_link_add_symbols' routine should save it
    176 somewhere attached to the object file BFD.  However, the information
    177 should only be saved if the `keep_memory' field of the `info' argument
    178 is true, so that the `-no-keep-memory' linker switch is effective.
    179 
    180    The a.out function which adds symbols from an object file is
    181 `aout_link_add_object_symbols', and most of the interesting work is in
    182 `aout_link_add_symbols'.  The latter saves pointers to the hash tables
    183 entries created by `_bfd_generic_link_add_one_symbol' indexed by symbol
    184 number, so that the `_bfd_final_link' routine does not have to call the
    185 hash table lookup routine to locate the entry.
    186 
    187 
    188 File: bfd.info,  Node: Adding symbols from an archive,  Prev: Adding symbols from an object file,  Up: Adding Symbols to the Hash Table
    189 
    190 Adding symbols from an archive
    191 ..............................
    192 
    193    When the `_bfd_link_add_symbols' routine is passed an archive, it
    194 must look through the symbols defined by the archive and decide which
    195 elements of the archive should be included in the link.  For each such
    196 element it must call the `add_archive_element' linker callback, and it
    197 must add the symbols from the object file to the linker hash table.
    198 
    199    In most cases the work of looking through the symbols in the archive
    200 should be done by the `_bfd_generic_link_add_archive_symbols' function.
    201 This function builds a hash table from the archive symbol table and
    202 looks through the list of undefined symbols to see which elements
    203 should be included.  `_bfd_generic_link_add_archive_symbols' is passed
    204 a function to call to make the final decision about adding an archive
    205 element to the link and to do the actual work of adding the symbols to
    206 the linker hash table.
    207 
    208    The function passed to `_bfd_generic_link_add_archive_symbols' must
    209 read the symbols of the archive element and decide whether the archive
    210 element should be included in the link.  If the element is to be
    211 included, the `add_archive_element' linker callback routine must be
    212 called with the element as an argument, and the elements symbols must
    213 be added to the linker hash table just as though the element had itself
    214 been passed to the `_bfd_link_add_symbols' function.
    215 
    216    When the a.out `_bfd_link_add_symbols' function receives an archive,
    217 it calls `_bfd_generic_link_add_archive_symbols' passing
    218 `aout_link_check_archive_element' as the function argument.
    219 `aout_link_check_archive_element' calls `aout_link_check_ar_symbols'.
    220 If the latter decides to add the element (an element is only added if
    221 it provides a real, non-common, definition for a previously undefined
    222 or common symbol) it calls the `add_archive_element' callback and then
    223 `aout_link_check_archive_element' calls `aout_link_add_symbols' to
    224 actually add the symbols to the linker hash table.
    225 
    226    The ECOFF back end is unusual in that it does not normally call
    227 `_bfd_generic_link_add_archive_symbols', because ECOFF archives already
    228 contain a hash table of symbols.  The ECOFF back end searches the
    229 archive itself to avoid the overhead of creating a new hash table.
    230 
    231 
    232 File: bfd.info,  Node: Performing the Final Link,  Prev: Adding Symbols to the Hash Table,  Up: Linker Functions
    233 
    234 Performing the final link
    235 -------------------------
    236 
    237    When all the input files have been processed, the linker calls the
    238 `_bfd_final_link' entry point of the output BFD.  This routine is
    239 responsible for producing the final output file, which has several
    240 aspects.  It must relocate the contents of the input sections and copy
    241 the data into the output sections.  It must build an output symbol
    242 table including any local symbols from the input files and the global
    243 symbols from the hash table.  When producing relocateable output, it
    244 must modify the input relocs and write them into the output file.
    245 There may also be object format dependent work to be done.
    246 
    247    The linker will also call the `write_object_contents' entry point
    248 when the BFD is closed.  The two entry points must work together in
    249 order to produce the correct output file.
    250 
    251    The details of how this works are inevitably dependent upon the
    252 specific object file format.  The a.out `_bfd_final_link' routine is
    253 `NAME(aout,final_link)'.
    254 
    255 * Menu:
    256 
    257 * Information provided by the linker::
    258 * Relocating the section contents::
    259 * Writing the symbol table::
    260 
    261 
    262 File: bfd.info,  Node: Information provided by the linker,  Next: Relocating the section contents,  Prev: Performing the Final Link,  Up: Performing the Final Link
    263 
    264 Information provided by the linker
    265 ..................................
    266 
    267    Before the linker calls the `_bfd_final_link' entry point, it sets
    268 up some data structures for the function to use.
    269 
    270    The `input_bfds' field of the `bfd_link_info' structure will point
    271 to a list of all the input files included in the link.  These files are
    272 linked through the `link_next' field of the `bfd' structure.
    273 
    274    Each section in the output file will have a list of `link_order'
    275 structures attached to the `link_order_head' field (the `link_order'
    276 structure is defined in `bfdlink.h').  These structures describe how to
    277 create the contents of the output section in terms of the contents of
    278 various input sections, fill constants, and, eventually, other types of
    279 information.  They also describe relocs that must be created by the BFD
    280 backend, but do not correspond to any input file; this is used to
    281 support -Ur, which builds constructors while generating a relocateable
    282 object file.
    283 
    284 
    285 File: bfd.info,  Node: Relocating the section contents,  Next: Writing the symbol table,  Prev: Information provided by the linker,  Up: Performing the Final Link
    286 
    287 Relocating the section contents
    288 ...............................
    289 
    290    The `_bfd_final_link' function should look through the `link_order'
    291 structures attached to each section of the output file.  Each
    292 `link_order' structure should either be handled specially, or it should
    293 be passed to the function `_bfd_default_link_order' which will do the
    294 right thing (`_bfd_default_link_order' is defined in `linker.c').
    295 
    296    For efficiency, a `link_order' of type `bfd_indirect_link_order'
    297 whose associated section belongs to a BFD of the same format as the
    298 output BFD must be handled specially.  This type of `link_order'
    299 describes part of an output section in terms of a section belonging to
    300 one of the input files.  The `_bfd_final_link' function should read the
    301 contents of the section and any associated relocs, apply the relocs to
    302 the section contents, and write out the modified section contents.  If
    303 performing a relocateable link, the relocs themselves must also be
    304 modified and written out.
    305 
    306    The functions `_bfd_relocate_contents' and
    307 `_bfd_final_link_relocate' provide some general support for performing
    308 the actual relocations, notably overflow checking.  Their arguments
    309 include information about the symbol the relocation is against and a
    310 `reloc_howto_type' argument which describes the relocation to perform.
    311 These functions are defined in `reloc.c'.
    312 
    313    The a.out function which handles reading, relocating, and writing
    314 section contents is `aout_link_input_section'.  The actual relocation
    315 is done in `aout_link_input_section_std' and
    316 `aout_link_input_section_ext'.
    317 
    318 
    319 File: bfd.info,  Node: Writing the symbol table,  Prev: Relocating the section contents,  Up: Performing the Final Link
    320 
    321 Writing the symbol table
    322 ........................
    323 
    324    The `_bfd_final_link' function must gather all the symbols in the
    325 input files and write them out.  It must also write out all the symbols
    326 in the global hash table.  This must be controlled by the `strip' and
    327 `discard' fields of the `bfd_link_info' structure.
    328 
    329    The local symbols of the input files will not have been entered into
    330 the linker hash table.  The `_bfd_final_link' routine must consider
    331 each input file and include the symbols in the output file.  It may be
    332 convenient to do this when looking through the `link_order' structures,
    333 or it may be done by stepping through the `input_bfds' list.
    334 
    335    The `_bfd_final_link' routine must also traverse the global hash
    336 table to gather all the externally visible symbols.  It is possible
    337 that most of the externally visible symbols may be written out when
    338 considering the symbols of each input file, but it is still necessary
    339 to traverse the hash table since the linker script may have defined
    340 some symbols that are not in any of the input files.
    341 
    342    The `strip' field of the `bfd_link_info' structure controls which
    343 symbols are written out.  The possible values are listed in
    344 `bfdlink.h'.  If the value is `strip_some', then the `keep_hash' field
    345 of the `bfd_link_info' structure is a hash table of symbols to keep;
    346 each symbol should be looked up in this hash table, and only symbols
    347 which are present should be included in the output file.
    348 
    349    If the `strip' field of the `bfd_link_info' structure permits local
    350 symbols to be written out, the `discard' field is used to further
    351 controls which local symbols are included in the output file.  If the
    352 value is `discard_l', then all local symbols which begin with a certain
    353 prefix are discarded; this is controlled by the
    354 `bfd_is_local_label_name' entry point.
    355 
    356    The a.out backend handles symbols by calling
    357 `aout_link_write_symbols' on each input BFD and then traversing the
    358 global hash table with the function `aout_link_write_other_symbol'.  It
    359 builds a string table while writing out the symbols, which is written
    360 to the output file at the end of `NAME(aout,final_link)'.
    361 
    362 `bfd_link_split_section'
    363 ........................
    364 
    365    *Synopsis*
    366      boolean bfd_link_split_section(bfd *abfd, asection *sec);
    367    *Description*
    368 Return nonzero if SEC should be split during a reloceatable or final
    369 link.
    370      #define bfd_link_split_section(abfd, sec) \
    371             BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
    372 
    373 
    374 File: bfd.info,  Node: Hash Tables,  Prev: Linker Functions,  Up: BFD front end
    375 
    376 Hash Tables
    377 ===========
    378 
    379    BFD provides a simple set of hash table functions.  Routines are
    380 provided to initialize a hash table, to free a hash table, to look up a
    381 string in a hash table and optionally create an entry for it, and to
    382 traverse a hash table.  There is currently no routine to delete an
    383 string from a hash table.
    384 
    385    The basic hash table does not permit any data to be stored with a
    386 string.  However, a hash table is designed to present a base class from
    387 which other types of hash tables may be derived.  These derived types
    388 may store additional information with the string.  Hash tables were
    389 implemented in this way, rather than simply providing a data pointer in
    390 a hash table entry, because they were designed for use by the linker
    391 back ends.  The linker may create thousands of hash table entries, and
    392 the overhead of allocating private data and storing and following
    393 pointers becomes noticeable.
    394 
    395    The basic hash table code is in `hash.c'.
    396 
    397 * Menu:
    398 
    399 * Creating and Freeing a Hash Table::
    400 * Looking Up or Entering a String::
    401 * Traversing a Hash Table::
    402 * Deriving a New Hash Table Type::
    403 
    404 
    405 File: bfd.info,  Node: Creating and Freeing a Hash Table,  Next: Looking Up or Entering a String,  Prev: Hash Tables,  Up: Hash Tables
    406 
    407 Creating and freeing a hash table
    408 ---------------------------------
    409 
    410    To create a hash table, create an instance of a `struct
    411 bfd_hash_table' (defined in `bfd.h') and call `bfd_hash_table_init' (if
    412 you know approximately how many entries you will need, the function
    413 `bfd_hash_table_init_n', which takes a SIZE argument, may be used).
    414 `bfd_hash_table_init' returns `false' if some sort of error occurs.
    415 
    416    The function `bfd_hash_table_init' take as an argument a function to
    417 use to create new entries.  For a basic hash table, use the function
    418 `bfd_hash_newfunc'.  *Note Deriving a New Hash Table Type::, for why
    419 you would want to use a different value for this argument.
    420 
    421    `bfd_hash_table_init' will create an objalloc which will be used to
    422 allocate new entries.  You may allocate memory on this objalloc using
    423 `bfd_hash_allocate'.
    424 
    425    Use `bfd_hash_table_free' to free up all the memory that has been
    426 allocated for a hash table.  This will not free up the `struct
    427 bfd_hash_table' itself, which you must provide.
    428 
    429 
    430 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
    431 
    432 Looking up or entering a string
    433 -------------------------------
    434 
    435    The function `bfd_hash_lookup' is used both to look up a string in
    436 the hash table and to create a new entry.
    437 
    438    If the CREATE argument is `false', `bfd_hash_lookup' will look up a
    439 string.  If the string is found, it will returns a pointer to a `struct
    440 bfd_hash_entry'.  If the string is not found in the table
    441 `bfd_hash_lookup' will return `NULL'.  You should not modify any of the
    442 fields in the returns `struct bfd_hash_entry'.
    443 
    444    If the CREATE argument is `true', the string will be entered into
    445 the hash table if it is not already there.  Either way a pointer to a
    446 `struct bfd_hash_entry' will be returned, either to the existing
    447 structure or to a newly created one.  In this case, a `NULL' return
    448 means that an error occurred.
    449 
    450    If the CREATE argument is `true', and a new entry is created, the
    451 COPY argument is used to decide whether to copy the string onto the
    452 hash table objalloc or not.  If COPY is passed as `false', you must be
    453 careful not to deallocate or modify the string as long as the hash table
    454 exists.
    455 
    456 
    457 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
    458 
    459 Traversing a hash table
    460 -----------------------
    461 
    462    The function `bfd_hash_traverse' may be used to traverse a hash
    463 table, calling a function on each element.  The traversal is done in a
    464 random order.
    465 
    466    `bfd_hash_traverse' takes as arguments a function and a generic
    467 `void *' pointer.  The function is called with a hash table entry (a
    468 `struct bfd_hash_entry *') and the generic pointer passed to
    469 `bfd_hash_traverse'.  The function must return a `boolean' value, which
    470 indicates whether to continue traversing the hash table.  If the
    471 function returns `false', `bfd_hash_traverse' will stop the traversal
    472 and return immediately.
    473 
    474 
    475 File: bfd.info,  Node: Deriving a New Hash Table Type,  Prev: Traversing a Hash Table,  Up: Hash Tables
    476 
    477 Deriving a new hash table type
    478 ------------------------------
    479 
    480    Many uses of hash tables want to store additional information which
    481 each entry in the hash table.  Some also find it convenient to store
    482 additional information with the hash table itself.  This may be done
    483 using a derived hash table.
    484 
    485    Since C is not an object oriented language, creating a derived hash
    486 table requires sticking together some boilerplate routines with a few
    487 differences specific to the type of hash table you want to create.
    488 
    489    An example of a derived hash table is the linker hash table.  The
    490 structures for this are defined in `bfdlink.h'.  The functions are in
    491 `linker.c'.
    492 
    493    You may also derive a hash table from an already derived hash table.
    494 For example, the a.out linker backend code uses a hash table derived
    495 from the linker hash table.
    496 
    497 * Menu:
    498 
    499 * Define the Derived Structures::
    500 * Write the Derived Creation Routine::
    501 * Write Other Derived Routines::
    502 
    503 
    504 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
    505 
    506 Define the derived structures
    507 .............................
    508 
    509    You must define a structure for an entry in the hash table, and a
    510 structure for the hash table itself.
    511 
    512    The first field in the structure for an entry in the hash table must
    513 be of the type used for an entry in the hash table you are deriving
    514 from.  If you are deriving from a basic hash table this is `struct
    515 bfd_hash_entry', which is defined in `bfd.h'.  The first field in the
    516 structure for the hash table itself must be of the type of the hash
    517 table you are deriving from itself.  If you are deriving from a basic
    518 hash table, this is `struct bfd_hash_table'.
    519 
    520    For example, the linker hash table defines `struct
    521 bfd_link_hash_entry' (in `bfdlink.h').  The first field, `root', is of
    522 type `struct bfd_hash_entry'.  Similarly, the first field in `struct
    523 bfd_link_hash_table', `table', is of type `struct bfd_hash_table'.
    524 
    525 
    526 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
    527 
    528 Write the derived creation routine
    529 ..................................
    530 
    531    You must write a routine which will create and initialize an entry
    532 in the hash table.  This routine is passed as the function argument to
    533 `bfd_hash_table_init'.
    534 
    535    In order to permit other hash tables to be derived from the hash
    536 table you are creating, this routine must be written in a standard way.
    537 
    538    The first argument to the creation routine is a pointer to a hash
    539 table entry.  This may be `NULL', in which case the routine should
    540 allocate the right amount of space.  Otherwise the space has already
    541 been allocated by a hash table type derived from this one.
    542 
    543    After allocating space, the creation routine must call the creation
    544 routine of the hash table type it is derived from, passing in a pointer
    545 to the space it just allocated.  This will initialize any fields used
    546 by the base hash table.
    547 
    548    Finally the creation routine must initialize any local fields for
    549 the new hash table type.
    550 
    551    Here is a boilerplate example of a creation routine.  FUNCTION_NAME
    552 is the name of the routine.  ENTRY_TYPE is the type of an entry in the
    553 hash table you are creating.  BASE_NEWFUNC is the name of the creation
    554 routine of the hash table type your hash table is derived from.
    555 
    556      struct bfd_hash_entry *
    557      FUNCTION_NAME (entry, table, string)
    558           struct bfd_hash_entry *entry;
    559           struct bfd_hash_table *table;
    560           const char *string;
    561      {
    562        struct ENTRY_TYPE *ret = (ENTRY_TYPE *) entry;
    563      
    564       /* Allocate the structure if it has not already been allocated by a
    565          derived class.  */
    566        if (ret == (ENTRY_TYPE *) NULL)
    567          {
    568            ret = ((ENTRY_TYPE *)
    569                   bfd_hash_allocate (table, sizeof (ENTRY_TYPE)));
    570            if (ret == (ENTRY_TYPE *) NULL)
    571              return NULL;
    572          }
    573      
    574       /* Call the allocation method of the base class.  */
    575        ret = ((ENTRY_TYPE *)
    576              BASE_NEWFUNC ((struct bfd_hash_entry *) ret, table, string));
    577      
    578       /* Initialize the local fields here.  */
    579      
    580        return (struct bfd_hash_entry *) ret;
    581      }
    582    *Description*
    583 The creation routine for the linker hash table, which is in `linker.c',
    584 looks just like this example.  FUNCTION_NAME is
    585 `_bfd_link_hash_newfunc'.  ENTRY_TYPE is `struct bfd_link_hash_entry'.
    586 BASE_NEWFUNC is `bfd_hash_newfunc', the creation routine for a basic
    587 hash table.
    588 
    589    `_bfd_link_hash_newfunc' also initializes the local fields in a
    590 linker hash table entry: `type', `written' and `next'.
    591 
    592 
    593 File: bfd.info,  Node: Write Other Derived Routines,  Prev: Write the Derived Creation Routine,  Up: Deriving a New Hash Table Type
    594 
    595 Write other derived routines
     949File: bfd.info,  Node: Opening and Closing,  Next: Internal,  Prev: Architectures,  Up: BFD front end
     950
     951Opening and closing BFDs
     952========================
     953
     954`bfd_openr'
     955...........
     956
     957   *Synopsis*
     958     bfd *bfd_openr(const char *filename, const char *target);
     959   *Description*
     960Open the file FILENAME (using `fopen') with the target TARGET.  Return
     961a pointer to the created BFD.
     962
     963   Calls `bfd_find_target', so TARGET is interpreted as by that
     964function.
     965
     966   If `NULL' is returned then an error has occured.   Possible errors
     967are `bfd_error_no_memory', `bfd_error_invalid_target' or `system_call'
     968error.
     969
     970`bfd_fdopenr'
     971.............
     972
     973   *Synopsis*
     974     bfd *bfd_fdopenr(const char *filename, const char *target, int fd);
     975   *Description*
     976`bfd_fdopenr' is to `bfd_fopenr' much like `fdopen' is to `fopen'.  It
     977opens a BFD on a file already described by the FD supplied.
     978
     979   When the file is later `bfd_close'd, the file descriptor will be
     980closed.  If the caller desires that this file descriptor be cached by
     981BFD (opened as needed, closed as needed to free descriptors for other
     982opens), with the supplied FD used as an initial file descriptor (but
     983subject to closure at any time), call bfd_set_cacheable(bfd, 1) on the
     984returned BFD.  The default is to assume no cacheing; the file
     985descriptor will remain open until `bfd_close', and will not be affected
     986by BFD operations on other files.
     987
     988   Possible errors are `bfd_error_no_memory',
     989`bfd_error_invalid_target' and `bfd_error_system_call'.
     990
     991`bfd_openstreamr'
     992.................
     993
     994   *Synopsis*
     995     bfd *bfd_openstreamr(const char *, const char *, PTR);
     996   *Description*
     997Open a BFD for read access on an existing stdio stream.  When the BFD
     998is passed to `bfd_close', the stream will be closed.
     999
     1000`bfd_openw'
     1001...........
     1002
     1003   *Synopsis*
     1004     bfd *bfd_openw(const char *filename, const char *target);
     1005   *Description*
     1006Create a BFD, associated with file FILENAME, using the file format
     1007TARGET, and return a pointer to it.
     1008
     1009   Possible errors are `bfd_error_system_call', `bfd_error_no_memory',
     1010`bfd_error_invalid_target'.
     1011
     1012`bfd_close'
     1013...........
     1014
     1015   *Synopsis*
     1016     bfd_boolean bfd_close (bfd *abfd);
     1017   *Description*
     1018Close a BFD. If the BFD was open for writing, then pending operations
     1019are completed and the file written out and closed.  If the created file
     1020is executable, then `chmod' is called to mark it as such.
     1021
     1022   All memory attached to the BFD is released.
     1023
     1024   The file descriptor associated with the BFD is closed (even if it
     1025was passed in to BFD by `bfd_fdopenr').
     1026
     1027   *Returns*
     1028`TRUE' is returned if all is ok, otherwise `FALSE'.
     1029
     1030`bfd_close_all_done'
     1031....................
     1032
     1033   *Synopsis*
     1034     bfd_boolean bfd_close_all_done (bfd *);
     1035   *Description*
     1036Close a BFD.  Differs from `bfd_close' since it does not complete any
     1037pending operations.  This routine would be used if the application had
     1038just used BFD for swapping and didn't want to use any of the writing
     1039code.
     1040
     1041   If the created file is executable, then `chmod' is called to mark it
     1042as such.
     1043
     1044   All memory attached to the BFD is released.
     1045
     1046   *Returns*
     1047`TRUE' is returned if all is ok, otherwise `FALSE'.
     1048
     1049`bfd_create'
     1050............
     1051
     1052   *Synopsis*
     1053     bfd *bfd_create(const char *filename, bfd *templ);
     1054   *Description*
     1055Create a new BFD in the manner of `bfd_openw', but without opening a
     1056file. The new BFD takes the target from the target used by TEMPLATE.
     1057The format is always set to `bfd_object'.
     1058
     1059`bfd_make_writable'
     1060...................
     1061
     1062   *Synopsis*
     1063     bfd_boolean bfd_make_writable (bfd *abfd);
     1064   *Description*
     1065Takes a BFD as created by `bfd_create' and converts it into one like as
     1066returned by `bfd_openw'.  It does this by converting the BFD to
     1067BFD_IN_MEMORY.  It's assumed that you will call `bfd_make_readable' on
     1068this bfd later.
     1069
     1070   *Returns*
     1071`TRUE' is returned if all is ok, otherwise `FALSE'.
     1072
     1073`bfd_make_readable'
     1074...................
     1075
     1076   *Synopsis*
     1077     bfd_boolean bfd_make_readable (bfd *abfd);
     1078   *Description*
     1079Takes a BFD as created by `bfd_create' and `bfd_make_writable' and
     1080converts it into one like as returned by `bfd_openr'.  It does this by
     1081writing the contents out to the memory buffer, then reversing the
     1082direction.
     1083
     1084   *Returns*
     1085`TRUE' is returned if all is ok, otherwise `FALSE'.
     1086
     1087`bfd_alloc'
     1088...........
     1089
     1090   *Synopsis*
     1091     PTR bfd_alloc (bfd *abfd, size_t wanted);
     1092   *Description*
     1093Allocate a block of WANTED bytes of memory attached to `abfd' and
     1094return a pointer to it.
     1095
     1096`calc_crc32'
     1097............
     1098
     1099   *Synopsis*
     1100     unsigned long calc_crc32 (unsigned long crc, const unsigned char *buf, size_t len);
     1101   *Description*
     1102Advance the CRC32 given by CRC through LEN bytes of BUF. Return the
     1103updated CRC32 value.
     1104
     1105`get_debug_link_info'
     1106.....................
     1107
     1108   *Synopsis*
     1109     char *get_debug_link_info (bfd *abfd, unsigned long *crc32_out)
     1110   *Description*
     1111fetch the filename and CRC32 value for any separate debuginfo
     1112associated with ABFD. Return NULL if no such info found, otherwise
     1113return filename and update CRC32_OUT.
     1114
     1115`separate_debug_file_exists'
    5961116............................
    5971117
    598    You will want to write other routines for your new hash table, as
    599 well.
    600 
    601    You will want an initialization routine which calls the
    602 initialization routine of the hash table you are deriving from and
    603 initializes any other local fields.  For the linker hash table, this is
    604 `_bfd_link_hash_table_init' in `linker.c'.
    605 
    606    You will want a lookup routine which calls the lookup routine of the
    607 hash table you are deriving from and casts the result.  The linker hash
    608 table uses `bfd_link_hash_lookup' in `linker.c' (this actually takes an
    609 additional argument which it uses to decide how to return the looked up
    610 value).
    611 
    612    You may want a traversal routine.  This should just call the
    613 traversal routine of the hash table you are deriving from with
    614 appropriate casts.  The linker hash table uses `bfd_link_hash_traverse'
    615 in `linker.c'.
    616 
    617    These routines may simply be defined as macros.  For example, the
    618 a.out backend linker hash table, which is derived from the linker hash
    619 table, uses macros for the lookup and traversal routines.  These are
    620 `aout_link_hash_lookup' and `aout_link_hash_traverse' in aoutx.h.
    621 
    622 
    623 File: bfd.info,  Node: BFD back ends,  Next: GNU Free Documentation License,  Prev: BFD front end,  Up: Top
    624 
    625 BFD back ends
    626 *************
    627 
    628 * Menu:
    629 
    630 * What to Put Where::
    631 * aout ::       a.out backends
    632 * coff ::       coff backends
    633 * elf  ::       elf backends
    634 
    635 
    636 File: bfd.info,  Node: What to Put Where,  Next: aout,  Prev: BFD back ends,  Up: BFD back ends
    637 
    638    All of BFD lives in one directory.
    639 
    640 
    641 File: bfd.info,  Node: aout,  Next: coff,  Prev: What to Put Where,  Up: BFD back ends
    642 
    643 a.out backends
    644 ==============
    645 
    646    *Description*
    647 BFD supports a number of different flavours of a.out format, though the
    648 major differences are only the sizes of the structures on disk, and the
    649 shape of the relocation information.
    650 
    651    The support is split into a basic support file `aoutx.h' and other
    652 files which derive functions from the base. One derivation file is
    653 `aoutf1.h' (for a.out flavour 1), and adds to the basic a.out functions
    654 support for sun3, sun4, 386 and 29k a.out files, to create a target
    655 jump vector for a specific target.
    656 
    657    This information is further split out into more specific files for
    658 each machine, including `sunos.c' for sun3 and sun4, `newsos3.c' for
    659 the Sony NEWS, and `demo64.c' for a demonstration of a 64 bit a.out
    660 format.
    661 
    662    The base file `aoutx.h' defines general mechanisms for reading and
    663 writing records to and from disk and various other methods which BFD
    664 requires. It is included by `aout32.c' and `aout64.c' to form the names
    665 `aout_32_swap_exec_header_in', `aout_64_swap_exec_header_in', etc.
    666 
    667    As an example, this is what goes on to make the back end for a sun4,
    668 from `aout32.c':
    669 
    670             #define ARCH_SIZE 32
    671             #include "aoutx.h"
    672 
    673    Which exports names:
    674 
    675             ...
    676             aout_32_canonicalize_reloc
    677             aout_32_find_nearest_line
    678             aout_32_get_lineno
    679             aout_32_get_reloc_upper_bound
    680             ...
    681 
    682    from `sunos.c':
    683 
    684             #define TARGET_NAME "a.out-sunos-big"
    685             #define VECNAME    sunos_big_vec
    686             #include "aoutf1.h"
    687 
    688    requires all the names from `aout32.c', and produces the jump vector
    689 
    690             sunos_big_vec
    691 
    692    The file `host-aout.c' is a special case.  It is for a large set of
    693 hosts that use "more or less standard" a.out files, and for which
    694 cross-debugging is not interesting.  It uses the standard 32-bit a.out
    695 support routines, but determines the file offsets and addresses of the
    696 text, data, and BSS sections, the machine architecture and machine
    697 type, and the entry point address, in a host-dependent manner.  Once
    698 these values have been determined, generic code is used to handle the
    699 object file.
    700 
    701    When porting it to run on a new system, you must supply:
    702 
    703              HOST_PAGE_SIZE
    704              HOST_SEGMENT_SIZE
    705              HOST_MACHINE_ARCH       (optional)
    706              HOST_MACHINE_MACHINE    (optional)
    707              HOST_TEXT_START_ADDR
    708              HOST_STACK_END_ADDR
    709 
    710    in the file `../include/sys/h-XXX.h' (for your host).  These values,
    711 plus the structures and macros defined in `a.out.h' on your host
    712 system, will produce a BFD target that will access ordinary a.out files
    713 on your host. To configure a new machine to use `host-aout.c', specify:
    714 
    715             TDEFAULTS = -DDEFAULT_VECTOR=host_aout_big_vec
    716             TDEPFILES= host-aout.o trad-core.o
    717 
    718    in the `config/XXX.mt' file, and modify `configure.in' to use the
    719 `XXX.mt' file (by setting "`bfd_target=XXX'") when your configuration
    720 is selected.
    721 
    722 Relocations
    723 -----------
    724 
    725    *Description*
    726 The file `aoutx.h' provides for both the _standard_ and _extended_
    727 forms of a.out relocation records.
    728 
    729    The standard records contain only an address, a symbol index, and a
    730 type field. The extended records (used on 29ks and sparcs) also have a
    731 full integer for an addend.
    732 
    733 Internal entry points
    734 ---------------------
    735 
    736    *Description*
    737 `aoutx.h' exports several routines for accessing the contents of an
    738 a.out file, which are gathered and exported in turn by various format
    739 specific files (eg sunos.c).
    740 
    741 `aout_SIZE_swap_exec_header_in'
    742 ...............................
    743 
    744    *Synopsis*
    745      void aout_SIZE_swap_exec_header_in,
    746         (bfd *abfd,
    747          struct external_exec *raw_bytes,
    748          struct internal_exec *execp);
    749    *Description*
    750 Swap the information in an executable header RAW_BYTES taken from a raw
    751 byte stream memory image into the internal exec header structure EXECP.
    752 
    753 `aout_SIZE_swap_exec_header_out'
    754 ................................
    755 
    756    *Synopsis*
    757      void aout_SIZE_swap_exec_header_out
    758         (bfd *abfd,
    759          struct internal_exec *execp,
    760          struct external_exec *raw_bytes);
    761    *Description*
    762 Swap the information in an internal exec header structure EXECP into
    763 the buffer RAW_BYTES ready for writing to disk.
    764 
    765 `aout_SIZE_some_aout_object_p'
    766 ..............................
    767 
    768    *Synopsis*
    769      const bfd_target *aout_SIZE_some_aout_object_p
    770         (bfd *abfd,
    771          const bfd_target *(*callback_to_real_object_p) ());
    772    *Description*
    773 Some a.out variant thinks that the file open in ABFD checking is an
    774 a.out file.  Do some more checking, and set up for access if it really
    775 is.  Call back to the calling environment's "finish up" function just
    776 before returning, to handle any last-minute setup.
    777 
    778 `aout_SIZE_mkobject'
    779 ....................
    780 
    781    *Synopsis*
    782      boolean aout_SIZE_mkobject, (bfd *abfd);
    783    *Description*
    784 Initialize BFD ABFD for use with a.out files.
    785 
    786 `aout_SIZE_machine_type'
    787 ........................
    788 
    789    *Synopsis*
    790      enum machine_type  aout_SIZE_machine_type
    791         (enum bfd_architecture arch,
    792          unsigned long machine));
    793    *Description*
    794 Keep track of machine architecture and machine type for a.out's. Return
    795 the `machine_type' for a particular architecture and machine, or
    796 `M_UNKNOWN' if that exact architecture and machine can't be represented
    797 in a.out format.
    798 
    799    If the architecture is understood, machine type 0 (default) is
    800 always understood.
    801 
    802 `aout_SIZE_set_arch_mach'
    803 .........................
    804 
    805    *Synopsis*
    806      boolean aout_SIZE_set_arch_mach,
    807         (bfd *,
    808          enum bfd_architecture arch,
    809          unsigned long machine));
    810    *Description*
    811 Set the architecture and the machine of the BFD ABFD to the values ARCH
    812 and MACHINE.  Verify that ABFD's format can support the architecture
    813 required.
    814 
    815 `aout_SIZE_new_section_hook'
    816 ............................
    817 
    818    *Synopsis*
    819      boolean aout_SIZE_new_section_hook,
    820         (bfd *abfd,
    821          asection *newsect));
    822    *Description*
    823 Called by the BFD in response to a `bfd_make_section' request.
    824 
     1118   *Synopsis*
     1119     bfd_boolean separate_debug_file_exists (char * name, unsigned long crc32)
     1120   *Description*
     1121Checks to see if NAME is a file and if its contents match CRC32.
     1122
     1123`find_separate_debug_file'
     1124..........................
     1125
     1126   *Synopsis*
     1127     char * find_separate_debug_file (bfd *abfd)
     1128   *Description*
     1129Searches ABFD for a reference to separate debugging information, scans
     1130various locations in the filesystem, including the file tree rooted at
     1131DEBUG_FILE_DIRECTORY, and returns a filename of such debugging
     1132information if the file is found and has matching CRC32.  Returns NULL
     1133if no reference to debugging file exists, or file cannot be found.
     1134
     1135`bfd_follow_gnu_debuglink'
     1136..........................
     1137
     1138   *Synopsis*
     1139     char * bfd_follow_gnu_debuglink(bfd *abfd, const char *dir);
     1140   *Description*
     1141Takes a BFD and searches it for a .gnu_debuglink section.  If this
     1142section is found, examines the section for the name and checksum of a
     1143'.debug' file containing auxiliary debugging information. Searches
     1144filesystem for .debug file in some standard locations, including the
     1145directory tree rooted at DIR, and if found returns the full filename.
     1146If DIR is NULL, will search default path configured into libbfd at
     1147build time.
     1148
     1149   *Returns*
     1150`NULL' on any errors or failure to locate the .debug file, otherwise a
     1151pointer to a heap-allocated string containing the filename. The caller
     1152is responsible for freeing this string.
     1153
  • branches/GNU/src/binutils/bfd/doc/bfd.info-6

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 This is bfd.info, produced by makeinfo version 4.0 from bfd.texinfo.
     1This is bfd.info, produced by makeinfo version 4.3 from bfd.texinfo.
    22
    33START-INFO-DIR-ENTRY
     
    77   This file documents the BFD library.
    88
    9    Copyright (C) 1991, 2000 Free Software Foundation, Inc.
     9   Copyright (C) 1991, 2000, 2001, 2003 Free Software Foundation, Inc.
    1010
    1111   Permission is granted to copy, distribute and/or modify this document
     
    1717
    1818
    19 File: bfd.info,  Node: coff,  Next: elf,  Prev: aout,  Up: BFD back ends
    20 
    21 coff backends
    22 =============
    23 
    24    BFD supports a number of different flavours of coff format.  The
    25 major differences between formats are the sizes and alignments of
    26 fields in structures on disk, and the occasional extra field.
    27 
    28    Coff in all its varieties is implemented with a few common files and
    29 a number of implementation specific files. For example, The 88k bcs
    30 coff format is implemented in the file `coff-m88k.c'. This file
    31 `#include's `coff/m88k.h' which defines the external structure of the
    32 coff format for the 88k, and `coff/internal.h' which defines the
    33 internal structure. `coff-m88k.c' also defines the relocations used by
    34 the 88k format *Note Relocations::.
    35 
    36    The Intel i960 processor version of coff is implemented in
    37 `coff-i960.c'. This file has the same structure as `coff-m88k.c',
    38 except that it includes `coff/i960.h' rather than `coff-m88k.h'.
    39 
    40 Porting to a new version of coff
     19File: bfd.info,  Node: Internal,  Next: File Caching,  Prev: Opening and Closing,  Up: BFD front end
     20
     21Internal functions
     22==================
     23
     24   *Description*
     25These routines are used within BFD.  They are not intended for export,
     26but are documented here for completeness.
     27
     28`bfd_write_bigendian_4byte_int'
     29...............................
     30
     31   *Synopsis*
     32     bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
     33   *Description*
     34Write a 4 byte integer I to the output BFD ABFD, in big endian order
     35regardless of what else is going on.  This is useful in archives.
     36
     37`bfd_put_size'
     38..............
     39
     40`bfd_get_size'
     41..............
     42
     43   *Description*
     44These macros as used for reading and writing raw data in sections; each
     45access (except for bytes) is vectored through the target format of the
     46BFD and mangled accordingly. The mangling performs any necessary endian
     47translations and removes alignment restrictions.  Note that types
     48accepted and returned by these macros are identical so they can be
     49swapped around in macros--for example, `libaout.h' defines `GET_WORD'
     50to either `bfd_get_32' or `bfd_get_64'.
     51
     52   In the put routines, VAL must be a `bfd_vma'.  If we are on a system
     53without prototypes, the caller is responsible for making sure that is
     54true, with a cast if necessary.  We don't cast them in the macro
     55definitions because that would prevent `lint' or `gcc -Wall' from
     56detecting sins such as passing a pointer.  To detect calling these with
     57less than a `bfd_vma', use `gcc -Wconversion' on a host with 64 bit
     58`bfd_vma''s.
     59
     60     /* Byte swapping macros for user section data.  */
     61     
     62     #define bfd_put_8(abfd, val, ptr) \
     63                     ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val)))
     64     #define bfd_put_signed_8 \
     65                    bfd_put_8
     66     #define bfd_get_8(abfd, ptr) \
     67                     (*(unsigned char *) (ptr) & 0xff)
     68     #define bfd_get_signed_8(abfd, ptr) \
     69                    (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
     70     
     71     #define bfd_put_16(abfd, val, ptr) \
     72                     BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
     73     #define bfd_put_signed_16 \
     74                     bfd_put_16
     75     #define bfd_get_16(abfd, ptr) \
     76                     BFD_SEND(abfd, bfd_getx16, (ptr))
     77     #define bfd_get_signed_16(abfd, ptr) \
     78                     BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
     79     
     80     #define bfd_put_32(abfd, val, ptr) \
     81                     BFD_SEND(abfd, bfd_putx32, ((val),(ptr)))
     82     #define bfd_put_signed_32 \
     83                     bfd_put_32
     84     #define bfd_get_32(abfd, ptr) \
     85                     BFD_SEND(abfd, bfd_getx32, (ptr))
     86     #define bfd_get_signed_32(abfd, ptr) \
     87                     BFD_SEND(abfd, bfd_getx_signed_32, (ptr))
     88     
     89     #define bfd_put_64(abfd, val, ptr) \
     90                     BFD_SEND(abfd, bfd_putx64, ((val), (ptr)))
     91     #define bfd_put_signed_64 \
     92                     bfd_put_64
     93     #define bfd_get_64(abfd, ptr) \
     94                     BFD_SEND(abfd, bfd_getx64, (ptr))
     95     #define bfd_get_signed_64(abfd, ptr) \
     96                     BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
     97     
     98     #define bfd_get(bits, abfd, ptr)                               \
     99                     ( (bits) ==  8 ? (bfd_vma) bfd_get_8 (abfd, ptr)       \
     100                     : (bits) == 16 ? bfd_get_16 (abfd, ptr)        \
     101                     : (bits) == 32 ? bfd_get_32 (abfd, ptr)        \
     102                     : (bits) == 64 ? bfd_get_64 (abfd, ptr)        \
     103                     : (abort (), (bfd_vma) - 1))
     104     
     105     #define bfd_put(bits, abfd, val, ptr)                          \
     106                     ( (bits) ==  8 ? bfd_put_8  (abfd, val, ptr)   \
     107                     : (bits) == 16 ? bfd_put_16 (abfd, val, ptr)   \
     108                     : (bits) == 32 ? bfd_put_32 (abfd, val, ptr)   \
     109                     : (bits) == 64 ? bfd_put_64 (abfd, val, ptr)   \
     110                     : (abort (), (void) 0))
     111
     112`bfd_h_put_size'
     113................
     114
     115   *Description*
     116These macros have the same function as their `bfd_get_x' brethren,
     117except that they are used for removing information for the header
     118records of object files. Believe it or not, some object files keep
     119their header records in big endian order and their data in little
     120endian order.
     121
     122     /* Byte swapping macros for file header data.  */
     123     
     124     #define bfd_h_put_8(abfd, val, ptr) \
     125       bfd_put_8 (abfd, val, ptr)
     126     #define bfd_h_put_signed_8(abfd, val, ptr) \
     127       bfd_put_8 (abfd, val, ptr)
     128     #define bfd_h_get_8(abfd, ptr) \
     129       bfd_get_8 (abfd, ptr)
     130     #define bfd_h_get_signed_8(abfd, ptr) \
     131       bfd_get_signed_8 (abfd, ptr)
     132     
     133     #define bfd_h_put_16(abfd, val, ptr) \
     134       BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
     135     #define bfd_h_put_signed_16 \
     136       bfd_h_put_16
     137     #define bfd_h_get_16(abfd, ptr) \
     138       BFD_SEND (abfd, bfd_h_getx16, (ptr))
     139     #define bfd_h_get_signed_16(abfd, ptr) \
     140       BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
     141     
     142     #define bfd_h_put_32(abfd, val, ptr) \
     143       BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
     144     #define bfd_h_put_signed_32 \
     145       bfd_h_put_32
     146     #define bfd_h_get_32(abfd, ptr) \
     147       BFD_SEND (abfd, bfd_h_getx32, (ptr))
     148     #define bfd_h_get_signed_32(abfd, ptr) \
     149       BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
     150     
     151     #define bfd_h_put_64(abfd, val, ptr) \
     152       BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
     153     #define bfd_h_put_signed_64 \
     154       bfd_h_put_64
     155     #define bfd_h_get_64(abfd, ptr) \
     156       BFD_SEND (abfd, bfd_h_getx64, (ptr))
     157     #define bfd_h_get_signed_64(abfd, ptr) \
     158       BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
     159     
     160     /* Refinements on the above, which should eventually go away.  Save
     161        cluttering the source with (bfd_vma) and (bfd_byte *) casts.  */
     162     
     163     #define H_PUT_64(abfd, val, where) \
     164       bfd_h_put_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
     165     
     166     #define H_PUT_32(abfd, val, where) \
     167       bfd_h_put_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
     168     
     169     #define H_PUT_16(abfd, val, where) \
     170       bfd_h_put_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
     171     
     172     #define H_PUT_8 bfd_h_put_8
     173     
     174     #define H_PUT_S64(abfd, val, where) \
     175       bfd_h_put_signed_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
     176     
     177     #define H_PUT_S32(abfd, val, where) \
     178       bfd_h_put_signed_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
     179     
     180     #define H_PUT_S16(abfd, val, where) \
     181       bfd_h_put_signed_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
     182     
     183     #define H_PUT_S8 bfd_h_put_signed_8
     184     
     185     #define H_GET_64(abfd, where) \
     186       bfd_h_get_64 ((abfd), (bfd_byte *) (where))
     187     
     188     #define H_GET_32(abfd, where) \
     189       bfd_h_get_32 ((abfd), (bfd_byte *) (where))
     190     
     191     #define H_GET_16(abfd, where) \
     192       bfd_h_get_16 ((abfd), (bfd_byte *) (where))
     193     
     194     #define H_GET_8 bfd_h_get_8
     195     
     196     #define H_GET_S64(abfd, where) \
     197       bfd_h_get_signed_64 ((abfd), (bfd_byte *) (where))
     198     
     199     #define H_GET_S32(abfd, where) \
     200       bfd_h_get_signed_32 ((abfd), (bfd_byte *) (where))
     201     
     202     #define H_GET_S16(abfd, where) \
     203       bfd_h_get_signed_16 ((abfd), (bfd_byte *) (where))
     204     
     205     #define H_GET_S8 bfd_h_get_signed_8
     206
     207`bfd_log2'
     208..........
     209
     210   *Synopsis*
     211     unsigned int bfd_log2 (bfd_vma x);
     212   *Description*
     213Return the log base 2 of the value supplied, rounded up.  E.g., an X of
     2141025 returns 11.  A X of 0 returns 0.
     215
     216
     217File: bfd.info,  Node: File Caching,  Next: Linker Functions,  Prev: Internal,  Up: BFD front end
     218
     219File caching
     220============
     221
     222   The file caching mechanism is embedded within BFD and allows the
     223application to open as many BFDs as it wants without regard to the
     224underlying operating system's file descriptor limit (often as low as 20
     225open files).  The module in `cache.c' maintains a least recently used
     226list of `BFD_CACHE_MAX_OPEN' files, and exports the name
     227`bfd_cache_lookup', which runs around and makes sure that the required
     228BFD is open. If not, then it chooses a file to close, closes it and
     229opens the one wanted, returning its file handle.
     230
     231`BFD_CACHE_MAX_OPEN macro'
     232..........................
     233
     234   *Description*
     235The maximum number of files which the cache will keep open at one time.
     236     #define BFD_CACHE_MAX_OPEN 10
     237
     238`bfd_last_cache'
     239................
     240
     241   *Synopsis*
     242     extern bfd *bfd_last_cache;
     243   *Description*
     244Zero, or a pointer to the topmost BFD on the chain.  This is used by
     245the `bfd_cache_lookup' macro in `libbfd.h' to determine when it can
     246avoid a function call.
     247
     248`bfd_cache_lookup'
     249..................
     250
     251   *Description*
     252Check to see if the required BFD is the same as the last one looked up.
     253If so, then it can use the stream in the BFD with impunity, since it
     254can't have changed since the last lookup; otherwise, it has to perform
     255the complicated lookup function.
     256     #define bfd_cache_lookup(x) \
     257         ((x)==bfd_last_cache? \
     258           (FILE*) (bfd_last_cache->iostream): \
     259            bfd_cache_lookup_worker(x))
     260
     261`bfd_cache_init'
     262................
     263
     264   *Synopsis*
     265     bfd_boolean bfd_cache_init (bfd *abfd);
     266   *Description*
     267Add a newly opened BFD to the cache.
     268
     269`bfd_cache_close'
     270.................
     271
     272   *Synopsis*
     273     bfd_boolean bfd_cache_close (bfd *abfd);
     274   *Description*
     275Remove the BFD ABFD from the cache. If the attached file is open, then
     276close it too.
     277
     278   *Returns*
     279`FALSE' is returned if closing the file fails, `TRUE' is returned if
     280all is well.
     281
     282`bfd_open_file'
     283...............
     284
     285   *Synopsis*
     286     FILE* bfd_open_file(bfd *abfd);
     287   *Description*
     288Call the OS to open a file for ABFD.  Return the `FILE *' (possibly
     289`NULL') that results from this operation.  Set up the BFD so that
     290future accesses know the file is open. If the `FILE *' returned is
     291`NULL', then it won't have been put in the cache, so it won't have to
     292be removed from it.
     293
     294`bfd_cache_lookup_worker'
     295.........................
     296
     297   *Synopsis*
     298     FILE *bfd_cache_lookup_worker(bfd *abfd);
     299   *Description*
     300Called when the macro `bfd_cache_lookup' fails to find a quick answer.
     301Find a file descriptor for ABFD.  If necessary, it open it.  If there
     302are already more than `BFD_CACHE_MAX_OPEN' files open, it tries to
     303close one first, to avoid running out of file descriptors.
     304
     305
     306File: bfd.info,  Node: Linker Functions,  Next: Hash Tables,  Prev: File Caching,  Up: BFD front end
     307
     308Linker Functions
     309================
     310
     311   The linker uses three special entry points in the BFD target vector.
     312It is not necessary to write special routines for these entry points
     313when creating a new BFD back end, since generic versions are provided.
     314However, writing them can speed up linking and make it use
     315significantly less runtime memory.
     316
     317   The first routine creates a hash table used by the other routines.
     318The second routine adds the symbols from an object file to the hash
     319table.  The third routine takes all the object files and links them
     320together to create the output file.  These routines are designed so
     321that the linker proper does not need to know anything about the symbols
     322in the object files that it is linking.  The linker merely arranges the
     323sections as directed by the linker script and lets BFD handle the
     324details of symbols and relocs.
     325
     326   The second routine and third routines are passed a pointer to a
     327`struct bfd_link_info' structure (defined in `bfdlink.h') which holds
     328information relevant to the link, including the linker hash table
     329(which was created by the first routine) and a set of callback
     330functions to the linker proper.
     331
     332   The generic linker routines are in `linker.c', and use the header
     333file `genlink.h'.  As of this writing, the only back ends which have
     334implemented versions of these routines are a.out (in `aoutx.h') and
     335ECOFF (in `ecoff.c').  The a.out routines are used as examples
     336throughout this section.
     337
     338* Menu:
     339
     340* Creating a Linker Hash Table::
     341* Adding Symbols to the Hash Table::
     342* Performing the Final Link::
     343
     344
     345File: bfd.info,  Node: Creating a Linker Hash Table,  Next: Adding Symbols to the Hash Table,  Prev: Linker Functions,  Up: Linker Functions
     346
     347Creating a linker hash table
     348----------------------------
     349
     350   The linker routines must create a hash table, which must be derived
     351from `struct bfd_link_hash_table' described in `bfdlink.c'.  *Note Hash
     352Tables::, for information on how to create a derived hash table.  This
     353entry point is called using the target vector of the linker output file.
     354
     355   The `_bfd_link_hash_table_create' entry point must allocate and
     356initialize an instance of the desired hash table.  If the back end does
     357not require any additional information to be stored with the entries in
     358the hash table, the entry point may simply create a `struct
     359bfd_link_hash_table'.  Most likely, however, some additional
     360information will be needed.
     361
     362   For example, with each entry in the hash table the a.out linker
     363keeps the index the symbol has in the final output file (this index
     364number is used so that when doing a relocateable link the symbol index
     365used in the output file can be quickly filled in when copying over a
     366reloc).  The a.out linker code defines the required structures and
     367functions for a hash table derived from `struct bfd_link_hash_table'.
     368The a.out linker hash table is created by the function
     369`NAME(aout,link_hash_table_create)'; it simply allocates space for the
     370hash table, initializes it, and returns a pointer to it.
     371
     372   When writing the linker routines for a new back end, you will
     373generally not know exactly which fields will be required until you have
     374finished.  You should simply create a new hash table which defines no
     375additional fields, and then simply add fields as they become necessary.
     376
     377
     378File: bfd.info,  Node: Adding Symbols to the Hash Table,  Next: Performing the Final Link,  Prev: Creating a Linker Hash Table,  Up: Linker Functions
     379
     380Adding symbols to the hash table
    41381--------------------------------
    42382
    43    The recommended method is to select from the existing
    44 implementations the version of coff which is most like the one you want
    45 to use.  For example, we'll say that i386 coff is the one you select,
    46 and that your coff flavour is called foo.  Copy `i386coff.c' to
    47 `foocoff.c', copy `../include/coff/i386.h' to `../include/coff/foo.h',
    48 and add the lines to `targets.c' and `Makefile.in' so that your new
    49 back end is used. Alter the shapes of the structures in
    50 `../include/coff/foo.h' so that they match what you need. You will
    51 probably also have to add `#ifdef's to the code in `coff/internal.h' and
    52 `coffcode.h' if your version of coff is too wild.
    53 
    54    You can verify that your new BFD backend works quite simply by
    55 building `objdump' from the `binutils' directory, and making sure that
    56 its version of what's going on and your host system's idea (assuming it
    57 has the pretty standard coff dump utility, usually called `att-dump' or
    58 just `dump') are the same.  Then clean up your code, and send what
    59 you've done to Cygnus. Then your stuff will be in the next release, and
    60 you won't have to keep integrating it.
    61 
    62 How the coff backend works
    63 --------------------------
    64 
    65 File layout
    66 ...........
    67 
    68    The Coff backend is split into generic routines that are applicable
    69 to any Coff target and routines that are specific to a particular
    70 target.  The target-specific routines are further split into ones which
    71 are basically the same for all Coff targets except that they use the
    72 external symbol format or use different values for certain constants.
    73 
    74    The generic routines are in `coffgen.c'.  These routines work for
    75 any Coff target.  They use some hooks into the target specific code;
    76 the hooks are in a `bfd_coff_backend_data' structure, one of which
    77 exists for each target.
    78 
    79    The essentially similar target-specific routines are in
    80 `coffcode.h'.  This header file includes executable C code.  The
    81 various Coff targets first include the appropriate Coff header file,
    82 make any special defines that are needed, and then include `coffcode.h'.
    83 
    84    Some of the Coff targets then also have additional routines in the
    85 target source file itself.
    86 
    87    For example, `coff-i960.c' includes `coff/internal.h' and
    88 `coff/i960.h'.  It then defines a few constants, such as `I960', and
    89 includes `coffcode.h'.  Since the i960 has complex relocation types,
    90 `coff-i960.c' also includes some code to manipulate the i960 relocs.
    91 This code is not in `coffcode.h' because it would not be used by any
    92 other target.
    93 
    94 Bit twiddling
    95 .............
    96 
    97    Each flavour of coff supported in BFD has its own header file
    98 describing the external layout of the structures. There is also an
    99 internal description of the coff layout, in `coff/internal.h'. A major
    100 function of the coff backend is swapping the bytes and twiddling the
    101 bits to translate the external form of the structures into the normal
    102 internal form. This is all performed in the `bfd_swap'_thing_direction
    103 routines. Some elements are different sizes between different versions
    104 of coff; it is the duty of the coff version specific include file to
    105 override the definitions of various packing routines in `coffcode.h'.
    106 E.g., the size of line number entry in coff is sometimes 16 bits, and
    107 sometimes 32 bits. `#define'ing `PUT_LNSZ_LNNO' and `GET_LNSZ_LNNO'
    108 will select the correct one. No doubt, some day someone will find a
    109 version of coff which has a varying field size not catered to at the
    110 moment. To port BFD, that person will have to add more `#defines'.
    111 Three of the bit twiddling routines are exported to `gdb';
    112 `coff_swap_aux_in', `coff_swap_sym_in' and `coff_swap_lineno_in'. `GDB'
    113 reads the symbol table on its own, but uses BFD to fix things up.  More
    114 of the bit twiddlers are exported for `gas'; `coff_swap_aux_out',
    115 `coff_swap_sym_out', `coff_swap_lineno_out', `coff_swap_reloc_out',
    116 `coff_swap_filehdr_out', `coff_swap_aouthdr_out',
    117 `coff_swap_scnhdr_out'. `Gas' currently keeps track of all the symbol
    118 table and reloc drudgery itself, thereby saving the internal BFD
    119 overhead, but uses BFD to swap things on the way out, making cross
    120 ports much safer.  Doing so also allows BFD (and thus the linker) to
    121 use the same header files as `gas', which makes one avenue to disaster
    122 disappear.
    123 
    124 Symbol reading
    125 ..............
    126 
    127    The simple canonical form for symbols used by BFD is not rich enough
    128 to keep all the information available in a coff symbol table. The back
    129 end gets around this problem by keeping the original symbol table
    130 around, "behind the scenes".
    131 
    132    When a symbol table is requested (through a call to
    133 `bfd_canonicalize_symtab'), a request gets through to
    134 `coff_get_normalized_symtab'. This reads the symbol table from the coff
    135 file and swaps all the structures inside into the internal form. It
    136 also fixes up all the pointers in the table (represented in the file by
    137 offsets from the first symbol in the table) into physical pointers to
    138 elements in the new internal table. This involves some work since the
    139 meanings of fields change depending upon context: a field that is a
    140 pointer to another structure in the symbol table at one moment may be
    141 the size in bytes of a structure at the next.  Another pass is made
    142 over the table. All symbols which mark file names (`C_FILE' symbols)
    143 are modified so that the internal string points to the value in the
    144 auxent (the real filename) rather than the normal text associated with
    145 the symbol (`".file"').
    146 
    147    At this time the symbol names are moved around. Coff stores all
    148 symbols less than nine characters long physically within the symbol
    149 table; longer strings are kept at the end of the file in the string
    150 table. This pass moves all strings into memory and replaces them with
    151 pointers to the strings.
    152 
    153    The symbol table is massaged once again, this time to create the
    154 canonical table used by the BFD application. Each symbol is inspected
    155 in turn, and a decision made (using the `sclass' field) about the
    156 various flags to set in the `asymbol'.  *Note Symbols::. The generated
    157 canonical table shares strings with the hidden internal symbol table.
    158 
    159    Any linenumbers are read from the coff file too, and attached to the
    160 symbols which own the functions the linenumbers belong to.
    161 
    162 Symbol writing
    163 ..............
    164 
    165    Writing a symbol to a coff file which didn't come from a coff file
    166 will lose any debugging information. The `asymbol' structure remembers
    167 the BFD from which the symbol was taken, and on output the back end
    168 makes sure that the same destination target as source target is present.
    169 
    170    When the symbols have come from a coff file then all the debugging
    171 information is preserved.
    172 
    173    Symbol tables are provided for writing to the back end in a vector
    174 of pointers to pointers. This allows applications like the linker to
    175 accumulate and output large symbol tables without having to do too much
    176 byte copying.
    177 
    178    This function runs through the provided symbol table and patches
    179 each symbol marked as a file place holder (`C_FILE') to point to the
    180 next file place holder in the list. It also marks each `offset' field
    181 in the list with the offset from the first symbol of the current symbol.
    182 
    183    Another function of this procedure is to turn the canonical value
    184 form of BFD into the form used by coff. Internally, BFD expects symbol
    185 values to be offsets from a section base; so a symbol physically at
    186 0x120, but in a section starting at 0x100, would have the value 0x20.
    187 Coff expects symbols to contain their final value, so symbols have
    188 their values changed at this point to reflect their sum with their
    189 owning section.  This transformation uses the `output_section' field of
    190 the `asymbol''s `asection' *Note Sections::.
    191 
    192    * `coff_mangle_symbols'
    193    This routine runs though the provided symbol table and uses the
    194 offsets generated by the previous pass and the pointers generated when
    195 the symbol table was read in to create the structured hierachy required
    196 by coff. It changes each pointer to a symbol into the index into the
    197 symbol table of the asymbol.
    198 
    199    * `coff_write_symbols'
    200    This routine runs through the symbol table and patches up the
    201 symbols from their internal form into the coff way, calls the bit
    202 twiddlers, and writes out the table to the file.
    203 
    204 `coff_symbol_type'
    205 ..................
    206 
    207    *Description*
    208 The hidden information for an `asymbol' is described in a
    209 `combined_entry_type':
    210 
    211 
    212      typedef struct coff_ptr_struct
     383   The linker proper will call the `_bfd_link_add_symbols' entry point
     384for each object file or archive which is to be linked (typically these
     385are the files named on the command line, but some may also come from
     386the linker script).  The entry point is responsible for examining the
     387file.  For an object file, BFD must add any relevant symbol information
     388to the hash table.  For an archive, BFD must determine which elements
     389of the archive should be used and adding them to the link.
     390
     391   The a.out version of this entry point is
     392`NAME(aout,link_add_symbols)'.
     393
     394* Menu:
     395
     396* Differing file formats::
     397* Adding symbols from an object file::
     398* Adding symbols from an archive::
     399
     400
     401File: 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
     402
     403Differing file formats
     404......................
     405
     406   Normally all the files involved in a link will be of the same
     407format, but it is also possible to link together different format
     408object files, and the back end must support that.  The
     409`_bfd_link_add_symbols' entry point is called via the target vector of
     410the file to be added.  This has an important consequence: the function
     411may not assume that the hash table is the type created by the
     412corresponding `_bfd_link_hash_table_create' vector.  All the
     413`_bfd_link_add_symbols' function can assume about the hash table is
     414that it is derived from `struct bfd_link_hash_table'.
     415
     416   Sometimes the `_bfd_link_add_symbols' function must store some
     417information in the hash table entry to be used by the `_bfd_final_link'
     418function.  In such a case the `creator' field of the hash table must be
     419checked to make sure that the hash table was created by an object file
     420of the same format.
     421
     422   The `_bfd_final_link' routine must be prepared to handle a hash
     423entry without any extra information added by the
     424`_bfd_link_add_symbols' function.  A hash entry without extra
     425information will also occur when the linker script directs the linker
     426to create a symbol.  Note that, regardless of how a hash table entry is
     427added, all the fields will be initialized to some sort of null value by
     428the hash table entry initialization function.
     429
     430   See `ecoff_link_add_externals' for an example of how to check the
     431`creator' field before saving information (in this case, the ECOFF
     432external symbol debugging information) in a hash table entry.
     433
     434
     435File: 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
     436
     437Adding symbols from an object file
     438..................................
     439
     440   When the `_bfd_link_add_symbols' routine is passed an object file,
     441it must add all externally visible symbols in that object file to the
     442hash table.  The actual work of adding the symbol to the hash table is
     443normally handled by the function `_bfd_generic_link_add_one_symbol'.
     444The `_bfd_link_add_symbols' routine is responsible for reading all the
     445symbols from the object file and passing the correct information to
     446`_bfd_generic_link_add_one_symbol'.
     447
     448   The `_bfd_link_add_symbols' routine should not use
     449`bfd_canonicalize_symtab' to read the symbols.  The point of providing
     450this routine is to avoid the overhead of converting the symbols into
     451generic `asymbol' structures.
     452
     453   `_bfd_generic_link_add_one_symbol' handles the details of combining
     454common symbols, warning about multiple definitions, and so forth.  It
     455takes arguments which describe the symbol to add, notably symbol flags,
     456a section, and an offset.  The symbol flags include such things as
     457`BSF_WEAK' or `BSF_INDIRECT'.  The section is a section in the object
     458file, or something like `bfd_und_section_ptr' for an undefined symbol
     459or `bfd_com_section_ptr' for a common symbol.
     460
     461   If the `_bfd_final_link' routine is also going to need to read the
     462symbol information, the `_bfd_link_add_symbols' routine should save it
     463somewhere attached to the object file BFD.  However, the information
     464should only be saved if the `keep_memory' field of the `info' argument
     465is TRUE, so that the `-no-keep-memory' linker switch is effective.
     466
     467   The a.out function which adds symbols from an object file is
     468`aout_link_add_object_symbols', and most of the interesting work is in
     469`aout_link_add_symbols'.  The latter saves pointers to the hash tables
     470entries created by `_bfd_generic_link_add_one_symbol' indexed by symbol
     471number, so that the `_bfd_final_link' routine does not have to call the
     472hash table lookup routine to locate the entry.
     473
     474
     475File: bfd.info,  Node: Adding symbols from an archive,  Prev: Adding symbols from an object file,  Up: Adding Symbols to the Hash Table
     476
     477Adding symbols from an archive
     478..............................
     479
     480   When the `_bfd_link_add_symbols' routine is passed an archive, it
     481must look through the symbols defined by the archive and decide which
     482elements of the archive should be included in the link.  For each such
     483element it must call the `add_archive_element' linker callback, and it
     484must add the symbols from the object file to the linker hash table.
     485
     486   In most cases the work of looking through the symbols in the archive
     487should be done by the `_bfd_generic_link_add_archive_symbols' function.
     488This function builds a hash table from the archive symbol table and
     489looks through the list of undefined symbols to see which elements
     490should be included.  `_bfd_generic_link_add_archive_symbols' is passed
     491a function to call to make the final decision about adding an archive
     492element to the link and to do the actual work of adding the symbols to
     493the linker hash table.
     494
     495   The function passed to `_bfd_generic_link_add_archive_symbols' must
     496read the symbols of the archive element and decide whether the archive
     497element should be included in the link.  If the element is to be
     498included, the `add_archive_element' linker callback routine must be
     499called with the element as an argument, and the elements symbols must
     500be added to the linker hash table just as though the element had itself
     501been passed to the `_bfd_link_add_symbols' function.
     502
     503   When the a.out `_bfd_link_add_symbols' function receives an archive,
     504it calls `_bfd_generic_link_add_archive_symbols' passing
     505`aout_link_check_archive_element' as the function argument.
     506`aout_link_check_archive_element' calls `aout_link_check_ar_symbols'.
     507If the latter decides to add the element (an element is only added if
     508it provides a real, non-common, definition for a previously undefined
     509or common symbol) it calls the `add_archive_element' callback and then
     510`aout_link_check_archive_element' calls `aout_link_add_symbols' to
     511actually add the symbols to the linker hash table.
     512
     513   The ECOFF back end is unusual in that it does not normally call
     514`_bfd_generic_link_add_archive_symbols', because ECOFF archives already
     515contain a hash table of symbols.  The ECOFF back end searches the
     516archive itself to avoid the overhead of creating a new hash table.
     517
     518
     519File: bfd.info,  Node: Performing the Final Link,  Prev: Adding Symbols to the Hash Table,  Up: Linker Functions
     520
     521Performing the final link
     522-------------------------
     523
     524   When all the input files have been processed, the linker calls the
     525`_bfd_final_link' entry point of the output BFD.  This routine is
     526responsible for producing the final output file, which has several
     527aspects.  It must relocate the contents of the input sections and copy
     528the data into the output sections.  It must build an output symbol
     529table including any local symbols from the input files and the global
     530symbols from the hash table.  When producing relocateable output, it
     531must modify the input relocs and write them into the output file.
     532There may also be object format dependent work to be done.
     533
     534   The linker will also call the `write_object_contents' entry point
     535when the BFD is closed.  The two entry points must work together in
     536order to produce the correct output file.
     537
     538   The details of how this works are inevitably dependent upon the
     539specific object file format.  The a.out `_bfd_final_link' routine is
     540`NAME(aout,final_link)'.
     541
     542* Menu:
     543
     544* Information provided by the linker::
     545* Relocating the section contents::
     546* Writing the symbol table::
     547
     548
     549File: bfd.info,  Node: Information provided by the linker,  Next: Relocating the section contents,  Prev: Performing the Final Link,  Up: Performing the Final Link
     550
     551Information provided by the linker
     552..................................
     553
     554   Before the linker calls the `_bfd_final_link' entry point, it sets
     555up some data structures for the function to use.
     556
     557   The `input_bfds' field of the `bfd_link_info' structure will point
     558to a list of all the input files included in the link.  These files are
     559linked through the `link_next' field of the `bfd' structure.
     560
     561   Each section in the output file will have a list of `link_order'
     562structures attached to the `link_order_head' field (the `link_order'
     563structure is defined in `bfdlink.h').  These structures describe how to
     564create the contents of the output section in terms of the contents of
     565various input sections, fill constants, and, eventually, other types of
     566information.  They also describe relocs that must be created by the BFD
     567backend, but do not correspond to any input file; this is used to
     568support -Ur, which builds constructors while generating a relocateable
     569object file.
     570
     571
     572File: bfd.info,  Node: Relocating the section contents,  Next: Writing the symbol table,  Prev: Information provided by the linker,  Up: Performing the Final Link
     573
     574Relocating the section contents
     575...............................
     576
     577   The `_bfd_final_link' function should look through the `link_order'
     578structures attached to each section of the output file.  Each
     579`link_order' structure should either be handled specially, or it should
     580be passed to the function `_bfd_default_link_order' which will do the
     581right thing (`_bfd_default_link_order' is defined in `linker.c').
     582
     583   For efficiency, a `link_order' of type `bfd_indirect_link_order'
     584whose associated section belongs to a BFD of the same format as the
     585output BFD must be handled specially.  This type of `link_order'
     586describes part of an output section in terms of a section belonging to
     587one of the input files.  The `_bfd_final_link' function should read the
     588contents of the section and any associated relocs, apply the relocs to
     589the section contents, and write out the modified section contents.  If
     590performing a relocateable link, the relocs themselves must also be
     591modified and written out.
     592
     593   The functions `_bfd_relocate_contents' and
     594`_bfd_final_link_relocate' provide some general support for performing
     595the actual relocations, notably overflow checking.  Their arguments
     596include information about the symbol the relocation is against and a
     597`reloc_howto_type' argument which describes the relocation to perform.
     598These functions are defined in `reloc.c'.
     599
     600   The a.out function which handles reading, relocating, and writing
     601section contents is `aout_link_input_section'.  The actual relocation
     602is done in `aout_link_input_section_std' and
     603`aout_link_input_section_ext'.
     604
     605
     606File: bfd.info,  Node: Writing the symbol table,  Prev: Relocating the section contents,  Up: Performing the Final Link
     607
     608Writing the symbol table
     609........................
     610
     611   The `_bfd_final_link' function must gather all the symbols in the
     612input files and write them out.  It must also write out all the symbols
     613in the global hash table.  This must be controlled by the `strip' and
     614`discard' fields of the `bfd_link_info' structure.
     615
     616   The local symbols of the input files will not have been entered into
     617the linker hash table.  The `_bfd_final_link' routine must consider
     618each input file and include the symbols in the output file.  It may be
     619convenient to do this when looking through the `link_order' structures,
     620or it may be done by stepping through the `input_bfds' list.
     621
     622   The `_bfd_final_link' routine must also traverse the global hash
     623table to gather all the externally visible symbols.  It is possible
     624that most of the externally visible symbols may be written out when
     625considering the symbols of each input file, but it is still necessary
     626to traverse the hash table since the linker script may have defined
     627some symbols that are not in any of the input files.
     628
     629   The `strip' field of the `bfd_link_info' structure controls which
     630symbols are written out.  The possible values are listed in
     631`bfdlink.h'.  If the value is `strip_some', then the `keep_hash' field
     632of the `bfd_link_info' structure is a hash table of symbols to keep;
     633each symbol should be looked up in this hash table, and only symbols
     634which are present should be included in the output file.
     635
     636   If the `strip' field of the `bfd_link_info' structure permits local
     637symbols to be written out, the `discard' field is used to further
     638controls which local symbols are included in the output file.  If the
     639value is `discard_l', then all local symbols which begin with a certain
     640prefix are discarded; this is controlled by the
     641`bfd_is_local_label_name' entry point.
     642
     643   The a.out backend handles symbols by calling
     644`aout_link_write_symbols' on each input BFD and then traversing the
     645global hash table with the function `aout_link_write_other_symbol'.  It
     646builds a string table while writing out the symbols, which is written
     647to the output file at the end of `NAME(aout,final_link)'.
     648
     649`bfd_link_split_section'
     650........................
     651
     652   *Synopsis*
     653     bfd_boolean bfd_link_split_section(bfd *abfd, asection *sec);
     654   *Description*
     655Return nonzero if SEC should be split during a reloceatable or final
     656link.
     657     #define bfd_link_split_section(abfd, sec) \
     658            BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
     659
     660
     661File: bfd.info,  Node: Hash Tables,  Prev: Linker Functions,  Up: BFD front end
     662
     663Hash Tables
     664===========
     665
     666   BFD provides a simple set of hash table functions.  Routines are
     667provided to initialize a hash table, to free a hash table, to look up a
     668string in a hash table and optionally create an entry for it, and to
     669traverse a hash table.  There is currently no routine to delete an
     670string from a hash table.
     671
     672   The basic hash table does not permit any data to be stored with a
     673string.  However, a hash table is designed to present a base class from
     674which other types of hash tables may be derived.  These derived types
     675may store additional information with the string.  Hash tables were
     676implemented in this way, rather than simply providing a data pointer in
     677a hash table entry, because they were designed for use by the linker
     678back ends.  The linker may create thousands of hash table entries, and
     679the overhead of allocating private data and storing and following
     680pointers becomes noticeable.
     681
     682   The basic hash table code is in `hash.c'.
     683
     684* Menu:
     685
     686* Creating and Freeing a Hash Table::
     687* Looking Up or Entering a String::
     688* Traversing a Hash Table::
     689* Deriving a New Hash Table Type::
     690
     691
     692File: bfd.info,  Node: Creating and Freeing a Hash Table,  Next: Looking Up or Entering a String,  Prev: Hash Tables,  Up: Hash Tables
     693
     694Creating and freeing a hash table
     695---------------------------------
     696
     697   To create a hash table, create an instance of a `struct
     698bfd_hash_table' (defined in `bfd.h') and call `bfd_hash_table_init' (if
     699you know approximately how many entries you will need, the function
     700`bfd_hash_table_init_n', which takes a SIZE argument, may be used).
     701`bfd_hash_table_init' returns `FALSE' if some sort of error occurs.
     702
     703   The function `bfd_hash_table_init' take as an argument a function to
     704use to create new entries.  For a basic hash table, use the function
     705`bfd_hash_newfunc'.  *Note Deriving a New Hash Table Type::, for why
     706you would want to use a different value for this argument.
     707
     708   `bfd_hash_table_init' will create an objalloc which will be used to
     709allocate new entries.  You may allocate memory on this objalloc using
     710`bfd_hash_allocate'.
     711
     712   Use `bfd_hash_table_free' to free up all the memory that has been
     713allocated for a hash table.  This will not free up the `struct
     714bfd_hash_table' itself, which you must provide.
     715
     716
     717File: bfd.info,  Node: Looking Up or Entering a String,  Next: Traversing a Hash Table,  Prev: Creating and Freeing a Hash Table,  Up: Hash Tables
     718
     719Looking up or entering a string
     720-------------------------------
     721
     722   The function `bfd_hash_lookup' is used both to look up a string in
     723the hash table and to create a new entry.
     724
     725   If the CREATE argument is `FALSE', `bfd_hash_lookup' will look up a
     726string.  If the string is found, it will returns a pointer to a `struct
     727bfd_hash_entry'.  If the string is not found in the table
     728`bfd_hash_lookup' will return `NULL'.  You should not modify any of the
     729fields in the returns `struct bfd_hash_entry'.
     730
     731   If the CREATE argument is `TRUE', the string will be entered into
     732the hash table if it is not already there.  Either way a pointer to a
     733`struct bfd_hash_entry' will be returned, either to the existing
     734structure or to a newly created one.  In this case, a `NULL' return
     735means that an error occurred.
     736
     737   If the CREATE argument is `TRUE', and a new entry is created, the
     738COPY argument is used to decide whether to copy the string onto the
     739hash table objalloc or not.  If COPY is passed as `FALSE', you must be
     740careful not to deallocate or modify the string as long as the hash table
     741exists.
     742
     743
     744File: bfd.info,  Node: Traversing a Hash Table,  Next: Deriving a New Hash Table Type,  Prev: Looking Up or Entering a String,  Up: Hash Tables
     745
     746Traversing a hash table
     747-----------------------
     748
     749   The function `bfd_hash_traverse' may be used to traverse a hash
     750table, calling a function on each element.  The traversal is done in a
     751random order.
     752
     753   `bfd_hash_traverse' takes as arguments a function and a generic
     754`void *' pointer.  The function is called with a hash table entry (a
     755`struct bfd_hash_entry *') and the generic pointer passed to
     756`bfd_hash_traverse'.  The function must return a `boolean' value, which
     757indicates whether to continue traversing the hash table.  If the
     758function returns `FALSE', `bfd_hash_traverse' will stop the traversal
     759and return immediately.
     760
     761
     762File: bfd.info,  Node: Deriving a New Hash Table Type,  Prev: Traversing a Hash Table,  Up: Hash Tables
     763
     764Deriving a new hash table type
     765------------------------------
     766
     767   Many uses of hash tables want to store additional information which
     768each entry in the hash table.  Some also find it convenient to store
     769additional information with the hash table itself.  This may be done
     770using a derived hash table.
     771
     772   Since C is not an object oriented language, creating a derived hash
     773table requires sticking together some boilerplate routines with a few
     774differences specific to the type of hash table you want to create.
     775
     776   An example of a derived hash table is the linker hash table.  The
     777structures for this are defined in `bfdlink.h'.  The functions are in
     778`linker.c'.
     779
     780   You may also derive a hash table from an already derived hash table.
     781For example, the a.out linker backend code uses a hash table derived
     782from the linker hash table.
     783
     784* Menu:
     785
     786* Define the Derived Structures::
     787* Write the Derived Creation Routine::
     788* Write Other Derived Routines::
     789
     790
     791File: 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
     792
     793Define the derived structures
     794.............................
     795
     796   You must define a structure for an entry in the hash table, and a
     797structure for the hash table itself.
     798
     799   The first field in the structure for an entry in the hash table must
     800be of the type used for an entry in the hash table you are deriving
     801from.  If you are deriving from a basic hash table this is `struct
     802bfd_hash_entry', which is defined in `bfd.h'.  The first field in the
     803structure for the hash table itself must be of the type of the hash
     804table you are deriving from itself.  If you are deriving from a basic
     805hash table, this is `struct bfd_hash_table'.
     806
     807   For example, the linker hash table defines `struct
     808bfd_link_hash_entry' (in `bfdlink.h').  The first field, `root', is of
     809type `struct bfd_hash_entry'.  Similarly, the first field in `struct
     810bfd_link_hash_table', `table', is of type `struct bfd_hash_table'.
     811
     812
     813File: 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
     814
     815Write the derived creation routine
     816..................................
     817
     818   You must write a routine which will create and initialize an entry
     819in the hash table.  This routine is passed as the function argument to
     820`bfd_hash_table_init'.
     821
     822   In order to permit other hash tables to be derived from the hash
     823table you are creating, this routine must be written in a standard way.
     824
     825   The first argument to the creation routine is a pointer to a hash
     826table entry.  This may be `NULL', in which case the routine should
     827allocate the right amount of space.  Otherwise the space has already
     828been allocated by a hash table type derived from this one.
     829
     830   After allocating space, the creation routine must call the creation
     831routine of the hash table type it is derived from, passing in a pointer
     832to the space it just allocated.  This will initialize any fields used
     833by the base hash table.
     834
     835   Finally the creation routine must initialize any local fields for
     836the new hash table type.
     837
     838   Here is a boilerplate example of a creation routine.  FUNCTION_NAME
     839is the name of the routine.  ENTRY_TYPE is the type of an entry in the
     840hash table you are creating.  BASE_NEWFUNC is the name of the creation
     841routine of the hash table type your hash table is derived from.
     842
     843     struct bfd_hash_entry *
     844     FUNCTION_NAME (entry, table, string)
     845          struct bfd_hash_entry *entry;
     846          struct bfd_hash_table *table;
     847          const char *string;
    213848     {
    214      
    215             /* Remembers the offset from the first symbol in the file for
    216                this symbol. Generated by coff_renumber_symbols. */
    217      unsigned int offset;
    218      
    219             /* Should the value of this symbol be renumbered.  Used for
    220                XCOFF C_BSTAT symbols.  Set by coff_slurp_symbol_table.  */
    221      unsigned int fix_value : 1;
    222      
    223             /* Should the tag field of this symbol be renumbered.
    224                Created by coff_pointerize_aux. */
    225      unsigned int fix_tag : 1;
    226      
    227             /* Should the endidx field of this symbol be renumbered.
    228                Created by coff_pointerize_aux. */
    229      unsigned int fix_end : 1;
    230      
    231             /* Should the x_csect.x_scnlen field be renumbered.
    232                Created by coff_pointerize_aux. */
    233      unsigned int fix_scnlen : 1;
    234      
    235             /* Fix up an XCOFF C_BINCL/C_EINCL symbol.  The value is the
    236                index into the line number entries.  Set by
    237                coff_slurp_symbol_table.  */
    238      unsigned int fix_line : 1;
    239      
    240             /* The container for the symbol structure as read and translated
    241                 from the file. */
    242      
    243      union {
    244         union internal_auxent auxent;
    245         struct internal_syment syment;
    246       } u;
    247      } combined_entry_type;
    248      
    249      
    250      /* Each canonical asymbol really looks like this: */
    251      
    252      typedef struct coff_symbol_struct
    253      {
    254         /* The actual symbol which the rest of BFD works with */
    255      asymbol symbol;
    256      
    257         /* A pointer to the hidden information for this symbol */
    258      combined_entry_type *native;
    259      
    260         /* A pointer to the linenumber information for this symbol */
    261      struct lineno_cache_entry *lineno;
    262      
    263         /* Have the line numbers been relocated yet ? */
    264      boolean done_lineno;
    265      } coff_symbol_type;
    266 
    267 `bfd_coff_backend_data'
    268 .......................
    269 
    270      /* COFF symbol classifications.  */
    271      
    272      enum coff_symbol_classification
    273      {
    274        /* Global symbol.  */
    275        COFF_SYMBOL_GLOBAL,
    276        /* Common symbol.  */
    277        COFF_SYMBOL_COMMON,
    278        /* Undefined symbol.  */
    279        COFF_SYMBOL_UNDEFINED,
    280        /* Local symbol.  */
    281        COFF_SYMBOL_LOCAL,
    282        /* PE section symbol.  */
    283        COFF_SYMBOL_PE_SECTION
    284      };
    285    Special entry points for gdb to swap in coff symbol table parts:
    286      typedef struct
    287      {
    288        void (*_bfd_coff_swap_aux_in) PARAMS ((
    289             bfd            *abfd,
    290             PTR             ext,
    291             int             type,
    292             int             class,
    293             int             indaux,
    294             int             numaux,
    295             PTR             in));
    296      
    297        void (*_bfd_coff_swap_sym_in) PARAMS ((
    298             bfd            *abfd ,
    299             PTR             ext,
    300             PTR             in));
    301      
    302        void (*_bfd_coff_swap_lineno_in) PARAMS ((
    303             bfd            *abfd,
    304             PTR            ext,
    305             PTR             in));
    306    Special entry points for gas to swap out coff parts:
    307       unsigned int (*_bfd_coff_swap_aux_out) PARAMS ((
    308             bfd     *abfd,
    309             PTR     in,
    310             int     type,
    311             int     class,
    312             int     indaux,
    313             int     numaux,
    314             PTR     ext));
    315      
    316       unsigned int (*_bfd_coff_swap_sym_out) PARAMS ((
    317            bfd      *abfd,
    318            PTR      in,
    319            PTR      ext));
    320      
    321       unsigned int (*_bfd_coff_swap_lineno_out) PARAMS ((
    322             bfd     *abfd,
    323             PTR     in,
    324             PTR     ext));
    325      
    326       unsigned int (*_bfd_coff_swap_reloc_out) PARAMS ((
    327             bfd     *abfd,
    328             PTR     src,
    329             PTR     dst));
    330      
    331       unsigned int (*_bfd_coff_swap_filehdr_out) PARAMS ((
    332             bfd     *abfd,
    333             PTR     in,
    334             PTR     out));
    335      
    336       unsigned int (*_bfd_coff_swap_aouthdr_out) PARAMS ((
    337             bfd     *abfd,
    338             PTR     in,
    339             PTR     out));
    340      
    341       unsigned int (*_bfd_coff_swap_scnhdr_out) PARAMS ((
    342             bfd     *abfd,
    343             PTR     in,
    344             PTR     out));
    345    Special entry points for generic COFF routines to call target
    346 dependent COFF routines:
    347       unsigned int _bfd_filhsz;
    348       unsigned int _bfd_aoutsz;
    349       unsigned int _bfd_scnhsz;
    350       unsigned int _bfd_symesz;
    351       unsigned int _bfd_auxesz;
    352       unsigned int _bfd_relsz;
    353       unsigned int _bfd_linesz;
    354       unsigned int _bfd_filnmlen;
    355       boolean _bfd_coff_long_filenames;
    356       boolean _bfd_coff_long_section_names;
    357       unsigned int _bfd_coff_default_section_alignment_power;
    358       boolean _bfd_coff_force_symnames_in_strings;
    359       unsigned int _bfd_coff_debug_string_prefix_length;
    360       void (*_bfd_coff_swap_filehdr_in) PARAMS ((
    361             bfd     *abfd,
    362             PTR     ext,
    363             PTR     in));
    364       void (*_bfd_coff_swap_aouthdr_in) PARAMS ((
    365             bfd     *abfd,
    366             PTR     ext,
    367             PTR     in));
    368       void (*_bfd_coff_swap_scnhdr_in) PARAMS ((
    369             bfd     *abfd,
    370             PTR     ext,
    371             PTR     in));
    372       void (*_bfd_coff_swap_reloc_in) PARAMS ((
    373             bfd     *abfd,
    374             PTR     ext,
    375             PTR     in));
    376       boolean (*_bfd_coff_bad_format_hook) PARAMS ((
    377             bfd     *abfd,
    378             PTR     internal_filehdr));
    379       boolean (*_bfd_coff_set_arch_mach_hook) PARAMS ((
    380             bfd     *abfd,
    381             PTR     internal_filehdr));
    382       PTR (*_bfd_coff_mkobject_hook) PARAMS ((
    383             bfd     *abfd,
    384             PTR     internal_filehdr,
    385             PTR     internal_aouthdr));
    386       flagword (*_bfd_styp_to_sec_flags_hook) PARAMS ((
    387             bfd     *abfd,
    388             PTR     internal_scnhdr,
    389             const char *name,
    390             asection *section));
    391       void (*_bfd_set_alignment_hook) PARAMS ((
    392             bfd     *abfd,
    393             asection *sec,
    394             PTR     internal_scnhdr));
    395       boolean (*_bfd_coff_slurp_symbol_table) PARAMS ((
    396             bfd     *abfd));
    397       boolean (*_bfd_coff_symname_in_debug) PARAMS ((
    398             bfd     *abfd,
    399             struct internal_syment *sym));
    400       boolean (*_bfd_coff_pointerize_aux_hook) PARAMS ((
    401             bfd *abfd,
    402             combined_entry_type *table_base,
    403             combined_entry_type *symbol,
    404             unsigned int indaux,
    405             combined_entry_type *aux));
    406       boolean (*_bfd_coff_print_aux) PARAMS ((
    407             bfd *abfd,
    408             FILE *file,
    409             combined_entry_type *table_base,
    410             combined_entry_type *symbol,
    411             combined_entry_type *aux,
    412             unsigned int indaux));
    413       void (*_bfd_coff_reloc16_extra_cases) PARAMS ((
    414             bfd     *abfd,
    415             struct bfd_link_info *link_info,
    416             struct bfd_link_order *link_order,
    417             arelent *reloc,
    418             bfd_byte *data,
    419             unsigned int *src_ptr,
    420             unsigned int *dst_ptr));
    421       int (*_bfd_coff_reloc16_estimate) PARAMS ((
    422             bfd *abfd,
    423             asection *input_section,
    424             arelent *r,
    425             unsigned int shrink,
    426             struct bfd_link_info *link_info));
    427       enum coff_symbol_classification (*_bfd_coff_classify_symbol) PARAMS ((
    428             bfd *abfd,
    429             struct internal_syment *));
    430       boolean (*_bfd_coff_compute_section_file_positions) PARAMS ((
    431             bfd *abfd));
    432       boolean (*_bfd_coff_start_final_link) PARAMS ((
    433             bfd *output_bfd,
    434             struct bfd_link_info *info));
    435       boolean (*_bfd_coff_relocate_section) PARAMS ((
    436             bfd *output_bfd,
    437             struct bfd_link_info *info,
    438             bfd *input_bfd,
    439             asection *input_section,
    440             bfd_byte *contents,
    441             struct internal_reloc *relocs,
    442             struct internal_syment *syms,
    443             asection **sections));
    444       reloc_howto_type *(*_bfd_coff_rtype_to_howto) PARAMS ((
    445             bfd *abfd,
    446             asection *sec,
    447             struct internal_reloc *rel,
    448             struct coff_link_hash_entry *h,
    449             struct internal_syment *sym,
    450             bfd_vma *addendp));
    451       boolean (*_bfd_coff_adjust_symndx) PARAMS ((
    452             bfd *obfd,
    453             struct bfd_link_info *info,
    454             bfd *ibfd,
    455             asection *sec,
    456             struct internal_reloc *reloc,
    457             boolean *adjustedp));
    458       boolean (*_bfd_coff_link_add_one_symbol) PARAMS ((
    459             struct bfd_link_info *info,
    460             bfd *abfd,
    461             const char *name,
    462             flagword flags,
    463             asection *section,
    464             bfd_vma value,
    465             const char *string,
    466             boolean copy,
    467             boolean collect,
    468             struct bfd_link_hash_entry **hashp));
    469      
    470       boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
    471             bfd * abfd,
    472             struct coff_final_link_info * pfinfo));
    473       boolean (*_bfd_coff_final_link_postscript) PARAMS ((
    474             bfd * abfd,
    475             struct coff_final_link_info * pfinfo));
    476      
    477      } bfd_coff_backend_data;
    478      
    479      #define coff_backend_info(abfd) ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
    480      
    481      #define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \
    482              ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
    483      
    484      #define bfd_coff_swap_sym_in(a,e,i) \
    485              ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
    486      
    487      #define bfd_coff_swap_lineno_in(a,e,i) \
    488              ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
    489      
    490      #define bfd_coff_swap_reloc_out(abfd, i, o) \
    491              ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
    492      
    493      #define bfd_coff_swap_lineno_out(abfd, i, o) \
    494              ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
    495      
    496      #define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \
    497              ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
    498      
    499      #define bfd_coff_swap_sym_out(abfd, i,o) \
    500              ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
    501      
    502      #define bfd_coff_swap_scnhdr_out(abfd, i,o) \
    503              ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
    504      
    505      #define bfd_coff_swap_filehdr_out(abfd, i,o) \
    506              ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
    507      
    508      #define bfd_coff_swap_aouthdr_out(abfd, i,o) \
    509              ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
    510      
    511      #define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz)
    512      #define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz)
    513      #define bfd_coff_scnhsz(abfd) (coff_backend_info (abfd)->_bfd_scnhsz)
    514      #define bfd_coff_symesz(abfd) (coff_backend_info (abfd)->_bfd_symesz)
    515      #define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz)
    516      #define bfd_coff_relsz(abfd)  (coff_backend_info (abfd)->_bfd_relsz)
    517      #define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz)
    518      #define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen)
    519      #define bfd_coff_long_filenames(abfd) (coff_backend_info (abfd)->_bfd_coff_long_filenames)
    520      #define bfd_coff_long_section_names(abfd) \
    521              (coff_backend_info (abfd)->_bfd_coff_long_section_names)
    522      #define bfd_coff_default_section_alignment_power(abfd) \
    523              (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
    524      #define bfd_coff_swap_filehdr_in(abfd, i,o) \
    525              ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
    526      
    527      #define bfd_coff_swap_aouthdr_in(abfd, i,o) \
    528              ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
    529      
    530      #define bfd_coff_swap_scnhdr_in(abfd, i,o) \
    531              ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
    532      
    533      #define bfd_coff_swap_reloc_in(abfd, i, o) \
    534              ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
    535      
    536      #define bfd_coff_bad_format_hook(abfd, filehdr) \
    537              ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
    538      
    539      #define bfd_coff_set_arch_mach_hook(abfd, filehdr)\
    540              ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
    541      #define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\
    542              ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook) (abfd, filehdr, aouthdr))
    543      
    544      #define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section)\
    545              ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
    546               (abfd, scnhdr, name, section))
    547      
    548      #define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\
    549              ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
    550      
    551      #define bfd_coff_slurp_symbol_table(abfd)\
    552              ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
    553      
    554      #define bfd_coff_symname_in_debug(abfd, sym)\
    555              ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
    556      
    557      #define bfd_coff_force_symnames_in_strings(abfd)\
    558             (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
    559      
    560      #define bfd_coff_debug_string_prefix_length(abfd)\
    561             (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
    562      
    563      #define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\
    564              ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
    565               (abfd, file, base, symbol, aux, indaux))
    566      
    567      #define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)\
    568              ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
    569               (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
    570      
    571      #define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\
    572              ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
    573               (abfd, section, reloc, shrink, link_info))
    574      
    575      #define bfd_coff_classify_symbol(abfd, sym)\
    576              ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
    577               (abfd, sym))
    578      
    579      #define bfd_coff_compute_section_file_positions(abfd)\
    580              ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
    581               (abfd))
    582      
    583      #define bfd_coff_start_final_link(obfd, info)\
    584              ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
    585               (obfd, info))
    586      #define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\
    587              ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
    588               (obfd, info, ibfd, o, con, rel, isyms, secs))
    589      #define bfd_coff_rtype_to_howto(abfd, sec, rel, h, sym, addendp)\
    590              ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
    591               (abfd, sec, rel, h, sym, addendp))
    592      #define bfd_coff_adjust_symndx(obfd, info, ibfd, sec, rel, adjustedp)\
    593              ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
    594               (obfd, info, ibfd, sec, rel, adjustedp))
    595      #define bfd_coff_link_add_one_symbol(info,abfd,name,flags,section,value,string,cp,coll,hashp)\
    596              ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
    597               (info, abfd, name, flags, section, value, string, cp, coll, hashp))
    598      
    599      #define bfd_coff_link_output_has_begun(a,p) \
    600              ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a,p))
    601      #define bfd_coff_final_link_postscript(a,p) \
    602              ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
    603 
    604 Writing relocations
    605 ...................
    606 
    607    To write relocations, the back end steps though the canonical
    608 relocation table and create an `internal_reloc'. The symbol index to
    609 use is removed from the `offset' field in the symbol table supplied.
    610 The address comes directly from the sum of the section base address and
    611 the relocation offset; the type is dug directly from the howto field.
    612 Then the `internal_reloc' is swapped into the shape of an
    613 `external_reloc' and written out to disk.
    614 
    615 Reading linenumbers
    616 ...................
    617 
    618    Creating the linenumber table is done by reading in the entire coff
    619 linenumber table, and creating another table for internal use.
    620 
    621    A coff linenumber table is structured so that each function is
    622 marked as having a line number of 0. Each line within the function is
    623 an offset from the first line in the function. The base of the line
    624 number information for the table is stored in the symbol associated
    625 with the function.
    626 
    627    Note: The PE format uses line number 0 for a flag indicating a new
    628 source file.
    629 
    630    The information is copied from the external to the internal table,
    631 and each symbol which marks a function is marked by pointing its...
    632 
    633    How does this work ?
    634 
    635 Reading relocations
    636 ...................
    637 
    638    Coff relocations are easily transformed into the internal BFD form
    639 (`arelent').
    640 
    641    Reading a coff relocation table is done in the following stages:
    642 
    643    * Read the entire coff relocation table into memory.
    644 
    645    * Process each relocation in turn; first swap it from the external
    646      to the internal form.
    647 
    648    * Turn the symbol referenced in the relocation's symbol index into a
    649      pointer into the canonical symbol table.  This table is the same
    650      as the one returned by a call to `bfd_canonicalize_symtab'. The
    651      back end will call that routine and save the result if a
    652      canonicalization hasn't been done.
    653 
    654    * The reloc index is turned into a pointer to a howto structure, in
    655      a back end specific way. For instance, the 386 and 960 use the
    656      `r_type' to directly produce an index into a howto table vector;
    657      the 88k subtracts a number from the `r_type' field and creates an
    658      addend field.
    659 
    660 
    661 File: bfd.info,  Node: elf,  Prev: coff,  Up: BFD back ends
    662 
    663 ELF backends
    664 ============
    665 
    666    BFD support for ELF formats is being worked on.  Currently, the best
    667 supported back ends are for sparc and i386 (running svr4 or Solaris 2).
    668 
    669    Documentation of the internals of the support code still needs to be
    670 written.  The code is changing quickly enough that we haven't bothered
    671 yet.
    672 
    673 `bfd_elf_find_section'
    674 ......................
    675 
    676    *Synopsis*
    677      struct elf_internal_shdr *bfd_elf_find_section (bfd *abfd, char *name);
    678    *Description*
    679 Helper functions for GDB to locate the string tables.  Since BFD hides
    680 string tables from callers, GDB needs to use an internal hook to find
    681 them.  Sun's .stabstr, in particular, isn't even pointed to by the
    682 .stab section, so ordinary mechanisms wouldn't work to find it, even if
    683 we had some.
    684 
    685 
    686 File: bfd.info,  Node: GNU Free Documentation License,  Next: Index,  Prev: BFD back ends,  Up: Top
    687 
    688 GNU Free Documentation License
    689 ******************************
    690 
    691    GNU Free Documentation License
    692 
    693    Version 1.1, March 2000
    694 
    695    Copyright (C) 2000  Free Software Foundation, Inc.    59 Temple
    696 Place, Suite 330, Boston, MA  02111-1307  USA
    697 
    698    Everyone is permitted to copy and distribute verbatim copies  of
    699 this license document, but changing it is not allowed.
    700 
    701    0. PREAMBLE
    702 
    703    The purpose of this License is to make a manual, textbook, or other
    704 written document "free" in the sense of freedom: to assure everyone the
    705 effective freedom to copy and redistribute it, with or without
    706 modifying it, either commercially or noncommercially.  Secondarily,
    707 this License preserves for the author and publisher a way to get credit
    708 for their work, while not being considered responsible for
    709 modifications made by others.
    710 
    711    This License is a kind of "copyleft", which means that derivative
    712 works of the document must themselves be free in the same sense.  It
    713 complements the GNU General Public License, which is a copyleft license
    714 designed for free software.
    715 
    716    We have designed this License in order to use it for manuals for free
    717 software, because free software needs free documentation: a free
    718 program should come with manuals providing the same freedoms that the
    719 software does.  But this License is not limited to software manuals; it
    720 can be used for any textual work, regardless of subject matter or
    721 whether it is published as a printed book.  We recommend this License
    722 principally for works whose purpose is instruction or reference.
    723 
    724    1. APPLICABILITY AND DEFINITIONS
    725 
    726    This License applies to any manual or other work that contains a
    727 notice placed by the copyright holder saying it can be distributed
    728 under the terms of this License.  The "Document", below, refers to any
    729 such manual or work.  Any member of the public is a licensee, and is
    730 addressed as "you".
    731 
    732    A "Modified Version" of the Document means any work containing the
    733 Document or a portion of it, either copied verbatim, or with
    734 modifications and/or translated into another language.
    735 
    736    A "Secondary Section" is a named appendix or a front-matter section
    737 of the Document that deals exclusively with the relationship of the
    738 publishers or authors of the Document to the Document's overall subject
    739 (or to related matters) and contains nothing that could fall directly
    740 within that overall subject.  (For example, if the Document is in part a
    741 textbook of mathematics, a Secondary Section may not explain any
    742 mathematics.)  The relationship could be a matter of historical
    743 connection with the subject or with related matters, or of legal,
    744 commercial, philosophical, ethical or political position regarding them.
    745 
    746    The "Invariant Sections" are certain Secondary Sections whose titles
    747 are designated, as being those of Invariant Sections, in the notice
    748 that says that the Document is released under this License.
    749 
    750    The "Cover Texts" are certain short passages of text that are listed,
    751 as Front-Cover Texts or Back-Cover Texts, in the notice that says that
    752 the Document is released under this License.
    753 
    754    A "Transparent" copy of the Document means a machine-readable copy,
    755 represented in a format whose specification is available to the general
    756 public, whose contents can be viewed and edited directly and
    757 straightforwardly with generic text editors or (for images composed of
    758 pixels) generic paint programs or (for drawings) some widely available
    759 drawing editor, and that is suitable for input to text formatters or
    760 for automatic translation to a variety of formats suitable for input to
    761 text formatters.  A copy made in an otherwise Transparent file format
    762 whose markup has been designed to thwart or discourage subsequent
    763 modification by readers is not Transparent.  A copy that is not
    764 "Transparent" is called "Opaque".
    765 
    766    Examples of suitable formats for Transparent copies include plain
    767 ASCII without markup, Texinfo input format, LaTeX input format, SGML or
    768 XML using a publicly available DTD, and standard-conforming simple HTML
    769 designed for human modification.  Opaque formats include PostScript,
    770 PDF, proprietary formats that can be read and edited only by
    771 proprietary word processors, SGML or XML for which the DTD and/or
    772 processing tools are not generally available, and the machine-generated
    773 HTML produced by some word processors for output purposes only.
    774 
    775    The "Title Page" means, for a printed book, the title page itself,
    776 plus such following pages as are needed to hold, legibly, the material
    777 this License requires to appear in the title page.  For works in
    778 formats which do not have any title page as such, "Title Page" means
    779 the text near the most prominent appearance of the work's title,
    780 preceding the beginning of the body of the text.
    781 
    782    2. VERBATIM COPYING
    783 
    784    You may copy and distribute the Document in any medium, either
    785 commercially or noncommercially, provided that this License, the
    786 copyright notices, and the license notice saying this License applies
    787 to the Document are reproduced in all copies, and that you add no other
    788 conditions whatsoever to those of this License.  You may not use
    789 technical measures to obstruct or control the reading or further
    790 copying of the copies you make or distribute.  However, you may accept
    791 compensation in exchange for copies.  If you distribute a large enough
    792 number of copies you must also follow the conditions in section 3.
    793 
    794    You may also lend copies, under the same conditions stated above, and
    795 you may publicly display copies.
    796 
    797    3. COPYING IN QUANTITY
    798 
    799    If you publish printed copies of the Document numbering more than
    800 100, and the Document's license notice requires Cover Texts, you must
    801 enclose the copies in covers that carry, clearly and legibly, all these
    802 Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts
    803 on the back cover.  Both covers must also clearly and legibly identify
    804 you as the publisher of these copies.  The front cover must present the
    805 full title with all words of the title equally prominent and visible.
    806 You may add other material on the covers in addition.  Copying with
    807 changes limited to the covers, as long as they preserve the title of
    808 the Document and satisfy these conditions, can be treated as verbatim
    809 copying in other respects.
    810 
    811    If the required texts for either cover are too voluminous to fit
    812 legibly, you should put the first ones listed (as many as fit
    813 reasonably) on the actual cover, and continue the rest onto adjacent
    814 pages.
    815 
    816    If you publish or distribute Opaque copies of the Document numbering
    817 more than 100, you must either include a machine-readable Transparent
    818 copy along with each Opaque copy, or state in or with each Opaque copy
    819 a publicly-accessible computer-network location containing a complete
    820 Transparent copy of the Document, free of added material, which the
    821 general network-using public has access to download anonymously at no
    822 charge using public-standard network protocols.  If you use the latter
    823 option, you must take reasonably prudent steps, when you begin
    824 distribution of Opaque copies in quantity, to ensure that this
    825 Transparent copy will remain thus accessible at the stated location
    826 until at least one year after the last time you distribute an Opaque
    827 copy (directly or through your agents or retailers) of that edition to
    828 the public.
    829 
    830    It is requested, but not required, that you contact the authors of
    831 the Document well before redistributing any large number of copies, to
    832 give them a chance to provide you with an updated version of the
    833 Document.
    834 
    835    4. MODIFICATIONS
    836 
    837    You may copy and distribute a Modified Version of the Document under
    838 the conditions of sections 2 and 3 above, provided that you release the
    839 Modified Version under precisely this License, with the Modified
    840 Version filling the role of the Document, thus licensing distribution
    841 and modification of the Modified Version to whoever possesses a copy of
    842 it.  In addition, you must do these things in the Modified Version:
    843 
    844    A. Use in the Title Page (and on the covers, if any) a title distinct
    845   from that of the Document, and from those of previous versions
    846 (which should, if there were any, be listed in the History section
    847 of the Document).  You may use the same title as a previous version
    848 if the original publisher of that version gives permission.  B. List on
    849 the Title Page, as authors, one or more persons or entities
    850 responsible for authorship of the modifications in the Modified
    851 Version, together with at least five of the principal authors of the
    852 Document (all of its principal authors, if it has less than five).  C.
    853 State on the Title page the name of the publisher of the    Modified
    854 Version, as the publisher.  D. Preserve all the copyright notices of
    855 the Document.  E. Add an appropriate copyright notice for your
    856 modifications    adjacent to the other copyright notices.  F. Include,
    857 immediately after the copyright notices, a license notice    giving the
    858 public permission to use the Modified Version under the    terms of
    859 this License, in the form shown in the Addendum below.  G. Preserve in
    860 that license notice the full lists of Invariant Sections    and
    861 required Cover Texts given in the Document's license notice.  H.
    862 Include an unaltered copy of this License.  I. Preserve the section
    863 entitled "History", and its title, and add to    it an item stating at
    864 least the title, year, new authors, and    publisher of the Modified
    865 Version as given on the Title Page.  If    there is no section entitled
    866 "History" in the Document, create one    stating the title, year,
    867 authors, and publisher of the Document as    given on its Title Page,
    868 then add an item describing the Modified    Version as stated in the
    869 previous sentence.  J. Preserve the network location, if any, given in
    870 the Document for    public access to a Transparent copy of the
    871 Document, and likewise    the network locations given in the Document
    872 for previous versions    it was based on.  These may be placed in the
    873 "History" section.     You may omit a network location for a work that
    874 was published at    least four years before the Document itself, or if
    875 the original    publisher of the version it refers to gives permission.
    876 K. In any section entitled "Acknowledgements" or "Dedications",
    877 preserve the section's title, and preserve in the section all the
    878 substance and tone of each of the contributor acknowledgements
    879 and/or dedications given therein.  L. Preserve all the Invariant
    880 Sections of the Document,    unaltered in their text and in their
    881 titles.  Section numbers    or the equivalent are not considered part
    882 of the section titles.  M. Delete any section entitled "Endorsements".
    883 Such a section    may not be included in the Modified Version.  N. Do
    884 not retitle any existing section as "Endorsements"    or to conflict in
    885 title with any Invariant Section.
    886 
    887    If the Modified Version includes new front-matter sections or
    888 appendices that qualify as Secondary Sections and contain no material
    889 copied from the Document, you may at your option designate some or all
    890 of these sections as invariant.  To do this, add their titles to the
    891 list of Invariant Sections in the Modified Version's license notice.
    892 These titles must be distinct from any other section titles.
    893 
    894    You may add a section entitled "Endorsements", provided it contains
    895 nothing but endorsements of your Modified Version by various
    896 parties-for example, statements of peer review or that the text has
    897 been approved by an organization as the authoritative definition of a
    898 standard.
    899 
    900    You may add a passage of up to five words as a Front-Cover Text, and
    901 a passage of up to 25 words as a Back-Cover Text, to the end of the list
    902 of Cover Texts in the Modified Version.  Only one passage of
    903 Front-Cover Text and one of Back-Cover Text may be added by (or through
    904 arrangements made by) any one entity.  If the Document already includes
    905 a cover text for the same cover, previously added by you or by
    906 arrangement made by the same entity you are acting on behalf of, you
    907 may not add another; but you may replace the old one, on explicit
    908 permission from the previous publisher that added the old one.
    909 
    910    The author(s) and publisher(s) of the Document do not by this License
    911 give permission to use their names for publicity for or to assert or
    912 imply endorsement of any Modified Version.
    913 
    914    5. COMBINING DOCUMENTS
    915 
    916    You may combine the Document with other documents released under this
    917 License, under the terms defined in section 4 above for modified
    918 versions, provided that you include in the combination all of the
    919 Invariant Sections of all of the original documents, unmodified, and
    920 list them all as Invariant Sections of your combined work in its
    921 license notice.
    922 
    923    The combined work need only contain one copy of this License, and
    924 multiple identical Invariant Sections may be replaced with a single
    925 copy.  If there are multiple Invariant Sections with the same name but
    926 different contents, make the title of each such section unique by
    927 adding at the end of it, in parentheses, the name of the original
    928 author or publisher of that section if known, or else a unique number.
    929 Make the same adjustment to the section titles in the list of Invariant
    930 Sections in the license notice of the combined work.
    931 
    932    In the combination, you must combine any sections entitled "History"
    933 in the various original documents, forming one section entitled
    934 "History"; likewise combine any sections entitled "Acknowledgements",
    935 and any sections entitled "Dedications".  You must delete all sections
    936 entitled "Endorsements."
    937 
    938    6. COLLECTIONS OF DOCUMENTS
    939 
    940    You may make a collection consisting of the Document and other
    941 documents released under this License, and replace the individual
    942 copies of this License in the various documents with a single copy that
    943 is included in the collection, provided that you follow the rules of
    944 this License for verbatim copying of each of the documents in all other
    945 respects.
    946 
    947    You may extract a single document from such a collection, and
    948 distribute it individually under this License, provided you insert a
    949 copy of this License into the extracted document, and follow this
    950 License in all other respects regarding verbatim copying of that
    951 document.
    952 
    953    7. AGGREGATION WITH INDEPENDENT WORKS
    954 
    955    A compilation of the Document or its derivatives with other separate
    956 and independent documents or works, in or on a volume of a storage or
    957 distribution medium, does not as a whole count as a Modified Version of
    958 the Document, provided no compilation copyright is claimed for the
    959 compilation.  Such a compilation is called an "aggregate", and this
    960 License does not apply to the other self-contained works thus compiled
    961 with the Document, on account of their being thus compiled, if they are
    962 not themselves derivative works of the Document.
    963 
    964    If the Cover Text requirement of section 3 is applicable to these
    965 copies of the Document, then if the Document is less than one quarter
    966 of the entire aggregate, the Document's Cover Texts may be placed on
    967 covers that surround only the Document within the aggregate.  Otherwise
    968 they must appear on covers around the whole aggregate.
    969 
    970    8. TRANSLATION
    971 
    972    Translation is considered a kind of modification, so you may
    973 distribute translations of the Document under the terms of section 4.
    974 Replacing Invariant Sections with translations requires special
    975 permission from their copyright holders, but you may include
    976 translations of some or all Invariant Sections in addition to the
    977 original versions of these Invariant Sections.  You may include a
    978 translation of this License provided that you also include the original
    979 English version of this License.  In case of a disagreement between the
    980 translation and the original English version of this License, the
    981 original English version will prevail.
    982 
    983    9. TERMINATION
    984 
    985    You may not copy, modify, sublicense, or distribute the Document
    986 except as expressly provided for under this License.  Any other attempt
    987 to copy, modify, sublicense or distribute the Document is void, and will
    988 automatically terminate your rights under this License.  However,
    989 parties who have received copies, or rights, from you under this
    990 License will not have their licenses terminated so long as such parties
    991 remain in full compliance.
    992 
    993    10. FUTURE REVISIONS OF THIS LICENSE
    994 
    995    The Free Software Foundation may publish new, revised versions of
    996 the GNU Free Documentation License from time to time.  Such new
    997 versions will be similar in spirit to the present version, but may
    998 differ in detail to address new problems or concerns.  See
    999 http://www.gnu.org/copyleft/.
    1000 
    1001    Each version of the License is given a distinguishing version number.
    1002 If the Document specifies that a particular numbered version of this
    1003 License "or any later version" applies to it, you have the option of
    1004 following the terms and conditions either of that specified version or
    1005 of any later version that has been published (not as a draft) by the
    1006 Free Software Foundation.  If the Document does not specify a version
    1007 number of this License, you may choose any version ever published (not
    1008 as a draft) by the Free Software Foundation.
    1009 
    1010    ADDENDUM: How to use this License for your documents
    1011 
    1012    To use this License in a document you have written, include a copy of
    1013 the License in the document and put the following copyright and license
    1014 notices just after the title page:
    1015 
    1016          Copyright (c)  YEAR  YOUR NAME.
    1017          Permission is granted to copy, distribute and/or modify this document
    1018          under the terms of the GNU Free Documentation License, Version 1.1
    1019          or any later version published by the Free Software Foundation;
    1020          with the Invariant Sections being LIST THEIR TITLES, with the
    1021          Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
    1022          A copy of the license is included in the section entitled "GNU
    1023          Free Documentation License".
    1024 
    1025    If you have no Invariant Sections, write "with no Invariant Sections"
    1026 instead of saying which ones are invariant.  If you have no Front-Cover
    1027 Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
    1028 LIST"; likewise for Back-Cover Texts.
    1029 
    1030    If your document contains nontrivial examples of program code, we
    1031 recommend releasing these examples in parallel under your choice of
    1032 free software license, such as the GNU General Public License, to
    1033 permit their use in free software.
    1034 
     849       struct ENTRY_TYPE *ret = (ENTRY_TYPE *) entry;
     850     
     851      /* Allocate the structure if it has not already been allocated by a
     852         derived class.  */
     853       if (ret == (ENTRY_TYPE *) NULL)
     854         {
     855           ret = ((ENTRY_TYPE *)
     856                  bfd_hash_allocate (table, sizeof (ENTRY_TYPE)));
     857           if (ret == (ENTRY_TYPE *) NULL)
     858             return NULL;
     859         }
     860     
     861      /* Call the allocation method of the base class.  */
     862       ret = ((ENTRY_TYPE *)
     863             BASE_NEWFUNC ((struct bfd_hash_entry *) ret, table, string));
     864     
     865      /* Initialize the local fields here.  */
     866     
     867       return (struct bfd_hash_entry *) ret;
     868     }
     869   *Description*
     870The creation routine for the linker hash table, which is in `linker.c',
     871looks just like this example.  FUNCTION_NAME is
     872`_bfd_link_hash_newfunc'.  ENTRY_TYPE is `struct bfd_link_hash_entry'.
     873BASE_NEWFUNC is `bfd_hash_newfunc', the creation routine for a basic
     874hash table.
     875
     876   `_bfd_link_hash_newfunc' also initializes the local fields in a
     877linker hash table entry: `type', `written' and `next'.
     878
     879
     880File: bfd.info,  Node: Write Other Derived Routines,  Prev: Write the Derived Creation Routine,  Up: Deriving a New Hash Table Type
     881
     882Write other derived routines
     883............................
     884
     885   You will want to write other routines for your new hash table, as
     886well.
     887
     888   You will want an initialization routine which calls the
     889initialization routine of the hash table you are deriving from and
     890initializes any other local fields.  For the linker hash table, this is
     891`_bfd_link_hash_table_init' in `linker.c'.
     892
     893   You will want a lookup routine which calls the lookup routine of the
     894hash table you are deriving from and casts the result.  The linker hash
     895table uses `bfd_link_hash_lookup' in `linker.c' (this actually takes an
     896additional argument which it uses to decide how to return the looked up
     897value).
     898
     899   You may want a traversal routine.  This should just call the
     900traversal routine of the hash table you are deriving from with
     901appropriate casts.  The linker hash table uses `bfd_link_hash_traverse'
     902in `linker.c'.
     903
     904   These routines may simply be defined as macros.  For example, the
     905a.out backend linker hash table, which is derived from the linker hash
     906table, uses macros for the lookup and traversal routines.  These are
     907`aout_link_hash_lookup' and `aout_link_hash_traverse' in aoutx.h.
     908
     909
     910File: bfd.info,  Node: BFD back ends,  Next: GNU Free Documentation License,  Prev: BFD front end,  Up: Top
     911
     912BFD back ends
     913*************
     914
     915* Menu:
     916
     917* What to Put Where::
     918* aout ::       a.out backends
     919* coff ::       coff backends
     920* elf  ::       elf backends
     921* mmo  ::       mmo backend
     922
     923
     924File: bfd.info,  Node: What to Put Where,  Next: aout,  Prev: BFD back ends,  Up: BFD back ends
     925
     926   All of BFD lives in one directory.
     927
     928
     929File: bfd.info,  Node: aout,  Next: coff,  Prev: What to Put Where,  Up: BFD back ends
     930
     931a.out backends
     932==============
     933
     934   *Description*
     935BFD supports a number of different flavours of a.out format, though the
     936major differences are only the sizes of the structures on disk, and the
     937shape of the relocation information.
     938
     939   The support is split into a basic support file `aoutx.h' and other
     940files which derive functions from the base. One derivation file is
     941`aoutf1.h' (for a.out flavour 1), and adds to the basic a.out functions
     942support for sun3, sun4, 386 and 29k a.out files, to create a target
     943jump vector for a specific target.
     944
     945   This information is further split out into more specific files for
     946each machine, including `sunos.c' for sun3 and sun4, `newsos3.c' for
     947the Sony NEWS, and `demo64.c' for a demonstration of a 64 bit a.out
     948format.
     949
     950   The base file `aoutx.h' defines general mechanisms for reading and
     951writing records to and from disk and various other methods which BFD
     952requires. It is included by `aout32.c' and `aout64.c' to form the names
     953`aout_32_swap_exec_header_in', `aout_64_swap_exec_header_in', etc.
     954
     955   As an example, this is what goes on to make the back end for a sun4,
     956from `aout32.c':
     957
     958            #define ARCH_SIZE 32
     959            #include "aoutx.h"
     960
     961   Which exports names:
     962
     963            ...
     964            aout_32_canonicalize_reloc
     965            aout_32_find_nearest_line
     966            aout_32_get_lineno
     967            aout_32_get_reloc_upper_bound
     968            ...
     969
     970   from `sunos.c':
     971
     972            #define TARGET_NAME "a.out-sunos-big"
     973            #define VECNAME    sunos_big_vec
     974            #include "aoutf1.h"
     975
     976   requires all the names from `aout32.c', and produces the jump vector
     977
     978            sunos_big_vec
     979
     980   The file `host-aout.c' is a special case.  It is for a large set of
     981hosts that use "more or less standard" a.out files, and for which
     982cross-debugging is not interesting.  It uses the standard 32-bit a.out
     983support routines, but determines the file offsets and addresses of the
     984text, data, and BSS sections, the machine architecture and machine
     985type, and the entry point address, in a host-dependent manner.  Once
     986these values have been determined, generic code is used to handle the
     987object file.
     988
     989   When porting it to run on a new system, you must supply:
     990
     991             HOST_PAGE_SIZE
     992             HOST_SEGMENT_SIZE
     993             HOST_MACHINE_ARCH       (optional)
     994             HOST_MACHINE_MACHINE    (optional)
     995             HOST_TEXT_START_ADDR
     996             HOST_STACK_END_ADDR
     997
     998   in the file `../include/sys/h-XXX.h' (for your host).  These values,
     999plus the structures and macros defined in `a.out.h' on your host
     1000system, will produce a BFD target that will access ordinary a.out files
     1001on your host. To configure a new machine to use `host-aout.c', specify:
     1002
     1003            TDEFAULTS = -DDEFAULT_VECTOR=host_aout_big_vec
     1004            TDEPFILES= host-aout.o trad-core.o
     1005
     1006   in the `config/XXX.mt' file, and modify `configure.in' to use the
     1007`XXX.mt' file (by setting "`bfd_target=XXX'") when your configuration
     1008is selected.
     1009
     1010Relocations
     1011-----------
     1012
     1013   *Description*
     1014The file `aoutx.h' provides for both the _standard_ and _extended_
     1015forms of a.out relocation records.
     1016
     1017   The standard records contain only an address, a symbol index, and a
     1018type field. The extended records (used on 29ks and sparcs) also have a
     1019full integer for an addend.
     1020
     1021Internal entry points
     1022---------------------
     1023
     1024   *Description*
     1025`aoutx.h' exports several routines for accessing the contents of an
     1026a.out file, which are gathered and exported in turn by various format
     1027specific files (eg sunos.c).
     1028
     1029`aout_SIZE_swap_exec_header_in'
     1030...............................
     1031
     1032   *Synopsis*
     1033     void aout_SIZE_swap_exec_header_in,
     1034        (bfd *abfd,
     1035         struct external_exec *raw_bytes,
     1036         struct internal_exec *execp);
     1037   *Description*
     1038Swap the information in an executable header RAW_BYTES taken from a raw
     1039byte stream memory image into the internal exec header structure EXECP.
     1040
     1041`aout_SIZE_swap_exec_header_out'
     1042................................
     1043
     1044   *Synopsis*
     1045     void aout_SIZE_swap_exec_header_out
     1046        (bfd *abfd,
     1047         struct internal_exec *execp,
     1048         struct external_exec *raw_bytes);
     1049   *Description*
     1050Swap the information in an internal exec header structure EXECP into
     1051the buffer RAW_BYTES ready for writing to disk.
     1052
     1053`aout_SIZE_some_aout_object_p'
     1054..............................
     1055
     1056   *Synopsis*
     1057     const bfd_target *aout_SIZE_some_aout_object_p
     1058        (bfd *abfd,
     1059         const bfd_target *(*callback_to_real_object_p) ());
     1060   *Description*
     1061Some a.out variant thinks that the file open in ABFD checking is an
     1062a.out file.  Do some more checking, and set up for access if it really
     1063is.  Call back to the calling environment's "finish up" function just
     1064before returning, to handle any last-minute setup.
     1065
     1066`aout_SIZE_mkobject'
     1067....................
     1068
     1069   *Synopsis*
     1070     bfd_boolean aout_SIZE_mkobject, (bfd *abfd);
     1071   *Description*
     1072Initialize BFD ABFD for use with a.out files.
     1073
     1074`aout_SIZE_machine_type'
     1075........................
     1076
     1077   *Synopsis*
     1078     enum machine_type  aout_SIZE_machine_type
     1079        (enum bfd_architecture arch,
     1080         unsigned long machine));
     1081   *Description*
     1082Keep track of machine architecture and machine type for a.out's. Return
     1083the `machine_type' for a particular architecture and machine, or
     1084`M_UNKNOWN' if that exact architecture and machine can't be represented
     1085in a.out format.
     1086
     1087   If the architecture is understood, machine type 0 (default) is
     1088always understood.
     1089
     1090`aout_SIZE_set_arch_mach'
     1091.........................
     1092
     1093   *Synopsis*
     1094     bfd_boolean aout_SIZE_set_arch_mach,
     1095        (bfd *,
     1096         enum bfd_architecture arch,
     1097         unsigned long machine));
     1098   *Description*
     1099Set the architecture and the machine of the BFD ABFD to the values ARCH
     1100and MACHINE.  Verify that ABFD's format can support the architecture
     1101required.
     1102
     1103`aout_SIZE_new_section_hook'
     1104............................
     1105
     1106   *Synopsis*
     1107     bfd_boolean aout_SIZE_new_section_hook,
     1108        (bfd *abfd,
     1109         asection *newsect));
     1110   *Description*
     1111Called by the BFD in response to a `bfd_make_section' request.
     1112
  • branches/GNU/src/binutils/bfd/doc/bfd.info-7

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 This is bfd.info, produced by makeinfo version 4.0 from bfd.texinfo.
     1This is bfd.info, produced by makeinfo version 4.3 from bfd.texinfo.
    22
    33START-INFO-DIR-ENTRY
     
    77   This file documents the BFD library.
    88
    9    Copyright (C) 1991, 2000 Free Software Foundation, Inc.
     9   Copyright (C) 1991, 2000, 2001, 2003 Free Software Foundation, Inc.
    1010
    1111   Permission is granted to copy, distribute and/or modify this document
     
    1717
    1818
    19 File: bfd.info,  Node: Index,  Prev: GNU Free Documentation License,  Up: Top
    20 
    21 Index
    22 *****
     19File: bfd.info,  Node: coff,  Next: elf,  Prev: aout,  Up: BFD back ends
     20
     21coff backends
     22=============
     23
     24   BFD supports a number of different flavours of coff format.  The
     25major differences between formats are the sizes and alignments of
     26fields in structures on disk, and the occasional extra field.
     27
     28   Coff in all its varieties is implemented with a few common files and
     29a number of implementation specific files. For example, The 88k bcs
     30coff format is implemented in the file `coff-m88k.c'. This file
     31`#include's `coff/m88k.h' which defines the external structure of the
     32coff format for the 88k, and `coff/internal.h' which defines the
     33internal structure. `coff-m88k.c' also defines the relocations used by
     34the 88k format *Note Relocations::.
     35
     36   The Intel i960 processor version of coff is implemented in
     37`coff-i960.c'. This file has the same structure as `coff-m88k.c',
     38except that it includes `coff/i960.h' rather than `coff-m88k.h'.
     39
     40Porting to a new version of coff
     41--------------------------------
     42
     43   The recommended method is to select from the existing
     44implementations the version of coff which is most like the one you want
     45to use.  For example, we'll say that i386 coff is the one you select,
     46and that your coff flavour is called foo.  Copy `i386coff.c' to
     47`foocoff.c', copy `../include/coff/i386.h' to `../include/coff/foo.h',
     48and add the lines to `targets.c' and `Makefile.in' so that your new
     49back end is used. Alter the shapes of the structures in
     50`../include/coff/foo.h' so that they match what you need. You will
     51probably also have to add `#ifdef's to the code in `coff/internal.h' and
     52`coffcode.h' if your version of coff is too wild.
     53
     54   You can verify that your new BFD backend works quite simply by
     55building `objdump' from the `binutils' directory, and making sure that
     56its version of what's going on and your host system's idea (assuming it
     57has the pretty standard coff dump utility, usually called `att-dump' or
     58just `dump') are the same.  Then clean up your code, and send what
     59you've done to Cygnus. Then your stuff will be in the next release, and
     60you won't have to keep integrating it.
     61
     62How the coff backend works
     63--------------------------
     64
     65File layout
     66...........
     67
     68   The Coff backend is split into generic routines that are applicable
     69to any Coff target and routines that are specific to a particular
     70target.  The target-specific routines are further split into ones which
     71are basically the same for all Coff targets except that they use the
     72external symbol format or use different values for certain constants.
     73
     74   The generic routines are in `coffgen.c'.  These routines work for
     75any Coff target.  They use some hooks into the target specific code;
     76the hooks are in a `bfd_coff_backend_data' structure, one of which
     77exists for each target.
     78
     79   The essentially similar target-specific routines are in
     80`coffcode.h'.  This header file includes executable C code.  The
     81various Coff targets first include the appropriate Coff header file,
     82make any special defines that are needed, and then include `coffcode.h'.
     83
     84   Some of the Coff targets then also have additional routines in the
     85target source file itself.
     86
     87   For example, `coff-i960.c' includes `coff/internal.h' and
     88`coff/i960.h'.  It then defines a few constants, such as `I960', and
     89includes `coffcode.h'.  Since the i960 has complex relocation types,
     90`coff-i960.c' also includes some code to manipulate the i960 relocs.
     91This code is not in `coffcode.h' because it would not be used by any
     92other target.
     93
     94Bit twiddling
     95.............
     96
     97   Each flavour of coff supported in BFD has its own header file
     98describing the external layout of the structures. There is also an
     99internal description of the coff layout, in `coff/internal.h'. A major
     100function of the coff backend is swapping the bytes and twiddling the
     101bits to translate the external form of the structures into the normal
     102internal form. This is all performed in the `bfd_swap'_thing_direction
     103routines. Some elements are different sizes between different versions
     104of coff; it is the duty of the coff version specific include file to
     105override the definitions of various packing routines in `coffcode.h'.
     106E.g., the size of line number entry in coff is sometimes 16 bits, and
     107sometimes 32 bits. `#define'ing `PUT_LNSZ_LNNO' and `GET_LNSZ_LNNO'
     108will select the correct one. No doubt, some day someone will find a
     109version of coff which has a varying field size not catered to at the
     110moment. To port BFD, that person will have to add more `#defines'.
     111Three of the bit twiddling routines are exported to `gdb';
     112`coff_swap_aux_in', `coff_swap_sym_in' and `coff_swap_lineno_in'. `GDB'
     113reads the symbol table on its own, but uses BFD to fix things up.  More
     114of the bit twiddlers are exported for `gas'; `coff_swap_aux_out',
     115`coff_swap_sym_out', `coff_swap_lineno_out', `coff_swap_reloc_out',
     116`coff_swap_filehdr_out', `coff_swap_aouthdr_out',
     117`coff_swap_scnhdr_out'. `Gas' currently keeps track of all the symbol
     118table and reloc drudgery itself, thereby saving the internal BFD
     119overhead, but uses BFD to swap things on the way out, making cross
     120ports much safer.  Doing so also allows BFD (and thus the linker) to
     121use the same header files as `gas', which makes one avenue to disaster
     122disappear.
     123
     124Symbol reading
     125..............
     126
     127   The simple canonical form for symbols used by BFD is not rich enough
     128to keep all the information available in a coff symbol table. The back
     129end gets around this problem by keeping the original symbol table
     130around, "behind the scenes".
     131
     132   When a symbol table is requested (through a call to
     133`bfd_canonicalize_symtab'), a request gets through to
     134`coff_get_normalized_symtab'. This reads the symbol table from the coff
     135file and swaps all the structures inside into the internal form. It
     136also fixes up all the pointers in the table (represented in the file by
     137offsets from the first symbol in the table) into physical pointers to
     138elements in the new internal table. This involves some work since the
     139meanings of fields change depending upon context: a field that is a
     140pointer to another structure in the symbol table at one moment may be
     141the size in bytes of a structure at the next.  Another pass is made
     142over the table. All symbols which mark file names (`C_FILE' symbols)
     143are modified so that the internal string points to the value in the
     144auxent (the real filename) rather than the normal text associated with
     145the symbol (`".file"').
     146
     147   At this time the symbol names are moved around. Coff stores all
     148symbols less than nine characters long physically within the symbol
     149table; longer strings are kept at the end of the file in the string
     150table. This pass moves all strings into memory and replaces them with
     151pointers to the strings.
     152
     153   The symbol table is massaged once again, this time to create the
     154canonical table used by the BFD application. Each symbol is inspected
     155in turn, and a decision made (using the `sclass' field) about the
     156various flags to set in the `asymbol'.  *Note Symbols::. The generated
     157canonical table shares strings with the hidden internal symbol table.
     158
     159   Any linenumbers are read from the coff file too, and attached to the
     160symbols which own the functions the linenumbers belong to.
     161
     162Symbol writing
     163..............
     164
     165   Writing a symbol to a coff file which didn't come from a coff file
     166will lose any debugging information. The `asymbol' structure remembers
     167the BFD from which the symbol was taken, and on output the back end
     168makes sure that the same destination target as source target is present.
     169
     170   When the symbols have come from a coff file then all the debugging
     171information is preserved.
     172
     173   Symbol tables are provided for writing to the back end in a vector
     174of pointers to pointers. This allows applications like the linker to
     175accumulate and output large symbol tables without having to do too much
     176byte copying.
     177
     178   This function runs through the provided symbol table and patches
     179each symbol marked as a file place holder (`C_FILE') to point to the
     180next file place holder in the list. It also marks each `offset' field
     181in the list with the offset from the first symbol of the current symbol.
     182
     183   Another function of this procedure is to turn the canonical value
     184form of BFD into the form used by coff. Internally, BFD expects symbol
     185values to be offsets from a section base; so a symbol physically at
     1860x120, but in a section starting at 0x100, would have the value 0x20.
     187Coff expects symbols to contain their final value, so symbols have
     188their values changed at this point to reflect their sum with their
     189owning section.  This transformation uses the `output_section' field of
     190the `asymbol''s `asection' *Note Sections::.
     191
     192   * `coff_mangle_symbols'
     193   This routine runs though the provided symbol table and uses the
     194offsets generated by the previous pass and the pointers generated when
     195the symbol table was read in to create the structured hierarchy
     196required by coff. It changes each pointer to a symbol into the index
     197into the symbol table of the asymbol.
     198
     199   * `coff_write_symbols'
     200   This routine runs through the symbol table and patches up the
     201symbols from their internal form into the coff way, calls the bit
     202twiddlers, and writes out the table to the file.
     203
     204`coff_symbol_type'
     205..................
     206
     207   *Description*
     208The hidden information for an `asymbol' is described in a
     209`combined_entry_type':
     210
     211
     212     typedef struct coff_ptr_struct
     213     {
     214       /* Remembers the offset from the first symbol in the file for
     215          this symbol. Generated by coff_renumber_symbols. */
     216       unsigned int offset;
     217     
     218       /* Should the value of this symbol be renumbered.  Used for
     219          XCOFF C_BSTAT symbols.  Set by coff_slurp_symbol_table.  */
     220       unsigned int fix_value : 1;
     221     
     222       /* Should the tag field of this symbol be renumbered.
     223          Created by coff_pointerize_aux. */
     224       unsigned int fix_tag : 1;
     225     
     226       /* Should the endidx field of this symbol be renumbered.
     227          Created by coff_pointerize_aux. */
     228       unsigned int fix_end : 1;
     229     
     230       /* Should the x_csect.x_scnlen field be renumbered.
     231          Created by coff_pointerize_aux. */
     232       unsigned int fix_scnlen : 1;
     233     
     234       /* Fix up an XCOFF C_BINCL/C_EINCL symbol.  The value is the
     235          index into the line number entries.  Set by coff_slurp_symbol_table.  */
     236       unsigned int fix_line : 1;
     237     
     238       /* The container for the symbol structure as read and translated
     239          from the file. */
     240       union
     241       {
     242         union internal_auxent auxent;
     243         struct internal_syment syment;
     244       } u;
     245     } combined_entry_type;
     246     
     247     
     248     /* Each canonical asymbol really looks like this: */
     249     
     250     typedef struct coff_symbol_struct
     251     {
     252       /* The actual symbol which the rest of BFD works with */
     253       asymbol symbol;
     254     
     255       /* A pointer to the hidden information for this symbol */
     256       combined_entry_type *native;
     257     
     258       /* A pointer to the linenumber information for this symbol */
     259       struct lineno_cache_entry *lineno;
     260     
     261       /* Have the line numbers been relocated yet ? */
     262       bfd_boolean done_lineno;
     263     } coff_symbol_type;
     264
     265`bfd_coff_backend_data'
     266.......................
     267
     268     /* COFF symbol classifications.  */
     269     
     270     enum coff_symbol_classification
     271     {
     272       /* Global symbol.  */
     273       COFF_SYMBOL_GLOBAL,
     274       /* Common symbol.  */
     275       COFF_SYMBOL_COMMON,
     276       /* Undefined symbol.  */
     277       COFF_SYMBOL_UNDEFINED,
     278       /* Local symbol.  */
     279       COFF_SYMBOL_LOCAL,
     280       /* PE section symbol.  */
     281       COFF_SYMBOL_PE_SECTION
     282     };
     283   Special entry points for gdb to swap in coff symbol table parts:
     284     typedef struct
     285     {
     286       void (*_bfd_coff_swap_aux_in)
     287         PARAMS ((bfd *, PTR, int, int, int, int, PTR));
     288     
     289       void (*_bfd_coff_swap_sym_in)
     290         PARAMS ((bfd *, PTR, PTR));
     291     
     292       void (*_bfd_coff_swap_lineno_in)
     293         PARAMS ((bfd *, PTR, PTR));
     294     
     295       unsigned int (*_bfd_coff_swap_aux_out)
     296         PARAMS ((bfd *, PTR, int, int, int, int, PTR));
     297     
     298       unsigned int (*_bfd_coff_swap_sym_out)
     299         PARAMS ((bfd *, PTR, PTR));
     300     
     301       unsigned int (*_bfd_coff_swap_lineno_out)
     302         PARAMS ((bfd *, PTR, PTR));
     303     
     304       unsigned int (*_bfd_coff_swap_reloc_out)
     305         PARAMS ((bfd *, PTR, PTR));
     306     
     307       unsigned int (*_bfd_coff_swap_filehdr_out)
     308         PARAMS ((bfd *, PTR, PTR));
     309     
     310       unsigned int (*_bfd_coff_swap_aouthdr_out)
     311         PARAMS ((bfd *, PTR, PTR));
     312     
     313       unsigned int (*_bfd_coff_swap_scnhdr_out)
     314         PARAMS ((bfd *, PTR, PTR));
     315     
     316       unsigned int _bfd_filhsz;
     317       unsigned int _bfd_aoutsz;
     318       unsigned int _bfd_scnhsz;
     319       unsigned int _bfd_symesz;
     320       unsigned int _bfd_auxesz;
     321       unsigned int _bfd_relsz;
     322       unsigned int _bfd_linesz;
     323       unsigned int _bfd_filnmlen;
     324       bfd_boolean _bfd_coff_long_filenames;
     325       bfd_boolean _bfd_coff_long_section_names;
     326       unsigned int _bfd_coff_default_section_alignment_power;
     327       bfd_boolean _bfd_coff_force_symnames_in_strings;
     328       unsigned int _bfd_coff_debug_string_prefix_length;
     329     
     330       void (*_bfd_coff_swap_filehdr_in)
     331         PARAMS ((bfd *, PTR, PTR));
     332     
     333       void (*_bfd_coff_swap_aouthdr_in)
     334         PARAMS ((bfd *, PTR, PTR));
     335     
     336       void (*_bfd_coff_swap_scnhdr_in)
     337         PARAMS ((bfd *, PTR, PTR));
     338     
     339       void (*_bfd_coff_swap_reloc_in)
     340         PARAMS ((bfd *abfd, PTR, PTR));
     341     
     342       bfd_boolean (*_bfd_coff_bad_format_hook)
     343         PARAMS ((bfd *, PTR));
     344     
     345       bfd_boolean (*_bfd_coff_set_arch_mach_hook)
     346         PARAMS ((bfd *, PTR));
     347     
     348       PTR (*_bfd_coff_mkobject_hook)
     349         PARAMS ((bfd *, PTR, PTR));
     350     
     351       bfd_boolean (*_bfd_styp_to_sec_flags_hook)
     352         PARAMS ((bfd *, PTR, const char *, asection *, flagword *));
     353     
     354       void (*_bfd_set_alignment_hook)
     355         PARAMS ((bfd *, asection *, PTR));
     356     
     357       bfd_boolean (*_bfd_coff_slurp_symbol_table)
     358         PARAMS ((bfd *));
     359     
     360       bfd_boolean (*_bfd_coff_symname_in_debug)
     361         PARAMS ((bfd *, struct internal_syment *));
     362     
     363       bfd_boolean (*_bfd_coff_pointerize_aux_hook)
     364         PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
     365                 unsigned int, combined_entry_type *));
     366     
     367       bfd_boolean (*_bfd_coff_print_aux)
     368         PARAMS ((bfd *, FILE *, combined_entry_type *, combined_entry_type *,
     369                 combined_entry_type *, unsigned int));
     370     
     371       void (*_bfd_coff_reloc16_extra_cases)
     372         PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
     373                bfd_byte *, unsigned int *, unsigned int *));
     374     
     375       int (*_bfd_coff_reloc16_estimate)
     376         PARAMS ((bfd *, asection *, arelent *, unsigned int,
     377                 struct bfd_link_info *));
     378     
     379       enum coff_symbol_classification (*_bfd_coff_classify_symbol)
     380         PARAMS ((bfd *, struct internal_syment *));
     381     
     382       bfd_boolean (*_bfd_coff_compute_section_file_positions)
     383         PARAMS ((bfd *));
     384     
     385       bfd_boolean (*_bfd_coff_start_final_link)
     386         PARAMS ((bfd *, struct bfd_link_info *));
     387     
     388       bfd_boolean (*_bfd_coff_relocate_section)
     389         PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
     390                 struct internal_reloc *, struct internal_syment *, asection **));
     391     
     392       reloc_howto_type *(*_bfd_coff_rtype_to_howto)
     393         PARAMS ((bfd *, asection *, struct internal_reloc *,
     394                 struct coff_link_hash_entry *, struct internal_syment *,
     395                 bfd_vma *));
     396     
     397       bfd_boolean (*_bfd_coff_adjust_symndx)
     398         PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
     399                 struct internal_reloc *, bfd_boolean *));
     400     
     401       bfd_boolean (*_bfd_coff_link_add_one_symbol)
     402         PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
     403                 asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean,
     404                 struct bfd_link_hash_entry **));
     405     
     406       bfd_boolean (*_bfd_coff_link_output_has_begun)
     407         PARAMS ((bfd *, struct coff_final_link_info *));
     408     
     409       bfd_boolean (*_bfd_coff_final_link_postscript)
     410         PARAMS ((bfd *, struct coff_final_link_info *));
     411     
     412     } bfd_coff_backend_data;
     413     
     414     #define coff_backend_info(abfd) \
     415       ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
     416     
     417     #define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \
     418       ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
     419     
     420     #define bfd_coff_swap_sym_in(a,e,i) \
     421       ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
     422     
     423     #define bfd_coff_swap_lineno_in(a,e,i) \
     424       ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
     425     
     426     #define bfd_coff_swap_reloc_out(abfd, i, o) \
     427       ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
     428     
     429     #define bfd_coff_swap_lineno_out(abfd, i, o) \
     430       ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
     431     
     432     #define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \
     433       ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
     434     
     435     #define bfd_coff_swap_sym_out(abfd, i,o) \
     436       ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
     437     
     438     #define bfd_coff_swap_scnhdr_out(abfd, i,o) \
     439       ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
     440     
     441     #define bfd_coff_swap_filehdr_out(abfd, i,o) \
     442       ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
     443     
     444     #define bfd_coff_swap_aouthdr_out(abfd, i,o) \
     445       ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
     446     
     447     #define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz)
     448     #define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz)
     449     #define bfd_coff_scnhsz(abfd) (coff_backend_info (abfd)->_bfd_scnhsz)
     450     #define bfd_coff_symesz(abfd) (coff_backend_info (abfd)->_bfd_symesz)
     451     #define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz)
     452     #define bfd_coff_relsz(abfd)  (coff_backend_info (abfd)->_bfd_relsz)
     453     #define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz)
     454     #define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen)
     455     #define bfd_coff_long_filenames(abfd) \
     456       (coff_backend_info (abfd)->_bfd_coff_long_filenames)
     457     #define bfd_coff_long_section_names(abfd) \
     458       (coff_backend_info (abfd)->_bfd_coff_long_section_names)
     459     #define bfd_coff_default_section_alignment_power(abfd) \
     460       (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
     461     #define bfd_coff_swap_filehdr_in(abfd, i,o) \
     462       ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
     463     
     464     #define bfd_coff_swap_aouthdr_in(abfd, i,o) \
     465       ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
     466     
     467     #define bfd_coff_swap_scnhdr_in(abfd, i,o) \
     468       ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
     469     
     470     #define bfd_coff_swap_reloc_in(abfd, i, o) \
     471       ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
     472     
     473     #define bfd_coff_bad_format_hook(abfd, filehdr) \
     474       ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
     475     
     476     #define bfd_coff_set_arch_mach_hook(abfd, filehdr)\
     477       ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
     478     #define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\
     479       ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook)\
     480        (abfd, filehdr, aouthdr))
     481     
     482     #define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section, flags_ptr)\
     483       ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
     484        (abfd, scnhdr, name, section, flags_ptr))
     485     
     486     #define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\
     487       ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
     488     
     489     #define bfd_coff_slurp_symbol_table(abfd)\
     490       ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
     491     
     492     #define bfd_coff_symname_in_debug(abfd, sym)\
     493       ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
     494     
     495     #define bfd_coff_force_symnames_in_strings(abfd)\
     496       (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
     497     
     498     #define bfd_coff_debug_string_prefix_length(abfd)\
     499       (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
     500     
     501     #define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\
     502       ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
     503        (abfd, file, base, symbol, aux, indaux))
     504     
     505     #define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order,\
     506                                          reloc, data, src_ptr, dst_ptr)\
     507       ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
     508        (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
     509     
     510     #define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\
     511       ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
     512        (abfd, section, reloc, shrink, link_info))
     513     
     514     #define bfd_coff_classify_symbol(abfd, sym)\
     515       ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
     516        (abfd, sym))
     517     
     518     #define bfd_coff_compute_section_file_positions(abfd)\
     519       ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
     520        (abfd))
     521     
     522     #define bfd_coff_start_final_link(obfd, info)\
     523       ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
     524        (obfd, info))
     525     #define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\
     526       ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
     527        (obfd, info, ibfd, o, con, rel, isyms, secs))
     528     #define bfd_coff_rtype_to_howto(abfd, sec, rel, h, sym, addendp)\
     529       ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
     530        (abfd, sec, rel, h, sym, addendp))
     531     #define bfd_coff_adjust_symndx(obfd, info, ibfd, sec, rel, adjustedp)\
     532       ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
     533        (obfd, info, ibfd, sec, rel, adjustedp))
     534     #define bfd_coff_link_add_one_symbol(info, abfd, name, flags, section,\
     535                                          value, string, cp, coll, hashp)\
     536       ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
     537        (info, abfd, name, flags, section, value, string, cp, coll, hashp))
     538     
     539     #define bfd_coff_link_output_has_begun(a,p) \
     540       ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a,p))
     541     #define bfd_coff_final_link_postscript(a,p) \
     542       ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
     543
     544Writing relocations
     545...................
     546
     547   To write relocations, the back end steps though the canonical
     548relocation table and create an `internal_reloc'. The symbol index to
     549use is removed from the `offset' field in the symbol table supplied.
     550The address comes directly from the sum of the section base address and
     551the relocation offset; the type is dug directly from the howto field.
     552Then the `internal_reloc' is swapped into the shape of an
     553`external_reloc' and written out to disk.
     554
     555Reading linenumbers
     556...................
     557
     558   Creating the linenumber table is done by reading in the entire coff
     559linenumber table, and creating another table for internal use.
     560
     561   A coff linenumber table is structured so that each function is
     562marked as having a line number of 0. Each line within the function is
     563an offset from the first line in the function. The base of the line
     564number information for the table is stored in the symbol associated
     565with the function.
     566
     567   Note: The PE format uses line number 0 for a flag indicating a new
     568source file.
     569
     570   The information is copied from the external to the internal table,
     571and each symbol which marks a function is marked by pointing its...
     572
     573   How does this work ?
     574
     575Reading relocations
     576...................
     577
     578   Coff relocations are easily transformed into the internal BFD form
     579(`arelent').
     580
     581   Reading a coff relocation table is done in the following stages:
     582
     583   * Read the entire coff relocation table into memory.
     584
     585   * Process each relocation in turn; first swap it from the external
     586     to the internal form.
     587
     588   * Turn the symbol referenced in the relocation's symbol index into a
     589     pointer into the canonical symbol table.  This table is the same
     590     as the one returned by a call to `bfd_canonicalize_symtab'. The
     591     back end will call that routine and save the result if a
     592     canonicalization hasn't been done.
     593
     594   * The reloc index is turned into a pointer to a howto structure, in
     595     a back end specific way. For instance, the 386 and 960 use the
     596     `r_type' to directly produce an index into a howto table vector;
     597     the 88k subtracts a number from the `r_type' field and creates an
     598     addend field.
     599
     600
     601File: bfd.info,  Node: elf,  Next: mmo,  Prev: coff,  Up: BFD back ends
     602
     603
     604
     605   ELF backends
     606
     607   BFD support for ELF formats is being worked on.  Currently, the best
     608supported back ends are for sparc and i386 (running svr4 or Solaris 2).
     609
     610   Documentation of the internals of the support code still needs to be
     611written.  The code is changing quickly enough that we haven't bothered
     612yet.
     613
     614`bfd_elf_find_section'
     615......................
     616
     617   *Synopsis*
     618     struct elf_internal_shdr *bfd_elf_find_section (bfd *abfd, char *name);
     619   *Description*
     620Helper functions for GDB to locate the string tables.  Since BFD hides
     621string tables from callers, GDB needs to use an internal hook to find
     622them.  Sun's .stabstr, in particular, isn't even pointed to by the
     623.stab section, so ordinary mechanisms wouldn't work to find it, even if
     624we had some.
     625
     626
     627File: bfd.info,  Node: mmo,  Prev: elf,  Up: BFD back ends
     628
     629mmo backend
     630===========
     631
     632   The mmo object format is used exclusively together with Professor
     633Donald E. Knuth's educational 64-bit processor MMIX.  The simulator
     634`mmix' which is available at
     635<http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz>
     636understands this format.  That package also includes a combined
     637assembler and linker called `mmixal'.  The mmo format has no advantages
     638feature-wise compared to e.g. ELF.  It is a simple non-relocatable
     639object format with no support for archives or debugging information,
     640except for symbol value information and line numbers (which is not yet
     641implemented in BFD).  See
     642<http://www-cs-faculty.stanford.edu/~knuth/mmix.html> for more
     643information about MMIX.  The ELF format is used for intermediate object
     644files in the BFD implementation.
    23645
    24646* Menu:
    25647
    26 * _bfd_final_link_relocate:              Relocating the section contents.
    27 * _bfd_generic_link_add_archive_symbols: Adding symbols from an archive.
    28 * _bfd_generic_link_add_one_symbol:      Adding symbols from an object file.
    29 * _bfd_link_add_symbols in target vector: Adding Symbols to the Hash Table.
    30 * _bfd_link_final_link in target vector: Performing the Final Link.
    31 * _bfd_link_hash_table_create in target vector: Creating a Linker Hash Table.
    32 * _bfd_relocate_contents:                Relocating the section contents.
    33 * _bfd_strip_section_from_output:        section prototypes.
    34 * aout_SIZE_machine_type:                aout.
    35 * aout_SIZE_mkobject:                    aout.
    36 * aout_SIZE_new_section_hook:            aout.
    37 * aout_SIZE_set_arch_mach:               aout.
    38 * aout_SIZE_some_aout_object_p:          aout.
    39 * aout_SIZE_swap_exec_header_in:         aout.
    40 * aout_SIZE_swap_exec_header_out:        aout.
    41 * arelent_chain:                         typedef arelent.
    42 * BFD:                                   Overview.
    43 * BFD canonical format:                  Canonical format.
    44 * bfd_alloc:                             Opening and Closing.
    45 * bfd_arch_bits_per_address:             Architectures.
    46 * bfd_arch_bits_per_byte:                Architectures.
    47 * bfd_arch_get_compatible:               Architectures.
    48 * bfd_arch_list:                         Architectures.
    49 * bfd_arch_mach_octets_per_byte:         Architectures.
    50 * bfd_cache_close:                       File Caching.
    51 * bfd_cache_init:                        File Caching.
    52 * bfd_cache_lookup:                      File Caching.
    53 * bfd_cache_lookup_worker:               File Caching.
    54 * BFD_CACHE_MAX_OPEN macro:              File Caching.
    55 * bfd_canonicalize_reloc:                BFD front end.
    56 * bfd_canonicalize_symtab:               symbol handling functions.
    57 * bfd_check_format:                      Formats.
    58 * bfd_check_format_matches:              Formats.
    59 * bfd_check_overflow:                    typedef arelent.
    60 * bfd_close:                             Opening and Closing.
    61 * bfd_close_all_done:                    Opening and Closing.
    62 * bfd_coff_backend_data:                 coff.
    63 * bfd_copy_private_bfd_data:             BFD front end.
    64 * bfd_copy_private_section_data:         section prototypes.
    65 * bfd_copy_private_symbol_data:          symbol handling functions.
    66 * bfd_core_file_failing_command:         Core Files.
    67 * bfd_core_file_failing_signal:          Core Files.
    68 * bfd_create:                            Opening and Closing.
    69 * bfd_decode_symclass:                   symbol handling functions.
    70 * bfd_default_arch_struct:               Architectures.
    71 * bfd_default_compatible:                Architectures.
    72 * bfd_default_reloc_type_lookup:         howto manager.
    73 * bfd_default_scan:                      Architectures.
    74 * bfd_default_set_arch_mach:             Architectures.
    75 * bfd_elf_find_section:                  elf.
    76 * bfd_errmsg:                            BFD front end.
    77 * bfd_fdopenr:                           Opening and Closing.
    78 * bfd_find_target:                       bfd_target.
    79 * bfd_format_string:                     Formats.
    80 * bfd_generic_gc_sections:               howto manager.
    81 * bfd_generic_get_relocated_section_contents: howto manager.
    82 * bfd_generic_relax_section:             howto manager.
    83 * bfd_get_arch:                          Architectures.
    84 * bfd_get_arch_info:                     Architectures.
    85 * bfd_get_arch_size:                     BFD front end.
    86 * bfd_get_error:                         BFD front end.
    87 * bfd_get_error_handler:                 BFD front end.
    88 * bfd_get_gp_size:                       BFD front end.
    89 * bfd_get_mach:                          Architectures.
    90 * bfd_get_mtime:                         BFD front end.
    91 * bfd_get_next_mapent:                   Archives.
    92 * bfd_get_reloc_code_name:               howto manager.
    93 * bfd_get_reloc_size:                    typedef arelent.
    94 * bfd_get_reloc_upper_bound:             BFD front end.
    95 * bfd_get_section_by_name:               section prototypes.
    96 * bfd_get_section_contents:              section prototypes.
    97 * bfd_get_sign_extend_vma:               BFD front end.
    98 * bfd_get_size <1>:                      Internal.
    99 * bfd_get_size:                          BFD front end.
    100 * bfd_get_symtab_upper_bound:            symbol handling functions.
    101 * bfd_get_unique_section_name:           section prototypes.
    102 * bfd_h_put_size:                        Internal.
    103 * bfd_hash_allocate:                     Creating and Freeing a Hash Table.
    104 * bfd_hash_lookup:                       Looking Up or Entering a String.
    105 * bfd_hash_newfunc:                      Creating and Freeing a Hash Table.
    106 * bfd_hash_table_free:                   Creating and Freeing a Hash Table.
    107 * bfd_hash_table_init:                   Creating and Freeing a Hash Table.
    108 * bfd_hash_table_init_n:                 Creating and Freeing a Hash Table.
    109 * bfd_hash_traverse:                     Traversing a Hash Table.
    110 * bfd_init:                              Initialization.
    111 * bfd_install_relocation:                typedef arelent.
    112 * bfd_is_local_label:                    symbol handling functions.
    113 * bfd_is_local_label_name:               symbol handling functions.
    114 * bfd_is_undefined_symclass:             symbol handling functions.
    115 * bfd_last_cache:                        File Caching.
    116 * bfd_link_split_section:                Writing the symbol table.
    117 * bfd_log2:                              Internal.
    118 * bfd_lookup_arch:                       Architectures.
    119 * bfd_make_debug_symbol:                 symbol handling functions.
    120 * bfd_make_empty_symbol:                 symbol handling functions.
    121 * bfd_make_readable:                     Opening and Closing.
    122 * bfd_make_section:                      section prototypes.
    123 * bfd_make_section_anyway:               section prototypes.
    124 * bfd_make_section_old_way:              section prototypes.
    125 * bfd_make_writable:                     Opening and Closing.
    126 * bfd_map_over_sections:                 section prototypes.
    127 * bfd_merge_private_bfd_data:            BFD front end.
    128 * bfd_octets_per_byte:                   Architectures.
    129 * bfd_open_file:                         File Caching.
    130 * bfd_openr:                             Opening and Closing.
    131 * bfd_openr_next_archived_file:          Archives.
    132 * bfd_openstreamr:                       Opening and Closing.
    133 * bfd_openw:                             Opening and Closing.
    134 * bfd_perform_relocation:                typedef arelent.
    135 * bfd_perror:                            BFD front end.
    136 * bfd_print_symbol_vandf:                symbol handling functions.
    137 * bfd_printable_arch_mach:               Architectures.
    138 * bfd_printable_name:                    Architectures.
    139 * bfd_put_size:                          Internal.
    140 * BFD_RELOC_12_PCREL:                    howto manager.
    141 * BFD_RELOC_14:                          howto manager.
    142 * BFD_RELOC_16:                          howto manager.
    143 * BFD_RELOC_16_BASEREL:                  howto manager.
    144 * BFD_RELOC_16_GOT_PCREL:                howto manager.
    145 * BFD_RELOC_16_GOTOFF:                   howto manager.
    146 * BFD_RELOC_16_PCREL:                    howto manager.
    147 * BFD_RELOC_16_PCREL_S2:                 howto manager.
    148 * BFD_RELOC_16_PLT_PCREL:                howto manager.
    149 * BFD_RELOC_16_PLTOFF:                   howto manager.
    150 * BFD_RELOC_23_PCREL_S2:                 howto manager.
    151 * BFD_RELOC_24:                          howto manager.
    152 * BFD_RELOC_24_PCREL:                    howto manager.
    153 * BFD_RELOC_24_PLT_PCREL:                howto manager.
    154 * BFD_RELOC_26:                          howto manager.
    155 * BFD_RELOC_32:                          howto manager.
    156 * BFD_RELOC_32_BASEREL:                  howto manager.
    157 * BFD_RELOC_32_GOT_PCREL:                howto manager.
    158 * BFD_RELOC_32_GOTOFF:                   howto manager.
    159 * BFD_RELOC_32_PCREL:                    howto manager.
    160 * BFD_RELOC_32_PCREL_S2:                 howto manager.
    161 * BFD_RELOC_32_PLT_PCREL:                howto manager.
    162 * BFD_RELOC_32_PLTOFF:                   howto manager.
    163 * BFD_RELOC_386_COPY:                    howto manager.
    164 * BFD_RELOC_386_GLOB_DAT:                howto manager.
    165 * BFD_RELOC_386_GOT32:                   howto manager.
    166 * BFD_RELOC_386_GOTOFF:                  howto manager.
    167 * BFD_RELOC_386_GOTPC:                   howto manager.
    168 * BFD_RELOC_386_JUMP_SLOT:               howto manager.
    169 * BFD_RELOC_386_PLT32:                   howto manager.
    170 * BFD_RELOC_386_RELATIVE:                howto manager.
    171 * BFD_RELOC_64:                          howto manager.
    172 * BFD_RELOC_64_PCREL:                    howto manager.
    173 * BFD_RELOC_68K_GLOB_DAT:                howto manager.
    174 * BFD_RELOC_68K_JMP_SLOT:                howto manager.
    175 * BFD_RELOC_68K_RELATIVE:                howto manager.
    176 * BFD_RELOC_8:                           howto manager.
    177 * BFD_RELOC_860_COPY:                    howto manager.
    178 * BFD_RELOC_860_GLOB_DAT:                howto manager.
    179 * BFD_RELOC_860_HAGOT:                   howto manager.
    180 * BFD_RELOC_860_HAGOTOFF:                howto manager.
    181 * BFD_RELOC_860_HAPC:                    howto manager.
    182 * BFD_RELOC_860_HIGH:                    howto manager.
    183 * BFD_RELOC_860_HIGHADJ:                 howto manager.
    184 * BFD_RELOC_860_HIGOT:                   howto manager.
    185 * BFD_RELOC_860_HIGOTOFF:                howto manager.
    186 * BFD_RELOC_860_JUMP_SLOT:               howto manager.
    187 * BFD_RELOC_860_LOGOT0:                  howto manager.
    188 * BFD_RELOC_860_LOGOT1:                  howto manager.
    189 * BFD_RELOC_860_LOGOTOFF0:               howto manager.
    190 * BFD_RELOC_860_LOGOTOFF1:               howto manager.
    191 * BFD_RELOC_860_LOGOTOFF2:               howto manager.
    192 * BFD_RELOC_860_LOGOTOFF3:               howto manager.
    193 * BFD_RELOC_860_LOPC:                    howto manager.
    194 * BFD_RELOC_860_LOW0:                    howto manager.
    195 * BFD_RELOC_860_LOW1:                    howto manager.
    196 * BFD_RELOC_860_LOW2:                    howto manager.
    197 * BFD_RELOC_860_LOW3:                    howto manager.
    198 * BFD_RELOC_860_PC16:                    howto manager.
    199 * BFD_RELOC_860_PC26:                    howto manager.
    200 * BFD_RELOC_860_PLT26:                   howto manager.
    201 * BFD_RELOC_860_RELATIVE:                howto manager.
    202 * BFD_RELOC_860_SPGOT0:                  howto manager.
    203 * BFD_RELOC_860_SPGOT1:                  howto manager.
    204 * BFD_RELOC_860_SPGOTOFF0:               howto manager.
    205 * BFD_RELOC_860_SPGOTOFF1:               howto manager.
    206 * BFD_RELOC_860_SPLIT0:                  howto manager.
    207 * BFD_RELOC_860_SPLIT1:                  howto manager.
    208 * BFD_RELOC_860_SPLIT2:                  howto manager.
    209 * BFD_RELOC_8_BASEREL:                   howto manager.
    210 * BFD_RELOC_8_FFnn:                      howto manager.
    211 * BFD_RELOC_8_GOT_PCREL:                 howto manager.
    212 * BFD_RELOC_8_GOTOFF:                    howto manager.
    213 * BFD_RELOC_8_PCREL:                     howto manager.
    214 * BFD_RELOC_8_PLT_PCREL:                 howto manager.
    215 * BFD_RELOC_8_PLTOFF:                    howto manager.
    216 * BFD_RELOC_ALPHA_CODEADDR:              howto manager.
    217 * BFD_RELOC_ALPHA_ELF_LITERAL:           howto manager.
    218 * BFD_RELOC_ALPHA_GPDISP:                howto manager.
    219 * BFD_RELOC_ALPHA_GPDISP_HI16:           howto manager.
    220 * BFD_RELOC_ALPHA_GPDISP_LO16:           howto manager.
    221 * BFD_RELOC_ALPHA_HINT:                  howto manager.
    222 * BFD_RELOC_ALPHA_LINKAGE:               howto manager.
    223 * BFD_RELOC_ALPHA_LITERAL:               howto manager.
    224 * BFD_RELOC_ALPHA_LITUSE:                howto manager.
    225 * BFD_RELOC_ALPHA_USER_GPDISP:           howto manager.
    226 * BFD_RELOC_ALPHA_USER_GPRELHIGH:        howto manager.
    227 * BFD_RELOC_ALPHA_USER_GPRELLOW:         howto manager.
    228 * BFD_RELOC_ALPHA_USER_LITERAL:          howto manager.
    229 * BFD_RELOC_ALPHA_USER_LITUSE_BASE:      howto manager.
    230 * BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF:    howto manager.
    231 * BFD_RELOC_ALPHA_USER_LITUSE_JSR:       howto manager.
    232 * BFD_RELOC_ARC_B22_PCREL:               howto manager.
    233 * BFD_RELOC_ARC_B26:                     howto manager.
    234 * BFD_RELOC_ARM_ADR_IMM:                 howto manager.
    235 * BFD_RELOC_ARM_ADRL_IMMEDIATE:          howto manager.
    236 * BFD_RELOC_ARM_COPY:                    howto manager.
    237 * BFD_RELOC_ARM_CP_OFF_IMM:              howto manager.
    238 * BFD_RELOC_ARM_GLOB_DAT:                howto manager.
    239 * BFD_RELOC_ARM_GOT12:                   howto manager.
    240 * BFD_RELOC_ARM_GOT32:                   howto manager.
    241 * BFD_RELOC_ARM_GOTOFF:                  howto manager.
    242 * BFD_RELOC_ARM_GOTPC:                   howto manager.
    243 * BFD_RELOC_ARM_HWLITERAL:               howto manager.
    244 * BFD_RELOC_ARM_IMMEDIATE:               howto manager.
    245 * BFD_RELOC_ARM_IN_POOL:                 howto manager.
    246 * BFD_RELOC_ARM_JUMP_SLOT:               howto manager.
    247 * BFD_RELOC_ARM_LDR_IMM:                 howto manager.
    248 * BFD_RELOC_ARM_LITERAL:                 howto manager.
    249 * BFD_RELOC_ARM_MULTI:                   howto manager.
    250 * BFD_RELOC_ARM_OFFSET_IMM:              howto manager.
    251 * BFD_RELOC_ARM_OFFSET_IMM8:             howto manager.
    252 * BFD_RELOC_ARM_PCREL_BLX:               howto manager.
    253 * BFD_RELOC_ARM_PCREL_BRANCH:            howto manager.
    254 * BFD_RELOC_ARM_PLT32:                   howto manager.
    255 * BFD_RELOC_ARM_RELATIVE:                howto manager.
    256 * BFD_RELOC_ARM_SHIFT_IMM:               howto manager.
    257 * BFD_RELOC_ARM_SWI:                     howto manager.
    258 * BFD_RELOC_ARM_THUMB_ADD:               howto manager.
    259 * BFD_RELOC_ARM_THUMB_IMM:               howto manager.
    260 * BFD_RELOC_ARM_THUMB_OFFSET:            howto manager.
    261 * BFD_RELOC_ARM_THUMB_SHIFT:             howto manager.
    262 * BFD_RELOC_AVR_13_PCREL:                howto manager.
    263 * BFD_RELOC_AVR_16_PM:                   howto manager.
    264 * BFD_RELOC_AVR_7_PCREL:                 howto manager.
    265 * BFD_RELOC_AVR_CALL:                    howto manager.
    266 * BFD_RELOC_AVR_HH8_LDI:                 howto manager.
    267 * BFD_RELOC_AVR_HH8_LDI_NEG:             howto manager.
    268 * BFD_RELOC_AVR_HH8_LDI_PM:              howto manager.
    269 * BFD_RELOC_AVR_HH8_LDI_PM_NEG:          howto manager.
    270 * BFD_RELOC_AVR_HI8_LDI:                 howto manager.
    271 * BFD_RELOC_AVR_HI8_LDI_NEG:             howto manager.
    272 * BFD_RELOC_AVR_HI8_LDI_PM:              howto manager.
    273 * BFD_RELOC_AVR_HI8_LDI_PM_NEG:          howto manager.
    274 * BFD_RELOC_AVR_LO8_LDI:                 howto manager.
    275 * BFD_RELOC_AVR_LO8_LDI_NEG:             howto manager.
    276 * BFD_RELOC_AVR_LO8_LDI_PM:              howto manager.
    277 * BFD_RELOC_AVR_LO8_LDI_PM_NEG:          howto manager.
    278 * bfd_reloc_code_type:                   howto manager.
    279 * BFD_RELOC_CRIS_BDISP8:                 howto manager.
    280 * BFD_RELOC_CRIS_SIGNED_6:               howto manager.
    281 * BFD_RELOC_CRIS_UNSIGNED_4:             howto manager.
    282 * BFD_RELOC_CRIS_UNSIGNED_5:             howto manager.
    283 * BFD_RELOC_CRIS_UNSIGNED_6:             howto manager.
    284 * BFD_RELOC_CTOR:                        howto manager.
    285 * BFD_RELOC_D10V_10_PCREL_L:             howto manager.
    286 * BFD_RELOC_D10V_10_PCREL_R:             howto manager.
    287 * BFD_RELOC_D10V_18:                     howto manager.
    288 * BFD_RELOC_D10V_18_PCREL:               howto manager.
    289 * BFD_RELOC_D30V_15:                     howto manager.
    290 * BFD_RELOC_D30V_15_PCREL:               howto manager.
    291 * BFD_RELOC_D30V_15_PCREL_R:             howto manager.
    292 * BFD_RELOC_D30V_21:                     howto manager.
    293 * BFD_RELOC_D30V_21_PCREL:               howto manager.
    294 * BFD_RELOC_D30V_21_PCREL_R:             howto manager.
    295 * BFD_RELOC_D30V_32:                     howto manager.
    296 * BFD_RELOC_D30V_32_PCREL:               howto manager.
    297 * BFD_RELOC_D30V_6:                      howto manager.
    298 * BFD_RELOC_D30V_9_PCREL:                howto manager.
    299 * BFD_RELOC_D30V_9_PCREL_R:              howto manager.
    300 * BFD_RELOC_FR30_10_IN_8:                howto manager.
    301 * BFD_RELOC_FR30_12_PCREL:               howto manager.
    302 * BFD_RELOC_FR30_20:                     howto manager.
    303 * BFD_RELOC_FR30_48:                     howto manager.
    304 * BFD_RELOC_FR30_6_IN_4:                 howto manager.
    305 * BFD_RELOC_FR30_8_IN_8:                 howto manager.
    306 * BFD_RELOC_FR30_9_IN_8:                 howto manager.
    307 * BFD_RELOC_FR30_9_PCREL:                howto manager.
    308 * BFD_RELOC_GPREL16:                     howto manager.
    309 * BFD_RELOC_GPREL32:                     howto manager.
    310 * BFD_RELOC_HI16:                        howto manager.
    311 * BFD_RELOC_HI16_BASEREL:                howto manager.
    312 * BFD_RELOC_HI16_GOTOFF:                 howto manager.
    313 * BFD_RELOC_HI16_PLTOFF:                 howto manager.
    314 * BFD_RELOC_HI16_S:                      howto manager.
    315 * BFD_RELOC_HI16_S_BASEREL:              howto manager.
    316 * BFD_RELOC_HI16_S_GOTOFF:               howto manager.
    317 * BFD_RELOC_HI16_S_PLTOFF:               howto manager.
    318 * BFD_RELOC_HI22:                        howto manager.
    319 * BFD_RELOC_I370_D12:                    howto manager.
    320 * BFD_RELOC_I960_CALLJ:                  howto manager.
    321 * BFD_RELOC_IA64_COPY:                   howto manager.
    322 * BFD_RELOC_IA64_DIR32LSB:               howto manager.
    323 * BFD_RELOC_IA64_DIR32MSB:               howto manager.
    324 * BFD_RELOC_IA64_DIR64LSB:               howto manager.
    325 * BFD_RELOC_IA64_DIR64MSB:               howto manager.
    326 * BFD_RELOC_IA64_FPTR32LSB:              howto manager.
    327 * BFD_RELOC_IA64_FPTR32MSB:              howto manager.
    328 * BFD_RELOC_IA64_FPTR64I:                howto manager.
    329 * BFD_RELOC_IA64_FPTR64LSB:              howto manager.
    330 * BFD_RELOC_IA64_FPTR64MSB:              howto manager.
    331 * BFD_RELOC_IA64_GPREL22:                howto manager.
    332 * BFD_RELOC_IA64_GPREL32LSB:             howto manager.
    333 * BFD_RELOC_IA64_GPREL32MSB:             howto manager.
    334 * BFD_RELOC_IA64_GPREL64I:               howto manager.
    335 * BFD_RELOC_IA64_GPREL64LSB:             howto manager.
    336 * BFD_RELOC_IA64_GPREL64MSB:             howto manager.
    337 * BFD_RELOC_IA64_IMM14:                  howto manager.
    338 * BFD_RELOC_IA64_IMM22:                  howto manager.
    339 * BFD_RELOC_IA64_IMM64:                  howto manager.
    340 * BFD_RELOC_IA64_IPLTLSB:                howto manager.
    341 * BFD_RELOC_IA64_IPLTMSB:                howto manager.
    342 * BFD_RELOC_IA64_LDXMOV:                 howto manager.
    343 * BFD_RELOC_IA64_LTOFF22:                howto manager.
    344 * BFD_RELOC_IA64_LTOFF22X:               howto manager.
    345 * BFD_RELOC_IA64_LTOFF64I:               howto manager.
    346 * BFD_RELOC_IA64_LTOFF_FPTR22:           howto manager.
    347 * BFD_RELOC_IA64_LTOFF_FPTR64I:          howto manager.
    348 * BFD_RELOC_IA64_LTOFF_FPTR64LSB:        howto manager.
    349 * BFD_RELOC_IA64_LTOFF_FPTR64MSB:        howto manager.
    350 * BFD_RELOC_IA64_LTOFF_TP22:             howto manager.
    351 * BFD_RELOC_IA64_LTV32LSB:               howto manager.
    352 * BFD_RELOC_IA64_LTV32MSB:               howto manager.
    353 * BFD_RELOC_IA64_LTV64LSB:               howto manager.
    354 * BFD_RELOC_IA64_LTV64MSB:               howto manager.
    355 * BFD_RELOC_IA64_PCREL21B:               howto manager.
    356 * BFD_RELOC_IA64_PCREL21BI:              howto manager.
    357 * BFD_RELOC_IA64_PCREL21F:               howto manager.
    358 * BFD_RELOC_IA64_PCREL21M:               howto manager.
    359 * BFD_RELOC_IA64_PCREL22:                howto manager.
    360 * BFD_RELOC_IA64_PCREL32LSB:             howto manager.
    361 * BFD_RELOC_IA64_PCREL32MSB:             howto manager.
    362 * BFD_RELOC_IA64_PCREL60B:               howto manager.
    363 * BFD_RELOC_IA64_PCREL64I:               howto manager.
    364 * BFD_RELOC_IA64_PCREL64LSB:             howto manager.
    365 * BFD_RELOC_IA64_PCREL64MSB:             howto manager.
    366 * BFD_RELOC_IA64_PLTOFF22:               howto manager.
    367 * BFD_RELOC_IA64_PLTOFF64I:              howto manager.
    368 * BFD_RELOC_IA64_PLTOFF64LSB:            howto manager.
    369 * BFD_RELOC_IA64_PLTOFF64MSB:            howto manager.
    370 * BFD_RELOC_IA64_REL32LSB:               howto manager.
    371 * BFD_RELOC_IA64_REL32MSB:               howto manager.
    372 * BFD_RELOC_IA64_REL64LSB:               howto manager.
    373 * BFD_RELOC_IA64_REL64MSB:               howto manager.
    374 * BFD_RELOC_IA64_SECREL32LSB:            howto manager.
    375 * BFD_RELOC_IA64_SECREL32MSB:            howto manager.
    376 * BFD_RELOC_IA64_SECREL64LSB:            howto manager.
    377 * BFD_RELOC_IA64_SECREL64MSB:            howto manager.
    378 * BFD_RELOC_IA64_SEGREL32LSB:            howto manager.
    379 * BFD_RELOC_IA64_SEGREL32MSB:            howto manager.
    380 * BFD_RELOC_IA64_SEGREL64LSB:            howto manager.
    381 * BFD_RELOC_IA64_SEGREL64MSB:            howto manager.
    382 * BFD_RELOC_IA64_TPREL22:                howto manager.
    383 * BFD_RELOC_IA64_TPREL64LSB:             howto manager.
    384 * BFD_RELOC_IA64_TPREL64MSB:             howto manager.
    385 * BFD_RELOC_LO10:                        howto manager.
    386 * BFD_RELOC_LO16:                        howto manager.
    387 * BFD_RELOC_LO16_BASEREL:                howto manager.
    388 * BFD_RELOC_LO16_GOTOFF:                 howto manager.
    389 * BFD_RELOC_LO16_PLTOFF:                 howto manager.
    390 * BFD_RELOC_M32R_10_PCREL:               howto manager.
    391 * BFD_RELOC_M32R_18_PCREL:               howto manager.
    392 * BFD_RELOC_M32R_24:                     howto manager.
    393 * BFD_RELOC_M32R_26_PCREL:               howto manager.
    394 * BFD_RELOC_M32R_HI16_SLO:               howto manager.
    395 * BFD_RELOC_M32R_HI16_ULO:               howto manager.
    396 * BFD_RELOC_M32R_LO16:                   howto manager.
    397 * BFD_RELOC_M32R_SDA16:                  howto manager.
    398 * BFD_RELOC_M68HC11_3B:                  howto manager.
    399 * BFD_RELOC_M68HC11_HI8:                 howto manager.
    400 * BFD_RELOC_M68HC11_LO8:                 howto manager.
    401 * BFD_RELOC_MCORE_PCREL_32:              howto manager.
    402 * BFD_RELOC_MCORE_PCREL_IMM11BY2:        howto manager.
    403 * BFD_RELOC_MCORE_PCREL_IMM4BY2:         howto manager.
    404 * BFD_RELOC_MCORE_PCREL_IMM8BY4:         howto manager.
    405 * BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2:    howto manager.
    406 * BFD_RELOC_MCORE_RVA:                   howto manager.
    407 * BFD_RELOC_MIPS16_GPREL:                howto manager.
    408 * BFD_RELOC_MIPS16_JMP:                  howto manager.
    409 * BFD_RELOC_MIPS_CALL16:                 howto manager.
    410 * BFD_RELOC_MIPS_CALL_HI16:              howto manager.
    411 * BFD_RELOC_MIPS_CALL_LO16:              howto manager.
    412 * BFD_RELOC_MIPS_DELETE:                 howto manager.
    413 * BFD_RELOC_MIPS_GOT16:                  howto manager.
    414 * BFD_RELOC_MIPS_GOT_DISP:               howto manager.
    415 * BFD_RELOC_MIPS_GOT_HI16:               howto manager.
    416 * BFD_RELOC_MIPS_GOT_LO16:               howto manager.
    417 * BFD_RELOC_MIPS_GOT_OFST:               howto manager.
    418 * BFD_RELOC_MIPS_GOT_PAGE:               howto manager.
    419 * BFD_RELOC_MIPS_GPREL:                  howto manager.
    420 * BFD_RELOC_MIPS_GPREL32:                howto manager.
    421 * BFD_RELOC_MIPS_HIGHER:                 howto manager.
    422 * BFD_RELOC_MIPS_HIGHEST:                howto manager.
    423 * BFD_RELOC_MIPS_INSERT_A:               howto manager.
    424 * BFD_RELOC_MIPS_INSERT_B:               howto manager.
    425 * BFD_RELOC_MIPS_JALR:                   howto manager.
    426 * BFD_RELOC_MIPS_JMP:                    howto manager.
    427 * BFD_RELOC_MIPS_LITERAL:                howto manager.
    428 * BFD_RELOC_MIPS_REL16:                  howto manager.
    429 * BFD_RELOC_MIPS_RELGOT:                 howto manager.
    430 * BFD_RELOC_MIPS_SCN_DISP:               howto manager.
    431 * BFD_RELOC_MIPS_SHIFT5:                 howto manager.
    432 * BFD_RELOC_MIPS_SHIFT6:                 howto manager.
    433 * BFD_RELOC_MIPS_SUB:                    howto manager.
    434 * BFD_RELOC_MN10300_16_PCREL:            howto manager.
    435 * BFD_RELOC_MN10300_32_PCREL:            howto manager.
    436 * BFD_RELOC_NONE:                        howto manager.
    437 * BFD_RELOC_NS32K_DISP_16:               howto manager.
    438 * BFD_RELOC_NS32K_DISP_16_PCREL:         howto manager.
    439 * BFD_RELOC_NS32K_DISP_32:               howto manager.
    440 * BFD_RELOC_NS32K_DISP_32_PCREL:         howto manager.
    441 * BFD_RELOC_NS32K_DISP_8:                howto manager.
    442 * BFD_RELOC_NS32K_DISP_8_PCREL:          howto manager.
    443 * BFD_RELOC_NS32K_IMM_16:                howto manager.
    444 * BFD_RELOC_NS32K_IMM_16_PCREL:          howto manager.
    445 * BFD_RELOC_NS32K_IMM_32:                howto manager.
    446 * BFD_RELOC_NS32K_IMM_32_PCREL:          howto manager.
    447 * BFD_RELOC_NS32K_IMM_8:                 howto manager.
    448 * BFD_RELOC_NS32K_IMM_8_PCREL:           howto manager.
    449 * BFD_RELOC_PCREL_HI16_S:                howto manager.
    450 * BFD_RELOC_PCREL_LO16:                  howto manager.
    451 * BFD_RELOC_PJ_CODE_DIR16:               howto manager.
    452 * BFD_RELOC_PJ_CODE_DIR32:               howto manager.
    453 * BFD_RELOC_PJ_CODE_HI16:                howto manager.
    454 * BFD_RELOC_PJ_CODE_LO16:                howto manager.
    455 * BFD_RELOC_PJ_CODE_REL16:               howto manager.
    456 * BFD_RELOC_PJ_CODE_REL32:               howto manager.
    457 * BFD_RELOC_PPC_B16:                     howto manager.
    458 * BFD_RELOC_PPC_B16_BRNTAKEN:            howto manager.
    459 * BFD_RELOC_PPC_B16_BRTAKEN:             howto manager.
    460 * BFD_RELOC_PPC_B26:                     howto manager.
    461 * BFD_RELOC_PPC_BA16:                    howto manager.
    462 * BFD_RELOC_PPC_BA16_BRNTAKEN:           howto manager.
    463 * BFD_RELOC_PPC_BA16_BRTAKEN:            howto manager.
    464 * BFD_RELOC_PPC_BA26:                    howto manager.
    465 * BFD_RELOC_PPC_COPY:                    howto manager.
    466 * BFD_RELOC_PPC_EMB_BIT_FLD:             howto manager.
    467 * BFD_RELOC_PPC_EMB_MRKREF:              howto manager.
    468 * BFD_RELOC_PPC_EMB_NADDR16:             howto manager.
    469 * BFD_RELOC_PPC_EMB_NADDR16_HA:          howto manager.
    470 * BFD_RELOC_PPC_EMB_NADDR16_HI:          howto manager.
    471 * BFD_RELOC_PPC_EMB_NADDR16_LO:          howto manager.
    472 * BFD_RELOC_PPC_EMB_NADDR32:             howto manager.
    473 * BFD_RELOC_PPC_EMB_RELSDA:              howto manager.
    474 * BFD_RELOC_PPC_EMB_RELSEC16:            howto manager.
    475 * BFD_RELOC_PPC_EMB_RELST_HA:            howto manager.
    476 * BFD_RELOC_PPC_EMB_RELST_HI:            howto manager.
    477 * BFD_RELOC_PPC_EMB_RELST_LO:            howto manager.
    478 * BFD_RELOC_PPC_EMB_SDA21:               howto manager.
    479 * BFD_RELOC_PPC_EMB_SDA2I16:             howto manager.
    480 * BFD_RELOC_PPC_EMB_SDA2REL:             howto manager.
    481 * BFD_RELOC_PPC_EMB_SDAI16:              howto manager.
    482 * BFD_RELOC_PPC_GLOB_DAT:                howto manager.
    483 * BFD_RELOC_PPC_JMP_SLOT:                howto manager.
    484 * BFD_RELOC_PPC_LOCAL24PC:               howto manager.
    485 * BFD_RELOC_PPC_RELATIVE:                howto manager.
    486 * BFD_RELOC_PPC_TOC16:                   howto manager.
    487 * BFD_RELOC_RVA:                         howto manager.
    488 * BFD_RELOC_SH_ALIGN:                    howto manager.
    489 * BFD_RELOC_SH_CODE:                     howto manager.
    490 * BFD_RELOC_SH_COPY:                     howto manager.
    491 * BFD_RELOC_SH_COUNT:                    howto manager.
    492 * BFD_RELOC_SH_DATA:                     howto manager.
    493 * BFD_RELOC_SH_GLOB_DAT:                 howto manager.
    494 * BFD_RELOC_SH_GOTPC:                    howto manager.
    495 * BFD_RELOC_SH_IMM4:                     howto manager.
    496 * BFD_RELOC_SH_IMM4BY2:                  howto manager.
    497 * BFD_RELOC_SH_IMM4BY4:                  howto manager.
    498 * BFD_RELOC_SH_IMM8:                     howto manager.
    499 * BFD_RELOC_SH_IMM8BY2:                  howto manager.
    500 * BFD_RELOC_SH_IMM8BY4:                  howto manager.
    501 * BFD_RELOC_SH_JMP_SLOT:                 howto manager.
    502 * BFD_RELOC_SH_LABEL:                    howto manager.
    503 * BFD_RELOC_SH_LOOP_END:                 howto manager.
    504 * BFD_RELOC_SH_LOOP_START:               howto manager.
    505 * BFD_RELOC_SH_PCDISP12BY2:              howto manager.
    506 * BFD_RELOC_SH_PCDISP8BY2:               howto manager.
    507 * BFD_RELOC_SH_PCRELIMM8BY2:             howto manager.
    508 * BFD_RELOC_SH_PCRELIMM8BY4:             howto manager.
    509 * BFD_RELOC_SH_RELATIVE:                 howto manager.
    510 * BFD_RELOC_SH_SWITCH16:                 howto manager.
    511 * BFD_RELOC_SH_SWITCH32:                 howto manager.
    512 * BFD_RELOC_SH_USES:                     howto manager.
    513 * BFD_RELOC_SPARC13:                     howto manager.
    514 * BFD_RELOC_SPARC22:                     howto manager.
    515 * BFD_RELOC_SPARC_10:                    howto manager.
    516 * BFD_RELOC_SPARC_11:                    howto manager.
    517 * BFD_RELOC_SPARC_5:                     howto manager.
    518 * BFD_RELOC_SPARC_6:                     howto manager.
    519 * BFD_RELOC_SPARC_64:                    howto manager.
    520 * BFD_RELOC_SPARC_7:                     howto manager.
    521 * BFD_RELOC_SPARC_BASE13:                howto manager.
    522 * BFD_RELOC_SPARC_BASE22:                howto manager.
    523 * BFD_RELOC_SPARC_COPY:                  howto manager.
    524 * BFD_RELOC_SPARC_DISP64:                howto manager.
    525 * BFD_RELOC_SPARC_GLOB_DAT:              howto manager.
    526 * BFD_RELOC_SPARC_GOT10:                 howto manager.
    527 * BFD_RELOC_SPARC_GOT13:                 howto manager.
    528 * BFD_RELOC_SPARC_GOT22:                 howto manager.
    529 * BFD_RELOC_SPARC_H44:                   howto manager.
    530 * BFD_RELOC_SPARC_HH22:                  howto manager.
    531 * BFD_RELOC_SPARC_HIX22:                 howto manager.
    532 * BFD_RELOC_SPARC_HM10:                  howto manager.
    533 * BFD_RELOC_SPARC_JMP_SLOT:              howto manager.
    534 * BFD_RELOC_SPARC_L44:                   howto manager.
    535 * BFD_RELOC_SPARC_LM22:                  howto manager.
    536 * BFD_RELOC_SPARC_LOX10:                 howto manager.
    537 * BFD_RELOC_SPARC_M44:                   howto manager.
    538 * BFD_RELOC_SPARC_OLO10:                 howto manager.
    539 * BFD_RELOC_SPARC_PC10:                  howto manager.
    540 * BFD_RELOC_SPARC_PC22:                  howto manager.
    541 * BFD_RELOC_SPARC_PC_HH22:               howto manager.
    542 * BFD_RELOC_SPARC_PC_HM10:               howto manager.
    543 * BFD_RELOC_SPARC_PC_LM22:               howto manager.
    544 * BFD_RELOC_SPARC_PLT64:                 howto manager.
    545 * BFD_RELOC_SPARC_REGISTER:              howto manager.
    546 * BFD_RELOC_SPARC_RELATIVE:              howto manager.
    547 * BFD_RELOC_SPARC_REV32:                 howto manager.
    548 * BFD_RELOC_SPARC_UA16:                  howto manager.
    549 * BFD_RELOC_SPARC_UA32:                  howto manager.
    550 * BFD_RELOC_SPARC_UA64:                  howto manager.
    551 * BFD_RELOC_SPARC_WDISP16:               howto manager.
    552 * BFD_RELOC_SPARC_WDISP19:               howto manager.
    553 * BFD_RELOC_SPARC_WDISP22:               howto manager.
    554 * BFD_RELOC_SPARC_WPLT30:                howto manager.
    555 * BFD_RELOC_THUMB_PCREL_BLX:             howto manager.
    556 * BFD_RELOC_THUMB_PCREL_BRANCH12:        howto manager.
    557 * BFD_RELOC_THUMB_PCREL_BRANCH23:        howto manager.
    558 * BFD_RELOC_THUMB_PCREL_BRANCH9:         howto manager.
    559 * BFD_RELOC_TIC30_LDP:                   howto manager.
    560 * BFD_RELOC_TIC54X_16_OF_23:             howto manager.
    561 * BFD_RELOC_TIC54X_23:                   howto manager.
    562 * BFD_RELOC_TIC54X_MS7_OF_23:            howto manager.
    563 * BFD_RELOC_TIC54X_PARTLS7:              howto manager.
    564 * BFD_RELOC_TIC54X_PARTMS9:              howto manager.
    565 * bfd_reloc_type_lookup:                 howto manager.
    566 * BFD_RELOC_V850_22_PCREL:               howto manager.
    567 * BFD_RELOC_V850_9_PCREL:                howto manager.
    568 * BFD_RELOC_V850_CALLT_16_16_OFFSET:     howto manager.
    569 * BFD_RELOC_V850_CALLT_6_7_OFFSET:       howto manager.
    570 * BFD_RELOC_V850_SDA_15_16_OFFSET:       howto manager.
    571 * BFD_RELOC_V850_SDA_16_16_OFFSET:       howto manager.
    572 * BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET: howto manager.
    573 * BFD_RELOC_V850_TDA_16_16_OFFSET:       howto manager.
    574 * BFD_RELOC_V850_TDA_4_4_OFFSET:         howto manager.
    575 * BFD_RELOC_V850_TDA_4_5_OFFSET:         howto manager.
    576 * BFD_RELOC_V850_TDA_6_8_OFFSET:         howto manager.
    577 * BFD_RELOC_V850_TDA_7_7_OFFSET:         howto manager.
    578 * BFD_RELOC_V850_TDA_7_8_OFFSET:         howto manager.
    579 * BFD_RELOC_V850_ZDA_15_16_OFFSET:       howto manager.
    580 * BFD_RELOC_V850_ZDA_16_16_OFFSET:       howto manager.
    581 * BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET: howto manager.
    582 * BFD_RELOC_VTABLE_ENTRY:                howto manager.
    583 * BFD_RELOC_VTABLE_INHERIT:              howto manager.
    584 * BFD_RELOC_X86_64_32S:                  howto manager.
    585 * BFD_RELOC_X86_64_COPY:                 howto manager.
    586 * BFD_RELOC_X86_64_GLOB_DAT:             howto manager.
    587 * BFD_RELOC_X86_64_GOT32:                howto manager.
    588 * BFD_RELOC_X86_64_GOTPCREL:             howto manager.
    589 * BFD_RELOC_X86_64_JUMP_SLOT:            howto manager.
    590 * BFD_RELOC_X86_64_PLT32:                howto manager.
    591 * BFD_RELOC_X86_64_RELATIVE:             howto manager.
    592 * bfd_scan_arch:                         Architectures.
    593 * bfd_scan_vma:                          BFD front end.
    594 * bfd_seach_for_target:                  bfd_target.
    595 * bfd_set_arch_info:                     Architectures.
    596 * bfd_set_archive_head:                  Archives.
    597 * bfd_set_default_target:                bfd_target.
    598 * bfd_set_error:                         BFD front end.
    599 * bfd_set_error_handler:                 BFD front end.
    600 * bfd_set_error_program_name:            BFD front end.
    601 * bfd_set_file_flags:                    BFD front end.
    602 * bfd_set_format:                        Formats.
    603 * bfd_set_gp_size:                       BFD front end.
    604 * bfd_set_private_flags:                 BFD front end.
    605 * bfd_set_reloc:                         BFD front end.
    606 * bfd_set_section_contents:              section prototypes.
    607 * bfd_set_section_flags:                 section prototypes.
    608 * bfd_set_section_size:                  section prototypes.
    609 * bfd_set_start_address:                 BFD front end.
    610 * bfd_set_symtab:                        symbol handling functions.
    611 * bfd_symbol_info:                       symbol handling functions.
    612 * bfd_target_list:                       bfd_target.
    613 * bfd_write_bigendian_4byte_int:         Internal.
    614 * coff_symbol_type:                      coff.
    615 * core_file_matches_executable_p:        Core Files.
    616 * GNU Free Documentation License:        GNU Free Documentation License.
    617 * Hash tables:                           Hash Tables.
    618 * internal object-file format:           Canonical format.
    619 * Linker:                                Linker Functions.
    620 * stuff:                                 BFD front end.
    621 * target vector (_bfd_final_link):       Performing the Final Link.
    622 * target vector (_bfd_link_add_symbols): Adding Symbols to the Hash Table.
    623 * target vector (_bfd_link_hash_table_create): Creating a Linker Hash Table.
    624 * The HOWTO Macro:                       typedef arelent.
    625 * what is it?:                           Overview.
    626 
    627 
     648* File layout::
     649* Symbol-table::
     650* mmo section mapping::
     651
     652
     653File: bfd.info,  Node: File layout,  Next: Symbol-table,  Prev: mmo,  Up: mmo
     654
     655File layout
     656-----------
     657
     658   The mmo file contents is not partitioned into named sections as with
     659e.g. ELF.  Memory areas is formed by specifying the location of the
     660data that follows.  Only the memory area `0x0000...00' to `0x01ff...ff'
     661is executable, so it is used for code (and constants) and the area
     662`0x2000...00' to `0x20ff...ff' is used for writable data.  *Note mmo
     663section mapping::.
     664
     665   Contents is entered as 32-bit words, xor:ed over previous contents,
     666always zero-initialized.  A word that starts with the byte `0x98' forms
     667a command called a `lopcode', where the next byte distinguished between
     668the thirteen lopcodes.  The two remaining bytes, called the `Y' and `Z'
     669fields, or the `YZ' field (a 16-bit big-endian number), are used for
     670various purposes different for each lopcode.  As documented in
     671<http://www-cs-faculty.stanford.edu/~knuth/mmixal-intro.ps.gz>, the
     672lopcodes are:
     673
     674   There is provision for specifying "special data" of 65536 different
     675types.  We use type 80 (decimal), arbitrarily chosen the same as the
     676ELF `e_machine' number for MMIX, filling it with section information
     677normally found in ELF objects. *Note mmo section mapping::.
     678
     679`lop_quote'
     680     0x98000001.  The next word is contents, regardless of whether it
     681     starts with 0x98 or not.
     682
     683`lop_loc'
     684     0x9801YYZZ, where `Z' is 1 or 2.  This is a location directive,
     685     setting the location for the next data to the next 32-bit word
     686     (for Z = 1) or 64-bit word (for Z = 2), plus Y * 2^56.  Normally
     687     `Y' is 0 for the text segment and 2 for the data segment.
     688
     689`lop_skip'
     690     0x9802YYZZ.  Increase the current location by `YZ' bytes.
     691
     692`lop_fixo'
     693     0x9803YYZZ, where `Z' is 1 or 2.  Store the current location as 64
     694     bits into the location pointed to by the next 32-bit (Z = 1) or
     695     64-bit (Z = 2) word, plus Y * 2^56.
     696
     697`lop_fixr'
     698     0x9804YYZZ.  `YZ' is stored into the current location plus 2 - 4 *
     699     YZ.
     700
     701`lop_fixrx'
     702     0x980500ZZ.  `Z' is 16 or 24.  A value `L' derived from the
     703     following 32-bit word are used in a manner similar to `YZ' in
     704     lop_fixr: it is xor:ed into the current location minus 4 * L.  The
     705     first byte of the word is 0 or 1.  If it is 1, then L = (LOWEST 24
     706     BITS OF WORD) - 2^Z, if 0, then L = (LOWEST 24 BITS OF WORD).
     707
     708`lop_file'
     709     0x9806YYZZ.  `Y' is the file number, `Z' is count of 32-bit words.
     710     Set the file number to `Y' and the line counter to 0.  The next Z
     711     * 4 bytes contain the file name, padded with zeros if the count is
     712     not a multiple of four.  The same `Y' may occur multiple times,
     713     but `Z' must be 0 for all but the first occurrence.
     714
     715`lop_line'
     716     0x9807YYZZ.  `YZ' is the line number.  Together with lop_file, it
     717     forms the source location for the next 32-bit word.  Note that for
     718     each non-lopcode 32-bit word, line numbers are assumed incremented
     719     by one.
     720
     721`lop_spec'
     722     0x9808YYZZ.  `YZ' is the type number.  Data until the next lopcode
     723     other than lop_quote forms special data of type `YZ'.  *Note mmo
     724     section mapping::.
     725
     726     Other types than 80, (or type 80 with a content that does not
     727     parse) is stored in sections named `.MMIX.spec_data.N' where N is
     728     the `YZ'-type.  The flags for such a sections say not to allocate
     729     or load the data.  The vma is 0.  Contents of multiple occurrences
     730     of special data N is concatenated to the data of the previous
     731     lop_spec Ns.  The location in data or code at which the lop_spec
     732     occurred is lost.
     733
     734`lop_pre'
     735     0x980901ZZ.  The first lopcode in a file.  The `Z' field forms the
     736     length of header information in 32-bit words, where the first word
     737     tells the time in seconds since `00:00:00 GMT Jan 1 1970'.
     738
     739`lop_post'
     740     0x980a00ZZ.  Z > 32.  This lopcode follows after all
     741     content-generating lopcodes in a program.  The `Z' field denotes
     742     the value of `rG' at the beginning of the program.  The following
     743     256 - Z big-endian 64-bit words are loaded into global registers
     744     `$G' ... `$255'.
     745
     746`lop_stab'
     747     0x980b0000.  The next-to-last lopcode in a program.  Must follow
     748     immediately after the lop_post lopcode and its data.  After this
     749     lopcode follows all symbols in a compressed format (*note
     750     Symbol-table::).
     751
     752`lop_end'
     753     0x980cYYZZ.  The last lopcode in a program.  It must follow the
     754     lop_stab lopcode and its data.  The `YZ' field contains the number
     755     of 32-bit words of symbol table information after the preceding
     756     lop_stab lopcode.
     757
     758   Note that the lopcode "fixups"; `lop_fixr', `lop_fixrx' and
     759`lop_fixo' are not generated by BFD, but are handled.  They are
     760generated by `mmixal'.
     761
     762   This trivial one-label, one-instruction file:
     763
     764      :Main TRAP 1,2,3
     765
     766   can be represented this way in mmo:
     767
     768      0x98090101 - lop_pre, one 32-bit word with timestamp.
     769      <timestamp>
     770      0x98010002 - lop_loc, text segment, using a 64-bit address.
     771                   Note that mmixal does not emit this for the file above.
     772      0x00000000 - Address, high 32 bits.
     773      0x00000000 - Address, low 32 bits.
     774      0x98060002 - lop_file, 2 32-bit words for file-name.
     775      0x74657374 - "test"
     776      0x2e730000 - ".s\0\0"
     777      0x98070001 - lop_line, line 1.
     778      0x00010203 - TRAP 1,2,3
     779      0x980a00ff - lop_post, setting $255 to 0.
     780      0x00000000
     781      0x00000000
     782      0x980b0000 - lop_stab for ":Main" = 0, serial 1.
     783      0x203a4040   *Note Symbol-table::.
     784      0x10404020
     785      0x4d206120
     786      0x69016e00
     787      0x81000000
     788      0x980c0005 - lop_end; symbol table contained five 32-bit words.
     789
     790
     791File: bfd.info,  Node: Symbol-table,  Next: mmo section mapping,  Prev: File layout,  Up: mmo
     792
     793Symbol table format
     794-------------------
     795
     796   From mmixal.w (or really, the generated mmixal.tex) in
     797<http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz>):
     798"Symbols are stored and retrieved by means of a `ternary search trie',
     799following ideas of Bentley and Sedgewick. (See ACM-SIAM Symp. on
     800Discrete Algorithms `8' (1997), 360-369; R.Sedgewick, `Algorithms in C'
     801(Reading, Mass.  Addison-Wesley, 1998), `15.4'.)  Each trie node stores
     802a character, and there are branches to subtries for the cases where a
     803given character is less than, equal to, or greater than the character
     804in the trie.  There also is a pointer to a symbol table entry if a
     805symbol ends at the current node."
     806
     807   So it's a tree encoded as a stream of bytes.  The stream of bytes
     808acts on a single virtual global symbol, adding and removing characters
     809and signalling complete symbol points.  Here, we read the stream and
     810create symbols at the completion points.
     811
     812   First, there's a control byte `m'.  If any of the listed bits in `m'
     813is nonzero, we execute what stands at the right, in the listed order:
     814
     815      (MMO3_LEFT)
     816      0x40 - Traverse left trie.
     817             (Read a new command byte and recurse.)
     818     
     819      (MMO3_SYMBITS)
     820      0x2f - Read the next byte as a character and store it in the
     821             current character position; increment character position.
     822             Test the bits of `m':
     823     
     824             (MMO3_WCHAR)
     825             0x80 - The character is 16-bit (so read another byte,
     826                    merge into current character.
     827     
     828             (MMO3_TYPEBITS)
     829             0xf  - We have a complete symbol; parse the type, value
     830                    and serial number and do what should be done
     831                    with a symbol.  The type and length information
     832                    is in j = (m & 0xf).
     833     
     834                    (MMO3_REGQUAL_BITS)
     835                    j == 0xf: A register variable.  The following
     836                              byte tells which register.
     837                    j <= 8:   An absolute symbol.  Read j bytes as the
     838                              big-endian number the symbol equals.
     839                              A j = 2 with two zero bytes denotes an
     840                              unknown symbol.
     841                    j > 8:    As with j <= 8, but add (0x20 << 56)
     842                              to the value in the following j - 8
     843                              bytes.
     844     
     845                    Then comes the serial number, as a variant of
     846                    uleb128, but better named ubeb128:
     847                    Read bytes and shift the previous value left 7
     848                    (multiply by 128).  Add in the new byte, repeat
     849                    until a byte has bit 7 set.  The serial number
     850                    is the computed value minus 128.
     851     
     852             (MMO3_MIDDLE)
     853             0x20 - Traverse middle trie.  (Read a new command byte
     854                    and recurse.)  Decrement character position.
     855     
     856      (MMO3_RIGHT)
     857      0x10 - Traverse right trie.  (Read a new command byte and
     858             recurse.)
     859
     860   Let's look again at the `lop_stab' for the trivial file (*note File
     861layout::).
     862
     863      0x980b0000 - lop_stab for ":Main" = 0, serial 1.
     864      0x203a4040
     865      0x10404020
     866      0x4d206120
     867      0x69016e00
     868      0x81000000
     869
     870   This forms the trivial trie (note that the path between ":" and "M"
     871is redundant):
     872
     873      203a     ":"
     874      40       /
     875      40      /
     876      10      \
     877      40      /
     878      40     /
     879      204d  "M"
     880      2061  "a"
     881      2069  "i"
     882      016e  "n" is the last character in a full symbol, and
     883            with a value represented in one byte.
     884      00    The value is 0.
     885      81    The serial number is 1.
     886
     887
     888File: bfd.info,  Node: mmo section mapping,  Prev: Symbol-table,  Up: mmo
     889
     890mmo section mapping
     891-------------------
     892
     893   The implementation in BFD uses special data type 80 (decimal) to
     894encapsulate and describe named sections, containing e.g. debug
     895information.  If needed, any datum in the encapsulation will be quoted
     896using lop_quote.  First comes a 32-bit word holding the number of
     89732-bit words containing the zero-terminated zero-padded segment name.
     898After the name there's a 32-bit word holding flags describing the
     899section type.  Then comes a 64-bit big-endian word with the section
     900length (in bytes), then another with the section start address.
     901Depending on the type of section, the contents might follow,
     902zero-padded to 32-bit boundary.  For a loadable section (such as data
     903or code), the contents might follow at some later point, not
     904necessarily immediately, as a lop_loc with the same start address as in
     905the section description, followed by the contents.  This in effect
     906forms a descriptor that must be emitted before the actual contents.
     907Sections described this way must not overlap.
     908
     909   For areas that don't have such descriptors, synthetic sections are
     910formed by BFD.  Consecutive contents in the two memory areas
     911`0x0000...00' to `0x01ff...ff' and `0x2000...00' to `0x20ff...ff' are
     912entered in sections named `.text' and `.data' respectively.  If an area
     913is not otherwise described, but would together with a neighboring lower
     914area be less than `0x40000000' bytes long, it is joined with the lower
     915area and the gap is zero-filled.  For other cases, a new section is
     916formed, named `.MMIX.sec.N'.  Here, N is a number, a running count
     917through the mmo file, starting at 0.
     918
     919   A loadable section specified as:
     920
     921      .section secname,"ax"
     922      TETRA 1,2,3,4,-1,-2009
     923      BYTE 80
     924
     925   and linked to address `0x4', is represented by the sequence:
     926
     927      0x98080050 - lop_spec 80
     928      0x00000002 - two 32-bit words for the section name
     929      0x7365636e - "secn"
     930      0x616d6500 - "ame\0"
     931      0x00000033 - flags CODE, READONLY, LOAD, ALLOC
     932      0x00000000 - high 32 bits of section length
     933      0x0000001c - section length is 28 bytes; 6 * 4 + 1 + alignment to 32 bits
     934      0x00000000 - high 32 bits of section address
     935      0x00000004 - section address is 4
     936      0x98010002 - 64 bits with address of following data
     937      0x00000000 - high 32 bits of address
     938      0x00000004 - low 32 bits: data starts at address 4
     939      0x00000001 - 1
     940      0x00000002 - 2
     941      0x00000003 - 3
     942      0x00000004 - 4
     943      0xffffffff - -1
     944      0xfffff827 - -2009
     945      0x50000000 - 80 as a byte, padded with zeros.
     946
     947   Note that the lop_spec wrapping does not include the section
     948contents.  Compare this to a non-loaded section specified as:
     949
     950      .section thirdsec
     951      TETRA 200001,100002
     952      BYTE 38,40
     953
     954   This, when linked to address `0x200000000000001c', is represented by:
     955
     956      0x98080050 - lop_spec 80
     957      0x00000002 - two 32-bit words for the section name
     958      0x7365636e - "thir"
     959      0x616d6500 - "dsec"
     960      0x00000010 - flag READONLY
     961      0x00000000 - high 32 bits of section length
     962      0x0000000c - section length is 12 bytes; 2 * 4 + 2 + alignment to 32 bits
     963      0x20000000 - high 32 bits of address
     964      0x0000001c - low 32 bits of address 0x200000000000001c
     965      0x00030d41 - 200001
     966      0x000186a2 - 100002
     967      0x26280000 - 38, 40 as bytes, padded with zeros
     968
     969   For the latter example, the section contents must not be loaded in
     970memory, and is therefore specified as part of the special data.  The
     971address is usually unimportant but might provide information for e.g.
     972the DWARF 2 debugging format.
     973
  • branches/GNU/src/binutils/bfd/doc/bfd.texinfo

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11\input texinfo.tex
    22@setfilename bfd.info
    3 @c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 2000
     3@c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 2000, 2003
    44@c Free Software Foundation, Inc.
    55@c
     
    3131This file documents the BFD library.
    3232
    33 Copyright (C) 1991, 2000 Free Software Foundation, Inc.
     33Copyright (C) 1991, 2000, 2001, 2003 Free Software Foundation, Inc.
    3434
    3535      Permission is granted to copy, distribute and/or modify this document
     
    3838      with no Invariant Sections, with no Front-Cover Texts, and with no
    3939      Back-Cover Texts.  A copy of the license is included in the
    40       section entitled "GNU Free Documentation License".
     40      section entitled ``GNU Free Documentation License''.
    4141
    4242@ignore
     
    5757@subtitle{The Binary File Descriptor Library}
    5858@sp 1
    59 @subtitle First Edition---BFD version < 3.0
    60 @subtitle April 1991
     59@subtitle First Edition---BFD version < 3.0  % Since no product is stable berfore version 3.0 :-)
     60@subtitle Original Document Created: April 1991
    6161@author {Steve Chamberlain}
    6262@author {Cygnus Support}
     
    6565@tex
    6666\def\$#1${{#1}}  % Kluge: collect RCS revision info without $...$
    67 \xdef\manvers{\$Revision: 1.2.2.1 $}  % For use in headers, footers too
     67\xdef\manvers{\1.5}  % For use in headers, footers too
    6868{\parskip=0pt
    69 \hfill Cygnus Support\par
    70 \hfill sac\@cygnus.com\par
     69\hfill Free Software Foundation\par
     70\hfill sac\@www.gnu.org\par
    7171\hfill {\it BFD}, \manvers\par
    7272\hfill \TeX{}info \texinfoversion\par
     
    7676
    7777@vskip 0pt plus 1filll
    78 Copyright @copyright{} 1991 Free Software Foundation, Inc.
     78Copyright @copyright{} 1991, 2001, 2003 Free Software Foundation, Inc.
    7979
    8080      Permission is granted to copy, distribute and/or modify this document
     
    8383      with no Invariant Sections, with no Front-Cover Texts, and with no
    8484      Back-Cover Texts.  A copy of the license is included in the
    85       section entitled "GNU Free Documentation License".
     85      section entitled ``GNU Free Documentation License''.
    8686
    8787@end titlepage
     
    171171@code{abfd}.
    172172
    173 @lisp
     173@example
    174174@c @cartouche
    175175#include "bfd.h"
    176176
    177 unsigned int number_of_sections(abfd)
     177unsigned int number_of_sections (abfd)
    178178bfd *abfd;
    179179@{
    180   return bfd_count_sections(abfd);
     180  return bfd_count_sections (abfd);
    181181@}
    182182@c @end cartouche
    183 @end lisp
     183@end example
    184184
    185185The abstraction used within BFD is that an object file has:
     
    206206
    207207@node BFD front end, BFD back ends, Overview, Top
    208 @chapter BFD front end
     208@chapter BFD Front End
    209209@include bfdt.texi
     210@include bfdio.texi
    210211
    211212@menu
     
    228229
    229230@node Memory Usage, Initialization, BFD front end, BFD front end
    230 @section Memory usage
     231@section Memory Usage
    231232BFD keeps all of its internal structures in obstacks. There is one obstack
    232233per open BFD file, into which the current state is stored. When a BFD is
     
    299300* coff ::       coff backends
    300301* elf  ::       elf backends
     302* mmo  ::       mmo backend
    301303@ignore
    302304* oasys ::      oasys backends
     
    314316@include  coffcode.texi
    315317
    316 @node elf,  , coff, BFD back ends
     318@node elf, mmo, coff, BFD back ends
    317319@include  elf.texi
    318320@c Leave this out until the file has some actual contents...
    319321@c @include  elfcode.texi
    320322
     323@node mmo,  , elf, BFD back ends
     324@include  mmo.texi
     325
    321326@node GNU Free Documentation License, Index, BFD back ends, Top
    322 @chapter GNU Free Documentation License
    323 @cindex GNU Free Documentation License
    324 
    325                 GNU Free Documentation License
    326                
    327                    Version 1.1, March 2000
    328 
    329  Copyright (C) 2000  Free Software Foundation, Inc.
    330   59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    331      
    332  Everyone is permitted to copy and distribute verbatim copies
    333  of this license document, but changing it is not allowed.
    334 
    335 
    336 0. PREAMBLE
    337 
    338 The purpose of this License is to make a manual, textbook, or other
    339 written document "free" in the sense of freedom: to assure everyone
    340 the effective freedom to copy and redistribute it, with or without
    341 modifying it, either commercially or noncommercially.  Secondarily,
    342 this License preserves for the author and publisher a way to get
    343 credit for their work, while not being considered responsible for
    344 modifications made by others.
    345 
    346 This License is a kind of "copyleft", which means that derivative
    347 works of the document must themselves be free in the same sense.  It
    348 complements the GNU General Public License, which is a copyleft
    349 license designed for free software.
    350 
    351 We have designed this License in order to use it for manuals for free
    352 software, because free software needs free documentation: a free
    353 program should come with manuals providing the same freedoms that the
    354 software does.  But this License is not limited to software manuals;
    355 it can be used for any textual work, regardless of subject matter or
    356 whether it is published as a printed book.  We recommend this License
    357 principally for works whose purpose is instruction or reference.
    358 
    359 
    360 1. APPLICABILITY AND DEFINITIONS
    361 
    362 This License applies to any manual or other work that contains a
    363 notice placed by the copyright holder saying it can be distributed
    364 under the terms of this License.  The "Document", below, refers to any
    365 such manual or work.  Any member of the public is a licensee, and is
    366 addressed as "you".
    367 
    368 A "Modified Version" of the Document means any work containing the
    369 Document or a portion of it, either copied verbatim, or with
    370 modifications and/or translated into another language.
    371 
    372 A "Secondary Section" is a named appendix or a front-matter section of
    373 the Document that deals exclusively with the relationship of the
    374 publishers or authors of the Document to the Document's overall subject
    375 (or to related matters) and contains nothing that could fall directly
    376 within that overall subject.  (For example, if the Document is in part a
    377 textbook of mathematics, a Secondary Section may not explain any
    378 mathematics.)  The relationship could be a matter of historical
    379 connection with the subject or with related matters, or of legal,
    380 commercial, philosophical, ethical or political position regarding
    381 them.
    382 
    383 The "Invariant Sections" are certain Secondary Sections whose titles
    384 are designated, as being those of Invariant Sections, in the notice
    385 that says that the Document is released under this License.
    386 
    387 The "Cover Texts" are certain short passages of text that are listed,
    388 as Front-Cover Texts or Back-Cover Texts, in the notice that says that
    389 the Document is released under this License.
    390 
    391 A "Transparent" copy of the Document means a machine-readable copy,
    392 represented in a format whose specification is available to the
    393 general public, whose contents can be viewed and edited directly and
    394 straightforwardly with generic text editors or (for images composed of
    395 pixels) generic paint programs or (for drawings) some widely available
    396 drawing editor, and that is suitable for input to text formatters or
    397 for automatic translation to a variety of formats suitable for input
    398 to text formatters.  A copy made in an otherwise Transparent file
    399 format whose markup has been designed to thwart or discourage
    400 subsequent modification by readers is not Transparent.  A copy that is
    401 not "Transparent" is called "Opaque".
    402 
    403 Examples of suitable formats for Transparent copies include plain
    404 ASCII without markup, Texinfo input format, LaTeX input format, SGML
    405 or XML using a publicly available DTD, and standard-conforming simple
    406 HTML designed for human modification.  Opaque formats include
    407 PostScript, PDF, proprietary formats that can be read and edited only
    408 by proprietary word processors, SGML or XML for which the DTD and/or
    409 processing tools are not generally available, and the
    410 machine-generated HTML produced by some word processors for output
    411 purposes only.
    412 
    413 The "Title Page" means, for a printed book, the title page itself,
    414 plus such following pages as are needed to hold, legibly, the material
    415 this License requires to appear in the title page.  For works in
    416 formats which do not have any title page as such, "Title Page" means
    417 the text near the most prominent appearance of the work's title,
    418 preceding the beginning of the body of the text.
    419 
    420 
    421 2. VERBATIM COPYING
    422 
    423 You may copy and distribute the Document in any medium, either
    424 commercially or noncommercially, provided that this License, the
    425 copyright notices, and the license notice saying this License applies
    426 to the Document are reproduced in all copies, and that you add no other
    427 conditions whatsoever to those of this License.  You may not use
    428 technical measures to obstruct or control the reading or further
    429 copying of the copies you make or distribute.  However, you may accept
    430 compensation in exchange for copies.  If you distribute a large enough
    431 number of copies you must also follow the conditions in section 3.
    432 
    433 You may also lend copies, under the same conditions stated above, and
    434 you may publicly display copies.
    435 
    436 
    437 3. COPYING IN QUANTITY
    438 
    439 If you publish printed copies of the Document numbering more than 100,
    440 and the Document's license notice requires Cover Texts, you must enclose
    441 the copies in covers that carry, clearly and legibly, all these Cover
    442 Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
    443 the back cover.  Both covers must also clearly and legibly identify
    444 you as the publisher of these copies.  The front cover must present
    445 the full title with all words of the title equally prominent and
    446 visible.  You may add other material on the covers in addition.
    447 Copying with changes limited to the covers, as long as they preserve
    448 the title of the Document and satisfy these conditions, can be treated
    449 as verbatim copying in other respects.
    450 
    451 If the required texts for either cover are too voluminous to fit
    452 legibly, you should put the first ones listed (as many as fit
    453 reasonably) on the actual cover, and continue the rest onto adjacent
    454 pages.
    455 
    456 If you publish or distribute Opaque copies of the Document numbering
    457 more than 100, you must either include a machine-readable Transparent
    458 copy along with each Opaque copy, or state in or with each Opaque copy
    459 a publicly-accessible computer-network location containing a complete
    460 Transparent copy of the Document, free of added material, which the
    461 general network-using public has access to download anonymously at no
    462 charge using public-standard network protocols.  If you use the latter
    463 option, you must take reasonably prudent steps, when you begin
    464 distribution of Opaque copies in quantity, to ensure that this
    465 Transparent copy will remain thus accessible at the stated location
    466 until at least one year after the last time you distribute an Opaque
    467 copy (directly or through your agents or retailers) of that edition to
    468 the public.
    469 
    470 It is requested, but not required, that you contact the authors of the
    471 Document well before redistributing any large number of copies, to give
    472 them a chance to provide you with an updated version of the Document.
    473 
    474 
    475 4. MODIFICATIONS
    476 
    477 You may copy and distribute a Modified Version of the Document under
    478 the conditions of sections 2 and 3 above, provided that you release
    479 the Modified Version under precisely this License, with the Modified
    480 Version filling the role of the Document, thus licensing distribution
    481 and modification of the Modified Version to whoever possesses a copy
    482 of it.  In addition, you must do these things in the Modified Version:
    483 
    484 A. Use in the Title Page (and on the covers, if any) a title distinct
    485    from that of the Document, and from those of previous versions
    486    (which should, if there were any, be listed in the History section
    487    of the Document).  You may use the same title as a previous version
    488    if the original publisher of that version gives permission.
    489 B. List on the Title Page, as authors, one or more persons or entities
    490    responsible for authorship of the modifications in the Modified
    491    Version, together with at least five of the principal authors of the
    492    Document (all of its principal authors, if it has less than five).
    493 C. State on the Title page the name of the publisher of the
    494    Modified Version, as the publisher.
    495 D. Preserve all the copyright notices of the Document.
    496 E. Add an appropriate copyright notice for your modifications
    497    adjacent to the other copyright notices.
    498 F. Include, immediately after the copyright notices, a license notice
    499    giving the public permission to use the Modified Version under the
    500    terms of this License, in the form shown in the Addendum below.
    501 G. Preserve in that license notice the full lists of Invariant Sections
    502    and required Cover Texts given in the Document's license notice.
    503 H. Include an unaltered copy of this License.
    504 I. Preserve the section entitled "History", and its title, and add to
    505    it an item stating at least the title, year, new authors, and
    506    publisher of the Modified Version as given on the Title Page.  If
    507    there is no section entitled "History" in the Document, create one
    508    stating the title, year, authors, and publisher of the Document as
    509    given on its Title Page, then add an item describing the Modified
    510    Version as stated in the previous sentence.
    511 J. Preserve the network location, if any, given in the Document for
    512    public access to a Transparent copy of the Document, and likewise
    513    the network locations given in the Document for previous versions
    514    it was based on.  These may be placed in the "History" section.
    515    You may omit a network location for a work that was published at
    516    least four years before the Document itself, or if the original
    517    publisher of the version it refers to gives permission.
    518 K. In any section entitled "Acknowledgements" or "Dedications",
    519    preserve the section's title, and preserve in the section all the
    520    substance and tone of each of the contributor acknowledgements
    521    and/or dedications given therein.
    522 L. Preserve all the Invariant Sections of the Document,
    523    unaltered in their text and in their titles.  Section numbers
    524    or the equivalent are not considered part of the section titles.
    525 M. Delete any section entitled "Endorsements".  Such a section
    526    may not be included in the Modified Version.
    527 N. Do not retitle any existing section as "Endorsements"
    528    or to conflict in title with any Invariant Section.
    529 
    530 If the Modified Version includes new front-matter sections or
    531 appendices that qualify as Secondary Sections and contain no material
    532 copied from the Document, you may at your option designate some or all
    533 of these sections as invariant.  To do this, add their titles to the
    534 list of Invariant Sections in the Modified Version's license notice.
    535 These titles must be distinct from any other section titles.
    536 
    537 You may add a section entitled "Endorsements", provided it contains
    538 nothing but endorsements of your Modified Version by various
    539 parties--for example, statements of peer review or that the text has
    540 been approved by an organization as the authoritative definition of a
    541 standard.
    542 
    543 You may add a passage of up to five words as a Front-Cover Text, and a
    544 passage of up to 25 words as a Back-Cover Text, to the end of the list
    545 of Cover Texts in the Modified Version.  Only one passage of
    546 Front-Cover Text and one of Back-Cover Text may be added by (or
    547 through arrangements made by) any one entity.  If the Document already
    548 includes a cover text for the same cover, previously added by you or
    549 by arrangement made by the same entity you are acting on behalf of,
    550 you may not add another; but you may replace the old one, on explicit
    551 permission from the previous publisher that added the old one.
    552 
    553 The author(s) and publisher(s) of the Document do not by this License
    554 give permission to use their names for publicity for or to assert or
    555 imply endorsement of any Modified Version.
    556 
    557 
    558 5. COMBINING DOCUMENTS
    559 
    560 You may combine the Document with other documents released under this
    561 License, under the terms defined in section 4 above for modified
    562 versions, provided that you include in the combination all of the
    563 Invariant Sections of all of the original documents, unmodified, and
    564 list them all as Invariant Sections of your combined work in its
    565 license notice.
    566 
    567 The combined work need only contain one copy of this License, and
    568 multiple identical Invariant Sections may be replaced with a single
    569 copy.  If there are multiple Invariant Sections with the same name but
    570 different contents, make the title of each such section unique by
    571 adding at the end of it, in parentheses, the name of the original
    572 author or publisher of that section if known, or else a unique number.
    573 Make the same adjustment to the section titles in the list of
    574 Invariant Sections in the license notice of the combined work.
    575 
    576 In the combination, you must combine any sections entitled "History"
    577 in the various original documents, forming one section entitled
    578 "History"; likewise combine any sections entitled "Acknowledgements",
    579 and any sections entitled "Dedications".  You must delete all sections
    580 entitled "Endorsements."
    581 
    582 
    583 6. COLLECTIONS OF DOCUMENTS
    584 
    585 You may make a collection consisting of the Document and other documents
    586 released under this License, and replace the individual copies of this
    587 License in the various documents with a single copy that is included in
    588 the collection, provided that you follow the rules of this License for
    589 verbatim copying of each of the documents in all other respects.
    590 
    591 You may extract a single document from such a collection, and distribute
    592 it individually under this License, provided you insert a copy of this
    593 License into the extracted document, and follow this License in all
    594 other respects regarding verbatim copying of that document.
    595 
    596 
    597 7. AGGREGATION WITH INDEPENDENT WORKS
    598 
    599 A compilation of the Document or its derivatives with other separate
    600 and independent documents or works, in or on a volume of a storage or
    601 distribution medium, does not as a whole count as a Modified Version
    602 of the Document, provided no compilation copyright is claimed for the
    603 compilation.  Such a compilation is called an "aggregate", and this
    604 License does not apply to the other self-contained works thus compiled
    605 with the Document, on account of their being thus compiled, if they
    606 are not themselves derivative works of the Document.
    607 
    608 If the Cover Text requirement of section 3 is applicable to these
    609 copies of the Document, then if the Document is less than one quarter
    610 of the entire aggregate, the Document's Cover Texts may be placed on
    611 covers that surround only the Document within the aggregate.
    612 Otherwise they must appear on covers around the whole aggregate.
    613 
    614 
    615 8. TRANSLATION
    616 
    617 Translation is considered a kind of modification, so you may
    618 distribute translations of the Document under the terms of section 4.
    619 Replacing Invariant Sections with translations requires special
    620 permission from their copyright holders, but you may include
    621 translations of some or all Invariant Sections in addition to the
    622 original versions of these Invariant Sections.  You may include a
    623 translation of this License provided that you also include the
    624 original English version of this License.  In case of a disagreement
    625 between the translation and the original English version of this
    626 License, the original English version will prevail.
    627 
    628 
    629 9. TERMINATION
    630 
    631 You may not copy, modify, sublicense, or distribute the Document except
    632 as expressly provided for under this License.  Any other attempt to
    633 copy, modify, sublicense or distribute the Document is void, and will
    634 automatically terminate your rights under this License.  However,
    635 parties who have received copies, or rights, from you under this
    636 License will not have their licenses terminated so long as such
    637 parties remain in full compliance.
    638 
    639 
    640 10. FUTURE REVISIONS OF THIS LICENSE
    641 
    642 The Free Software Foundation may publish new, revised versions
    643 of the GNU Free Documentation License from time to time.  Such new
    644 versions will be similar in spirit to the present version, but may
    645 differ in detail to address new problems or concerns.  See
    646 http://www.gnu.org/copyleft/.
    647 
    648 Each version of the License is given a distinguishing version number.
    649 If the Document specifies that a particular numbered version of this
    650 License "or any later version" applies to it, you have the option of
    651 following the terms and conditions either of that specified version or
    652 of any later version that has been published (not as a draft) by the
    653 Free Software Foundation.  If the Document does not specify a version
    654 number of this License, you may choose any version ever published (not
    655 as a draft) by the Free Software Foundation.
    656 
    657 
    658 ADDENDUM: How to use this License for your documents
    659 
    660 To use this License in a document you have written, include a copy of
    661 the License in the document and put the following copyright and
    662 license notices just after the title page:
    663 
    664 @smallexample
    665     Copyright (c)  YEAR  YOUR NAME.
    666     Permission is granted to copy, distribute and/or modify this document
    667     under the terms of the GNU Free Documentation License, Version 1.1
    668     or any later version published by the Free Software Foundation;
    669     with the Invariant Sections being LIST THEIR TITLES, with the
    670     Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
    671     A copy of the license is included in the section entitled "GNU
    672     Free Documentation License".
    673 @end smallexample
    674 
    675 If you have no Invariant Sections, write "with no Invariant Sections"
    676 instead of saying which ones are invariant.  If you have no
    677 Front-Cover Texts, write "no Front-Cover Texts" instead of
    678 "Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
    679 
    680 If your document contains nontrivial examples of program code, we
    681 recommend releasing these examples in parallel under your choice of
    682 free software license, such as the GNU General Public License,
    683 to permit their use in free software.
    684 
    685 @node Index,  , GNU Free Documentation License , Top
     327@include fdl.texi
     328
     329@node Index,  , GNU Free Documentation License, Top
    686330@unnumbered Index
    687331@printindex cp
  • branches/GNU/src/binutils/bfd/doc/bfdint.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11\input texinfo
    22@c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
    3 @c 2000
     3@c 2000, 2001
    44@c Free Software Foundation, Inc.
    55@setfilename bfdint.info
     
    336336@item bfd_target_evax_flavour
    337337openVMS.
     338@item bfd_target_mmo_flavour
     339Donald Knuth's MMIXware object format.
    338340@end table
    339341
     
    380382@subsection Swapping functions
    381383
    382 Every target vector has fuction pointers used for swapping information
     384Every target vector has function pointers used for swapping information
    383385in and out of the target representation.  There are two sets of
    384386functions: one for data information, and one for header information.
     
    504506@samp{bfd_get_section_contents}.  Most targets set this to
    505507@samp{_bfd_generic_get_section_contents}, which does a @samp{bfd_seek}
    506 based on the section's @samp{filepos} field and a @samp{bfd_read}.  The
     508based on the section's @samp{filepos} field and a @samp{bfd_bread}.  The
    507509corresponding field in the target vector is named
    508510@samp{_bfd_get_section_contents}.
     
    637639
    638640@item _write_armap
    639 Write out the archive symbol table using calls to @samp{bfd_write}.
     641Write out the archive symbol table using calls to @samp{bfd_bwrite}.
    640642This is normally called from the archive @samp{write_contents} routine.
    641643The corresponding field in the target vector is named @samp{write_armap}
     
    12921294Using the linker to generate relocateable output in a different object
    12931295file format is impossible in the general case, so you generally don't
    1294 have to worry about that.  Linking input files of different object file
    1295 formats together is quite unusual, but if you're really dedicated you
    1296 may want to consider testing this case, both when the output object file
    1297 format is the same as your format, and when it is different.
     1296have to worry about that.  The GNU linker makes sure to stop that from
     1297happening when an input file in a different format has relocations.
     1298
     1299Linking input files of different object file formats together is quite
     1300unusual, but if you're really dedicated you may want to consider testing
     1301this case, both when the output object file format is the same as your
     1302format, and when it is different.
    12981303@end itemize
    12991304
     
    15411546Define @samp{ELF_MACHINE_CODE} to the magic number which should appear
    15421547in the @samp{e_machine} field of the ELF header.  As of this writing,
    1543 these magic numbers are assigned by SCO; if you want to get a magic
     1548these magic numbers are assigned by Caldera; if you want to get a magic
    15441549number for a particular processor, try sending a note to
    1545 @email{registry@@sco.com}.  In the BFD sources, the magic numbers are
     1550@email{registry@@caldera.com}.  In the BFD sources, the magic numbers are
    15461551found in @file{include/elf/common.h}; they have names beginning with
    15471552@samp{EM_}.
     
    16071612it should use the @samp{START_RELOC_NUMBERS}, @samp{RELOC_NUMBER},
    16081613@samp{FAKE_RELOC}, @samp{EMPTY_RELOC} and @samp{END_RELOC_NUMBERS}
    1609 macros to create a table mapping the number used to indentify a
     1614macros to create a table mapping the number used to identify a
    16101615relocation to a name describing that relocation.
    16111616
     
    17841789
    17851790@item BFD
    1786 The BFD library itself.  Also, each object file, archive, or exectable
     1791The BFD library itself.  Also, each object file, archive, or executable
    17871792opened by the BFD library has the type @samp{bfd *}, and is sometimes
    17881793referred to as a bfd.
  • branches/GNU/src/binutils/bfd/doc/bfdsumm.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    55the object file's data structures.
    66
    7 As different information from the the object files is required,
     7As different information from the object files is required,
    88BFD reads from different sections of the file and processes them.
    99For example, a very common operation for the linker is processing symbol
  • branches/GNU/src/binutils/bfd/doc/bfdt.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1111@example
    1212
    13 struct _bfd
     13struct bfd
    1414@{
    15     /* The filename the application opened the BFD with.  */
    16     CONST char *filename;
    17 
    18     /* A pointer to the target jump table.             */
    19     const struct bfd_target *xvec;
    20 
    21     /* To avoid dragging too many header files into every file that
    22        includes `@code{bfd.h}', IOSTREAM has been declared as a "char
    23        *", and MTIME as a "long".  Their correct types, to which they
    24        are cast when used, are "FILE *" and "time_t".    The iostream
    25        is the result of an fopen on the filename.  However, if the
    26        BFD_IN_MEMORY flag is set, then iostream is actually a pointer
    27        to a bfd_in_memory struct.  */
    28     PTR iostream;
    29 
    30     /* Is the file descriptor being cached?  That is, can it be closed as
    31        needed, and re-opened when accessed later?  */
    32 
    33     boolean cacheable;
    34 
    35     /* Marks whether there was a default target specified when the
    36        BFD was opened. This is used to select which matching algorithm
    37        to use to choose the back end. */
    38 
    39     boolean target_defaulted;
    40 
    41     /* The caching routines use these to maintain a
    42        least-recently-used list of BFDs */
    43 
    44     struct _bfd *lru_prev, *lru_next;
    45 
    46     /* When a file is closed by the caching routines, BFD retains
    47        state information on the file here: */
    48 
    49     file_ptr where;
    50 
    51     /* and here: (``once'' means at least once) */
    52 
    53     boolean opened_once;
    54 
    55     /* Set if we have a locally maintained mtime value, rather than
    56        getting it from the file each time: */
    57 
    58     boolean mtime_set;
    59 
    60     /* File modified time, if mtime_set is true: */
    61 
    62     long mtime;
    63 
    64     /* Reserved for an unimplemented file locking extension.*/
    65 
    66     int ifd;
    67 
    68     /* The format which belongs to the BFD. (object, core, etc.) */
    69 
    70     bfd_format format;
    71 
    72     /* The direction the BFD was opened with*/
    73 
    74     enum bfd_direction @{no_direction = 0,
    75                         read_direction = 1,
    76                         write_direction = 2,
    77                         both_direction = 3@} direction;
    78 
    79     /* Format_specific flags*/
    80 
    81     flagword flags;
    82 
    83     /* Currently my_archive is tested before adding origin to
    84        anything. I believe that this can become always an add of
    85        origin, with origin set to 0 for non archive files.   */
    86 
    87     file_ptr origin;
    88 
    89     /* Remember when output has begun, to stop strange things
    90        from happening. */
    91     boolean output_has_begun;
    92 
    93     /* Pointer to linked list of sections*/
    94     struct sec  *sections;
    95 
    96     /* The number of sections */
    97     unsigned int section_count;
    98 
    99     /* Stuff only useful for object files:
    100        The start address. */
    101     bfd_vma start_address;
    102 
    103     /* Used for input and output*/
    104     unsigned int symcount;
    105 
    106     /* Symbol table for output BFD (with symcount entries) */
    107     struct symbol_cache_entry  **outsymbols;
    108 
    109     /* Pointer to structure which contains architecture information*/
    110     const struct bfd_arch_info *arch_info;
    111 
    112     /* Stuff only useful for archives:*/
    113     PTR arelt_data;
    114     struct _bfd *my_archive;     /* The containing archive BFD.  */
    115     struct _bfd *next;           /* The next BFD in the archive.  */
    116     struct _bfd *archive_head;   /* The first BFD in the archive.  */
    117     boolean has_armap;
    118 
    119     /* A chain of BFD structures involved in a link.  */
    120     struct _bfd *link_next;
    121 
    122     /* A field used by _bfd_generic_link_add_archive_symbols.  This will
    123        be used only for archive elements.  */
    124     int archive_pass;
    125 
    126     /* Used by the back end to hold private data. */
    127 
    128     union
    129       @{
     15  /* A unique identifier of the BFD  */
     16  unsigned int id;
     17
     18  /* The filename the application opened the BFD with.  */
     19  const char *filename;
     20
     21  /* A pointer to the target jump table.  */
     22  const struct bfd_target *xvec;
     23
     24  /* To avoid dragging too many header files into every file that
     25     includes `@code{bfd.h}', IOSTREAM has been declared as a "char *",
     26     and MTIME as a "long".  Their correct types, to which they
     27     are cast when used, are "FILE *" and "time_t".    The iostream
     28     is the result of an fopen on the filename.  However, if the
     29     BFD_IN_MEMORY flag is set, then iostream is actually a pointer
     30     to a bfd_in_memory struct.  */
     31  PTR iostream;
     32
     33  /* Is the file descriptor being cached?  That is, can it be closed as
     34     needed, and re-opened when accessed later?  */
     35  bfd_boolean cacheable;
     36
     37  /* Marks whether there was a default target specified when the
     38     BFD was opened. This is used to select which matching algorithm
     39     to use to choose the back end.  */
     40  bfd_boolean target_defaulted;
     41
     42  /* The caching routines use these to maintain a
     43     least-recently-used list of BFDs.  */
     44  struct bfd *lru_prev, *lru_next;
     45
     46  /* When a file is closed by the caching routines, BFD retains
     47     state information on the file here...  */
     48  ufile_ptr where;
     49
     50  /* ... and here: (``once'' means at least once).  */
     51  bfd_boolean opened_once;
     52
     53  /* Set if we have a locally maintained mtime value, rather than
     54     getting it from the file each time.  */
     55  bfd_boolean mtime_set;
     56
     57  /* File modified time, if mtime_set is TRUE.  */
     58  long mtime;
     59
     60  /* Reserved for an unimplemented file locking extension.  */
     61  int ifd;
     62
     63  /* The format which belongs to the BFD. (object, core, etc.)  */
     64  bfd_format format;
     65
     66  /* The direction with which the BFD was opened.  */
     67  enum bfd_direction
     68    @{
     69      no_direction = 0,
     70      read_direction = 1,
     71      write_direction = 2,
     72      both_direction = 3
     73    @}
     74  direction;
     75
     76  /* Format_specific flags.  */
     77  flagword flags;
     78
     79  /* Currently my_archive is tested before adding origin to
     80     anything. I believe that this can become always an add of
     81     origin, with origin set to 0 for non archive files.  */
     82  ufile_ptr origin;
     83
     84  /* Remember when output has begun, to stop strange things
     85     from happening.  */
     86  bfd_boolean output_has_begun;
     87
     88  /* A hash table for section names.  */
     89  struct bfd_hash_table section_htab;
     90
     91  /* Pointer to linked list of sections.  */
     92  struct sec *sections;
     93
     94  /* The place where we add to the section list.  */
     95  struct sec **section_tail;
     96
     97  /* The number of sections.  */
     98  unsigned int section_count;
     99
     100  /* Stuff only useful for object files:
     101     The start address.  */
     102  bfd_vma start_address;
     103
     104  /* Used for input and output.  */
     105  unsigned int symcount;
     106
     107  /* Symbol table for output BFD (with symcount entries).  */
     108  struct symbol_cache_entry  **outsymbols;
     109
     110  /* Used for slurped dynamic symbol tables.  */
     111  unsigned int dynsymcount;
     112
     113  /* Pointer to structure which contains architecture information.  */
     114  const struct bfd_arch_info *arch_info;
     115
     116  /* Stuff only useful for archives.  */
     117  PTR arelt_data;
     118  struct bfd *my_archive;      /* The containing archive BFD.  */
     119  struct bfd *next;            /* The next BFD in the archive.  */
     120  struct bfd *archive_head;    /* The first BFD in the archive.  */
     121  bfd_boolean has_armap;
     122
     123  /* A chain of BFD structures involved in a link.  */
     124  struct bfd *link_next;
     125
     126  /* A field used by _bfd_generic_link_add_archive_symbols.  This will
     127     be used only for archive elements.  */
     128  int archive_pass;
     129
     130  /* Used by the back end to hold private data.  */
     131  union
     132    @{
    130133      struct aout_data_struct *aout_data;
    131134      struct artdata *aout_ar_data;
     
    144147      struct nlm_obj_tdata *nlm_obj_data;
    145148      struct bout_data_struct *bout_data;
     149      struct mmo_data_struct *mmo_data;
    146150      struct sun_core_struct *sun_core_data;
    147151      struct sco5_core_struct *sco5_core_data;
     
    156160      struct versados_data_struct *versados_data;
    157161      struct netbsd_core_struct *netbsd_core_data;
     162      struct mach_o_data_struct *mach_o_data;
     163      struct mach_o_fat_data_struct *mach_o_fat_data;
     164      struct bfd_pef_data_struct *pef_data;
     165      struct bfd_pef_xlib_data_struct *pef_xlib_data;
     166      struct bfd_sym_data_struct *sym_data;
    158167      PTR any;
    159       @} tdata;
    160 
    161     /* Used by the application to hold private data*/
    162     PTR usrdata;
     168    @}
     169  tdata;
     170
     171  /* Used by the application to hold private data.  */
     172  PTR usrdata;
    163173
    164174  /* Where all the allocated stuff under this BFD goes.  This is a
    165175     struct objalloc *, but we use PTR to avoid requiring the inclusion of
    166176     objalloc.h.  */
    167     PTR memory;
     177  PTR memory;
    168178@};
    169179
     
    193203  bfd_error_invalid_target,
    194204  bfd_error_wrong_format,
     205  bfd_error_wrong_object_format,
    195206  bfd_error_invalid_operation,
    196207  bfd_error_no_memory,
     
    208219  bfd_error_file_too_big,
    209220  bfd_error_invalid_error_code
    210 @} bfd_error_type;
     221@}
     222bfd_error_type;
    211223
    212224@end example
     
    233245@strong{Synopsis}
    234246@example
    235 CONST char *bfd_errmsg (bfd_error_type error_tag);
     247const char *bfd_errmsg (bfd_error_type error_tag);
    236248@end example
    237249@strong{Description}@*
     
    243255@strong{Synopsis}
    244256@example
    245 void bfd_perror (CONST char *message);
     257void bfd_perror (const char *message);
    246258@end example
    247259@strong{Description}@*
     
    296308Return the BFD error handler function.
    297309
     310@findex bfd_archive_filename
     311@subsubsection @code{bfd_archive_filename}
     312@strong{Synopsis}
     313@example
     314const char *bfd_archive_filename (bfd *);
     315@end example
     316@strong{Description}@*
     317For a BFD that is a component of an archive, returns a string
     318with both the archive name and file name.  For other BFDs, just
     319returns the file name.
     320
    298321@section Symbols
    299322
     
    303326@strong{Synopsis}
    304327@example
    305 long bfd_get_reloc_upper_bound(bfd *abfd, asection *sect);
     328long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
    306329@end example
    307330@strong{Description}@*
     
    337360@example
    338361void bfd_set_reloc
    339    (bfd *abfd, asection *sec, arelent **rel, unsigned int count)
     362   (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
    340363@end example
    341364@strong{Description}@*
     
    348371@strong{Synopsis}
    349372@example
    350 boolean bfd_set_file_flags(bfd *abfd, flagword flags);
     373bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
    351374@end example
    352375@strong{Description}@*
     
    404427@strong{Synopsis}
    405428@example
    406 boolean bfd_set_start_address(bfd *abfd, bfd_vma vma);
     429bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
    407430@end example
    408431@strong{Description}@*
     
    410433
    411434@strong{Returns}@*
    412 Returns @code{true} on success, @code{false} otherwise.
    413 
    414 @findex bfd_get_mtime
    415 @subsubsection @code{bfd_get_mtime}
    416 @strong{Synopsis}
    417 @example
    418 long bfd_get_mtime(bfd *abfd);
    419 @end example
    420 @strong{Description}@*
    421 Return the file modification time (as read from the file system, or
    422 from the archive header for archive members).
    423 
    424 @findex bfd_get_size
    425 @subsubsection @code{bfd_get_size}
    426 @strong{Synopsis}
    427 @example
    428 long bfd_get_size(bfd *abfd);
    429 @end example
    430 @strong{Description}@*
    431 Return the file size (as read from file system) for the file
    432 associated with BFD @var{abfd}.
    433 
    434 The initial motivation for, and use of, this routine is not
    435 so we can get the exact size of the object the BFD applies to, since
    436 that might not be generally possible (archive members for example).
    437 It would be ideal if someone could eventually modify
    438 it so that such results were guaranteed.
    439 
    440 Instead, we want to ask questions like "is this NNN byte sized
    441 object I'm about to try read from file offset YYY reasonable?"
    442 As as example of where we might do this, some object formats
    443 use string tables for which the first @code{sizeof (long)} bytes of the
    444 table contain the size of the table itself, including the size bytes.
    445 If an application tries to read what it thinks is one of these
    446 string tables, without some way to validate the size, and for
    447 some reason the size is wrong (byte swapping error, wrong location
    448 for the string table, etc.), the only clue is likely to be a read
    449 error when it tries to read the table, or a "virtual memory
    450 exhausted" error when it tries to allocate 15 bazillon bytes
    451 of space for the 15 bazillon byte table it is about to read.
    452 This function at least allows us to answer the quesion, "is the
    453 size reasonable?".
     435Returns @code{TRUE} on success, @code{FALSE} otherwise.
    454436
    455437@findex bfd_get_gp_size
     
    457439@strong{Synopsis}
    458440@example
    459 int bfd_get_gp_size(bfd *abfd);
     441unsigned int bfd_get_gp_size (bfd *abfd);
    460442@end example
    461443@strong{Description}@*
     
    468450@strong{Synopsis}
    469451@example
    470 void bfd_set_gp_size(bfd *abfd, int i);
     452void bfd_set_gp_size (bfd *abfd, unsigned int i);
    471453@end example
    472454@strong{Description}@*
     
    479461@strong{Synopsis}
    480462@example
    481 bfd_vma bfd_scan_vma(CONST char *string, CONST char **end, int base);
     463bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
    482464@end example
    483465@strong{Description}@*
     
    491473in octal if a leading zero is found, otherwise in decimal.
    492474
    493 Overflow is not detected.
     475If the value would overflow, the maximum @code{bfd_vma} value is
     476returned.
    494477
    495478@findex bfd_copy_private_bfd_data
     
    497480@strong{Synopsis}
    498481@example
    499 boolean bfd_copy_private_bfd_data(bfd *ibfd, bfd *obfd);
     482bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
    500483@end example
    501484@strong{Description}@*
    502485Copy private BFD information from the BFD @var{ibfd} to the
    503 the BFD @var{obfd}.  Return @code{true} on success, @code{false} on error.
     486the BFD @var{obfd}.  Return @code{TRUE} on success, @code{FALSE} on error.
    504487Possible error returns are:
    505488
     
    520503@strong{Synopsis}
    521504@example
    522 boolean bfd_merge_private_bfd_data(bfd *ibfd, bfd *obfd);
     505bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
    523506@end example
    524507@strong{Description}@*
    525508Merge private BFD information from the BFD @var{ibfd} to the
    526 the output file BFD @var{obfd} when linking.  Return @code{true}
    527 on success, @code{false} on error.  Possible error returns are:
     509the output file BFD @var{obfd} when linking.  Return @code{TRUE}
     510on success, @code{FALSE} on error.  Possible error returns are:
    528511
    529512@itemize @bullet
     
    543526@strong{Synopsis}
    544527@example
    545 boolean bfd_set_private_flags(bfd *abfd, flagword flags);
     528bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
    546529@end example
    547530@strong{Description}@*
    548531Set private BFD flag information in the BFD @var{abfd}.
    549 Return @code{true} on success, @code{false} on error.  Possible error
     532Return @code{TRUE} on success, @code{FALSE} on error.  Possible error
    550533returns are:
    551534
     
    558541@example
    559542#define bfd_set_private_flags(abfd, flags) \
    560      BFD_SEND (abfd, _bfd_set_private_flags, \
    561                (abfd, flags))
    562 @end example
    563 
    564 @findex stuff
    565 @subsubsection @code{stuff}
    566 @strong{Description}@*
    567 Stuff which should be documented:
     543     BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
     544@end example
     545
     546@findex Other functions
     547@subsubsection @code{Other functions}
     548@strong{Description}@*
     549The following functions exist but have not yet been documented.
    568550@example
    569551#define bfd_sizeof_headers(abfd, reloc) \
    570      BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
     552       BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
    571553
    572554#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
    573      BFD_SEND (abfd, _bfd_find_nearest_line,  (abfd, sec, syms, off, file, func, line))
    574 
    575        /* Do these three do anything useful at all, for any back end?  */
     555       BFD_SEND (abfd, _bfd_find_nearest_line, \
     556                 (abfd, sec, syms, off, file, func, line))
     557
    576558#define bfd_debug_info_start(abfd) \
    577         BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
     559       BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
    578560
    579561#define bfd_debug_info_end(abfd) \
    580         BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
     562       BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
    581563
    582564#define bfd_debug_info_accumulate(abfd, section) \
    583         BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
    584 
     565       BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
    585566
    586567#define bfd_stat_arch_elt(abfd, stat) \
    587         BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
     568       BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
    588569
    589570#define bfd_update_armap_timestamp(abfd) \
    590         BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
     571       BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
    591572
    592573#define bfd_set_arch_mach(abfd, arch, mach)\
    593         BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
     574       BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
    594575
    595576#define bfd_relax_section(abfd, section, link_info, again) \
     
    599580       BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
    600581
     582#define bfd_merge_sections(abfd, link_info) \
     583       BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
     584
     585#define bfd_discard_group(abfd, sec) \
     586       BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
     587
    601588#define bfd_link_hash_table_create(abfd) \
    602589       BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
    603590
     591#define bfd_link_hash_table_free(abfd, hash) \
     592       BFD_SEND (abfd, _bfd_link_hash_table_free, (hash))
     593
    604594#define bfd_link_add_symbols(abfd, info) \
    605595       BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
     596
     597#define bfd_link_just_syms(sec, info) \
     598       BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
    606599
    607600#define bfd_final_link(abfd, info) \
     
    629622       PARAMS ((bfd *, struct bfd_link_info *,
    630623                 struct bfd_link_order *, bfd_byte *,
    631                  boolean, asymbol **));
    632 
    633 @end example
    634 
     624                 bfd_boolean, asymbol **));
     625
     626@end example
     627
     628@findex bfd_alt_mach_code
     629@subsubsection @code{bfd_alt_mach_code}
     630@strong{Synopsis}
     631@example
     632bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
     633@end example
     634@strong{Description}@*
     635When more than one machine code number is available for the
     636same machine type, this function can be used to switch between
     637the preferred one (alternative == 0) and any others.  Currently,
     638only ELF supports this feature, with up to two alternate
     639machine codes.
     640
     641
     642@example
     643struct bfd_preserve
     644@{
     645  PTR marker;
     646  PTR tdata;
     647  flagword flags;
     648  const struct bfd_arch_info *arch_info;
     649  struct sec *sections;
     650  struct sec **section_tail;
     651  unsigned int section_count;
     652  struct bfd_hash_table section_htab;
     653@};
     654
     655@end example
     656@findex bfd_preserve_save
     657@subsubsection @code{bfd_preserve_save}
     658@strong{Synopsis}
     659@example
     660bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
     661@end example
     662@strong{Description}@*
     663When testing an object for compatibility with a particular
     664target back-end, the back-end object_p function needs to set
     665up certain fields in the bfd on successfully recognizing the
     666object.  This typically happens in a piecemeal fashion, with
     667failures possible at many points.  On failure, the bfd is
     668supposed to be restored to its initial state, which is
     669virtually impossible.  However, restoring a subset of the bfd
     670state works in practice.  This function stores the subset and
     671reinitializes the bfd.
     672
     673@findex bfd_preserve_restore
     674@subsubsection @code{bfd_preserve_restore}
     675@strong{Synopsis}
     676@example
     677void bfd_preserve_restore (bfd *, struct bfd_preserve *);
     678@end example
     679@strong{Description}@*
     680This function restores bfd state saved by bfd_preserve_save.
     681If MARKER is non-NULL in struct bfd_preserve then that block
     682and all subsequently bfd_alloc'd memory is freed.
     683
     684@findex bfd_preserve_finish
     685@subsubsection @code{bfd_preserve_finish}
     686@strong{Synopsis}
     687@example
     688void bfd_preserve_finish (bfd *, struct bfd_preserve *);
     689@end example
     690@strong{Description}@*
     691This function should be called when the bfd state saved by
     692bfd_preserve_save is no longer needed.  ie. when the back-end
     693object_p function returns with success.
     694
  • branches/GNU/src/binutils/bfd/doc/cache.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    4949@strong{Synopsis}
    5050@example
    51 boolean bfd_cache_init (bfd *abfd);
     51bfd_boolean bfd_cache_init (bfd *abfd);
    5252@end example
    5353@strong{Description}@*
     
    5858@strong{Synopsis}
    5959@example
    60 boolean bfd_cache_close (bfd *abfd);
     60bfd_boolean bfd_cache_close (bfd *abfd);
    6161@end example
    6262@strong{Description}@*
     
    6565
    6666@strong{Returns}@*
    67 @code{false} is returned if closing the file fails, @code{true} is
     67@code{FALSE} is returned if closing the file fails, @code{TRUE} is
    6868returned if all is well.
    6969
  • branches/GNU/src/binutils/bfd/doc/chew.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* chew
    2    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001
     2   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001,
     3   2002
    34   Free Software Foundation, Inc.
    45   Contributed by steve chamberlain @cygnus
     
    8283   Foo.  */
    8384
    84 #include <ansidecl.h>
     85#include "ansidecl.h"
    8586#include "sysdep.h"
    8687#include <assert.h>
     
    289290
    290291typedef struct dict_struct dict_type;
    291 
    292 #define WORD(x) static void x()
    293292
    294293static void
     
    363362}
    364363
    365 WORD (call)
     364static void
     365call ()
    366366{
    367367  stinst_type *oldpc = pc;
     
    372372}
    373373
    374 WORD (remchar)
     374static void
     375remchar ()
    375376{
    376377  if (tos->write_idx)
     
    389390}
    390391
    391 WORD (push_number)
     392static void
     393push_number ()
    392394{
    393395  isp++;
     
    398400}
    399401
    400 WORD (push_text)
     402static void
     403push_text ()
    401404{
    402405  tos++;
     
    483486
    484487static void
    485 paramstuff (void)
     488paramstuff ()
    486489{
    487490  unsigned int openp;
     
    552555   and *} into comments */
    553556
    554 WORD (translatecomments)
     557static void
     558translatecomments ()
    555559{
    556560  unsigned int idx = 0;
     
    588592/* turn everything not starting with a . into a comment */
    589593
    590 WORD (manglecomments)
     594static void
     595manglecomments ()
    591596{
    592597  unsigned int idx = 0;
     
    622627/* Mod tos so that only lines with leading dots remain */
    623628static void
    624 outputdots (void)
     629outputdots ()
    625630{
    626631  unsigned int idx = 0;
     
    666671
    667672/* Find lines starting with . and | and put example around them on tos */
    668 WORD (courierize)
     673static void
     674courierize ()
    669675{
    670676  string_type out;
     
    687693              while (at (tos, idx) && at (tos, idx) != '\n')
    688694                {
    689                   if (at (tos, idx) == '{' && at (tos, idx + 1) == '*')
     695                  if (command > 1)
     696                    {
     697                      /* We are inside {} parameters of some command;
     698                         Just pass through until matching brace.  */
     699                      if (at (tos, idx) == '{')
     700                        ++command;
     701                      else if (at (tos, idx) == '}')
     702                        --command;
     703                    }
     704                  else if (command != 0)
     705                    {
     706                      if (at (tos, idx) == '{')
     707                        ++command;
     708                      else if (!islower ((unsigned char) at (tos, idx)))
     709                        --command;
     710                    }
     711                  else if (at (tos, idx) == '@'
     712                           && islower ((unsigned char) at (tos, idx + 1)))
     713                    {
     714                      ++command;
     715                    }
     716                  else if (at (tos, idx) == '{' && at (tos, idx + 1) == '*')
    690717                    {
    691718                      cattext (&out, "/*");
    692719                      idx += 2;
     720                      continue;
    693721                    }
    694722                  else if (at (tos, idx) == '*' && at (tos, idx + 1) == '}')
     
    696724                      cattext (&out, "*/");
    697725                      idx += 2;
     726                      continue;
    698727                    }
    699                   else if (at (tos, idx) == '{' && !command)
     728                  else if (at (tos, idx) == '{'
     729                           || at (tos, idx) == '}')
    700730                    {
    701                       cattext (&out, "@{");
    702                       idx++;
     731                      catchar (&out, '@');
    703732                    }
    704                   else if (at (tos, idx) == '}' && !command)
    705                     {
    706                       cattext (&out, "@}");
    707                       idx++;
    708                     }
    709                   else
    710                     {
    711                       if (at (tos, idx) == '@')
    712                         command = 1;
    713                       else if (isspace ((unsigned char) at (tos, idx))
    714                                || at (tos, idx) == '}')
    715                         command = 0;
    716                       catchar (&out, at (tos, idx));
    717                       idx++;
    718                     }
    719 
     733
     734                  catchar (&out, at (tos, idx));
     735                  idx++;
    720736                }
    721737              catchar (&out, '\n');
     
    742758   itemize, inplace at TOS*/
    743759
    744 WORD (bulletize)
     760static void
     761bulletize ()
    745762{
    746763  unsigned int idx = 0;
     
    796813/* Turn <<foo>> into @code{foo} in place at TOS*/
    797814
    798 WORD (do_fancy_stuff)
     815static void
     816do_fancy_stuff ()
    799817{
    800818  unsigned int idx = 0;
     
    892910}
    893911
    894 WORD (icopy_past_newline)
     912static void
     913icopy_past_newline ()
    895914{
    896915  tos++;
     
    904923   Take the string at the top of the stack, do some prettying.  */
    905924
    906 WORD (kill_bogus_lines)
     925static void
     926kill_bogus_lines ()
    907927{
    908928  int sl;
     
    9901010}
    9911011
    992 WORD (indent)
     1012static void
     1013indent ()
    9931014{
    9941015  string_type out;
     
    10401061}
    10411062
    1042 WORD (get_stuff_in_command)
     1063static void
     1064get_stuff_in_command ()
    10431065{
    10441066  tos++;
     
    10551077}
    10561078
    1057 WORD (swap)
     1079static void
     1080swap ()
    10581081{
    10591082  string_type t;
     
    10651088}
    10661089
    1067 WORD (other_dup)
     1090static void
     1091other_dup ()
    10681092{
    10691093  tos++;
     
    10741098}
    10751099
    1076 WORD (drop)
     1100static void
     1101drop ()
    10771102{
    10781103  tos--;
     
    10811106}
    10821107
    1083 WORD (idrop)
     1108static void
     1109idrop ()
    10841110{
    10851111  isp--;
     
    10881114}
    10891115
    1090 WORD (icatstr)
     1116static void
     1117icatstr ()
    10911118{
    10921119  tos--;
     
    10971124}
    10981125
    1099 WORD (skip_past_newline)
     1126static void
     1127skip_past_newline ()
    11001128{
    11011129  while (at (ptr, idx)
     
    11061134}
    11071135
    1108 WORD (internalmode)
     1136static void
     1137internalmode ()
    11091138{
    11101139  internal_mode = *(isp);
     
    11141143}
    11151144
    1116 WORD (maybecatstr)
     1145static void
     1146maybecatstr ()
    11171147{
    11181148  if (internal_wanted == internal_mode)
     
    12321262
    12331263static void
    1234 perform (void)
     1264perform ()
    12351265{
    12361266  tos = stack;
     
    13831413
    13841414static void
    1385 bang (void)
     1415bang ()
    13861416{
    13871417  *(long *) ((isp[0])) = isp[-1];
     
    13911421}
    13921422
    1393 WORD (atsign)
     1423static void
     1424atsign ()
    13941425{
    13951426  isp[0] = *(long *) (isp[0]);
     
    13971428}
    13981429
    1399 WORD (hello)
     1430static void
     1431hello ()
    14001432{
    14011433  printf ("hello\n");
     
    14031435}
    14041436
    1405 WORD (stdout_)
     1437static void
     1438stdout_ ()
    14061439{
    14071440  isp++;
     
    14111444}
    14121445
    1413 WORD (stderr_)
     1446static void
     1447stderr_ ()
    14141448{
    14151449  isp++;
     
    14191453}
    14201454
    1421 WORD (print)
     1455static void
     1456print ()
    14221457{
    14231458  if (*isp == 1)
     
    14531488
    14541489static void
    1455 usage (void)
     1490usage ()
    14561491{
    14571492  fprintf (stderr, "usage: -[d|i|g] <file >file\n");
  • branches/GNU/src/binutils/bfd/doc/coffcode.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    189189the offsets generated by the previous pass and the pointers
    190190generated when the symbol table was read in to create the
    191 structured hierachy required by coff. It changes each pointer
     191structured hierarchy required by coff. It changes each pointer
    192192to a symbol into the index into the symbol table of the asymbol.
    193193
     
    212212typedef struct coff_ptr_struct
    213213@{
    214 
    215        /* Remembers the offset from the first symbol in the file for
    216           this symbol. Generated by coff_renumber_symbols. */
    217 unsigned int offset;
    218 
    219        /* Should the value of this symbol be renumbered.  Used for
    220           XCOFF C_BSTAT symbols.  Set by coff_slurp_symbol_table.  */
    221 unsigned int fix_value : 1;
    222 
    223        /* Should the tag field of this symbol be renumbered.
    224           Created by coff_pointerize_aux. */
    225 unsigned int fix_tag : 1;
    226 
    227        /* Should the endidx field of this symbol be renumbered.
    228           Created by coff_pointerize_aux. */
    229 unsigned int fix_end : 1;
    230 
    231        /* Should the x_csect.x_scnlen field be renumbered.
    232           Created by coff_pointerize_aux. */
    233 unsigned int fix_scnlen : 1;
    234 
    235        /* Fix up an XCOFF C_BINCL/C_EINCL symbol.  The value is the
    236           index into the line number entries.  Set by
    237           coff_slurp_symbol_table.  */
    238 unsigned int fix_line : 1;
    239 
    240        /* The container for the symbol structure as read and translated
    241            from the file. */
    242 
    243 union @{
    244    union internal_auxent auxent;
    245    struct internal_syment syment;
    246  @} u;
     214  /* Remembers the offset from the first symbol in the file for
     215     this symbol. Generated by coff_renumber_symbols. */
     216  unsigned int offset;
     217
     218  /* Should the value of this symbol be renumbered.  Used for
     219     XCOFF C_BSTAT symbols.  Set by coff_slurp_symbol_table.  */
     220  unsigned int fix_value : 1;
     221
     222  /* Should the tag field of this symbol be renumbered.
     223     Created by coff_pointerize_aux. */
     224  unsigned int fix_tag : 1;
     225
     226  /* Should the endidx field of this symbol be renumbered.
     227     Created by coff_pointerize_aux. */
     228  unsigned int fix_end : 1;
     229
     230  /* Should the x_csect.x_scnlen field be renumbered.
     231     Created by coff_pointerize_aux. */
     232  unsigned int fix_scnlen : 1;
     233
     234  /* Fix up an XCOFF C_BINCL/C_EINCL symbol.  The value is the
     235     index into the line number entries.  Set by coff_slurp_symbol_table.  */
     236  unsigned int fix_line : 1;
     237
     238  /* The container for the symbol structure as read and translated
     239     from the file. */
     240  union
     241  @{
     242    union internal_auxent auxent;
     243    struct internal_syment syment;
     244  @} u;
    247245@} combined_entry_type;
    248246
     
    252250typedef struct coff_symbol_struct
    253251@{
    254    /* The actual symbol which the rest of BFD works with */
    255 asymbol symbol;
    256 
    257    /* A pointer to the hidden information for this symbol */
    258 combined_entry_type *native;
    259 
    260    /* A pointer to the linenumber information for this symbol */
    261 struct lineno_cache_entry *lineno;
    262 
    263    /* Have the line numbers been relocated yet ? */
    264 boolean done_lineno;
     252  /* The actual symbol which the rest of BFD works with */
     253  asymbol symbol;
     254
     255  /* A pointer to the hidden information for this symbol */
     256  combined_entry_type *native;
     257
     258  /* A pointer to the linenumber information for this symbol */
     259  struct lineno_cache_entry *lineno;
     260
     261  /* Have the line numbers been relocated yet ? */
     262  bfd_boolean done_lineno;
    265263@} coff_symbol_type;
    266264@end example
     
    290288typedef struct
    291289@{
    292   void (*_bfd_coff_swap_aux_in) PARAMS ((
    293        bfd            *abfd,
    294        PTR             ext,
    295        int             type,
    296        int             class,
    297        int             indaux,
    298        int             numaux,
    299        PTR             in));
    300 
    301   void (*_bfd_coff_swap_sym_in) PARAMS ((
    302        bfd            *abfd ,
    303        PTR             ext,
    304        PTR             in));
    305 
    306   void (*_bfd_coff_swap_lineno_in) PARAMS ((
    307        bfd            *abfd,
    308        PTR            ext,
    309        PTR             in));
    310 
    311 @end example
    312 Special entry points for gas to swap out coff parts:
    313 @example
    314  unsigned int (*_bfd_coff_swap_aux_out) PARAMS ((
    315        bfd     *abfd,
    316        PTR     in,
    317        int     type,
    318        int     class,
    319        int     indaux,
    320        int     numaux,
    321        PTR     ext));
    322 
    323  unsigned int (*_bfd_coff_swap_sym_out) PARAMS ((
    324       bfd      *abfd,
    325       PTR      in,
    326       PTR      ext));
    327 
    328  unsigned int (*_bfd_coff_swap_lineno_out) PARAMS ((
    329        bfd     *abfd,
    330        PTR     in,
    331        PTR     ext));
    332 
    333  unsigned int (*_bfd_coff_swap_reloc_out) PARAMS ((
    334        bfd     *abfd,
    335        PTR     src,
    336        PTR     dst));
    337 
    338  unsigned int (*_bfd_coff_swap_filehdr_out) PARAMS ((
    339        bfd     *abfd,
    340        PTR     in,
    341        PTR     out));
    342 
    343  unsigned int (*_bfd_coff_swap_aouthdr_out) PARAMS ((
    344        bfd     *abfd,
    345        PTR     in,
    346        PTR     out));
    347 
    348  unsigned int (*_bfd_coff_swap_scnhdr_out) PARAMS ((
    349        bfd     *abfd,
    350        PTR     in,
    351        PTR     out));
    352 
    353 @end example
    354 Special entry points for generic COFF routines to call target
    355 dependent COFF routines:
    356 @example
    357  unsigned int _bfd_filhsz;
    358  unsigned int _bfd_aoutsz;
    359  unsigned int _bfd_scnhsz;
    360  unsigned int _bfd_symesz;
    361  unsigned int _bfd_auxesz;
    362  unsigned int _bfd_relsz;
    363  unsigned int _bfd_linesz;
    364  unsigned int _bfd_filnmlen;
    365  boolean _bfd_coff_long_filenames;
    366  boolean _bfd_coff_long_section_names;
    367  unsigned int _bfd_coff_default_section_alignment_power;
    368  boolean _bfd_coff_force_symnames_in_strings;
    369  unsigned int _bfd_coff_debug_string_prefix_length;
    370  void (*_bfd_coff_swap_filehdr_in) PARAMS ((
    371        bfd     *abfd,
    372        PTR     ext,
    373        PTR     in));
    374  void (*_bfd_coff_swap_aouthdr_in) PARAMS ((
    375        bfd     *abfd,
    376        PTR     ext,
    377        PTR     in));
    378  void (*_bfd_coff_swap_scnhdr_in) PARAMS ((
    379        bfd     *abfd,
    380        PTR     ext,
    381        PTR     in));
    382  void (*_bfd_coff_swap_reloc_in) PARAMS ((
    383        bfd     *abfd,
    384        PTR     ext,
    385        PTR     in));
    386  boolean (*_bfd_coff_bad_format_hook) PARAMS ((
    387        bfd     *abfd,
    388        PTR     internal_filehdr));
    389  boolean (*_bfd_coff_set_arch_mach_hook) PARAMS ((
    390        bfd     *abfd,
    391        PTR     internal_filehdr));
    392  PTR (*_bfd_coff_mkobject_hook) PARAMS ((
    393        bfd     *abfd,
    394        PTR     internal_filehdr,
    395        PTR     internal_aouthdr));
    396  flagword (*_bfd_styp_to_sec_flags_hook) PARAMS ((
    397        bfd     *abfd,
    398        PTR     internal_scnhdr,
    399        const char *name,
    400        asection *section));
    401  void (*_bfd_set_alignment_hook) PARAMS ((
    402        bfd     *abfd,
    403        asection *sec,
    404        PTR     internal_scnhdr));
    405  boolean (*_bfd_coff_slurp_symbol_table) PARAMS ((
    406        bfd     *abfd));
    407  boolean (*_bfd_coff_symname_in_debug) PARAMS ((
    408        bfd     *abfd,
    409        struct internal_syment *sym));
    410  boolean (*_bfd_coff_pointerize_aux_hook) PARAMS ((
    411        bfd *abfd,
    412        combined_entry_type *table_base,
    413        combined_entry_type *symbol,
    414        unsigned int indaux,
    415        combined_entry_type *aux));
    416  boolean (*_bfd_coff_print_aux) PARAMS ((
    417        bfd *abfd,
    418        FILE *file,
    419        combined_entry_type *table_base,
    420        combined_entry_type *symbol,
    421        combined_entry_type *aux,
    422        unsigned int indaux));
    423  void (*_bfd_coff_reloc16_extra_cases) PARAMS ((
    424        bfd     *abfd,
    425        struct bfd_link_info *link_info,
    426        struct bfd_link_order *link_order,
    427        arelent *reloc,
    428        bfd_byte *data,
    429        unsigned int *src_ptr,
    430        unsigned int *dst_ptr));
    431  int (*_bfd_coff_reloc16_estimate) PARAMS ((
    432        bfd *abfd,
    433        asection *input_section,
    434        arelent *r,
    435        unsigned int shrink,
    436        struct bfd_link_info *link_info));
    437  enum coff_symbol_classification (*_bfd_coff_classify_symbol) PARAMS ((
    438        bfd *abfd,
    439        struct internal_syment *));
    440  boolean (*_bfd_coff_compute_section_file_positions) PARAMS ((
    441        bfd *abfd));
    442  boolean (*_bfd_coff_start_final_link) PARAMS ((
    443        bfd *output_bfd,
    444        struct bfd_link_info *info));
    445  boolean (*_bfd_coff_relocate_section) PARAMS ((
    446        bfd *output_bfd,
    447        struct bfd_link_info *info,
    448        bfd *input_bfd,
    449        asection *input_section,
    450        bfd_byte *contents,
    451        struct internal_reloc *relocs,
    452        struct internal_syment *syms,
    453        asection **sections));
    454  reloc_howto_type *(*_bfd_coff_rtype_to_howto) PARAMS ((
    455        bfd *abfd,
    456        asection *sec,
    457        struct internal_reloc *rel,
    458        struct coff_link_hash_entry *h,
    459        struct internal_syment *sym,
    460        bfd_vma *addendp));
    461  boolean (*_bfd_coff_adjust_symndx) PARAMS ((
    462        bfd *obfd,
    463        struct bfd_link_info *info,
    464        bfd *ibfd,
    465        asection *sec,
    466        struct internal_reloc *reloc,
    467        boolean *adjustedp));
    468  boolean (*_bfd_coff_link_add_one_symbol) PARAMS ((
    469        struct bfd_link_info *info,
    470        bfd *abfd,
    471        const char *name,
    472        flagword flags,
    473        asection *section,
    474        bfd_vma value,
    475        const char *string,
    476        boolean copy,
    477        boolean collect,
    478        struct bfd_link_hash_entry **hashp));
    479 
    480  boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
    481        bfd * abfd,
    482        struct coff_final_link_info * pfinfo));
    483  boolean (*_bfd_coff_final_link_postscript) PARAMS ((
    484        bfd * abfd,
    485        struct coff_final_link_info * pfinfo));
     290  void (*_bfd_coff_swap_aux_in)
     291    PARAMS ((bfd *, PTR, int, int, int, int, PTR));
     292
     293  void (*_bfd_coff_swap_sym_in)
     294    PARAMS ((bfd *, PTR, PTR));
     295
     296  void (*_bfd_coff_swap_lineno_in)
     297    PARAMS ((bfd *, PTR, PTR));
     298
     299  unsigned int (*_bfd_coff_swap_aux_out)
     300    PARAMS ((bfd *, PTR, int, int, int, int, PTR));
     301
     302  unsigned int (*_bfd_coff_swap_sym_out)
     303    PARAMS ((bfd *, PTR, PTR));
     304
     305  unsigned int (*_bfd_coff_swap_lineno_out)
     306    PARAMS ((bfd *, PTR, PTR));
     307
     308  unsigned int (*_bfd_coff_swap_reloc_out)
     309    PARAMS ((bfd *, PTR, PTR));
     310
     311  unsigned int (*_bfd_coff_swap_filehdr_out)
     312    PARAMS ((bfd *, PTR, PTR));
     313
     314  unsigned int (*_bfd_coff_swap_aouthdr_out)
     315    PARAMS ((bfd *, PTR, PTR));
     316
     317  unsigned int (*_bfd_coff_swap_scnhdr_out)
     318    PARAMS ((bfd *, PTR, PTR));
     319
     320  unsigned int _bfd_filhsz;
     321  unsigned int _bfd_aoutsz;
     322  unsigned int _bfd_scnhsz;
     323  unsigned int _bfd_symesz;
     324  unsigned int _bfd_auxesz;
     325  unsigned int _bfd_relsz;
     326  unsigned int _bfd_linesz;
     327  unsigned int _bfd_filnmlen;
     328  bfd_boolean _bfd_coff_long_filenames;
     329  bfd_boolean _bfd_coff_long_section_names;
     330  unsigned int _bfd_coff_default_section_alignment_power;
     331  bfd_boolean _bfd_coff_force_symnames_in_strings;
     332  unsigned int _bfd_coff_debug_string_prefix_length;
     333
     334  void (*_bfd_coff_swap_filehdr_in)
     335    PARAMS ((bfd *, PTR, PTR));
     336
     337  void (*_bfd_coff_swap_aouthdr_in)
     338    PARAMS ((bfd *, PTR, PTR));
     339
     340  void (*_bfd_coff_swap_scnhdr_in)
     341    PARAMS ((bfd *, PTR, PTR));
     342
     343  void (*_bfd_coff_swap_reloc_in)
     344    PARAMS ((bfd *abfd, PTR, PTR));
     345
     346  bfd_boolean (*_bfd_coff_bad_format_hook)
     347    PARAMS ((bfd *, PTR));
     348
     349  bfd_boolean (*_bfd_coff_set_arch_mach_hook)
     350    PARAMS ((bfd *, PTR));
     351
     352  PTR (*_bfd_coff_mkobject_hook)
     353    PARAMS ((bfd *, PTR, PTR));
     354
     355  bfd_boolean (*_bfd_styp_to_sec_flags_hook)
     356    PARAMS ((bfd *, PTR, const char *, asection *, flagword *));
     357
     358  void (*_bfd_set_alignment_hook)
     359    PARAMS ((bfd *, asection *, PTR));
     360
     361  bfd_boolean (*_bfd_coff_slurp_symbol_table)
     362    PARAMS ((bfd *));
     363
     364  bfd_boolean (*_bfd_coff_symname_in_debug)
     365    PARAMS ((bfd *, struct internal_syment *));
     366
     367  bfd_boolean (*_bfd_coff_pointerize_aux_hook)
     368    PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
     369            unsigned int, combined_entry_type *));
     370
     371  bfd_boolean (*_bfd_coff_print_aux)
     372    PARAMS ((bfd *, FILE *, combined_entry_type *, combined_entry_type *,
     373            combined_entry_type *, unsigned int));
     374
     375  void (*_bfd_coff_reloc16_extra_cases)
     376    PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
     377           bfd_byte *, unsigned int *, unsigned int *));
     378
     379  int (*_bfd_coff_reloc16_estimate)
     380    PARAMS ((bfd *, asection *, arelent *, unsigned int,
     381            struct bfd_link_info *));
     382
     383  enum coff_symbol_classification (*_bfd_coff_classify_symbol)
     384    PARAMS ((bfd *, struct internal_syment *));
     385
     386  bfd_boolean (*_bfd_coff_compute_section_file_positions)
     387    PARAMS ((bfd *));
     388
     389  bfd_boolean (*_bfd_coff_start_final_link)
     390    PARAMS ((bfd *, struct bfd_link_info *));
     391
     392  bfd_boolean (*_bfd_coff_relocate_section)
     393    PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
     394            struct internal_reloc *, struct internal_syment *, asection **));
     395
     396  reloc_howto_type *(*_bfd_coff_rtype_to_howto)
     397    PARAMS ((bfd *, asection *, struct internal_reloc *,
     398            struct coff_link_hash_entry *, struct internal_syment *,
     399            bfd_vma *));
     400
     401  bfd_boolean (*_bfd_coff_adjust_symndx)
     402    PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
     403            struct internal_reloc *, bfd_boolean *));
     404
     405  bfd_boolean (*_bfd_coff_link_add_one_symbol)
     406    PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
     407            asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean,
     408            struct bfd_link_hash_entry **));
     409
     410  bfd_boolean (*_bfd_coff_link_output_has_begun)
     411    PARAMS ((bfd *, struct coff_final_link_info *));
     412
     413  bfd_boolean (*_bfd_coff_final_link_postscript)
     414    PARAMS ((bfd *, struct coff_final_link_info *));
    486415
    487416@} bfd_coff_backend_data;
    488417
    489 #define coff_backend_info(abfd) ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
     418#define coff_backend_info(abfd) \
     419  ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
    490420
    491421#define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \
    492         ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
     422  ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
    493423
    494424#define bfd_coff_swap_sym_in(a,e,i) \
    495         ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
     425  ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
    496426
    497427#define bfd_coff_swap_lineno_in(a,e,i) \
    498         ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
     428  ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
    499429
    500430#define bfd_coff_swap_reloc_out(abfd, i, o) \
    501         ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
     431  ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
    502432
    503433#define bfd_coff_swap_lineno_out(abfd, i, o) \
    504         ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
     434  ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
    505435
    506436#define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \
    507         ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
     437  ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
    508438
    509439#define bfd_coff_swap_sym_out(abfd, i,o) \
    510         ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
     440  ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
    511441
    512442#define bfd_coff_swap_scnhdr_out(abfd, i,o) \
    513         ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
     443  ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
    514444
    515445#define bfd_coff_swap_filehdr_out(abfd, i,o) \
    516         ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
     446  ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
    517447
    518448#define bfd_coff_swap_aouthdr_out(abfd, i,o) \
    519         ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
     449  ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
    520450
    521451#define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz)
     
    527457#define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz)
    528458#define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen)
    529 #define bfd_coff_long_filenames(abfd) (coff_backend_info (abfd)->_bfd_coff_long_filenames)
     459#define bfd_coff_long_filenames(abfd) \
     460  (coff_backend_info (abfd)->_bfd_coff_long_filenames)
    530461#define bfd_coff_long_section_names(abfd) \
    531         (coff_backend_info (abfd)->_bfd_coff_long_section_names)
     462  (coff_backend_info (abfd)->_bfd_coff_long_section_names)
    532463#define bfd_coff_default_section_alignment_power(abfd) \
    533         (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
     464  (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
    534465#define bfd_coff_swap_filehdr_in(abfd, i,o) \
    535         ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
     466  ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
    536467
    537468#define bfd_coff_swap_aouthdr_in(abfd, i,o) \
    538         ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
     469  ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
    539470
    540471#define bfd_coff_swap_scnhdr_in(abfd, i,o) \
    541         ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
     472  ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
    542473
    543474#define bfd_coff_swap_reloc_in(abfd, i, o) \
    544         ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
     475  ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
    545476
    546477#define bfd_coff_bad_format_hook(abfd, filehdr) \
    547         ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
     478  ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
    548479
    549480#define bfd_coff_set_arch_mach_hook(abfd, filehdr)\
    550         ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
     481  ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
    551482#define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\
    552         ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook) (abfd, filehdr, aouthdr))
    553 
    554 #define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section)\
    555         ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
    556          (abfd, scnhdr, name, section))
     483  ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook)\
     484   (abfd, filehdr, aouthdr))
     485
     486#define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section, flags_ptr)\
     487  ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
     488   (abfd, scnhdr, name, section, flags_ptr))
    557489
    558490#define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\
    559         ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
     491  ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
    560492
    561493#define bfd_coff_slurp_symbol_table(abfd)\
    562         ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
     494  ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
    563495
    564496#define bfd_coff_symname_in_debug(abfd, sym)\
    565         ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
     497  ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
    566498
    567499#define bfd_coff_force_symnames_in_strings(abfd)\
    568        (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
     500  (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
    569501
    570502#define bfd_coff_debug_string_prefix_length(abfd)\
    571        (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
     503  (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
    572504
    573505#define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\
    574         ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
    575          (abfd, file, base, symbol, aux, indaux))
    576 
    577 #define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)\
    578         ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
    579          (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
     506  ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
     507   (abfd, file, base, symbol, aux, indaux))
     508
     509#define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order,\
     510                                     reloc, data, src_ptr, dst_ptr)\
     511  ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
     512   (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
    580513
    581514#define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\
    582         ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
    583          (abfd, section, reloc, shrink, link_info))
     515  ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
     516   (abfd, section, reloc, shrink, link_info))
    584517
    585518#define bfd_coff_classify_symbol(abfd, sym)\
    586         ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
    587          (abfd, sym))
     519  ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
     520   (abfd, sym))
    588521
    589522#define bfd_coff_compute_section_file_positions(abfd)\
    590         ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
    591          (abfd))
     523  ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
     524   (abfd))
    592525
    593526#define bfd_coff_start_final_link(obfd, info)\
    594         ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
    595          (obfd, info))
     527  ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
     528   (obfd, info))
    596529#define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\
    597         ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
    598          (obfd, info, ibfd, o, con, rel, isyms, secs))
     530  ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
     531   (obfd, info, ibfd, o, con, rel, isyms, secs))
    599532#define bfd_coff_rtype_to_howto(abfd, sec, rel, h, sym, addendp)\
    600         ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
    601          (abfd, sec, rel, h, sym, addendp))
     533  ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
     534   (abfd, sec, rel, h, sym, addendp))
    602535#define bfd_coff_adjust_symndx(obfd, info, ibfd, sec, rel, adjustedp)\
    603         ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
    604          (obfd, info, ibfd, sec, rel, adjustedp))
    605 #define bfd_coff_link_add_one_symbol(info,abfd,name,flags,section,value,string,cp,coll,hashp)\
    606         ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
    607          (info, abfd, name, flags, section, value, string, cp, coll, hashp))
     536  ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
     537   (obfd, info, ibfd, sec, rel, adjustedp))
     538#define bfd_coff_link_add_one_symbol(info, abfd, name, flags, section,\
     539                                     value, string, cp, coll, hashp)\
     540  ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
     541   (info, abfd, name, flags, section, value, string, cp, coll, hashp))
    608542
    609543#define bfd_coff_link_output_has_begun(a,p) \
    610         ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a,p))
     544  ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a,p))
    611545#define bfd_coff_final_link_postscript(a,p) \
    612         ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
     546  ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
    613547
    614548@end example
  • branches/GNU/src/binutils/bfd/doc/core.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    99@strong{Synopsis}
    1010@example
    11 CONST char *bfd_core_file_failing_command(bfd *abfd);
     11const char *bfd_core_file_failing_command(bfd *abfd);
    1212@end example
    1313@strong{Description}@*
     
    2929@strong{Synopsis}
    3030@example
    31 boolean core_file_matches_executable_p
     31bfd_boolean core_file_matches_executable_p
    3232   (bfd *core_bfd, bfd *exec_bfd);
    3333@end example
    3434@strong{Description}@*
    35 Return @code{true} if the core file attached to @var{core_bfd}
     35Return @code{TRUE} if the core file attached to @var{core_bfd}
    3636was generated by a run of the executable file attached to
    37 @var{exec_bfd}, @code{false} otherwise.
     37@var{exec_bfd}, @code{FALSE} otherwise.
    3838
  • branches/GNU/src/binutils/bfd/doc/elf.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 @section ELF backends
     1@section
     2ELF backends
     3
    24BFD support for ELF formats is being worked on.
    35Currently, the best supported back ends are for sparc and i386
  • branches/GNU/src/binutils/bfd/doc/format.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2828@strong{Synopsis}
    2929@example
    30 boolean bfd_check_format(bfd *abfd, bfd_format format);
     30bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
    3131@end example
    3232@strong{Description}@*
     
    4343the file, or an error results.
    4444
    45 The function returns @code{true} on success, otherwise @code{false}
     45The function returns @code{TRUE} on success, otherwise @code{FALSE}
    4646with one of the following error codes:
    4747
     
    7171@strong{Synopsis}
    7272@example
    73 boolean bfd_check_format_matches(bfd *abfd, bfd_format format, char ***matching);
     73bfd_boolean bfd_check_format_matches (bfd *abfd, bfd_format format,
     74    char ***matching);
    7475@end example
    7576@strong{Description}@*
    76 Like @code{bfd_check_format}, except when it returns false with
     77Like @code{bfd_check_format}, except when it returns FALSE with
    7778@code{bfd_errno} set to @code{bfd_error_file_ambiguously_recognized}.  In that
    7879case, if @var{matching} is not NULL, it will be filled in with
     
    8889@strong{Synopsis}
    8990@example
    90 boolean bfd_set_format(bfd *abfd, bfd_format format);
     91bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
    9192@end example
    9293@strong{Description}@*
     
    100101@strong{Synopsis}
    101102@example
    102 CONST char *bfd_format_string(bfd_format format);
     103const char *bfd_format_string (bfd_format format);
    103104@end example
    104105@strong{Description}@*
  • branches/GNU/src/binutils/bfd/doc/hash.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    3636entries you will need, the function @code{bfd_hash_table_init_n},
    3737which takes a @var{size} argument, may be used).
    38 @code{bfd_hash_table_init} returns @code{false} if some sort of
     38@code{bfd_hash_table_init} returns @code{FALSE} if some sort of
    3939error occurs.
    4040
     
    6262string in the hash table and to create a new entry.
    6363
    64 If the @var{create} argument is @code{false}, @code{bfd_hash_lookup}
     64If the @var{create} argument is @code{FALSE}, @code{bfd_hash_lookup}
    6565will look up a string.  If the string is found, it will
    6666returns a pointer to a @code{struct bfd_hash_entry}.  If the
     
    6969the returns @code{struct bfd_hash_entry}.
    7070
    71 If the @var{create} argument is @code{true}, the string will be
     71If the @var{create} argument is @code{TRUE}, the string will be
    7272entered into the hash table if it is not already there.
    7373Either way a pointer to a @code{struct bfd_hash_entry} will be
     
    7676error occurred.
    7777
    78 If the @var{create} argument is @code{true}, and a new entry is
     78If the @var{create} argument is @code{TRUE}, and a new entry is
    7979created, the @var{copy} argument is used to decide whether to
    8080copy the string onto the hash table objalloc or not.  If
    81 @var{copy} is passed as @code{false}, you must be careful not to
     81@var{copy} is passed as @code{FALSE}, you must be careful not to
    8282deallocate or modify the string as long as the hash table
    8383exists.
     
    9696must return a @code{boolean} value, which indicates whether to
    9797continue traversing the hash table.  If the function returns
    98 @code{false}, @code{bfd_hash_traverse} will stop the traversal and
     98@code{FALSE}, @code{bfd_hash_traverse} will stop the traversal and
    9999return immediately.
    100100
  • branches/GNU/src/binutils/bfd/doc/libbfd.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1111@strong{Synopsis}
    1212@example
    13 void bfd_write_bigendian_4byte_int(bfd *abfd,  int i);
     13bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
    1414@end example
    1515@strong{Description}@*
     
    4848               bfd_put_8
    4949#define bfd_get_8(abfd, ptr) \
    50                 (*(unsigned char *) (ptr))
     50                (*(unsigned char *) (ptr) & 0xff)
    5151#define bfd_get_signed_8(abfd, ptr) \
    52                ((*(unsigned char *) (ptr) ^ 0x80) - 0x80)
     52               (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
    5353
    5454#define bfd_put_16(abfd, val, ptr) \
     
    8080
    8181#define bfd_get(bits, abfd, ptr)                               \
    82                 ((bits) == 8 ? bfd_get_8 (abfd, ptr)           \
     82                ( (bits) ==  8 ? (bfd_vma) bfd_get_8 (abfd, ptr)       \
    8383                : (bits) == 16 ? bfd_get_16 (abfd, ptr)        \
    8484                : (bits) == 32 ? bfd_get_32 (abfd, ptr)        \
     
    8787
    8888#define bfd_put(bits, abfd, val, ptr)                          \
    89                 ((bits) == 8 ? bfd_put_8 (abfd, val, ptr)      \
     89                ( (bits) ==  8 ? bfd_put_8  (abfd, val, ptr)   \
    9090                : (bits) == 16 ? bfd_put_16 (abfd, val, ptr)   \
    9191                : (bits) == 32 ? bfd_put_32 (abfd, val, ptr)   \
     
    9999@strong{Description}@*
    100100These macros have the same function as their @code{bfd_get_x}
    101 bretheren, except that they are used for removing information
     101brethren, except that they are used for removing information
    102102for the header records of object files. Believe it or not,
    103103some object files keep their header records in big endian
     
    108108
    109109#define bfd_h_put_8(abfd, val, ptr) \
    110                bfd_put_8 (abfd, val, ptr)
     110  bfd_put_8 (abfd, val, ptr)
    111111#define bfd_h_put_signed_8(abfd, val, ptr) \
    112                bfd_put_8 (abfd, val, ptr)
     112  bfd_put_8 (abfd, val, ptr)
    113113#define bfd_h_get_8(abfd, ptr) \
    114                bfd_get_8 (abfd, ptr)
     114  bfd_get_8 (abfd, ptr)
    115115#define bfd_h_get_signed_8(abfd, ptr) \
    116                bfd_get_signed_8 (abfd, ptr)
     116  bfd_get_signed_8 (abfd, ptr)
    117117
    118118#define bfd_h_put_16(abfd, val, ptr) \
    119                 BFD_SEND(abfd, bfd_h_putx16,(val,ptr))
     119  BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
    120120#define bfd_h_put_signed_16 \
    121                 bfd_h_put_16
     121  bfd_h_put_16
    122122#define bfd_h_get_16(abfd, ptr) \
    123                 BFD_SEND(abfd, bfd_h_getx16,(ptr))
     123  BFD_SEND (abfd, bfd_h_getx16, (ptr))
    124124#define bfd_h_get_signed_16(abfd, ptr) \
    125                 BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr))
     125  BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
    126126
    127127#define bfd_h_put_32(abfd, val, ptr) \
    128                 BFD_SEND(abfd, bfd_h_putx32,(val,ptr))
     128  BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
    129129#define bfd_h_put_signed_32 \
    130                 bfd_h_put_32
     130  bfd_h_put_32
    131131#define bfd_h_get_32(abfd, ptr) \
    132                 BFD_SEND(abfd, bfd_h_getx32,(ptr))
     132  BFD_SEND (abfd, bfd_h_getx32, (ptr))
    133133#define bfd_h_get_signed_32(abfd, ptr) \
    134                 BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr))
     134  BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
    135135
    136136#define bfd_h_put_64(abfd, val, ptr) \
    137                 BFD_SEND(abfd, bfd_h_putx64,(val, ptr))
     137  BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
    138138#define bfd_h_put_signed_64 \
    139                 bfd_h_put_64
     139  bfd_h_put_64
    140140#define bfd_h_get_64(abfd, ptr) \
    141                 BFD_SEND(abfd, bfd_h_getx64,(ptr))
     141  BFD_SEND (abfd, bfd_h_getx64, (ptr))
    142142#define bfd_h_get_signed_64(abfd, ptr) \
    143                 BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
     143  BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
     144
     145/* Refinements on the above, which should eventually go away.  Save
     146   cluttering the source with (bfd_vma) and (bfd_byte *) casts.  */
     147
     148#define H_PUT_64(abfd, val, where) \
     149  bfd_h_put_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
     150
     151#define H_PUT_32(abfd, val, where) \
     152  bfd_h_put_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
     153
     154#define H_PUT_16(abfd, val, where) \
     155  bfd_h_put_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
     156
     157#define H_PUT_8 bfd_h_put_8
     158
     159#define H_PUT_S64(abfd, val, where) \
     160  bfd_h_put_signed_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
     161
     162#define H_PUT_S32(abfd, val, where) \
     163  bfd_h_put_signed_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
     164
     165#define H_PUT_S16(abfd, val, where) \
     166  bfd_h_put_signed_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
     167
     168#define H_PUT_S8 bfd_h_put_signed_8
     169
     170#define H_GET_64(abfd, where) \
     171  bfd_h_get_64 ((abfd), (bfd_byte *) (where))
     172
     173#define H_GET_32(abfd, where) \
     174  bfd_h_get_32 ((abfd), (bfd_byte *) (where))
     175
     176#define H_GET_16(abfd, where) \
     177  bfd_h_get_16 ((abfd), (bfd_byte *) (where))
     178
     179#define H_GET_8 bfd_h_get_8
     180
     181#define H_GET_S64(abfd, where) \
     182  bfd_h_get_signed_64 ((abfd), (bfd_byte *) (where))
     183
     184#define H_GET_S32(abfd, where) \
     185  bfd_h_get_signed_32 ((abfd), (bfd_byte *) (where))
     186
     187#define H_GET_S16(abfd, where) \
     188  bfd_h_get_signed_16 ((abfd), (bfd_byte *) (where))
     189
     190#define H_GET_S8 bfd_h_get_signed_8
     191
    144192
    145193@end example
     
    149197@strong{Synopsis}
    150198@example
    151 unsigned int bfd_log2(bfd_vma x);
     199unsigned int bfd_log2 (bfd_vma x);
    152200@end example
    153201@strong{Description}@*
    154202Return the log base 2 of the value supplied, rounded up.  E.g., an
    155 @var{x} of 1025 returns 11.
    156 
     203@var{x} of 1025 returns 11.  A @var{x} of 0 returns 0.
     204
  • branches/GNU/src/binutils/bfd/doc/linker.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    159159routine should save it somewhere attached to the object file
    160160BFD.  However, the information should only be saved if the
    161 @code{keep_memory} field of the @code{info} argument is true, so
     161@code{keep_memory} field of the @code{info} argument is TRUE, so
    162162that the @code{-no-keep-memory} linker switch is effective.
    163163
     
    353353@strong{Synopsis}
    354354@example
    355 boolean bfd_link_split_section(bfd *abfd, asection *sec);
     355bfd_boolean bfd_link_split_section(bfd *abfd, asection *sec);
    356356@end example
    357357@strong{Description}@*
  • branches/GNU/src/binutils/bfd/doc/opncls.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    66@strong{Synopsis}
    77@example
    8 bfd *bfd_openr(CONST char *filename, CONST char *target);
     8bfd *bfd_openr(const char *filename, const char *target);
    99@end example
    1010@strong{Description}@*
     
    1616
    1717If @code{NULL} is returned then an error has occured.   Possible errors
    18 are @code{bfd_error_no_memory}, @code{bfd_error_invalid_target} or @code{system_call} error.
     18are @code{bfd_error_no_memory}, @code{bfd_error_invalid_target} or
     19@code{system_call} error.
    1920
    2021@findex bfd_fdopenr
     
    2223@strong{Synopsis}
    2324@example
    24 bfd *bfd_fdopenr(CONST char *filename, CONST char *target, int fd);
    25 @end example
    26 @strong{Description}@*
    27 @code{bfd_fdopenr} is to @code{bfd_fopenr} much like @code{fdopen} is to @code{fopen}.
    28 It opens a BFD on a file already described by the @var{fd}
    29 supplied.
    30 
    31 When the file is later @code{bfd_close}d, the file descriptor will be closed.
    32 
    33 If the caller desires that this file descriptor be cached by BFD
    34 (opened as needed, closed as needed to free descriptors for
    35 other opens), with the supplied @var{fd} used as an initial
    36 file descriptor (but subject to closure at any time), call
    37 bfd_set_cacheable(bfd, 1) on the returned BFD.  The default is to
    38 assume no cacheing; the file descriptor will remain open until
    39 @code{bfd_close}, and will not be affected by BFD operations on other
    40 files.
    41 
    42 Possible errors are @code{bfd_error_no_memory}, @code{bfd_error_invalid_target} and @code{bfd_error_system_call}.
     25bfd *bfd_fdopenr(const char *filename, const char *target, int fd);
     26@end example
     27@strong{Description}@*
     28@code{bfd_fdopenr} is to @code{bfd_fopenr} much like @code{fdopen} is to
     29@code{fopen}.  It opens a BFD on a file already described by the
     30@var{fd} supplied.
     31
     32When the file is later @code{bfd_close}d, the file descriptor will
     33be closed.  If the caller desires that this file descriptor be
     34cached by BFD (opened as needed, closed as needed to free
     35descriptors for other opens), with the supplied @var{fd} used as
     36an initial file descriptor (but subject to closure at any time),
     37call bfd_set_cacheable(bfd, 1) on the returned BFD.  The default
     38is to assume no cacheing; the file descriptor will remain open
     39until @code{bfd_close}, and will not be affected by BFD operations
     40on other files.
     41
     42Possible errors are @code{bfd_error_no_memory},
     43@code{bfd_error_invalid_target} and @code{bfd_error_system_call}.
    4344
    4445@findex bfd_openstreamr
     
    5657@strong{Synopsis}
    5758@example
    58 bfd *bfd_openw(CONST char *filename, CONST char *target);
     59bfd *bfd_openw(const char *filename, const char *target);
    5960@end example
    6061@strong{Description}@*
     
    6970@strong{Synopsis}
    7071@example
    71 boolean bfd_close(bfd *abfd);
    72 @end example
    73 @strong{Description}@*
    74 Close a BFD. If the BFD was open for writing,
    75 then pending operations are completed and the file written out
    76 and closed. If the created file is executable, then
    77 @code{chmod} is called to mark it as such.
     72bfd_boolean bfd_close (bfd *abfd);
     73@end example
     74@strong{Description}@*
     75Close a BFD. If the BFD was open for writing, then pending
     76operations are completed and the file written out and closed.
     77If the created file is executable, then @code{chmod} is called
     78to mark it as such.
    7879
    7980All memory attached to the BFD is released.
     
    8384
    8485@strong{Returns}@*
    85 @code{true} is returned if all is ok, otherwise @code{false}.
     86@code{TRUE} is returned if all is ok, otherwise @code{FALSE}.
    8687
    8788@findex bfd_close_all_done
     
    8990@strong{Synopsis}
    9091@example
    91 boolean bfd_close_all_done(bfd *);
    92 @end example
    93 @strong{Description}@*
    94 Close a BFD.  Differs from @code{bfd_close}
    95 since it does not complete any pending operations.  This
    96 routine would be used if the application had just used BFD for
    97 swapping and didn't want to use any of the writing code.
     92bfd_boolean bfd_close_all_done (bfd *);
     93@end example
     94@strong{Description}@*
     95Close a BFD.  Differs from @code{bfd_close} since it does not
     96complete any pending operations.  This routine would be used
     97if the application had just used BFD for swapping and didn't
     98want to use any of the writing code.
    9899
    99100If the created file is executable, then @code{chmod} is called
     
    103104
    104105@strong{Returns}@*
    105 @code{true} is returned if all is ok, otherwise @code{false}.
     106@code{TRUE} is returned if all is ok, otherwise @code{FALSE}.
    106107
    107108@findex bfd_create
     
    109110@strong{Synopsis}
    110111@example
    111 bfd *bfd_create(CONST char *filename, bfd *templ);
    112 @end example
    113 @strong{Description}@*
    114 Create a new BFD in the manner of
    115 @code{bfd_openw}, but without opening a file. The new BFD
    116 takes the target from the target used by @var{template}. The
    117 format is always set to @code{bfd_object}.
     112bfd *bfd_create(const char *filename, bfd *templ);
     113@end example
     114@strong{Description}@*
     115Create a new BFD in the manner of @code{bfd_openw}, but without
     116opening a file. The new BFD takes the target from the target
     117used by @var{template}. The format is always set to @code{bfd_object}.
    118118
    119119@findex bfd_make_writable
     
    121121@strong{Synopsis}
    122122@example
    123 boolean bfd_make_writable(bfd *abfd);
     123bfd_boolean bfd_make_writable (bfd *abfd);
    124124@end example
    125125@strong{Description}@*
     
    130130
    131131@strong{Returns}@*
    132 @code{true} is returned if all is ok, otherwise @code{false}.
     132@code{TRUE} is returned if all is ok, otherwise @code{FALSE}.
    133133
    134134@findex bfd_make_readable
     
    136136@strong{Synopsis}
    137137@example
    138 boolean bfd_make_readable(bfd *abfd);
     138bfd_boolean bfd_make_readable (bfd *abfd);
    139139@end example
    140140@strong{Description}@*
     
    146146
    147147@strong{Returns}@*
    148 @code{true} is returned if all is ok, otherwise @code{false}.
     148@code{TRUE} is returned if all is ok, otherwise @code{FALSE}.
    149149
    150150@findex bfd_alloc
     
    158158@code{abfd} and return a pointer to it.
    159159
     160@findex calc_crc32
     161@subsubsection @code{calc_crc32}
     162@strong{Synopsis}
     163@example
     164unsigned long calc_crc32 (unsigned long crc, const unsigned char *buf, size_t len);
     165@end example
     166@strong{Description}@*
     167Advance the CRC32 given by @var{crc} through @var{len}
     168bytes of @var{buf}. Return the updated CRC32 value.
     169
     170@findex get_debug_link_info
     171@subsubsection @code{get_debug_link_info}
     172@strong{Synopsis}
     173@example
     174char *get_debug_link_info (bfd *abfd, unsigned long *crc32_out)
     175@end example
     176@strong{Description}@*
     177fetch the filename and CRC32 value for any separate debuginfo
     178associated with @var{abfd}. Return NULL if no such info found,
     179otherwise return filename and update @var{crc32_out}.
     180
     181@findex separate_debug_file_exists
     182@subsubsection @code{separate_debug_file_exists}
     183@strong{Synopsis}
     184@example
     185bfd_boolean separate_debug_file_exists (char * name, unsigned long crc32)
     186@end example
     187@strong{Description}@*
     188Checks to see if @var{name} is a file and if its contents
     189match @var{crc32}.
     190
     191@findex find_separate_debug_file
     192@subsubsection @code{find_separate_debug_file}
     193@strong{Synopsis}
     194@example
     195char * find_separate_debug_file (bfd *abfd)
     196@end example
     197@strong{Description}@*
     198Searches @var{abfd} for a reference to separate debugging
     199information, scans various locations in the filesystem, including
     200the file tree rooted at @var{debug_file_directory}, and returns a
     201filename of such debugging information if the file is found and has
     202matching CRC32.  Returns NULL if no reference to debugging file
     203exists, or file cannot be found.
     204
     205@findex bfd_follow_gnu_debuglink
     206@subsubsection @code{bfd_follow_gnu_debuglink}
     207@strong{Synopsis}
     208@example
     209char * bfd_follow_gnu_debuglink(bfd *abfd, const char *dir);
     210@end example
     211@strong{Description}@*
     212Takes a BFD and searches it for a .gnu_debuglink section.  If this
     213section is found, examines the section for the name and checksum of
     214a '.debug' file containing auxiliary debugging
     215information. Searches filesystem for .debug file in some standard
     216locations, including the directory tree rooted at @var{dir}, and if
     217found returns the full filename. If @var{dir} is NULL, will search
     218default path configured into libbfd at build time.
     219
     220@strong{Returns}@*
     221@code{NULL} on any errors or failure to locate the .debug file,
     222otherwise a pointer to a heap-allocated string containing the
     223filename. The caller is responsible for freeing this string.
     224
  • branches/GNU/src/binutils/bfd/doc/proto.str

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    115115        get_stuff_in_command
    116116        strip_trailing_newlines
    117         "\n{* " swap catstr " *}\n" catstr
     117        "\n{* " swap catstr "  *}\n" catstr
    118118        translatecomments
    119119        - discard it if we're doing internal mode
  • branches/GNU/src/binutils/bfd/doc/reloc.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2828typedef enum bfd_reloc_status
    2929@{
    30        /* No errors detected */
     30  /* No errors detected. */
    3131  bfd_reloc_ok,
    3232
    33        /* The relocation was performed, but there was an overflow. */
     33  /* The relocation was performed, but there was an overflow. */
    3434  bfd_reloc_overflow,
    3535
    36        /* The address to relocate was not within the section supplied. */
     36  /* The address to relocate was not within the section supplied. */
    3737  bfd_reloc_outofrange,
    3838
    39        /* Used by special functions */
     39  /* Used by special functions. */
    4040  bfd_reloc_continue,
    4141
    42        /* Unsupported relocation size requested. */
     42  /* Unsupported relocation size requested. */
    4343  bfd_reloc_notsupported,
    4444
    45        /* Unused */
     45  /* Unused. */
    4646  bfd_reloc_other,
    4747
    48        /* The symbol to relocate against was undefined. */
     48  /* The symbol to relocate against was undefined. */
    4949  bfd_reloc_undefined,
    5050
    51        /* The relocation was performed, but may not be ok - presently
    52           generated only when linking i960 coff files with i960 b.out
    53           symbols.  If this type is returned, the error_message argument
    54           to bfd_perform_relocation will be set.  */
     51  /* The relocation was performed, but may not be ok - presently
     52     generated only when linking i960 coff files with i960 b.out
     53     symbols.  If this type is returned, the error_message argument
     54     to bfd_perform_relocation will be set.  */
    5555  bfd_reloc_dangerous
    5656 @}
     
    6060typedef struct reloc_cache_entry
    6161@{
    62        /* A pointer into the canonical table of pointers  */
     62  /* A pointer into the canonical table of pointers.  */
    6363  struct symbol_cache_entry **sym_ptr_ptr;
    6464
    65        /* offset in section */
     65  /* offset in section. */
    6666  bfd_size_type address;
    6767
    68        /* addend for relocation value */
     68  /* addend for relocation value. */
    6969  bfd_vma addend;
    7070
    71        /* Pointer to how to perform the required relocation */
     71  /* Pointer to how to perform the required relocation. */
    7272  reloc_howto_type *howto;
    7373
    74 @} arelent;
     74@}
     75arelent;
     76
    7577@end example
    7678@strong{Description}@*
     
    231233enum complain_overflow
    232234@{
    233        /* Do not complain on overflow. */
     235  /* Do not complain on overflow. */
    234236  complain_overflow_dont,
    235237
    236        /* Complain if the bitfield overflows, whether it is considered
    237           as signed or unsigned. */
     238  /* Complain if the bitfield overflows, whether it is considered
     239     as signed or unsigned. */
    238240  complain_overflow_bitfield,
    239241
    240        /* Complain if the value overflows when considered as signed
    241           number. */
     242  /* Complain if the value overflows when considered as signed
     243     number. */
    242244  complain_overflow_signed,
    243245
    244        /* Complain if the value overflows when considered as an
    245           unsigned number. */
     246  /* Complain if the value overflows when considered as an
     247     unsigned number. */
    246248  complain_overflow_unsigned
    247249@};
     
    253255
    254256@example
    255 struct symbol_cache_entry;             /* Forward declaration */
     257struct symbol_cache_entry;             /* Forward declaration. */
    256258
    257259struct reloc_howto_struct
    258260@{
    259        /*  The type field has mainly a documentary use - the back end can
    260            do what it wants with it, though normally the back end's
    261            external idea of what a reloc number is stored
    262            in this field. For example, a PC relative word relocation
    263            in a coff environment has the type 023 - because that's
    264            what the outside world calls a R_PCRWORD reloc. */
     261  /*  The type field has mainly a documentary use - the back end can
     262      do what it wants with it, though normally the back end's
     263      external idea of what a reloc number is stored
     264      in this field. For example, a PC relative word relocation
     265      in a coff environment has the type 023 - because that's
     266      what the outside world calls a R_PCRWORD reloc. */
    265267  unsigned int type;
    266268
    267        /*  The value the final relocation is shifted right by. This drops
    268            unwanted data from the relocation.  */
     269  /*  The value the final relocation is shifted right by. This drops
     270      unwanted data from the relocation.  */
    269271  unsigned int rightshift;
    270272
    271        /*  The size of the item to be relocated.  This is *not* a
    272            power-of-two measure.  To get the number of bytes operated
    273            on by a type of relocation, use bfd_get_reloc_size.  */
     273  /*  The size of the item to be relocated.  This is *not* a
     274      power-of-two measure.  To get the number of bytes operated
     275      on by a type of relocation, use bfd_get_reloc_size.  */
    274276  int size;
    275277
    276        /*  The number of bits in the item to be relocated.  This is used
    277            when doing overflow checking.  */
     278  /*  The number of bits in the item to be relocated.  This is used
     279      when doing overflow checking.  */
    278280  unsigned int bitsize;
    279281
    280        /*  Notes that the relocation is relative to the location in the
    281            data section of the addend. The relocation function will
    282            subtract from the relocation value the address of the location
    283            being relocated. */
    284   boolean pc_relative;
    285 
    286        /*  The bit position of the reloc value in the destination.
    287            The relocated value is left shifted by this amount. */
     282  /*  Notes that the relocation is relative to the location in the
     283      data section of the addend. The relocation function will
     284      subtract from the relocation value the address of the location
     285      being relocated. */
     286  bfd_boolean pc_relative;
     287
     288  /*  The bit position of the reloc value in the destination.
     289      The relocated value is left shifted by this amount. */
    288290  unsigned int bitpos;
    289291
    290        /* What type of overflow error should be checked for when
    291           relocating. */
     292  /* What type of overflow error should be checked for when
     293     relocating. */
    292294  enum complain_overflow complain_on_overflow;
    293295
    294        /* If this field is non null, then the supplied function is
    295           called rather than the normal function. This allows really
    296           strange relocation methods to be accomodated (e.g., i960 callj
    297           instructions). */
     296  /* If this field is non null, then the supplied function is
     297     called rather than the normal function. This allows really
     298     strange relocation methods to be accomodated (e.g., i960 callj
     299     instructions). */
    298300  bfd_reloc_status_type (*special_function)
    299                                    PARAMS ((bfd *abfd,
    300                                             arelent *reloc_entry,
    301                                             struct symbol_cache_entry *symbol,
    302                                             PTR data,
    303                                             asection *input_section,
    304                                             bfd *output_bfd,
    305                                             char **error_message));
    306 
    307        /* The textual name of the relocation type. */
     301    PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
     302             bfd *, char **));
     303
     304  /* The textual name of the relocation type.  */
    308305  char *name;
    309306
    310        /* Some formats record a relocation addend in the section contents
    311           rather than with the relocation.  For ELF formats this is the
    312           distinction between USE_REL and USE_RELA (though the code checks
    313           for USE_REL == 1/0).  The value of this field is TRUE if the
    314           addend is recorded with the section contents; when performing a
    315           partial link (ld -r) the section contents (the data) will be
    316           modified.  The value of this field is FALSE if addends are
    317           recorded with the relocation (in arelent.addend); when performing
    318           a partial link the relocation will be modified.
    319           All relocations for all ELF USE_RELA targets should set this field
    320           to FALSE (values of TRUE should be looked on with suspicion).
    321           However, the converse is not true: not all relocations of all ELF
    322           USE_REL targets set this field to TRUE.  Why this is so is peculiar
    323           to each particular target.  For relocs that aren't used in partial
    324           links (e.g. GOT stuff) it doesn't matter what this is set to.  */
    325   boolean partial_inplace;
    326 
    327        /* The src_mask selects which parts of the read in data
    328           are to be used in the relocation sum.  E.g., if this was an 8 bit
    329           byte of data which we read and relocated, this would be
    330           0x000000ff. When we have relocs which have an addend, such as
    331           sun4 extended relocs, the value in the offset part of a
    332           relocating field is garbage so we never use it. In this case
    333           the mask would be 0x00000000. */
     307  /* Some formats record a relocation addend in the section contents
     308     rather than with the relocation.  For ELF formats this is the
     309     distinction between USE_REL and USE_RELA (though the code checks
     310     for USE_REL == 1/0).  The value of this field is TRUE if the
     311     addend is recorded with the section contents; when performing a
     312     partial link (ld -r) the section contents (the data) will be
     313     modified.  The value of this field is FALSE if addends are
     314     recorded with the relocation (in arelent.addend); when performing
     315     a partial link the relocation will be modified.
     316     All relocations for all ELF USE_RELA targets should set this field
     317     to FALSE (values of TRUE should be looked on with suspicion).
     318     However, the converse is not true: not all relocations of all ELF
     319     USE_REL targets set this field to TRUE.  Why this is so is peculiar
     320     to each particular target.  For relocs that aren't used in partial
     321     links (e.g. GOT stuff) it doesn't matter what this is set to.  */
     322  bfd_boolean partial_inplace;
     323
     324  /* src_mask selects the part of the instruction (or data) to be used
     325     in the relocation sum.  If the target relocations don't have an
     326     addend in the reloc, eg. ELF USE_REL, src_mask will normally equal
     327     dst_mask to extract the addend from the section contents.  If
     328     relocations do have an addend in the reloc, eg. ELF USE_RELA, this
     329     field should be zero.  Non-zero values for ELF USE_RELA targets are
     330     bogus as in those cases the value in the dst_mask part of the
     331     section contents should be treated as garbage.  */
    334332  bfd_vma src_mask;
    335333
    336        /* The dst_mask selects which parts of the instruction are replaced
    337           into the instruction. In most cases src_mask == dst_mask,
    338           except in the above special case, where dst_mask would be
    339           0x000000ff, and src_mask would be 0x00000000.   */
     334  /* dst_mask selects which parts of the instruction (or data) are
     335     replaced with a relocated value.  */
    340336  bfd_vma dst_mask;
    341337
    342        /* When some formats create PC relative instructions, they leave
    343           the value of the pc of the place being relocated in the offset
    344           slot of the instruction, so that a PC relative relocation can
    345           be made just by adding in an ordinary offset (e.g., sun3 a.out).
    346           Some formats leave the displacement part of an instruction
    347           empty (e.g., m88k bcs); this flag signals the fact.*/
    348   boolean pcrel_offset;
    349 
     338  /* When some formats create PC relative instructions, they leave
     339     the value of the pc of the place being relocated in the offset
     340     slot of the instruction, so that a PC relative relocation can
     341     be made just by adding in an ordinary offset (e.g., sun3 a.out).
     342     Some formats leave the displacement part of an instruction
     343     empty (e.g., m88k bcs); this flag signals the fact.  */
     344  bfd_boolean pcrel_offset;
    350345@};
     346
    351347@end example
    352348@findex The HOWTO Macro
     
    355351The HOWTO define is horrible and will go away.
    356352@example
    357 #define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
    358   @{(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC@}
     353#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
     354  @{ (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC @}
    359355@end example
    360356
     
    363359moment, we are compatible, so do it this way.
    364360@example
    365 #define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN)
     361#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \
     362  HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \
     363         NAME, FALSE, 0, 0, IN)
    366364
    367365@end example
     
    371369@example
    372370#define EMPTY_HOWTO(C) \
    373   HOWTO((C),0,0,0,false,0,complain_overflow_dont,NULL,NULL,false,0,0,false)
     371  HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \
     372         NULL, FALSE, 0, 0, FALSE)
    374373
    375374@end example
     
    378377Helper routine to turn a symbol into a relocation value.
    379378@example
    380 #define HOWTO_PREPARE(relocation, symbol)      \
    381   @{                                            \
    382   if (symbol != (asymbol *)NULL) @{             \
    383     if (bfd_is_com_section (symbol->section)) @{ \
    384       relocation = 0;                          \
    385     @}                                          \
    386     else @{                                     \
    387       relocation = symbol->value;              \
    388     @}                                          \
    389   @}                                            \
    390 @}
     379#define HOWTO_PREPARE(relocation, symbol)               \
     380  @{                                                     \
     381    if (symbol != (asymbol *) NULL)                     \
     382      @{                                                 \
     383        if (bfd_is_com_section (symbol->section))       \
     384          @{                                             \
     385            relocation = 0;                             \
     386          @}                                             \
     387        else                                            \
     388          @{                                             \
     389            relocation = symbol->value;                 \
     390          @}                                             \
     391      @}                                                 \
     392  @}
     393
    391394@end example
    392395
     
    406409How relocs are tied together in an @code{asection}:
    407410@example
    408 typedef struct relent_chain @{
     411typedef struct relent_chain
     412@{
    409413  arelent relent;
    410   struct   relent_chain *next;
    411 @} arelent_chain;
     414  struct relent_chain *next;
     415@}
     416arelent_chain;
     417
    412418@end example
    413419
     
    532538@deffnx {} BFD_RELOC_HI16_S_GOTOFF
    533539@deffnx {} BFD_RELOC_8_GOTOFF
     540@deffnx {} BFD_RELOC_64_PLT_PCREL
    534541@deffnx {} BFD_RELOC_32_PLT_PCREL
    535542@deffnx {} BFD_RELOC_24_PLT_PCREL
    536543@deffnx {} BFD_RELOC_16_PLT_PCREL
    537544@deffnx {} BFD_RELOC_8_PLT_PCREL
     545@deffnx {} BFD_RELOC_64_PLTOFF
    538546@deffnx {} BFD_RELOC_32_PLTOFF
    539547@deffnx {} BFD_RELOC_16_PLTOFF
     
    626634@deffnx {} BFD_RELOC_SPARC_5
    627635@deffnx {} BFD_RELOC_SPARC_DISP64
     636@deffnx {} BFD_RELOC_SPARC_PLT32
    628637@deffnx {} BFD_RELOC_SPARC_PLT64
    629638@deffnx {} BFD_RELOC_SPARC_HIX22
     
    638647SPARC little endian relocation
    639648@end deffn
     649@deffn {} BFD_RELOC_SPARC_TLS_GD_HI22
     650@deffnx {} BFD_RELOC_SPARC_TLS_GD_LO10
     651@deffnx {} BFD_RELOC_SPARC_TLS_GD_ADD
     652@deffnx {} BFD_RELOC_SPARC_TLS_GD_CALL
     653@deffnx {} BFD_RELOC_SPARC_TLS_LDM_HI22
     654@deffnx {} BFD_RELOC_SPARC_TLS_LDM_LO10
     655@deffnx {} BFD_RELOC_SPARC_TLS_LDM_ADD
     656@deffnx {} BFD_RELOC_SPARC_TLS_LDM_CALL
     657@deffnx {} BFD_RELOC_SPARC_TLS_LDO_HIX22
     658@deffnx {} BFD_RELOC_SPARC_TLS_LDO_LOX10
     659@deffnx {} BFD_RELOC_SPARC_TLS_LDO_ADD
     660@deffnx {} BFD_RELOC_SPARC_TLS_IE_HI22
     661@deffnx {} BFD_RELOC_SPARC_TLS_IE_LO10
     662@deffnx {} BFD_RELOC_SPARC_TLS_IE_LD
     663@deffnx {} BFD_RELOC_SPARC_TLS_IE_LDX
     664@deffnx {} BFD_RELOC_SPARC_TLS_IE_ADD
     665@deffnx {} BFD_RELOC_SPARC_TLS_LE_HIX22
     666@deffnx {} BFD_RELOC_SPARC_TLS_LE_LOX10
     667@deffnx {} BFD_RELOC_SPARC_TLS_DTPMOD32
     668@deffnx {} BFD_RELOC_SPARC_TLS_DTPMOD64
     669@deffnx {} BFD_RELOC_SPARC_TLS_DTPOFF32
     670@deffnx {} BFD_RELOC_SPARC_TLS_DTPOFF64
     671@deffnx {} BFD_RELOC_SPARC_TLS_TPOFF32
     672@deffnx {} BFD_RELOC_SPARC_TLS_TPOFF64
     673SPARC TLS relocations
     674@end deffn
    640675@deffn {} BFD_RELOC_ALPHA_GPDISP_HI16
    641676Alpha ECOFF and ELF relocations.  Some of these treat the symbol or
     
    6837182 - byte-manipulation (byte offset reg)
    6847193 - jsr (target of branch)
    685 
    686 The GNU linker currently doesn't do any of this optimizing.
    687 @end deffn
    688 @deffn {} BFD_RELOC_ALPHA_USER_LITERAL
    689 @deffnx {} BFD_RELOC_ALPHA_USER_LITUSE_BASE
    690 @deffnx {} BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF
    691 @deffnx {} BFD_RELOC_ALPHA_USER_LITUSE_JSR
    692 @deffnx {} BFD_RELOC_ALPHA_USER_GPDISP
    693 @deffnx {} BFD_RELOC_ALPHA_USER_GPRELHIGH
    694 @deffnx {} BFD_RELOC_ALPHA_USER_GPRELLOW
    695 The BFD_RELOC_ALPHA_USER_* relocations are used by the assembler to
    696 process the explicit !<reloc>!sequence relocations, and are mapped
    697 into the normal relocations at the end of processing.
    698720@end deffn
    699721@deffn {} BFD_RELOC_ALPHA_HINT
     
    709731The CODEADDR relocation outputs a STO_CA in the object file,
    710732which is filled by the linker.
     733@end deffn
     734@deffn {} BFD_RELOC_ALPHA_GPREL_HI16
     735@deffnx {} BFD_RELOC_ALPHA_GPREL_LO16
     736The GPREL_HI/LO relocations together form a 32-bit offset from the
     737GP register.
     738@end deffn
     739@deffn {} BFD_RELOC_ALPHA_BRSGP
     740Like BFD_RELOC_23_PCREL_S2, except that the source and target must
     741share a common GP, and the target address is adjusted for
     742STO_ALPHA_STD_GPLOAD.
     743@end deffn
     744@deffn {} BFD_RELOC_ALPHA_TLSGD
     745@deffnx {} BFD_RELOC_ALPHA_TLSLDM
     746@deffnx {} BFD_RELOC_ALPHA_DTPMOD64
     747@deffnx {} BFD_RELOC_ALPHA_GOTDTPREL16
     748@deffnx {} BFD_RELOC_ALPHA_DTPREL64
     749@deffnx {} BFD_RELOC_ALPHA_DTPREL_HI16
     750@deffnx {} BFD_RELOC_ALPHA_DTPREL_LO16
     751@deffnx {} BFD_RELOC_ALPHA_DTPREL16
     752@deffnx {} BFD_RELOC_ALPHA_GOTTPREL16
     753@deffnx {} BFD_RELOC_ALPHA_TPREL64
     754@deffnx {} BFD_RELOC_ALPHA_TPREL_HI16
     755@deffnx {} BFD_RELOC_ALPHA_TPREL_LO16
     756@deffnx {} BFD_RELOC_ALPHA_TPREL16
     757Alpha thread-local storage relocations.
    711758@end deffn
    712759@deffn {} BFD_RELOC_MIPS_JMP
     
    738785Like BFD_RELOC_LO16, but PC relative.
    739786@end deffn
    740 @deffn {} BFD_RELOC_MIPS_GPREL
    741 Relocation relative to the global pointer.
    742 @end deffn
    743787@deffn {} BFD_RELOC_MIPS_LITERAL
    744788Relocation against a MIPS literal section.
     
    746790@deffn {} BFD_RELOC_MIPS_GOT16
    747791@deffnx {} BFD_RELOC_MIPS_CALL16
    748 @deffnx {} BFD_RELOC_MIPS_GPREL32
    749792@deffnx {} BFD_RELOC_MIPS_GOT_HI16
    750793@deffnx {} BFD_RELOC_MIPS_GOT_LO16
     
    766809@deffnx {} BFD_RELOC_MIPS_RELGOT
    767810@deffnx {} BFD_RELOC_MIPS_JALR
     811@deffn {} BFD_RELOC_FRV_LABEL16
     812@deffnx {} BFD_RELOC_FRV_LABEL24
     813@deffnx {} BFD_RELOC_FRV_LO16
     814@deffnx {} BFD_RELOC_FRV_HI16
     815@deffnx {} BFD_RELOC_FRV_GPREL12
     816@deffnx {} BFD_RELOC_FRV_GPRELU12
     817@deffnx {} BFD_RELOC_FRV_GPREL32
     818@deffnx {} BFD_RELOC_FRV_GPRELHI
     819@deffnx {} BFD_RELOC_FRV_GPRELLO
     820Fujitsu Frv Relocations.
     821@end deffn
    768822MIPS ELF relocations.
    769823@end deffn
     
    776830@deffnx {} BFD_RELOC_386_GOTOFF
    777831@deffnx {} BFD_RELOC_386_GOTPC
     832@deffnx {} BFD_RELOC_386_TLS_TPOFF
     833@deffnx {} BFD_RELOC_386_TLS_IE
     834@deffnx {} BFD_RELOC_386_TLS_GOTIE
     835@deffnx {} BFD_RELOC_386_TLS_LE
     836@deffnx {} BFD_RELOC_386_TLS_GD
     837@deffnx {} BFD_RELOC_386_TLS_LDM
     838@deffnx {} BFD_RELOC_386_TLS_LDO_32
     839@deffnx {} BFD_RELOC_386_TLS_IE_32
     840@deffnx {} BFD_RELOC_386_TLS_LE_32
     841@deffnx {} BFD_RELOC_386_TLS_DTPMOD32
     842@deffnx {} BFD_RELOC_386_TLS_DTPOFF32
     843@deffnx {} BFD_RELOC_386_TLS_TPOFF32
    778844i386/elf relocations
    779845@end deffn
     
    786852@deffnx {} BFD_RELOC_X86_64_GOTPCREL
    787853@deffnx {} BFD_RELOC_X86_64_32S
     854@deffnx {} BFD_RELOC_X86_64_DTPMOD64
     855@deffnx {} BFD_RELOC_X86_64_DTPOFF64
     856@deffnx {} BFD_RELOC_X86_64_TPOFF64
     857@deffnx {} BFD_RELOC_X86_64_TLSGD
     858@deffnx {} BFD_RELOC_X86_64_TLSLD
     859@deffnx {} BFD_RELOC_X86_64_DTPOFF32
     860@deffnx {} BFD_RELOC_X86_64_GOTTPOFF
     861@deffnx {} BFD_RELOC_X86_64_TPOFF32
    788862x86-64/elf relocations
    789863@end deffn
     
    801875@deffnx {} BFD_RELOC_NS32K_DISP_32_PCREL
    802876ns32k relocations
     877@end deffn
     878@deffn {} BFD_RELOC_PDP11_DISP_8_PCREL
     879@deffnx {} BFD_RELOC_PDP11_DISP_6_PCREL
     880PDP11 relocations
    803881@end deffn
    804882@deffn {} BFD_RELOC_PJ_CODE_HI16
     
    840918@deffnx {} BFD_RELOC_PPC_EMB_BIT_FLD
    841919@deffnx {} BFD_RELOC_PPC_EMB_RELSDA
     920@deffnx {} BFD_RELOC_PPC64_HIGHER
     921@deffnx {} BFD_RELOC_PPC64_HIGHER_S
     922@deffnx {} BFD_RELOC_PPC64_HIGHEST
     923@deffnx {} BFD_RELOC_PPC64_HIGHEST_S
     924@deffnx {} BFD_RELOC_PPC64_TOC16_LO
     925@deffnx {} BFD_RELOC_PPC64_TOC16_HI
     926@deffnx {} BFD_RELOC_PPC64_TOC16_HA
     927@deffnx {} BFD_RELOC_PPC64_TOC
     928@deffnx {} BFD_RELOC_PPC64_PLTGOT16
     929@deffnx {} BFD_RELOC_PPC64_PLTGOT16_LO
     930@deffnx {} BFD_RELOC_PPC64_PLTGOT16_HI
     931@deffnx {} BFD_RELOC_PPC64_PLTGOT16_HA
     932@deffnx {} BFD_RELOC_PPC64_ADDR16_DS
     933@deffnx {} BFD_RELOC_PPC64_ADDR16_LO_DS
     934@deffnx {} BFD_RELOC_PPC64_GOT16_DS
     935@deffnx {} BFD_RELOC_PPC64_GOT16_LO_DS
     936@deffnx {} BFD_RELOC_PPC64_PLT16_LO_DS
     937@deffnx {} BFD_RELOC_PPC64_SECTOFF_DS
     938@deffnx {} BFD_RELOC_PPC64_SECTOFF_LO_DS
     939@deffnx {} BFD_RELOC_PPC64_TOC16_DS
     940@deffnx {} BFD_RELOC_PPC64_TOC16_LO_DS
     941@deffnx {} BFD_RELOC_PPC64_PLTGOT16_DS
     942@deffnx {} BFD_RELOC_PPC64_PLTGOT16_LO_DS
    842943Power(rs6000) and PowerPC relocations.
     944@end deffn
     945@deffn {} BFD_RELOC_PPC_TLS
     946@deffnx {} BFD_RELOC_PPC_DTPMOD
     947@deffnx {} BFD_RELOC_PPC_TPREL16
     948@deffnx {} BFD_RELOC_PPC_TPREL16_LO
     949@deffnx {} BFD_RELOC_PPC_TPREL16_HI
     950@deffnx {} BFD_RELOC_PPC_TPREL16_HA
     951@deffnx {} BFD_RELOC_PPC_TPREL
     952@deffnx {} BFD_RELOC_PPC_DTPREL16
     953@deffnx {} BFD_RELOC_PPC_DTPREL16_LO
     954@deffnx {} BFD_RELOC_PPC_DTPREL16_HI
     955@deffnx {} BFD_RELOC_PPC_DTPREL16_HA
     956@deffnx {} BFD_RELOC_PPC_DTPREL
     957@deffnx {} BFD_RELOC_PPC_GOT_TLSGD16
     958@deffnx {} BFD_RELOC_PPC_GOT_TLSGD16_LO
     959@deffnx {} BFD_RELOC_PPC_GOT_TLSGD16_HI
     960@deffnx {} BFD_RELOC_PPC_GOT_TLSGD16_HA
     961@deffnx {} BFD_RELOC_PPC_GOT_TLSLD16
     962@deffnx {} BFD_RELOC_PPC_GOT_TLSLD16_LO
     963@deffnx {} BFD_RELOC_PPC_GOT_TLSLD16_HI
     964@deffnx {} BFD_RELOC_PPC_GOT_TLSLD16_HA
     965@deffnx {} BFD_RELOC_PPC_GOT_TPREL16
     966@deffnx {} BFD_RELOC_PPC_GOT_TPREL16_LO
     967@deffnx {} BFD_RELOC_PPC_GOT_TPREL16_HI
     968@deffnx {} BFD_RELOC_PPC_GOT_TPREL16_HA
     969@deffnx {} BFD_RELOC_PPC_GOT_DTPREL16
     970@deffnx {} BFD_RELOC_PPC_GOT_DTPREL16_LO
     971@deffnx {} BFD_RELOC_PPC_GOT_DTPREL16_HI
     972@deffnx {} BFD_RELOC_PPC_GOT_DTPREL16_HA
     973@deffnx {} BFD_RELOC_PPC64_TPREL16_DS
     974@deffnx {} BFD_RELOC_PPC64_TPREL16_LO_DS
     975@deffnx {} BFD_RELOC_PPC64_TPREL16_HIGHER
     976@deffnx {} BFD_RELOC_PPC64_TPREL16_HIGHERA
     977@deffnx {} BFD_RELOC_PPC64_TPREL16_HIGHEST
     978@deffnx {} BFD_RELOC_PPC64_TPREL16_HIGHESTA
     979@deffnx {} BFD_RELOC_PPC64_DTPREL16_DS
     980@deffnx {} BFD_RELOC_PPC64_DTPREL16_LO_DS
     981@deffnx {} BFD_RELOC_PPC64_DTPREL16_HIGHER
     982@deffnx {} BFD_RELOC_PPC64_DTPREL16_HIGHERA
     983@deffnx {} BFD_RELOC_PPC64_DTPREL16_HIGHEST
     984@deffnx {} BFD_RELOC_PPC64_DTPREL16_HIGHESTA
     985PowerPC and PowerPC64 thread-local storage relocations.
    843986@end deffn
    844987@deffn {} BFD_RELOC_I370_D12
     
    8711014@deffnx {} BFD_RELOC_ARM_MULTI
    8721015@deffnx {} BFD_RELOC_ARM_CP_OFF_IMM
     1016@deffnx {} BFD_RELOC_ARM_CP_OFF_IMM_S2
    8731017@deffnx {} BFD_RELOC_ARM_ADR_IMM
    8741018@deffnx {} BFD_RELOC_ARM_LDR_IMM
     
    9181062@deffnx {} BFD_RELOC_SH_RELATIVE
    9191063@deffnx {} BFD_RELOC_SH_GOTPC
    920 Hitachi SH relocs.  Not all of these appear in object files.
     1064@deffnx {} BFD_RELOC_SH_GOT_LOW16
     1065@deffnx {} BFD_RELOC_SH_GOT_MEDLOW16
     1066@deffnx {} BFD_RELOC_SH_GOT_MEDHI16
     1067@deffnx {} BFD_RELOC_SH_GOT_HI16
     1068@deffnx {} BFD_RELOC_SH_GOTPLT_LOW16
     1069@deffnx {} BFD_RELOC_SH_GOTPLT_MEDLOW16
     1070@deffnx {} BFD_RELOC_SH_GOTPLT_MEDHI16
     1071@deffnx {} BFD_RELOC_SH_GOTPLT_HI16
     1072@deffnx {} BFD_RELOC_SH_PLT_LOW16
     1073@deffnx {} BFD_RELOC_SH_PLT_MEDLOW16
     1074@deffnx {} BFD_RELOC_SH_PLT_MEDHI16
     1075@deffnx {} BFD_RELOC_SH_PLT_HI16
     1076@deffnx {} BFD_RELOC_SH_GOTOFF_LOW16
     1077@deffnx {} BFD_RELOC_SH_GOTOFF_MEDLOW16
     1078@deffnx {} BFD_RELOC_SH_GOTOFF_MEDHI16
     1079@deffnx {} BFD_RELOC_SH_GOTOFF_HI16
     1080@deffnx {} BFD_RELOC_SH_GOTPC_LOW16
     1081@deffnx {} BFD_RELOC_SH_GOTPC_MEDLOW16
     1082@deffnx {} BFD_RELOC_SH_GOTPC_MEDHI16
     1083@deffnx {} BFD_RELOC_SH_GOTPC_HI16
     1084@deffnx {} BFD_RELOC_SH_COPY64
     1085@deffnx {} BFD_RELOC_SH_GLOB_DAT64
     1086@deffnx {} BFD_RELOC_SH_JMP_SLOT64
     1087@deffnx {} BFD_RELOC_SH_RELATIVE64
     1088@deffnx {} BFD_RELOC_SH_GOT10BY4
     1089@deffnx {} BFD_RELOC_SH_GOT10BY8
     1090@deffnx {} BFD_RELOC_SH_GOTPLT10BY4
     1091@deffnx {} BFD_RELOC_SH_GOTPLT10BY8
     1092@deffnx {} BFD_RELOC_SH_GOTPLT32
     1093@deffnx {} BFD_RELOC_SH_SHMEDIA_CODE
     1094@deffnx {} BFD_RELOC_SH_IMMU5
     1095@deffnx {} BFD_RELOC_SH_IMMS6
     1096@deffnx {} BFD_RELOC_SH_IMMS6BY32
     1097@deffnx {} BFD_RELOC_SH_IMMU6
     1098@deffnx {} BFD_RELOC_SH_IMMS10
     1099@deffnx {} BFD_RELOC_SH_IMMS10BY2
     1100@deffnx {} BFD_RELOC_SH_IMMS10BY4
     1101@deffnx {} BFD_RELOC_SH_IMMS10BY8
     1102@deffnx {} BFD_RELOC_SH_IMMS16
     1103@deffnx {} BFD_RELOC_SH_IMMU16
     1104@deffnx {} BFD_RELOC_SH_IMM_LOW16
     1105@deffnx {} BFD_RELOC_SH_IMM_LOW16_PCREL
     1106@deffnx {} BFD_RELOC_SH_IMM_MEDLOW16
     1107@deffnx {} BFD_RELOC_SH_IMM_MEDLOW16_PCREL
     1108@deffnx {} BFD_RELOC_SH_IMM_MEDHI16
     1109@deffnx {} BFD_RELOC_SH_IMM_MEDHI16_PCREL
     1110@deffnx {} BFD_RELOC_SH_IMM_HI16
     1111@deffnx {} BFD_RELOC_SH_IMM_HI16_PCREL
     1112@deffnx {} BFD_RELOC_SH_PT_16
     1113@deffnx {} BFD_RELOC_SH_TLS_GD_32
     1114@deffnx {} BFD_RELOC_SH_TLS_LD_32
     1115@deffnx {} BFD_RELOC_SH_TLS_LDO_32
     1116@deffnx {} BFD_RELOC_SH_TLS_IE_32
     1117@deffnx {} BFD_RELOC_SH_TLS_LE_32
     1118@deffnx {} BFD_RELOC_SH_TLS_DTPMOD32
     1119@deffnx {} BFD_RELOC_SH_TLS_DTPOFF32
     1120@deffnx {} BFD_RELOC_SH_TLS_TPOFF32
     1121Renesas / SuperH SH relocs.  Not all of these appear in object files.
    9211122@end deffn
    9221123@deffn {} BFD_RELOC_THUMB_PCREL_BRANCH9
     
    10051206This is a 32-bit pc-relative reloc.
    10061207@end deffn
     1208@deffn {} BFD_RELOC_DLX_HI16_S
     1209DLX relocs
     1210@end deffn
     1211@deffn {} BFD_RELOC_DLX_LO16
     1212DLX relocs
     1213@end deffn
     1214@deffn {} BFD_RELOC_DLX_JMP26
     1215DLX relocs
     1216@end deffn
    10071217@deffn {} BFD_RELOC_M32R_24
    1008 Mitsubishi M32R relocs.
     1218Renesas M32R (formerly Mitsubishi M32R) relocs.
    10091219This is a 24 bit absolute address.
    10101220@end deffn
     
    10871297@deffn {} BFD_RELOC_V850_CALLT_16_16_OFFSET
    10881298This is a 16 bit offset from the call table base pointer.
     1299@end deffn
     1300@deffn {} BFD_RELOC_V850_LONGCALL
     1301Used for relaxing indirect function calls.
     1302@end deffn
     1303@deffn {} BFD_RELOC_V850_LONGJUMP
     1304Used for relaxing indirect jumps.
     1305@end deffn
     1306@deffn {} BFD_RELOC_V850_ALIGN
     1307Used to maintain alignment whilst relaxing.
    10891308@end deffn
    10901309@deffn {} BFD_RELOC_MN10300_32_PCREL
     
    11631382Motorola Mcore relocations.
    11641383@end deffn
     1384@deffn {} BFD_RELOC_MMIX_GETA
     1385@deffnx {} BFD_RELOC_MMIX_GETA_1
     1386@deffnx {} BFD_RELOC_MMIX_GETA_2
     1387@deffnx {} BFD_RELOC_MMIX_GETA_3
     1388These are relocations for the GETA instruction.
     1389@end deffn
     1390@deffn {} BFD_RELOC_MMIX_CBRANCH
     1391@deffnx {} BFD_RELOC_MMIX_CBRANCH_J
     1392@deffnx {} BFD_RELOC_MMIX_CBRANCH_1
     1393@deffnx {} BFD_RELOC_MMIX_CBRANCH_2
     1394@deffnx {} BFD_RELOC_MMIX_CBRANCH_3
     1395These are relocations for a conditional branch instruction.
     1396@end deffn
     1397@deffn {} BFD_RELOC_MMIX_PUSHJ
     1398@deffnx {} BFD_RELOC_MMIX_PUSHJ_1
     1399@deffnx {} BFD_RELOC_MMIX_PUSHJ_2
     1400@deffnx {} BFD_RELOC_MMIX_PUSHJ_3
     1401These are relocations for the PUSHJ instruction.
     1402@end deffn
     1403@deffn {} BFD_RELOC_MMIX_JMP
     1404@deffnx {} BFD_RELOC_MMIX_JMP_1
     1405@deffnx {} BFD_RELOC_MMIX_JMP_2
     1406@deffnx {} BFD_RELOC_MMIX_JMP_3
     1407These are relocations for the JMP instruction.
     1408@end deffn
     1409@deffn {} BFD_RELOC_MMIX_ADDR19
     1410This is a relocation for a relative address as in a GETA instruction or
     1411a branch.
     1412@end deffn
     1413@deffn {} BFD_RELOC_MMIX_ADDR27
     1414This is a relocation for a relative address as in a JMP instruction.
     1415@end deffn
     1416@deffn {} BFD_RELOC_MMIX_REG_OR_BYTE
     1417This is a relocation for an instruction field that may be a general
     1418register or a value 0..255.
     1419@end deffn
     1420@deffn {} BFD_RELOC_MMIX_REG
     1421This is a relocation for an instruction field that may be a general
     1422register.
     1423@end deffn
     1424@deffn {} BFD_RELOC_MMIX_BASE_PLUS_OFFSET
     1425This is a relocation for two instruction fields holding a register and
     1426an offset, the equivalent of the relocation.
     1427@end deffn
     1428@deffn {} BFD_RELOC_MMIX_LOCAL
     1429This relocation is an assertion that the expression is not allocated as
     1430a global register.  It does not modify contents.
     1431@end deffn
    11651432@deffn {} BFD_RELOC_AVR_7_PCREL
    11661433This is a 16 bit reloc for the AVR that stores 8 bit pc relative
     
    12301497This is a 32 bit reloc for the AVR that stores 23 bit value
    12311498into 22 bits.
     1499@end deffn
     1500@deffn {} BFD_RELOC_390_12
     1501Direct 12 bit.
     1502@end deffn
     1503@deffn {} BFD_RELOC_390_GOT12
     150412 bit GOT offset.
     1505@end deffn
     1506@deffn {} BFD_RELOC_390_PLT32
     150732 bit PC relative PLT address.
     1508@end deffn
     1509@deffn {} BFD_RELOC_390_COPY
     1510Copy symbol at runtime.
     1511@end deffn
     1512@deffn {} BFD_RELOC_390_GLOB_DAT
     1513Create GOT entry.
     1514@end deffn
     1515@deffn {} BFD_RELOC_390_JMP_SLOT
     1516Create PLT entry.
     1517@end deffn
     1518@deffn {} BFD_RELOC_390_RELATIVE
     1519Adjust by program base.
     1520@end deffn
     1521@deffn {} BFD_RELOC_390_GOTPC
     152232 bit PC relative offset to GOT.
     1523@end deffn
     1524@deffn {} BFD_RELOC_390_GOT16
     152516 bit GOT offset.
     1526@end deffn
     1527@deffn {} BFD_RELOC_390_PC16DBL
     1528PC relative 16 bit shifted by 1.
     1529@end deffn
     1530@deffn {} BFD_RELOC_390_PLT16DBL
     153116 bit PC rel. PLT shifted by 1.
     1532@end deffn
     1533@deffn {} BFD_RELOC_390_PC32DBL
     1534PC relative 32 bit shifted by 1.
     1535@end deffn
     1536@deffn {} BFD_RELOC_390_PLT32DBL
     153732 bit PC rel. PLT shifted by 1.
     1538@end deffn
     1539@deffn {} BFD_RELOC_390_GOTPCDBL
     154032 bit PC rel. GOT shifted by 1.
     1541@end deffn
     1542@deffn {} BFD_RELOC_390_GOT64
     154364 bit GOT offset.
     1544@end deffn
     1545@deffn {} BFD_RELOC_390_PLT64
     154664 bit PC relative PLT address.
     1547@end deffn
     1548@deffn {} BFD_RELOC_390_GOTENT
     154932 bit rel. offset to GOT entry.
     1550@end deffn
     1551@deffn {} BFD_RELOC_390_GOTOFF64
     155264 bit offset to GOT.
     1553@end deffn
     1554@deffn {} BFD_RELOC_390_GOTPLT12
     155512-bit offset to symbol-entry within GOT, with PLT handling.
     1556@end deffn
     1557@deffn {} BFD_RELOC_390_GOTPLT16
     155816-bit offset to symbol-entry within GOT, with PLT handling.
     1559@end deffn
     1560@deffn {} BFD_RELOC_390_GOTPLT32
     156132-bit offset to symbol-entry within GOT, with PLT handling.
     1562@end deffn
     1563@deffn {} BFD_RELOC_390_GOTPLT64
     156464-bit offset to symbol-entry within GOT, with PLT handling.
     1565@end deffn
     1566@deffn {} BFD_RELOC_390_GOTPLTENT
     156732-bit rel. offset to symbol-entry within GOT, with PLT handling.
     1568@end deffn
     1569@deffn {} BFD_RELOC_390_PLTOFF16
     157016-bit rel. offset from the GOT to a PLT entry.
     1571@end deffn
     1572@deffn {} BFD_RELOC_390_PLTOFF32
     157332-bit rel. offset from the GOT to a PLT entry.
     1574@end deffn
     1575@deffn {} BFD_RELOC_390_PLTOFF64
     157664-bit rel. offset from the GOT to a PLT entry.
     1577@end deffn
     1578@deffn {} BFD_RELOC_390_TLS_LOAD
     1579@deffnx {} BFD_RELOC_390_TLS_GDCALL
     1580@deffnx {} BFD_RELOC_390_TLS_LDCALL
     1581@deffnx {} BFD_RELOC_390_TLS_GD32
     1582@deffnx {} BFD_RELOC_390_TLS_GD64
     1583@deffnx {} BFD_RELOC_390_TLS_GOTIE12
     1584@deffnx {} BFD_RELOC_390_TLS_GOTIE32
     1585@deffnx {} BFD_RELOC_390_TLS_GOTIE64
     1586@deffnx {} BFD_RELOC_390_TLS_LDM32
     1587@deffnx {} BFD_RELOC_390_TLS_LDM64
     1588@deffnx {} BFD_RELOC_390_TLS_IE32
     1589@deffnx {} BFD_RELOC_390_TLS_IE64
     1590@deffnx {} BFD_RELOC_390_TLS_IEENT
     1591@deffnx {} BFD_RELOC_390_TLS_LE32
     1592@deffnx {} BFD_RELOC_390_TLS_LE64
     1593@deffnx {} BFD_RELOC_390_TLS_LDO32
     1594@deffnx {} BFD_RELOC_390_TLS_LDO64
     1595@deffnx {} BFD_RELOC_390_TLS_DTPMOD
     1596@deffnx {} BFD_RELOC_390_TLS_DTPOFF
     1597@deffnx {} BFD_RELOC_390_TLS_TPOFF
     1598s390 tls relocations.
     1599@end deffn
     1600@deffn {} BFD_RELOC_IP2K_FR9
     1601Scenix IP2K - 9-bit register number / data address
     1602@end deffn
     1603@deffn {} BFD_RELOC_IP2K_BANK
     1604Scenix IP2K - 4-bit register/data bank number
     1605@end deffn
     1606@deffn {} BFD_RELOC_IP2K_ADDR16CJP
     1607Scenix IP2K - low 13 bits of instruction word address
     1608@end deffn
     1609@deffn {} BFD_RELOC_IP2K_PAGE3
     1610Scenix IP2K - high 3 bits of instruction word address
     1611@end deffn
     1612@deffn {} BFD_RELOC_IP2K_LO8DATA
     1613@deffnx {} BFD_RELOC_IP2K_HI8DATA
     1614@deffnx {} BFD_RELOC_IP2K_EX8DATA
     1615Scenix IP2K - ext/low/high 8 bits of data address
     1616@end deffn
     1617@deffn {} BFD_RELOC_IP2K_LO8INSN
     1618@deffnx {} BFD_RELOC_IP2K_HI8INSN
     1619Scenix IP2K - low/high 8 bits of instruction word address
     1620@end deffn
     1621@deffn {} BFD_RELOC_IP2K_PC_SKIP
     1622Scenix IP2K - even/odd PC modifier to modify snb pcl.0
     1623@end deffn
     1624@deffn {} BFD_RELOC_IP2K_TEXT
     1625Scenix IP2K - 16 bit word address in text section.
     1626@end deffn
     1627@deffn {} BFD_RELOC_IP2K_FR_OFFSET
     1628Scenix IP2K - 7-bit sp or dp offset
     1629@end deffn
     1630@deffn {} BFD_RELOC_VPE4KMATH_DATA
     1631@deffnx {} BFD_RELOC_VPE4KMATH_INSN
     1632Scenix VPE4K coprocessor - data/insn-space addressing
    12321633@end deffn
    12331634@deffn {} BFD_RELOC_VTABLE_INHERIT
     
    12881689@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR22
    12891690@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR64I
     1691@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR32MSB
     1692@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR32LSB
    12901693@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR64MSB
    12911694@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR64LSB
     
    13091712@deffnx {} BFD_RELOC_IA64_IPLTLSB
    13101713@deffnx {} BFD_RELOC_IA64_COPY
     1714@deffnx {} BFD_RELOC_IA64_LTOFF22X
     1715@deffnx {} BFD_RELOC_IA64_LDXMOV
     1716@deffnx {} BFD_RELOC_IA64_TPREL14
    13111717@deffnx {} BFD_RELOC_IA64_TPREL22
     1718@deffnx {} BFD_RELOC_IA64_TPREL64I
    13121719@deffnx {} BFD_RELOC_IA64_TPREL64MSB
    13131720@deffnx {} BFD_RELOC_IA64_TPREL64LSB
    1314 @deffnx {} BFD_RELOC_IA64_LTOFF_TP22
    1315 @deffnx {} BFD_RELOC_IA64_LTOFF22X
    1316 @deffnx {} BFD_RELOC_IA64_LDXMOV
     1721@deffnx {} BFD_RELOC_IA64_LTOFF_TPREL22
     1722@deffnx {} BFD_RELOC_IA64_DTPMOD64MSB
     1723@deffnx {} BFD_RELOC_IA64_DTPMOD64LSB
     1724@deffnx {} BFD_RELOC_IA64_LTOFF_DTPMOD22
     1725@deffnx {} BFD_RELOC_IA64_DTPREL14
     1726@deffnx {} BFD_RELOC_IA64_DTPREL22
     1727@deffnx {} BFD_RELOC_IA64_DTPREL64I
     1728@deffnx {} BFD_RELOC_IA64_DTPREL32MSB
     1729@deffnx {} BFD_RELOC_IA64_DTPREL32LSB
     1730@deffnx {} BFD_RELOC_IA64_DTPREL64MSB
     1731@deffnx {} BFD_RELOC_IA64_DTPREL64LSB
     1732@deffnx {} BFD_RELOC_IA64_LTOFF_DTPREL22
    13171733Intel IA64 Relocations.
    13181734@end deffn
    13191735@deffn {} BFD_RELOC_M68HC11_HI8
    13201736Motorola 68HC11 reloc.
    1321 This is the 8 bits high part of an absolute address.
     1737This is the 8 bit high part of an absolute address.
    13221738@end deffn
    13231739@deffn {} BFD_RELOC_M68HC11_LO8
    13241740Motorola 68HC11 reloc.
    1325 This is the 8 bits low part of an absolute address.
     1741This is the 8 bit low part of an absolute address.
    13261742@end deffn
    13271743@deffn {} BFD_RELOC_M68HC11_3B
    13281744Motorola 68HC11 reloc.
    1329 This is the 3 bits of a value.
     1745This is the 3 bit of a value.
     1746@end deffn
     1747@deffn {} BFD_RELOC_M68HC11_RL_JUMP
     1748Motorola 68HC11 reloc.
     1749This reloc marks the beginning of a jump/call instruction.
     1750It is used for linker relaxation to correctly identify beginning
     1751of instruction and change some branchs to use PC-relative
     1752addressing mode.
     1753@end deffn
     1754@deffn {} BFD_RELOC_M68HC11_RL_GROUP
     1755Motorola 68HC11 reloc.
     1756This reloc marks a group of several instructions that gcc generates
     1757and for which the linker relaxation pass can modify and/or remove
     1758some of them.
     1759@end deffn
     1760@deffn {} BFD_RELOC_M68HC11_LO16
     1761Motorola 68HC11 reloc.
     1762This is the 16-bit lower part of an address.  It is used for 'call'
     1763instruction to specify the symbol address without any special
     1764transformation (due to memory bank window).
     1765@end deffn
     1766@deffn {} BFD_RELOC_M68HC11_PAGE
     1767Motorola 68HC11 reloc.
     1768This is a 8-bit reloc that specifies the page number of an address.
     1769It is used by 'call' instruction to specify the page number of
     1770the symbol.
     1771@end deffn
     1772@deffn {} BFD_RELOC_M68HC11_24
     1773Motorola 68HC11 reloc.
     1774This is a 24-bit reloc that represents the address with a 16-bit
     1775value and a 8-bit page number.  The symbol address is transformed
     1776to follow the 16K memory bank of 68HC12 (seen as mapped in the window).
    13301777@end deffn
    13311778@deffn {} BFD_RELOC_CRIS_BDISP8
     
    13361783These relocs are only used within the CRIS assembler.  They are not
    13371784(at present) written to any object files.
     1785@end deffn
     1786@deffn {} BFD_RELOC_CRIS_COPY
     1787@deffnx {} BFD_RELOC_CRIS_GLOB_DAT
     1788@deffnx {} BFD_RELOC_CRIS_JUMP_SLOT
     1789@deffnx {} BFD_RELOC_CRIS_RELATIVE
     1790Relocs used in ELF shared libraries for CRIS.
     1791@end deffn
     1792@deffn {} BFD_RELOC_CRIS_32_GOT
     179332-bit offset to symbol-entry within GOT.
     1794@end deffn
     1795@deffn {} BFD_RELOC_CRIS_16_GOT
     179616-bit offset to symbol-entry within GOT.
     1797@end deffn
     1798@deffn {} BFD_RELOC_CRIS_32_GOTPLT
     179932-bit offset to symbol-entry within GOT, with PLT handling.
     1800@end deffn
     1801@deffn {} BFD_RELOC_CRIS_16_GOTPLT
     180216-bit offset to symbol-entry within GOT, with PLT handling.
     1803@end deffn
     1804@deffn {} BFD_RELOC_CRIS_32_GOTREL
     180532-bit offset to symbol, relative to GOT.
     1806@end deffn
     1807@deffn {} BFD_RELOC_CRIS_32_PLT_GOTREL
     180832-bit offset to symbol with PLT entry, relative to GOT.
     1809@end deffn
     1810@deffn {} BFD_RELOC_CRIS_32_PLT_PCREL
     181132-bit offset to symbol with PLT entry, relative to this relocation.
    13381812@end deffn
    13391813@deffn {} BFD_RELOC_860_COPY
     
    13711845Intel i860 Relocations.
    13721846@end deffn
     1847@deffn {} BFD_RELOC_OPENRISC_ABS_26
     1848@deffnx {} BFD_RELOC_OPENRISC_REL_26
     1849OpenRISC Relocations.
     1850@end deffn
     1851@deffn {} BFD_RELOC_H8_DIR16A8
     1852@deffnx {} BFD_RELOC_H8_DIR16R8
     1853@deffnx {} BFD_RELOC_H8_DIR24A8
     1854@deffnx {} BFD_RELOC_H8_DIR24R8
     1855@deffnx {} BFD_RELOC_H8_DIR32A16
     1856H8 elf Relocations.
     1857@end deffn
     1858@deffn {} BFD_RELOC_XSTORMY16_REL_12
     1859@deffnx {} BFD_RELOC_XSTORMY16_12
     1860@deffnx {} BFD_RELOC_XSTORMY16_24
     1861@deffnx {} BFD_RELOC_XSTORMY16_FPTR16
     1862Sony Xstormy16 Relocations.
     1863@end deffn
     1864@deffn {} BFD_RELOC_VAX_GLOB_DAT
     1865@deffnx {} BFD_RELOC_VAX_JMP_SLOT
     1866@deffnx {} BFD_RELOC_VAX_RELATIVE
     1867Relocations used by VAX ELF.
     1868@end deffn
     1869@deffn {} BFD_RELOC_MSP430_10_PCREL
     1870@deffnx {} BFD_RELOC_MSP430_16_PCREL
     1871@deffnx {} BFD_RELOC_MSP430_16
     1872@deffnx {} BFD_RELOC_MSP430_16_PCREL_BYTE
     1873@deffnx {} BFD_RELOC_MSP430_16_BYTE
     1874msp430 specific relocation codes
     1875@end deffn
     1876@deffn {} BFD_RELOC_IQ2000_OFFSET_16
     1877@deffnx {} BFD_RELOC_IQ2000_OFFSET_21
     1878@deffnx {} BFD_RELOC_IQ2000_UHI16
     1879IQ2000 Relocations.
     1880@end deffn
     1881@deffn {} BFD_RELOC_XTENSA_RTLD
     1882Special Xtensa relocation used only by PLT entries in ELF shared
     1883objects to indicate that the runtime linker should set the value
     1884to one of its own internal functions or data structures.
     1885@end deffn
     1886@deffn {} BFD_RELOC_XTENSA_GLOB_DAT
     1887@deffnx {} BFD_RELOC_XTENSA_JMP_SLOT
     1888@deffnx {} BFD_RELOC_XTENSA_RELATIVE
     1889Xtensa relocations for ELF shared objects.
     1890@end deffn
     1891@deffn {} BFD_RELOC_XTENSA_PLT
     1892Xtensa relocation used in ELF object files for symbols that may require
     1893PLT entries.  Otherwise, this is just a generic 32-bit relocation.
     1894@end deffn
     1895@deffn {} BFD_RELOC_XTENSA_OP0
     1896@deffnx {} BFD_RELOC_XTENSA_OP1
     1897@deffnx {} BFD_RELOC_XTENSA_OP2
     1898Generic Xtensa relocations.  Only the operand number is encoded
     1899in the relocation.  The details are determined by extracting the
     1900instruction opcode.
     1901@end deffn
     1902@deffn {} BFD_RELOC_XTENSA_ASM_EXPAND
     1903Xtensa relocation to mark that the assembler expanded the
     1904instructions from an original target.  The expansion size is
     1905encoded in the reloc size.
     1906@end deffn
     1907@deffn {} BFD_RELOC_XTENSA_ASM_SIMPLIFY
     1908Xtensa relocation to mark that the linker should simplify
     1909assembler-expanded instructions.  This is commonly used
     1910internally by the linker after analysis of a
     1911BFD_RELOC_XTENSA_ASM_EXPAND.
     1912@end deffn
    13731913
    13741914@example
     
    14121952@strong{Synopsis}
    14131953@example
    1414 boolean bfd_generic_relax_section
     1954bfd_boolean bfd_generic_relax_section
    14151955   (bfd *abfd,
    14161956    asection *section,
    14171957    struct bfd_link_info *,
    1418     boolean *);
     1958    bfd_boolean *);
    14191959@end example
    14201960@strong{Description}@*
     
    14261966@strong{Synopsis}
    14271967@example
    1428 boolean bfd_generic_gc_sections
     1968bfd_boolean bfd_generic_gc_sections
    14291969   (bfd *, struct bfd_link_info *);
    14301970@end example
     
    14321972Provides default handling for relaxing for back ends which
    14331973don't do section gc -- i.e., does nothing.
     1974
     1975@findex bfd_generic_merge_sections
     1976@subsubsection @code{bfd_generic_merge_sections}
     1977@strong{Synopsis}
     1978@example
     1979bfd_boolean bfd_generic_merge_sections
     1980   (bfd *, struct bfd_link_info *);
     1981@end example
     1982@strong{Description}@*
     1983Provides default handling for SEC_MERGE section merging for back ends
     1984which don't have SEC_MERGE support -- i.e., does nothing.
    14341985
    14351986@findex bfd_generic_get_relocated_section_contents
     
    14421993    struct bfd_link_order *link_order,
    14431994    bfd_byte *data,
    1444     boolean relocateable,
     1995    bfd_boolean relocateable,
    14451996    asymbol **symbols);
    14461997@end example
  • branches/GNU/src/binutils/bfd/doc/section.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    129129  /* The name of the section; the name isn't a copy, the pointer is
    130130     the same as that passed to bfd_make_section.  */
    131 
    132131  const char *name;
    133132
    134133  /* A unique sequence number.  */
    135 
    136134  int id;
    137135
    138   /* Which section is it; 0..nth.  */
    139 
     136  /* Which section in the bfd; 0..n-1 as sections are created in a bfd.  */
    140137  int index;
    141138
    142139  /* The next section in the list belonging to the BFD, or NULL.  */
    143 
    144140  struct sec *next;
    145141
     
    147143     flags are read in from the object file, and some are
    148144     synthesized from other information.  */
    149 
    150145  flagword flags;
    151146
     
    164159#define SEC_RELOC      0x004
    165160
    166 #if 0   /* Obsolete ? */
    167 #define SEC_BALIGN     0x008
    168 #endif
     161  /* ELF reserves 4 processor specific bits and 8 operating system
     162     specific bits in sh_flags; at present we can get away with just
     163     one in communicating between the assembler and BFD, but this
     164     isn't a good long-term solution.  */
     165#define SEC_ARCH_BIT_0 0x008
    169166
    170167  /* A signal to the OS that the section contains read only data.  */
     
    192189#define SEC_CONSTRUCTOR 0x100
    193190
    194   /* The section is a constructor, and should be placed at the
    195      end of the text, data, or bss section(?).  */
    196 #define SEC_CONSTRUCTOR_TEXT 0x1100
    197 #define SEC_CONSTRUCTOR_DATA 0x2100
    198 #define SEC_CONSTRUCTOR_BSS  0x3100
    199 
    200191  /* The section has contents - a data section could be
    201192     @code{SEC_ALLOC} | @code{SEC_HAS_CONTENTS}; a debug section could be
     
    218209#define SEC_COFF_SHARED_LIBRARY 0x800
    219210
     211  /* The section contains thread local data.  */
     212#define SEC_THREAD_LOCAL 0x1000
     213
    220214  /* The section has GOT references.  This flag is only for the
    221215     linker, and is currently only used by the elf32-hppa back end.
     
    249243#define SEC_EXCLUDE 0x40000
    250244
    251   /* The contents of this section are to be sorted by the
    252      based on the address specified in the associated symbol
    253      table.  */
     245  /* The contents of this section are to be sorted based on the sum of
     246     the symbol and addend values specified by the associated relocation
     247     entries.  Entries without associated relocation entries will be
     248     appended to the end of the section in an unspecified order.  */
    254249#define SEC_SORT_ENTRIES 0x80000
    255250
     
    309304#define SEC_CLINK 0x10000000
    310305
     306  /* Attempt to merge identical entities in the section.
     307     Entity size is given in the entsize field.  */
     308#define SEC_MERGE 0x20000000
     309
     310  /* If given with SEC_MERGE, entities to merge are zero terminated
     311     strings where entsize specifies character size instead of fixed
     312     size entries.  */
     313#define SEC_STRINGS 0x40000000
     314
     315  /* This section contains data about section groups.  */
     316#define SEC_GROUP 0x80000000
     317
    311318  /*  End of section flags.  */
    312319
     
    323330
    324331  /* Another mark flag used by some of the linker backends.  Set for
    325      output sections that have a input section.  */
     332     output sections that have an input section.  */
    326333  unsigned int linker_has_input : 1;
    327334
     
    329336  unsigned int gc_mark : 1;
    330337
    331   /* Used by the ELF code to mark sections which have been allocated to segments.  */
     338  /* The following flags are used by the ELF linker. */
     339
     340  /* Mark sections which have been allocated to segments.  */
    332341  unsigned int segment_mark : 1;
     342
     343  /* Type of sec_info information.  */
     344  unsigned int sec_info_type:3;
     345#define ELF_INFO_TYPE_NONE      0
     346#define ELF_INFO_TYPE_STABS     1
     347#define ELF_INFO_TYPE_MERGE     2
     348#define ELF_INFO_TYPE_EH_FRAME  3
     349#define ELF_INFO_TYPE_JUST_SYMS 4
     350
     351  /* Nonzero if this section uses RELA relocations, rather than REL.  */
     352  unsigned int use_rela_p:1;
     353
     354  /* Bits used by various backends.  */
     355  unsigned int has_tls_reloc:1;
     356
     357  /* Nonzero if this section needs the relax finalize pass.  */
     358  unsigned int need_finalize_relax:1;
     359
     360  /* Usused bits.  */
     361  unsigned int flag12:1;
     362  unsigned int flag13:1;
     363  unsigned int flag14:1;
     364  unsigned int flag15:1;
     365  unsigned int flag16:4;
     366  unsigned int flag20:4;
     367  unsigned int flag24:8;
    333368
    334369  /* End of internal packed boolean fields.  */
     
    340375      the default address for @code{.data} is dependent on the specific
    341376      target and various flags).  */
    342 
    343377  bfd_vma vma;
    344378
    345379  /*  The load address of the section - where it would be in a
    346380      rom image; really only used for writing section header
    347       information. */
    348 
     381      information.  */
    349382  bfd_vma lma;
    350383
     
    352385     Contains a value even if the section has no contents (e.g., the
    353386     size of @code{.bss}).  This will be filled in after relocation.  */
    354 
    355387  bfd_size_type _cooked_size;
    356388
     
    358390     value is the same as the size, but if some relaxing has
    359391     been done, then this value will be bigger.  */
    360 
    361392  bfd_size_type _raw_size;
    362393
     
    368399     would be 100.  However, if the target byte size is 16 bits
    369400     (bfd_octets_per_byte is "2"), this value would be 50.  */
    370 
    371401  bfd_vma output_offset;
    372402
    373403  /* The output section through which to map on output.  */
    374 
    375404  struct sec *output_section;
    376405
    377406  /* The alignment requirement of the section, as an exponent of 2 -
    378407     e.g., 3 aligns to 2^3 (or 8).  */
    379 
    380408  unsigned int alignment_power;
    381409
    382410  /* If an input section, a pointer to a vector of relocation
    383411     records for the data in this section.  */
    384 
    385412  struct reloc_cache_entry *relocation;
    386413
    387414  /* If an output section, a pointer to a vector of pointers to
    388415     relocation records for the data in this section.  */
    389 
    390416  struct reloc_cache_entry **orelocation;
    391417
    392   /* The number of relocation records in one of the above  */
    393 
     418  /* The number of relocation records in one of the above.  */
    394419  unsigned reloc_count;
    395420
     
    398423
    399424  /* File position of section data.  */
    400 
    401425  file_ptr filepos;
    402426
    403427  /* File position of relocation info.  */
    404 
    405428  file_ptr rel_filepos;
    406429
    407430  /* File position of line data.  */
    408 
    409431  file_ptr line_filepos;
    410432
    411433  /* Pointer to data for applications.  */
    412 
    413434  PTR userdata;
    414435
     
    418439
    419440  /* Attached line number information.  */
    420 
    421441  alent *lineno;
    422442
    423443  /* Number of line number records.  */
    424 
    425444  unsigned int lineno_count;
    426445
     446  /* Entity size for merging purposes.  */
     447  unsigned int entsize;
     448
    427449  /* Optional information about a COMDAT entry; NULL if not COMDAT.  */
    428 
    429450  struct bfd_comdat_info *comdat;
    430 
    431   /* Points to the kept section if this section is a link-once section,
    432      and is discarded.  */
    433   struct sec *kept_section;
    434451
    435452  /* When a section is being output, this value changes as more
    436453     linenumbers are written out.  */
    437 
    438454  file_ptr moving_line_filepos;
    439455
    440456  /* What the section number is in the target world.  */
    441 
    442457  int target_index;
    443458
     
    446461  /* If this is a constructor section then here is a list of the
    447462     relocations created to relocate items within it.  */
    448 
    449463  struct relent_chain *constructor_chain;
    450464
    451465  /* The BFD which owns the section.  */
    452 
    453466  bfd *owner;
    454467
    455   /* A symbol which points at this section only */
     468  /* A symbol which points at this section only. */
    456469  struct symbol_cache_entry *symbol;
    457470  struct symbol_cache_entry **symbol_ptr_ptr;
     
    459472  struct bfd_link_order *link_order_head;
    460473  struct bfd_link_order *link_order_tail;
    461 @} asection ;
     474@} asection;
    462475
    463476/* These sections are global, and are managed by BFD.  The application
     
    471484#define BFD_IND_SECTION_NAME "*IND*"
    472485
    473 /* the absolute section */
     486/* The absolute section. */
    474487extern const asection bfd_abs_section;
    475488#define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
    476489#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
    477 /* Pointer to the undefined section */
     490/* Pointer to the undefined section. */
    478491extern const asection bfd_und_section;
    479492#define bfd_und_section_ptr ((asection *) &bfd_und_section)
    480493#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
    481 /* Pointer to the common section */
     494/* Pointer to the common section. */
    482495extern const asection bfd_com_section;
    483496#define bfd_com_section_ptr ((asection *) &bfd_com_section)
    484 /* Pointer to the indirect section */
     497/* Pointer to the indirect section. */
    485498extern const asection bfd_ind_section;
    486499#define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
    487500#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
     501
     502#define bfd_is_const_section(SEC)              \
     503 (   ((SEC) == bfd_abs_section_ptr)            \
     504  || ((SEC) == bfd_und_section_ptr)            \
     505  || ((SEC) == bfd_com_section_ptr)            \
     506  || ((SEC) == bfd_ind_section_ptr))
    488507
    489508extern const struct symbol_cache_entry * const bfd_abs_symbol;
     
    497516     ((section)->reloc_done ? (section)->_cooked_size \
    498517                            : (abort (), (bfd_size_type) 1))
     518
     519/* Macros to handle insertion and deletion of a bfd's sections.  These
     520   only handle the list pointers, ie. do not adjust section_count,
     521   target_index etc.  */
     522#define bfd_section_list_remove(ABFD, PS) \
     523  do                                                   \
     524    @{                                                  \
     525      asection **_ps = PS;                             \
     526      asection *_s = *_ps;                             \
     527      *_ps = _s->next;                                 \
     528      if (_s->next == NULL)                            \
     529        (ABFD)->section_tail = _ps;                    \
     530    @}                                                  \
     531  while (0)
     532#define bfd_section_list_insert(ABFD, PS, S) \
     533  do                                                   \
     534    @{                                                  \
     535      asection **_ps = PS;                             \
     536      asection *_s = S;                                \
     537      _s->next = *_ps;                                 \
     538      *_ps = _s;                                       \
     539      if (_s->next == NULL)                            \
     540        (ABFD)->section_tail = &_s->next;              \
     541    @}                                                  \
     542  while (0)
     543
    499544@end example
    500545
     
    502547@subsection Section prototypes
    503548These are the functions exported by the section handling part of BFD.
     549
     550@findex bfd_section_list_clear
     551@subsubsection @code{bfd_section_list_clear}
     552@strong{Synopsis}
     553@example
     554void bfd_section_list_clear (bfd *);
     555@end example
     556@strong{Description}@*
     557Clears the section list, and also resets the section count and
     558hash table entries.
    504559
    505560@findex bfd_get_section_by_name
     
    597652@strong{Synopsis}
    598653@example
    599 boolean bfd_set_section_flags(bfd *abfd, asection *sec, flagword flags);
     654bfd_boolean bfd_set_section_flags (bfd *abfd, asection *sec, flagword flags);
    600655@end example
    601656@strong{Description}@*
    602657Set the attributes of the section @var{sec} in the BFD
    603 @var{abfd} to the value @var{flags}. Return @code{true} on success,
    604 @code{false} on error. Possible error returns are:
     658@var{abfd} to the value @var{flags}. Return @code{TRUE} on success,
     659@code{FALSE} on error. Possible error returns are:
    605660
    606661@itemize @bullet
     
    645700@strong{Synopsis}
    646701@example
    647 boolean bfd_set_section_size(bfd *abfd, asection *sec, bfd_size_type val);
     702bfd_boolean bfd_set_section_size (bfd *abfd, asection *sec, bfd_size_type val);
    648703@end example
    649704@strong{Description}@*
    650705Set @var{sec} to the size @var{val}. If the operation is
    651 ok, then @code{true} is returned, else @code{false}.
     706ok, then @code{TRUE} is returned, else @code{FALSE}.
    652707
    653708Possible error returns:
     
    663718@strong{Synopsis}
    664719@example
    665 boolean bfd_set_section_contents
    666    (bfd *abfd,
    667     asection *section,
    668     PTR data,
    669     file_ptr offset,
     720bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section,
     721    PTR data, file_ptr offset,
    670722    bfd_size_type count);
    671723@end example
     
    676728@var{offset} for @var{count} octets.
    677729
    678 Normally @code{true} is returned, else @code{false}. Possible error
     730Normally @code{TRUE} is returned, else @code{FALSE}. Possible error
    679731returns are:
    680732@itemize @bullet
     
    694746@strong{Synopsis}
    695747@example
    696 boolean bfd_get_section_contents
    697    (bfd *abfd, asection *section, PTR location,
    698     file_ptr offset, bfd_size_type count);
     748bfd_boolean bfd_get_section_contents (bfd *abfd, asection *section,
     749    PTR location, file_ptr offset,
     750    bfd_size_type count);
    699751@end example
    700752@strong{Description}@*
     
    707759flag set are requested or if the section does not have the
    708760@code{SEC_HAS_CONTENTS} flag set, then the @var{location} is filled
    709 with zeroes. If no errors occur, @code{true} is returned, else
    710 @code{false}.
     761with zeroes. If no errors occur, @code{TRUE} is returned, else
     762@code{FALSE}.
    711763
    712764@findex bfd_copy_private_section_data
     
    714766@strong{Synopsis}
    715767@example
    716 boolean bfd_copy_private_section_data(bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
     768bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec,
     769    bfd *obfd, asection *osec);
    717770@end example
    718771@strong{Description}@*
    719772Copy private section information from @var{isec} in the BFD
    720773@var{ibfd} to the section @var{osec} in the BFD @var{obfd}.
    721 Return @code{true} on success, @code{false} on error.  Possible error
     774Return @code{TRUE} on success, @code{FALSE} on error.  Possible error
    722775returns are:
    723776
     
    743796@strong{Description}@*
    744797Remove @var{section} from the output.  If the output section
    745 becomes empty, remove it from the output bfd.  @var{info} may
    746 be NULL; if it is not, it is used to decide whether the output
    747 section is empty.
    748 
     798becomes empty, remove it from the output bfd.
     799
     800This function won't actually do anything except twiddle flags
     801if called too late in the linking process, when it's not safe
     802to remove sections.
     803
     804@findex bfd_generic_discard_group
     805@subsubsection @code{bfd_generic_discard_group}
     806@strong{Synopsis}
     807@example
     808bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
     809@end example
     810@strong{Description}@*
     811Remove all members of @var{group} from the output.
     812
  • branches/GNU/src/binutils/bfd/doc/syms.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    4848           FAIL
    4949
    50          if (storage_needed == 0) @{
    51             return ;
    52          @}
     50         if (storage_needed == 0)
     51           return;
     52         
    5353         symbol_table = (asymbol **) xmalloc (storage_needed);
    5454           ...
     
    5959           FAIL
    6060
    61          for (i = 0; i < number_of_symbols; i++) @{
    62             process_symbol (symbol_table[i]);
    63          @}
     61         for (i = 0; i < number_of_symbols; i++)
     62           process_symbol (symbol_table[i]);
    6463@end example
    6564
     
    8180@example
    8281       #include "bfd.h"
    83        main()
     82       int main (void)
    8483       @{
    8584         bfd *abfd;
     
    8786         asymbol *new;
    8887
    89          abfd = bfd_openw("foo","a.out-sunos-big");
    90          bfd_set_format(abfd, bfd_object);
    91          new = bfd_make_empty_symbol(abfd);
     88         abfd = bfd_openw ("foo","a.out-sunos-big");
     89         bfd_set_format (abfd, bfd_object);
     90         new = bfd_make_empty_symbol (abfd);
    9291         new->name = "dummy_symbol";
    93          new->section = bfd_make_section_old_way(abfd, ".text");
     92         new->section = bfd_make_section_old_way (abfd, ".text");
    9493         new->flags = BSF_GLOBAL;
    9594         new->value = 0x12345;
     
    9897         ptrs[1] = (asymbol *)0;
    9998
    100          bfd_set_symtab(abfd, ptrs, 1);
    101          bfd_close(abfd);
     99         bfd_set_symtab (abfd, ptrs, 1);
     100         bfd_close (abfd);
     101         return 0;
    102102       @}
    103103
     
    142142typedef struct symbol_cache_entry
    143143@{
    144        /* A pointer to the BFD which owns the symbol. This information
    145           is necessary so that a back end can work out what additional
    146           information (invisible to the application writer) is carried
    147           with the symbol.
    148 
    149           This field is *almost* redundant, since you can use section->owner
    150           instead, except that some symbols point to the global sections
    151           bfd_@{abs,com,und@}_section.  This could be fixed by making
    152           these globals be per-bfd (or per-target-flavor).  FIXME. */
    153 
    154   struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
    155 
    156        /* The text of the symbol. The name is left alone, and not copied; the
    157           application may not alter it. */
    158   CONST char *name;
    159 
    160        /* The value of the symbol.  This really should be a union of a
    161           numeric value with a pointer, since some flags indicate that
    162           a pointer to another symbol is stored here.  */
     144  /* A pointer to the BFD which owns the symbol. This information
     145     is necessary so that a back end can work out what additional
     146     information (invisible to the application writer) is carried
     147     with the symbol.
     148
     149     This field is *almost* redundant, since you can use section->owner
     150     instead, except that some symbols point to the global sections
     151     bfd_@{abs,com,und@}_section.  This could be fixed by making
     152     these globals be per-bfd (or per-target-flavor).  FIXME.  */
     153  struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field.  */
     154
     155  /* The text of the symbol. The name is left alone, and not copied; the
     156     application may not alter it.  */
     157  const char *name;
     158
     159  /* The value of the symbol.  This really should be a union of a
     160     numeric value with a pointer, since some flags indicate that
     161     a pointer to another symbol is stored here.  */
    163162  symvalue value;
    164163
    165        /* Attributes of a symbol: */
    166 
     164  /* Attributes of a symbol.  */
    167165#define BSF_NO_FLAGS    0x00
    168166
    169        /* The symbol has local scope; @code{static} in @code{C}. The value
    170           is the offset into the section of the data. */
     167  /* The symbol has local scope; @code{static} in @code{C}. The value
     168     is the offset into the section of the data. */
    171169#define BSF_LOCAL      0x01
    172170
    173        /* The symbol has global scope; initialized data in @code{C}. The
    174           value is the offset into the section of the data. */
     171  /* The symbol has global scope; initialized data in @code{C}. The
     172     value is the offset into the section of the data. */
    175173#define BSF_GLOBAL     0x02
    176174
    177        /* The symbol has global scope and is exported. The value is
    178           the offset into the section of the data. */
    179 #define BSF_EXPORT     BSF_GLOBAL /* no real difference */
    180 
    181        /* A normal C symbol would be one of:
    182           @code{BSF_LOCAL}, @code{BSF_FORT_COMM},  @code{BSF_UNDEFINED} or
    183           @code{BSF_GLOBAL} */
    184 
    185        /* The symbol is a debugging record. The value has an arbitary
    186           meaning, unless BSF_DEBUGGING_RELOC is also set.  */
     175  /* The symbol has global scope and is exported. The value is
     176     the offset into the section of the data. */
     177#define BSF_EXPORT     BSF_GLOBAL /* No real difference. */
     178
     179  /* A normal C symbol would be one of:
     180     @code{BSF_LOCAL}, @code{BSF_FORT_COMM},  @code{BSF_UNDEFINED} or
     181     @code{BSF_GLOBAL}. */
     182
     183  /* The symbol is a debugging record. The value has an arbitary
     184     meaning, unless BSF_DEBUGGING_RELOC is also set.  */
    187185#define BSF_DEBUGGING  0x08
    188186
    189        /* The symbol denotes a function entry point.  Used in ELF,
    190           perhaps others someday.  */
     187  /* The symbol denotes a function entry point.  Used in ELF,
     188     perhaps others someday.  */
    191189#define BSF_FUNCTION    0x10
    192190
    193        /* Used by the linker. */
     191  /* Used by the linker. */
    194192#define BSF_KEEP        0x20
    195193#define BSF_KEEP_G      0x40
    196194
    197        /* A weak global symbol, overridable without warnings by
    198           a regular global symbol of the same name.  */
     195  /* A weak global symbol, overridable without warnings by
     196     a regular global symbol of the same name.  */
    199197#define BSF_WEAK        0x80
    200198
    201        /* This symbol was created to point to a section, e.g. ELF's
    202           STT_SECTION symbols.  */
     199  /* This symbol was created to point to a section, e.g. ELF's
     200     STT_SECTION symbols.  */
    203201#define BSF_SECTION_SYM 0x100
    204202
    205        /* The symbol used to be a common symbol, but now it is
    206           allocated. */
     203  /* The symbol used to be a common symbol, but now it is
     204     allocated. */
    207205#define BSF_OLD_COMMON  0x200
    208206
    209        /* The default value for common data. */
     207  /* The default value for common data. */
    210208#define BFD_FORT_COMM_DEFAULT_VALUE 0
    211209
    212        /* In some files the type of a symbol sometimes alters its
    213           location in an output file - ie in coff a @code{ISFCN} symbol
    214           which is also @code{C_EXT} symbol appears where it was
    215           declared and not at the end of a section.  This bit is set
    216           by the target BFD part to convey this information. */
    217 
     210  /* In some files the type of a symbol sometimes alters its
     211     location in an output file - ie in coff a @code{ISFCN} symbol
     212     which is also @code{C_EXT} symbol appears where it was
     213     declared and not at the end of a section.  This bit is set
     214     by the target BFD part to convey this information.  */
    218215#define BSF_NOT_AT_END    0x400
    219216
    220        /* Signal that the symbol is the label of constructor section. */
     217  /* Signal that the symbol is the label of constructor section. */
    221218#define BSF_CONSTRUCTOR   0x800
    222219
    223        /* Signal that the symbol is a warning symbol.  The name is a
    224           warning.  The name of the next symbol is the one to warn about;
    225           if a reference is made to a symbol with the same name as the next
    226           symbol, a warning is issued by the linker. */
     220  /* Signal that the symbol is a warning symbol.  The name is a
     221     warning.  The name of the next symbol is the one to warn about;
     222     if a reference is made to a symbol with the same name as the next
     223     symbol, a warning is issued by the linker. */
    227224#define BSF_WARNING       0x1000
    228225
    229        /* Signal that the symbol is indirect.  This symbol is an indirect
    230           pointer to the symbol with the same name as the next symbol. */
     226  /* Signal that the symbol is indirect.  This symbol is an indirect
     227     pointer to the symbol with the same name as the next symbol. */
    231228#define BSF_INDIRECT      0x2000
    232229
    233        /* BSF_FILE marks symbols that contain a file name.  This is used
    234           for ELF STT_FILE symbols.  */
     230  /* BSF_FILE marks symbols that contain a file name.  This is used
     231     for ELF STT_FILE symbols.  */
    235232#define BSF_FILE          0x4000
    236233
    237        /* Symbol is from dynamic linking information.  */
     234  /* Symbol is from dynamic linking information.  */
    238235#define BSF_DYNAMIC       0x8000
    239236
    240        /* The symbol denotes a data object.  Used in ELF, and perhaps
    241           others someday.  */
     237  /* The symbol denotes a data object.  Used in ELF, and perhaps
     238     others someday.  */
    242239#define BSF_OBJECT        0x10000
    243240
    244        /* This symbol is a debugging symbol.  The value is the offset
    245           into the section of the data.  BSF_DEBUGGING should be set
    246           as well.  */
     241  /* This symbol is a debugging symbol.  The value is the offset
     242     into the section of the data.  BSF_DEBUGGING should be set
     243     as well.  */
    247244#define BSF_DEBUGGING_RELOC 0x20000
    248245
     246  /* This symbol is thread local.  Used in ELF.  */
     247#define BSF_THREAD_LOCAL  0x40000
     248
    249249  flagword flags;
    250250
    251        /* A pointer to the section to which this symbol is
    252           relative.  This will always be non NULL, there are special
    253           sections for undefined and absolute symbols.  */
     251  /* A pointer to the section to which this symbol is
     252     relative.  This will always be non NULL, there are special
     253     sections for undefined and absolute symbols.  */
    254254  struct sec *section;
    255255
    256        /* Back end special data.  */
     256  /* Back end special data.  */
    257257  union
    258258    @{
    259259      PTR p;
    260260      bfd_vma i;
    261     @} udata;
    262 
    263 @} asymbol;
     261    @}
     262  udata;
     263@}
     264asymbol;
     265
    264266@end example
    265267
     
    278280#define bfd_get_symtab_upper_bound(abfd) \
    279281     BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
     282
    280283@end example
    281284
     
    284287@strong{Synopsis}
    285288@example
    286 boolean bfd_is_local_label(bfd *abfd, asymbol *sym);
    287 @end example
    288 @strong{Description}@*
    289 Return true if the given symbol @var{sym} in the BFD @var{abfd} is
    290 a compiler generated local label, else return false.
     289bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
     290@end example
     291@strong{Description}@*
     292Return TRUE if the given symbol @var{sym} in the BFD @var{abfd} is
     293a compiler generated local label, else return FALSE.
    291294
    292295@findex bfd_is_local_label_name
     
    294297@strong{Synopsis}
    295298@example
    296 boolean bfd_is_local_label_name(bfd *abfd, const char *name);
    297 @end example
    298 @strong{Description}@*
    299 Return true if a symbol with the name @var{name} in the BFD
     299bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
     300@end example
     301@strong{Description}@*
     302Return TRUE if a symbol with the name @var{name} in the BFD
    300303@var{abfd} is a compiler generated local label, else return
    301 false.  This just checks whether the name has the form of a
     304FALSE.  This just checks whether the name has the form of a
    302305local label.
    303306@example
    304307#define bfd_is_local_label_name(abfd, name) \
    305308     BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
     309
    306310@end example
    307311
     
    318322     BFD_SEND (abfd, _bfd_canonicalize_symtab,\
    319323                  (abfd, location))
     324
    320325@end example
    321326
     
    324329@strong{Synopsis}
    325330@example
    326 boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count);
     331bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count);
    327332@end example
    328333@strong{Description}@*
     
    335340@strong{Synopsis}
    336341@example
    337 void bfd_print_symbol_vandf(PTR file, asymbol *symbol);
     342void bfd_print_symbol_vandf (bfd *abfd, PTR file, asymbol *symbol);
    338343@end example
    339344@strong{Description}@*
     
    354359#define bfd_make_empty_symbol(abfd) \
    355360     BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
    356 @end example
     361
     362@end example
     363
     364@findex _bfd_generic_make_empty_symbol
     365@subsubsection @code{_bfd_generic_make_empty_symbol}
     366@strong{Synopsis}
     367@example
     368asymbol * _bfd_generic_make_empty_symbol (bfd *);
     369@end example
     370@strong{Description}@*
     371Create a new @code{asymbol} structure for the BFD @var{abfd}
     372and return a pointer to it.  Used by core file routines,
     373binary back-end and anywhere else where no private info
     374is needed.
    357375
    358376@findex bfd_make_debug_symbol
     
    365383#define bfd_make_debug_symbol(abfd,ptr,size) \
    366384        BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
     385
    367386@end example
    368387
     
    375394@strong{Synopsis}
    376395@example
    377 int bfd_decode_symclass(asymbol *symbol);
     396int bfd_decode_symclass (asymbol *symbol);
    378397@end example
    379398@findex bfd_is_undefined_symclass
     
    386405@strong{Synopsis}
    387406@example
    388 boolean bfd_is_undefined_symclass (int symclass);
     407bfd_boolean bfd_is_undefined_symclass (int symclass);
    389408@end example
    390409@findex bfd_symbol_info
     
    397416@strong{Synopsis}
    398417@example
    399 void bfd_symbol_info(asymbol *symbol, symbol_info *ret);
     418void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
    400419@end example
    401420@findex bfd_copy_private_symbol_data
     
    403422@strong{Synopsis}
    404423@example
    405 boolean bfd_copy_private_symbol_data(bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
     424bfd_boolean bfd_copy_private_symbol_data (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
    406425@end example
    407426@strong{Description}@*
    408427Copy private symbol information from @var{isym} in the BFD
    409428@var{ibfd} to the symbol @var{osym} in the BFD @var{obfd}.
    410 Return @code{true} on success, @code{false} on error.  Possible error
     429Return @code{TRUE} on success, @code{FALSE} on error.  Possible error
    411430returns are:
    412431
     
    421440     BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
    422441               (ibfd, isymbol, obfd, osymbol))
    423 @end example
    424 
     442
     443@end example
     444
  • branches/GNU/src/binutils/bfd/doc/targets.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    5151If @code{target_defaulted} has been set, each possible target
    5252type is tried to see if it recognizes the specified format.
    53 @code{bfd_check_format} returns @code{true} when the caller guesses right.
     53@code{bfd_check_format} returns @code{TRUE} when the caller guesses right.
    5454@menu
    5555* bfd_target::
     
    102102   (bfd_assert (__FILE__,__LINE__), NULL))
    103103#endif
     104
    104105@end example
    105106This is the structure which defines the type of BFD this is.  The
     
    112113macro to define them both!
    113114@example
    114 enum bfd_flavour @{
     115enum bfd_flavour
     116@{
    115117  bfd_target_unknown_flavour,
    116118  bfd_target_aout_flavour,
     
    130132  bfd_target_msdos_flavour,
    131133  bfd_target_ovax_flavour,
    132   bfd_target_evax_flavour
     134  bfd_target_evax_flavour,
     135  bfd_target_mmo_flavour,
     136  bfd_target_mach_o_flavour,
     137  bfd_target_pef_flavour,
     138  bfd_target_pef_xlib_flavour,
     139  bfd_target_sym_flavour
    133140@};
    134141
     
    140147typedef struct bfd_target
    141148@{
    142 @end example
    143 Identifies the kind of target, e.g., SunOS4, Ultrix, etc.
    144 @example
     149  /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc.  */
    145150  char *name;
    146 @end example
    147 The "flavour" of a back end is a general indication about the contents
    148 of a file.
    149 @example
     151
     152 /* The "flavour" of a back end is a general indication about
     153    the contents of a file.  */
    150154  enum bfd_flavour flavour;
    151 @end example
    152 The order of bytes within the data area of a file.
    153 @example
     155
     156  /* The order of bytes within the data area of a file.  */
    154157  enum bfd_endian byteorder;
    155 @end example
    156 The order of bytes within the header parts of a file.
    157 @example
     158
     159 /* The order of bytes within the header parts of a file.  */
    158160  enum bfd_endian header_byteorder;
    159 @end example
    160 A mask of all the flags which an executable may have set -
    161 from the set @code{BFD_NO_FLAGS}, @code{HAS_RELOC}, ...@code{D_PAGED}.
    162 @example
     161
     162  /* A mask of all the flags which an executable may have set -
     163     from the set @code{BFD_NO_FLAGS}, @code{HAS_RELOC}, ...@code{D_PAGED}.  */
    163164  flagword object_flags;
    164 @end example
    165 A mask of all the flags which a section may have set - from
    166 the set @code{SEC_NO_FLAGS}, @code{SEC_ALLOC}, ...@code{SET_NEVER_LOAD}.
    167 @example
     165
     166 /* A mask of all the flags which a section may have set - from
     167    the set @code{SEC_NO_FLAGS}, @code{SEC_ALLOC}, ...@code{SET_NEVER_LOAD}.  */
    168168  flagword section_flags;
    169 @end example
    170 The character normally found at the front of a symbol
    171 (if any), perhaps `_'.
    172 @example
     169
     170 /* The character normally found at the front of a symbol.
     171    (if any), perhaps `_'.  */
    173172  char symbol_leading_char;
    174 @end example
    175 The pad character for file names within an archive header.
    176 @example
     173
     174 /* The pad character for file names within an archive header.  */
    177175  char ar_pad_char;
    178 @end example
    179 The maximum number of characters in an archive header.
    180 @example
     176
     177  /* The maximum number of characters in an archive header.  */
    181178  unsigned short ar_max_namelen;
    182 @end example
    183 Entries for byte swapping for data. These are different from the other
    184 entry points, since they don't take a BFD asthe first argument.
    185 Certain other handlers could do the same.
    186 @example
    187   bfd_vma      (*bfd_getx64) PARAMS ((const bfd_byte *));
     179
     180  /* Entries for byte swapping for data. These are different from the
     181     other entry points, since they don't take a BFD asthe first argument.
     182     Certain other handlers could do the same.  */
     183  bfd_vma        (*bfd_getx64) PARAMS ((const bfd_byte *));
    188184  bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *));
    189   void         (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
    190   bfd_vma      (*bfd_getx32) PARAMS ((const bfd_byte *));
     185  void           (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
     186  bfd_vma        (*bfd_getx32) PARAMS ((const bfd_byte *));
    191187  bfd_signed_vma (*bfd_getx_signed_32) PARAMS ((const bfd_byte *));
    192   void         (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
    193   bfd_vma      (*bfd_getx16) PARAMS ((const bfd_byte *));
     188  void           (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
     189  bfd_vma        (*bfd_getx16) PARAMS ((const bfd_byte *));
    194190  bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *));
    195   void         (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
    196 @end example
    197 Byte swapping for the headers
    198 @example
    199   bfd_vma      (*bfd_h_getx64) PARAMS ((const bfd_byte *));
     191  void           (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
     192
     193  /* Byte swapping for the headers.  */
     194  bfd_vma        (*bfd_h_getx64) PARAMS ((const bfd_byte *));
    200195  bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *));
    201   void         (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
    202   bfd_vma      (*bfd_h_getx32) PARAMS ((const bfd_byte *));
     196  void           (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
     197  bfd_vma        (*bfd_h_getx32) PARAMS ((const bfd_byte *));
    203198  bfd_signed_vma (*bfd_h_getx_signed_32) PARAMS ((const bfd_byte *));
    204   void         (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
    205   bfd_vma      (*bfd_h_getx16) PARAMS ((const bfd_byte *));
     199  void           (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
     200  bfd_vma        (*bfd_h_getx16) PARAMS ((const bfd_byte *));
    206201  bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *));
    207   void         (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
    208 @end example
    209 Format dependent routines: these are vectors of entry points
    210 within the target vector structure, one for each format to check.
    211 
    212 Check the format of a file being read.  Return a @code{bfd_target *} or zero.
    213 @example
     202  void           (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
     203
     204  /* Format dependent routines: these are vectors of entry points
     205     within the target vector structure, one for each format to check.  */
     206
     207  /* Check the format of a file being read.  Return a @code{bfd_target *} or zero.  */
    214208  const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
    215 @end example
    216 Set the format of a file being written.
    217 @example
    218   boolean             (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
    219 @end example
    220 Write cached information into a file being written, at @code{bfd_close}.
    221 @example
    222   boolean             (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
     209
     210  /* Set the format of a file being written.  */
     211  bfd_boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
     212
     213  /* Write cached information into a file being written, at @code{bfd_close}.  */
     214  bfd_boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
     215
    223216@end example
    224217The general target vector.  These vectors are initialized using the
     
    227220
    228221  /* Generic entry points.  */
    229 #define BFD_JUMP_TABLE_GENERIC(NAME)\
    230 CAT(NAME,_close_and_cleanup),\
    231 CAT(NAME,_bfd_free_cached_info),\
    232 CAT(NAME,_new_section_hook),\
    233 CAT(NAME,_get_section_contents),\
    234 CAT(NAME,_get_section_contents_in_window)
     222@end example
     223Do not "beautify" the CONCAT* macro args.  Traditional C will not
     224remove whitespace added here, and thus will fail to concatenate
     225the tokens.
     226@example
     227#define BFD_JUMP_TABLE_GENERIC(NAME) \
     228CONCAT2 (NAME,_close_and_cleanup), \
     229CONCAT2 (NAME,_bfd_free_cached_info), \
     230CONCAT2 (NAME,_new_section_hook), \
     231CONCAT2 (NAME,_get_section_contents), \
     232CONCAT2 (NAME,_get_section_contents_in_window)
    235233
    236234  /* Called when the BFD is being closed to do any necessary cleanup.  */
    237   boolean      (*_close_and_cleanup) PARAMS ((bfd *));
     235  bfd_boolean (*_close_and_cleanup) PARAMS ((bfd *));
    238236  /* Ask the BFD to free all cached information.  */
    239   boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
     237  bfd_boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
    240238  /* Called when a new section is created.  */
    241   boolean      (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
     239  bfd_boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
    242240  /* Read the contents of a section.  */
    243   boolean       (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
    244                                             file_ptr, bfd_size_type));
    245   boolean       (*_bfd_get_section_contents_in_window)
    246                           PARAMS ((bfd *, sec_ptr, bfd_window *,
    247                                    file_ptr, bfd_size_type));
     241  bfd_boolean (*_bfd_get_section_contents)
     242    PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
     243  bfd_boolean (*_bfd_get_section_contents_in_window)
     244    PARAMS ((bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type));
    248245
    249246  /* Entry points to copy private data.  */
    250 #define BFD_JUMP_TABLE_COPY(NAME)\
    251 CAT(NAME,_bfd_copy_private_bfd_data),\
    252 CAT(NAME,_bfd_merge_private_bfd_data),\
    253 CAT(NAME,_bfd_copy_private_section_data),\
    254 CAT(NAME,_bfd_copy_private_symbol_data),\
    255 CAT(NAME,_bfd_set_private_flags),\
    256 CAT(NAME,_bfd_print_private_bfd_data)\
     247#define BFD_JUMP_TABLE_COPY(NAME) \
     248CONCAT2 (NAME,_bfd_copy_private_bfd_data), \
     249CONCAT2 (NAME,_bfd_merge_private_bfd_data), \
     250CONCAT2 (NAME,_bfd_copy_private_section_data), \
     251CONCAT2 (NAME,_bfd_copy_private_symbol_data), \
     252CONCAT2 (NAME,_bfd_set_private_flags), \
     253CONCAT2 (NAME,_bfd_print_private_bfd_data) \
    257254  /* Called to copy BFD general private data from one object file
    258255     to another.  */
    259   boolean      (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
     256  bfd_boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
    260257  /* Called to merge BFD general private data from one object file
    261258     to a common output file when linking.  */
    262   boolean      (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
     259  bfd_boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
    263260  /* Called to copy BFD private section data from one object file
    264261     to another.  */
    265   boolean       (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
    266                                                       bfd *, sec_ptr));
     262  bfd_boolean (*_bfd_copy_private_section_data)
     263    PARAMS ((bfd *, sec_ptr, bfd *, sec_ptr));
    267264  /* Called to copy BFD private symbol data from one symbol
    268265     to another.  */
    269   boolean       (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
    270                                                           bfd *, asymbol *));
    271   /* Called to set private backend flags */
    272   boolean      (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
    273 
    274   /* Called to print private BFD data */
    275   boolean      (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
     266  bfd_boolean (*_bfd_copy_private_symbol_data)
     267    PARAMS ((bfd *, asymbol *, bfd *, asymbol *));
     268  /* Called to set private backend flags. */
     269  bfd_boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
     270
     271  /* Called to print private BFD data. */
     272  bfd_boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
    276273
    277274  /* Core file entry points.  */
    278 #define BFD_JUMP_TABLE_CORE(NAME)\
    279 CAT(NAME,_core_file_failing_command),\
    280 CAT(NAME,_core_file_failing_signal),\
    281 CAT(NAME,_core_file_matches_executable_p)
    282   char *   (*_core_file_failing_command) PARAMS ((bfd *));
    283   int      (*_core_file_failing_signal) PARAMS ((bfd *));
    284   boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *));
     275#define BFD_JUMP_TABLE_CORE(NAME) \
     276CONCAT2 (NAME,_core_file_failing_command), \
     277CONCAT2 (NAME,_core_file_failing_signal), \
     278CONCAT2 (NAME,_core_file_matches_executable_p)
     279  char *      (*_core_file_failing_command) PARAMS ((bfd *));
     280  int         (*_core_file_failing_signal) PARAMS ((bfd *));
     281  bfd_boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *));
    285282
    286283  /* Archive entry points.  */
    287 #define BFD_JUMP_TABLE_ARCHIVE(NAME)\
    288 CAT(NAME,_slurp_armap),\
    289 CAT(NAME,_slurp_extended_name_table),\
    290 CAT(NAME,_construct_extended_name_table),\
    291 CAT(NAME,_truncate_arname),\
    292 CAT(NAME,_write_armap),\
    293 CAT(NAME,_read_ar_hdr),\
    294 CAT(NAME,_openr_next_archived_file),\
    295 CAT(NAME,_get_elt_at_index),\
    296 CAT(NAME,_generic_stat_arch_elt),\
    297 CAT(NAME,_update_armap_timestamp)
    298   boolean  (*_bfd_slurp_armap) PARAMS ((bfd *));
    299   boolean  (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
    300   boolean  (*_bfd_construct_extended_name_table)
    301              PARAMS ((bfd *, char **, bfd_size_type *, const char **));
    302   void     (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *));
    303   boolean  (*write_armap) PARAMS ((bfd *arch,
    304                               unsigned int elength,
    305                               struct orl *map,
    306                               unsigned int orl_count,
    307                               int stridx));
    308   PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
    309   bfd *    (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev));
     284#define BFD_JUMP_TABLE_ARCHIVE(NAME) \
     285CONCAT2 (NAME,_slurp_armap), \
     286CONCAT2 (NAME,_slurp_extended_name_table), \
     287CONCAT2 (NAME,_construct_extended_name_table), \
     288CONCAT2 (NAME,_truncate_arname), \
     289CONCAT2 (NAME,_write_armap), \
     290CONCAT2 (NAME,_read_ar_hdr), \
     291CONCAT2 (NAME,_openr_next_archived_file), \
     292CONCAT2 (NAME,_get_elt_at_index), \
     293CONCAT2 (NAME,_generic_stat_arch_elt), \
     294CONCAT2 (NAME,_update_armap_timestamp)
     295  bfd_boolean (*_bfd_slurp_armap) PARAMS ((bfd *));
     296  bfd_boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
     297  bfd_boolean (*_bfd_construct_extended_name_table)
     298    PARAMS ((bfd *, char **, bfd_size_type *, const char **));
     299  void        (*_bfd_truncate_arname) PARAMS ((bfd *, const char *, char *));
     300  bfd_boolean (*write_armap)
     301    PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
     302  PTR         (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
     303  bfd *       (*openr_next_archived_file) PARAMS ((bfd *, bfd *));
    310304#define bfd_get_elt_at_index(b,i) BFD_SEND(b, _bfd_get_elt_at_index, (b,i))
    311   bfd *    (*_bfd_get_elt_at_index) PARAMS ((bfd *, symindex));
    312   int      (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
    313   boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
     305  bfd *       (*_bfd_get_elt_at_index) PARAMS ((bfd *, symindex));
     306  int         (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
     307  bfd_boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
    314308
    315309  /* Entry points used for symbols.  */
    316 #define BFD_JUMP_TABLE_SYMBOLS(NAME)\
    317 CAT(NAME,_get_symtab_upper_bound),\
    318 CAT(NAME,_get_symtab),\
    319 CAT(NAME,_make_empty_symbol),\
    320 CAT(NAME,_print_symbol),\
    321 CAT(NAME,_get_symbol_info),\
    322 CAT(NAME,_bfd_is_local_label_name),\
    323 CAT(NAME,_get_lineno),\
    324 CAT(NAME,_find_nearest_line),\
    325 CAT(NAME,_bfd_make_debug_symbol),\
    326 CAT(NAME,_read_minisymbols),\
    327 CAT(NAME,_minisymbol_to_symbol)
    328   long  (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
    329   long  (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
    330                                              struct symbol_cache_entry **));
    331   struct symbol_cache_entry  *
    332                 (*_bfd_make_empty_symbol) PARAMS ((bfd *));
    333   void          (*_bfd_print_symbol) PARAMS ((bfd *, PTR,
    334                                       struct symbol_cache_entry *,
    335                                       bfd_print_symbol_type));
     310#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
     311CONCAT2 (NAME,_get_symtab_upper_bound), \
     312CONCAT2 (NAME,_get_symtab), \
     313CONCAT2 (NAME,_make_empty_symbol), \
     314CONCAT2 (NAME,_print_symbol), \
     315CONCAT2 (NAME,_get_symbol_info), \
     316CONCAT2 (NAME,_bfd_is_local_label_name), \
     317CONCAT2 (NAME,_get_lineno), \
     318CONCAT2 (NAME,_find_nearest_line), \
     319CONCAT2 (NAME,_bfd_make_debug_symbol), \
     320CONCAT2 (NAME,_read_minisymbols), \
     321CONCAT2 (NAME,_minisymbol_to_symbol)
     322  long        (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
     323  long        (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
     324                                                struct symbol_cache_entry **));
     325  struct symbol_cache_entry *
     326              (*_bfd_make_empty_symbol) PARAMS ((bfd *));
     327  void        (*_bfd_print_symbol)
     328    PARAMS ((bfd *, PTR, struct symbol_cache_entry *, bfd_print_symbol_type));
    336329#define bfd_print_symbol(b,p,s,e) BFD_SEND(b, _bfd_print_symbol, (b,p,s,e))
    337   void          (*_bfd_get_symbol_info) PARAMS ((bfd *,
    338                                       struct symbol_cache_entry *,
    339                                       symbol_info *));
     330  void        (*_bfd_get_symbol_info)
     331    PARAMS ((bfd *, struct symbol_cache_entry *, symbol_info *));
    340332#define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e))
    341   boolean       (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
    342 
    343   alent *    (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
    344   boolean    (*_bfd_find_nearest_line) PARAMS ((bfd *abfd,
    345                     struct sec *section, struct symbol_cache_entry **symbols,
    346                     bfd_vma offset, CONST char **file, CONST char **func,
    347                     unsigned int *line));
     333  bfd_boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
     334
     335  alent *     (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
     336  bfd_boolean (*_bfd_find_nearest_line)
     337    PARAMS ((bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma,
     338             const char **, const char **, unsigned int *));
    348339 /* Back-door to allow format-aware applications to create debug symbols
    349340    while using BFD for everything else.  Currently used by the assembler
    350341    when creating COFF files.  */
    351   asymbol *  (*_bfd_make_debug_symbol) PARAMS ((
    352        bfd *abfd,
    353        void *ptr,
    354        unsigned long size));
     342  asymbol *   (*_bfd_make_debug_symbol)
     343    PARAMS ((bfd *, void *, unsigned long size));
    355344#define bfd_read_minisymbols(b, d, m, s) \
    356345  BFD_SEND (b, _read_minisymbols, (b, d, m, s))
    357   long  (*_read_minisymbols) PARAMS ((bfd *, boolean, PTR *,
    358                                       unsigned int *));
     346  long        (*_read_minisymbols)
     347    PARAMS ((bfd *, bfd_boolean, PTR *, unsigned int *));
    359348#define bfd_minisymbol_to_symbol(b, d, m, f) \
    360349  BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
    361   asymbol *(*_minisymbol_to_symbol) PARAMS ((bfd *, boolean, const PTR,
    362                                             asymbol *));
     350  asymbol *   (*_minisymbol_to_symbol)
     351    PARAMS ((bfd *, bfd_boolean, const PTR, asymbol *));
    363352
    364353  /* Routines for relocs.  */
    365 #define BFD_JUMP_TABLE_RELOCS(NAME)\
    366 CAT(NAME,_get_reloc_upper_bound),\
    367 CAT(NAME,_canonicalize_reloc),\
    368 CAT(NAME,_bfd_reloc_type_lookup)
    369   long  (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
    370   long  (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
    371                                             struct symbol_cache_entry **));
     354#define BFD_JUMP_TABLE_RELOCS(NAME) \
     355CONCAT2 (NAME,_get_reloc_upper_bound), \
     356CONCAT2 (NAME,_canonicalize_reloc), \
     357CONCAT2 (NAME,_bfd_reloc_type_lookup)
     358  long        (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
     359  long        (*_bfd_canonicalize_reloc)
     360    PARAMS ((bfd *, sec_ptr, arelent **, struct symbol_cache_entry **));
    372361  /* See documentation on reloc types.  */
    373362  reloc_howto_type *
    374        (*reloc_type_lookup) PARAMS ((bfd *abfd,
    375                                      bfd_reloc_code_real_type code));
     363              (*reloc_type_lookup) PARAMS ((bfd *, bfd_reloc_code_real_type));
    376364
    377365  /* Routines used when writing an object file.  */
    378 #define BFD_JUMP_TABLE_WRITE(NAME)\
    379 CAT(NAME,_set_arch_mach),\
    380 CAT(NAME,_set_section_contents)
    381   boolean    (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture,
    382                     unsigned long));
    383   boolean       (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
    384                                             file_ptr, bfd_size_type));
     366#define BFD_JUMP_TABLE_WRITE(NAME) \
     367CONCAT2 (NAME,_set_arch_mach), \
     368CONCAT2 (NAME,_set_section_contents)
     369  bfd_boolean (*_bfd_set_arch_mach)
     370    PARAMS ((bfd *, enum bfd_architecture, unsigned long));
     371  bfd_boolean (*_bfd_set_section_contents)
     372    PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
    385373
    386374  /* Routines used by the linker.  */
    387 #define BFD_JUMP_TABLE_LINK(NAME)\
    388 CAT(NAME,_sizeof_headers),\
    389 CAT(NAME,_bfd_get_relocated_section_contents),\
    390 CAT(NAME,_bfd_relax_section),\
    391 CAT(NAME,_bfd_link_hash_table_create),\
    392 CAT(NAME,_bfd_link_add_symbols),\
    393 CAT(NAME,_bfd_final_link),\
    394 CAT(NAME,_bfd_link_split_section),\
    395 CAT(NAME,_bfd_gc_sections)
    396   int        (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
    397   bfd_byte * (*_bfd_get_relocated_section_contents) PARAMS ((bfd *,
    398                     struct bfd_link_info *, struct bfd_link_order *,
    399                     bfd_byte *data, boolean relocateable,
    400                     struct symbol_cache_entry **));
    401 
    402   boolean    (*_bfd_relax_section) PARAMS ((bfd *, struct sec *,
    403                     struct bfd_link_info *, boolean *again));
     375#define BFD_JUMP_TABLE_LINK(NAME) \
     376CONCAT2 (NAME,_sizeof_headers), \
     377CONCAT2 (NAME,_bfd_get_relocated_section_contents), \
     378CONCAT2 (NAME,_bfd_relax_section), \
     379CONCAT2 (NAME,_bfd_link_hash_table_create), \
     380CONCAT2 (NAME,_bfd_link_hash_table_free), \
     381CONCAT2 (NAME,_bfd_link_add_symbols), \
     382CONCAT2 (NAME,_bfd_link_just_syms), \
     383CONCAT2 (NAME,_bfd_final_link), \
     384CONCAT2 (NAME,_bfd_link_split_section), \
     385CONCAT2 (NAME,_bfd_gc_sections), \
     386CONCAT2 (NAME,_bfd_merge_sections), \
     387CONCAT2 (NAME,_bfd_discard_group)
     388  int         (*_bfd_sizeof_headers) PARAMS ((bfd *, bfd_boolean));
     389  bfd_byte *  (*_bfd_get_relocated_section_contents)
     390    PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
     391             bfd_byte *, bfd_boolean, struct symbol_cache_entry **));
     392
     393  bfd_boolean (*_bfd_relax_section)
     394    PARAMS ((bfd *, struct sec *, struct bfd_link_info *, bfd_boolean *));
    404395
    405396  /* Create a hash table for the linker.  Different backends store
    406397     different information in this table.  */
    407   struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *));
     398  struct bfd_link_hash_table *
     399              (*_bfd_link_hash_table_create) PARAMS ((bfd *));
     400
     401  /* Release the memory associated with the linker hash table.  */
     402  void        (*_bfd_link_hash_table_free)
     403    PARAMS ((struct bfd_link_hash_table *));
    408404
    409405  /* Add symbols from this object file into the hash table.  */
    410   boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
     406  bfd_boolean (*_bfd_link_add_symbols)
     407    PARAMS ((bfd *, struct bfd_link_info *));
     408
     409  /* Indicate that we are only retrieving symbol values from this section.  */
     410  void        (*_bfd_link_just_syms)
     411    PARAMS ((asection *, struct bfd_link_info *));
    411412
    412413  /* Do a link based on the link_order structures attached to each
    413414     section of the BFD.  */
    414   boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
     415  bfd_boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
    415416
    416417  /* Should this section be split up into smaller pieces during linking.  */
    417   boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
     418  bfd_boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
    418419
    419420  /* Remove sections that are not referenced from the output.  */
    420   boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
     421  bfd_boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
     422
     423  /* Attempt to merge SEC_MERGE sections.  */
     424  bfd_boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
     425
     426  /* Discard members of a group.  */
     427  bfd_boolean (*_bfd_discard_group) PARAMS ((bfd *, struct sec *));
    421428
    422429  /* Routines to handle dynamic symbols and relocs.  */
    423 #define BFD_JUMP_TABLE_DYNAMIC(NAME)\
    424 CAT(NAME,_get_dynamic_symtab_upper_bound),\
    425 CAT(NAME,_canonicalize_dynamic_symtab),\
    426 CAT(NAME,_get_dynamic_reloc_upper_bound),\
    427 CAT(NAME,_canonicalize_dynamic_reloc)
    428   /* Get the amount of memory required to hold the dynamic symbols. */
    429   long  (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
     430#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
     431CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
     432CONCAT2 (NAME,_canonicalize_dynamic_symtab), \
     433CONCAT2 (NAME,_get_dynamic_reloc_upper_bound), \
     434CONCAT2 (NAME,_canonicalize_dynamic_reloc)
     435  /* Get the amount of memory required to hold the dynamic symbols.  */
     436  long        (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
    430437  /* Read in the dynamic symbols.  */
    431   long  (*_bfd_canonicalize_dynamic_symtab)
     438  long        (*_bfd_canonicalize_dynamic_symtab)
    432439    PARAMS ((bfd *, struct symbol_cache_entry **));
    433440  /* Get the amount of memory required to hold the dynamic relocs.  */
    434   long  (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
     441  long        (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
    435442  /* Read in the dynamic relocs.  */
    436   long  (*_bfd_canonicalize_dynamic_reloc)
     443  long        (*_bfd_canonicalize_dynamic_reloc)
    437444    PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
    438445
     
    444451to find an alternative output format that is suitable.
    445452@example
    446  /* Opposite endian version of this target.  */
    447  const struct bfd_target * alternative_target;
    448 
    449 @end example
    450 Data for use by back-end routines, which isn't generic enough to belong
    451 in this structure.
    452 @example
    453  PTR backend_data;
     453  /* Opposite endian version of this target.  */
     454  const struct bfd_target * alternative_target;
     455
     456  /* Data for use by back-end routines, which isn't
     457     generic enough to belong in this structure.  */
     458  PTR backend_data;
    454459
    455460@} bfd_target;
     461
    456462@end example
    457463
     
    460466@strong{Synopsis}
    461467@example
    462 boolean bfd_set_default_target (const char *name);
     468bfd_boolean bfd_set_default_target (const char *name);
    463469@end example
    464470@strong{Description}@*
     
    471477@strong{Synopsis}
    472478@example
    473 const bfd_target *bfd_find_target(CONST char *target_name, bfd *abfd);
     479const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
    474480@end example
    475481@strong{Description}@*
     
    488494@strong{Synopsis}
    489495@example
    490 const char **bfd_target_list(void);
     496const char ** bfd_target_list (void);
    491497@end example
    492498@strong{Description}@*
     
    499505@strong{Synopsis}
    500506@example
    501 const bfd_target * bfd_search_for_target (int (* search_func) (const bfd_target *, void *), void *);
     507const bfd_target * bfd_search_for_target (int (* search_func)
     508       (const bfd_target *, void *),
     509    void *);
    502510@end example
    503511@strong{Description}@*
Note: See TracChangeset for help on using the changeset viewer.