| OLD | NEW |
| 1 @section Symbols | 1 @section Symbols |
| 2 BFD tries to maintain as much symbol information as it can when | 2 BFD tries to maintain as much symbol information as it can when |
| 3 it moves information from file to file. BFD passes information | 3 it moves information from file to file. BFD passes information |
| 4 to applications though the @code{asymbol} structure. When the | 4 to applications though the @code{asymbol} structure. When the |
| 5 application requests the symbol table, BFD reads the table in | 5 application requests the symbol table, BFD reads the table in |
| 6 the native form and translates parts of it into the internal | 6 the native form and translates parts of it into the internal |
| 7 format. To maintain more than the information passed to | 7 format. To maintain more than the information passed to |
| 8 applications, some targets keep some information ``behind the | 8 applications, some targets keep some information ``behind the |
| 9 scenes'' in a structure only the particular back end knows | 9 scenes'' in a structure only the particular back end knows |
| 10 about. For example, the coff back end keeps the original | 10 about. For example, the coff back end keeps the original |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 writing is closed. The application attaches a vector of | 71 writing is closed. The application attaches a vector of |
| 72 pointers to pointers to symbols to the BFD being written, and | 72 pointers to pointers to symbols to the BFD being written, and |
| 73 fills in the symbol count. The close and cleanup code reads | 73 fills in the symbol count. The close and cleanup code reads |
| 74 through the table provided and performs all the necessary | 74 through the table provided and performs all the necessary |
| 75 operations. The BFD output code must always be provided with an | 75 operations. The BFD output code must always be provided with an |
| 76 ``owned'' symbol: one which has come from another BFD, or one | 76 ``owned'' symbol: one which has come from another BFD, or one |
| 77 which has been created using @code{bfd_make_empty_symbol}. Here is an | 77 which has been created using @code{bfd_make_empty_symbol}. Here is an |
| 78 example showing the creation of a symbol table with only one element: | 78 example showing the creation of a symbol table with only one element: |
| 79 | 79 |
| 80 @example | 80 @example |
| 81 #include "sysdep.h" |
| 81 #include "bfd.h" | 82 #include "bfd.h" |
| 82 int main (void) | 83 int main (void) |
| 83 @{ | 84 @{ |
| 84 bfd *abfd; | 85 bfd *abfd; |
| 85 asymbol *ptrs[2]; | 86 asymbol *ptrs[2]; |
| 86 asymbol *new; | 87 asymbol *new; |
| 87 | 88 |
| 88 abfd = bfd_openw ("foo","a.out-sunos-big"); | 89 abfd = bfd_openw ("foo","a.out-sunos-big"); |
| 89 bfd_set_format (abfd, bfd_object); | 90 bfd_set_format (abfd, bfd_object); |
| 90 new = bfd_make_empty_symbol (abfd); | 91 new = bfd_make_empty_symbol (abfd); |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 @code{bfd_error_no_memory} - | 471 @code{bfd_error_no_memory} - |
| 471 Not enough memory exists to create private data for @var{osec}. | 472 Not enough memory exists to create private data for @var{osec}. |
| 472 @end itemize | 473 @end itemize |
| 473 @example | 474 @example |
| 474 #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \ | 475 #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \ |
| 475 BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ | 476 BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ |
| 476 (ibfd, isymbol, obfd, osymbol)) | 477 (ibfd, isymbol, obfd, osymbol)) |
| 477 | 478 |
| 478 @end example | 479 @end example |
| 479 | 480 |
| OLD | NEW |