summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/bfd/doc/syms.texi
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/bfd/doc/syms.texi')
-rw-r--r--contrib/binutils/bfd/doc/syms.texi85
1 files changed, 43 insertions, 42 deletions
diff --git a/contrib/binutils/bfd/doc/syms.texi b/contrib/binutils/bfd/doc/syms.texi
index cb29e7d..415d156 100644
--- a/contrib/binutils/bfd/doc/syms.texi
+++ b/contrib/binutils/bfd/doc/syms.texi
@@ -47,10 +47,10 @@ excerpt from an application which reads the symbol table:
if (storage_needed < 0)
FAIL
- if (storage_needed == 0) @{
- return ;
- @}
- symbol_table = (asymbol **) xmalloc (storage_needed);
+ if (storage_needed == 0)
+ return;
+
+ symbol_table = xmalloc (storage_needed);
...
number_of_symbols =
bfd_canonicalize_symtab (abfd, symbol_table);
@@ -58,9 +58,8 @@ excerpt from an application which reads the symbol table:
if (number_of_symbols < 0)
FAIL
- for (i = 0; i < number_of_symbols; i++) @{
- process_symbol (symbol_table[i]);
- @}
+ for (i = 0; i < number_of_symbols; i++)
+ process_symbol (symbol_table[i]);
@end example
All storage for the symbols themselves is in an objalloc
@@ -80,25 +79,26 @@ example showing the creation of a symbol table with only one element:
@example
#include "bfd.h"
- main()
+ int main (void)
@{
bfd *abfd;
asymbol *ptrs[2];
asymbol *new;
- abfd = bfd_openw("foo","a.out-sunos-big");
- bfd_set_format(abfd, bfd_object);
- new = bfd_make_empty_symbol(abfd);
+ abfd = bfd_openw ("foo","a.out-sunos-big");
+ bfd_set_format (abfd, bfd_object);
+ new = bfd_make_empty_symbol (abfd);
new->name = "dummy_symbol";
- new->section = bfd_make_section_old_way(abfd, ".text");
+ new->section = bfd_make_section_old_way (abfd, ".text");
new->flags = BSF_GLOBAL;
new->value = 0x12345;
ptrs[0] = new;
- ptrs[1] = (asymbol *)0;
+ ptrs[1] = 0;
- bfd_set_symtab(abfd, ptrs, 1);
- bfd_close(abfd);
+ bfd_set_symtab (abfd, ptrs, 1);
+ bfd_close (abfd);
+ return 0;
@}
./makesym
@@ -106,9 +106,9 @@ example showing the creation of a symbol table with only one element:
00012345 A dummy_symbol
@end example
-Many formats cannot represent arbitary symbol information; for
+Many formats cannot represent arbitrary symbol information; for
instance, the @code{a.out} object format does not allow an
-arbitary number of sections. A symbol pointing to a section
+arbitrary number of sections. A symbol pointing to a section
which is not one of @code{.text}, @code{.data} or @code{.bss} cannot
be described.
@@ -139,7 +139,7 @@ An @code{asymbol} has the form:
@example
-typedef struct symbol_cache_entry
+typedef struct bfd_symbol
@{
/* A pointer to the BFD which owns the symbol. This information
is necessary so that a back end can work out what additional
@@ -150,7 +150,7 @@ typedef struct symbol_cache_entry
instead, except that some symbols point to the global sections
bfd_@{abs,com,und@}_section. This could be fixed by making
these globals be per-bfd (or per-target-flavor). FIXME. */
- struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
+ struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
/* The text of the symbol. The name is left alone, and not copied; the
application may not alter it. */
@@ -180,7 +180,7 @@ typedef struct symbol_cache_entry
@code{BSF_LOCAL}, @code{BSF_FORT_COMM}, @code{BSF_UNDEFINED} or
@code{BSF_GLOBAL}. */
- /* The symbol is a debugging record. The value has an arbitary
+ /* The symbol is a debugging record. The value has an arbitrary
meaning, unless BSF_DEBUGGING_RELOC is also set. */
#define BSF_DEBUGGING 0x08
@@ -251,12 +251,12 @@ typedef struct symbol_cache_entry
/* A pointer to the section to which this symbol is
relative. This will always be non NULL, there are special
sections for undefined and absolute symbols. */
- struct sec *section;
+ struct bfd_section *section;
/* Back end special data. */
union
@{
- PTR p;
+ void *p;
bfd_vma i;
@}
udata;
@@ -286,26 +286,26 @@ the BFD, then return 0. If an error occurs, return -1.
@subsubsection @code{bfd_is_local_label}
@strong{Synopsis}
@example
-boolean bfd_is_local_label(bfd *abfd, asymbol *sym);
+bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
@end example
@strong{Description}@*
-Return true if the given symbol @var{sym} in the BFD @var{abfd} is
-a compiler generated local label, else return false.
+Return TRUE if the given symbol @var{sym} in the BFD @var{abfd} is
+a compiler generated local label, else return FALSE.
@findex bfd_is_local_label_name
@subsubsection @code{bfd_is_local_label_name}
@strong{Synopsis}
@example
-boolean bfd_is_local_label_name(bfd *abfd, const char *name);
+bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
@end example
@strong{Description}@*
-Return true if a symbol with the name @var{name} in the BFD
+Return TRUE if a symbol with the name @var{name} in the BFD
@var{abfd} is a compiler generated local label, else return
-false. This just checks whether the name has the form of a
+FALSE. This just checks whether the name has the form of a
local label.
@example
#define bfd_is_local_label_name(abfd, name) \
- BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
+ BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
@end example
@@ -319,8 +319,7 @@ Return the actual number of symbol pointers, not
including the NULL.
@example
#define bfd_canonicalize_symtab(abfd, location) \
- BFD_SEND (abfd, _bfd_canonicalize_symtab,\
- (abfd, location))
+ BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
@end example
@@ -328,7 +327,8 @@ including the NULL.
@subsubsection @code{bfd_set_symtab}
@strong{Synopsis}
@example
-boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count);
+bfd_boolean bfd_set_symtab
+ (bfd *abfd, asymbol **location, unsigned int count);
@end example
@strong{Description}@*
Arrange that when the output BFD @var{abfd} is closed,
@@ -339,7 +339,7 @@ will be written.
@subsubsection @code{bfd_print_symbol_vandf}
@strong{Synopsis}
@example
-void bfd_print_symbol_vandf(bfd *abfd, PTR file, asymbol *symbol);
+void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
@end example
@strong{Description}@*
Print the value and flags of the @var{symbol} supplied to the
@@ -357,7 +357,7 @@ information surrounding the @code{asymbol}. Building your own
information, and will cause problems later on.
@example
#define bfd_make_empty_symbol(abfd) \
- BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
+ BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
@end example
@@ -381,7 +381,7 @@ to be used as a debugging symbol. Further details of its use have
yet to be worked out.
@example
#define bfd_make_debug_symbol(abfd,ptr,size) \
- BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
+ BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
@end example
@@ -393,7 +393,7 @@ class of @var{symbol}, or '?' for an unknown class.
@strong{Synopsis}
@example
-int bfd_decode_symclass(asymbol *symbol);
+int bfd_decode_symclass (asymbol *symbol);
@end example
@findex bfd_is_undefined_symclass
@subsubsection @code{bfd_is_undefined_symclass}
@@ -404,7 +404,7 @@ Returns zero otherwise.
@strong{Synopsis}
@example
-boolean bfd_is_undefined_symclass (int symclass);
+bfd_boolean bfd_is_undefined_symclass (int symclass);
@end example
@findex bfd_symbol_info
@subsubsection @code{bfd_symbol_info}
@@ -415,18 +415,19 @@ calling this function.
@strong{Synopsis}
@example
-void bfd_symbol_info(asymbol *symbol, symbol_info *ret);
+void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
@end example
@findex bfd_copy_private_symbol_data
@subsubsection @code{bfd_copy_private_symbol_data}
@strong{Synopsis}
@example
-boolean bfd_copy_private_symbol_data(bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
+bfd_boolean bfd_copy_private_symbol_data
+ (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
@end example
@strong{Description}@*
Copy private symbol information from @var{isym} in the BFD
@var{ibfd} to the symbol @var{osym} in the BFD @var{obfd}.
-Return @code{true} on success, @code{false} on error. Possible error
+Return @code{TRUE} on success, @code{FALSE} on error. Possible error
returns are:
@itemize @bullet
@@ -437,8 +438,8 @@ Not enough memory exists to create private data for @var{osec}.
@end itemize
@example
#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
- BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
- (ibfd, isymbol, obfd, osymbol))
+ BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
+ (ibfd, isymbol, obfd, osymbol))
@end example
OpenPOWER on IntegriCloud