projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a flag to asection, linker_has_input, and use it to reliably
[deliverable/binutils-gdb.git]
/
bfd
/
bfd.c
diff --git
a/bfd/bfd.c
b/bfd/bfd.c
index f7f8c2ab205558718f72380af5ff3986d1c5cf24..1f92762d2c3824c52d04b118f2389c5bd7915f21 100644
(file)
--- a/
bfd/bfd.c
+++ b/
bfd/bfd.c
@@
-1,5
+1,6
@@
/* Generic BFD library interface and support routines.
/* Generic BFD library interface and support routines.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
Free Software Foundation, Inc.
Written by Cygnus Support.
@@
-33,10
+34,10
@@
SECTION
CODE_FRAGMENT
.
CODE_FRAGMENT
.
-.struct _bfd
+.struct _bfd
.{
. {* The filename the application opened the BFD with. *}
.{
. {* The filename the application opened the BFD with. *}
-. CONST char *filename;
+. CONST char *filename;
.
. {* A pointer to the target jump table. *}
. const struct bfd_target *xvec;
.
. {* A pointer to the target jump table. *}
. const struct bfd_target *xvec;
@@
-69,7
+70,7
@@
CODE_FRAGMENT
. {* When a file is closed by the caching routines, BFD retains
. state information on the file here: *}
.
. {* When a file is closed by the caching routines, BFD retains
. state information on the file here: *}
.
-. file_ptr where;
+. file_ptr where;
.
. {* and here: (``once'' means at least once) *}
.
.
. {* and here: (``once'' means at least once) *}
.
@@
-82,7
+83,7
@@
CODE_FRAGMENT
.
. {* File modified time, if mtime_set is true: *}
.
.
. {* File modified time, if mtime_set is true: *}
.
-. long mtime;
+. long mtime;
.
. {* Reserved for an unimplemented file locking extension.*}
.
.
. {* Reserved for an unimplemented file locking extension.*}
.
@@
-101,13
+102,13
@@
CODE_FRAGMENT
.
. {* Format_specific flags*}
.
.
. {* Format_specific flags*}
.
-. flagword flags;
+. flagword flags;
.
. {* Currently my_archive is tested before adding origin to
. anything. I believe that this can become always an add of
. origin, with origin set to 0 for non archive files. *}
.
.
. {* Currently my_archive is tested before adding origin to
. anything. I believe that this can become always an add of
. origin, with origin set to 0 for non archive files. *}
.
-. file_ptr origin;
+. file_ptr origin;
.
. {* Remember when output has begun, to stop strange things
. from happening. *}
.
. {* Remember when output has begun, to stop strange things
. from happening. *}
@@
-119,7
+120,7
@@
CODE_FRAGMENT
. {* The number of sections *}
. unsigned int section_count;
.
. {* The number of sections *}
. unsigned int section_count;
.
-. {* Stuff only useful for object files:
+. {* Stuff only useful for object files:
. The start address. *}
. bfd_vma start_address;
.
. The start address. *}
. bfd_vma start_address;
.
@@
-127,17
+128,17
@@
CODE_FRAGMENT
. unsigned int symcount;
.
. {* Symbol table for output BFD (with symcount entries) *}
. unsigned int symcount;
.
. {* Symbol table for output BFD (with symcount entries) *}
-. struct symbol_cache_entry **outsymbols;
+. struct symbol_cache_entry **outsymbols;
.
. {* Pointer to structure which contains architecture information*}
. const struct bfd_arch_info *arch_info;
.
. {* Stuff only useful for archives:*}
.
. {* Pointer to structure which contains architecture information*}
. const struct bfd_arch_info *arch_info;
.
. {* Stuff only useful for archives:*}
-. PTR arelt_data;
+. PTR arelt_data;
. struct _bfd *my_archive; {* The containing archive BFD. *}
. struct _bfd *next; {* The next BFD in the archive. *}
. struct _bfd *archive_head; {* The first BFD in the archive. *}
. struct _bfd *my_archive; {* The containing archive BFD. *}
. struct _bfd *next; {* The next BFD in the archive. *}
. struct _bfd *archive_head; {* The first BFD in the archive. *}
-. boolean has_armap;
+. boolean has_armap;
.
. {* A chain of BFD structures involved in a link. *}
. struct _bfd *link_next;
.
. {* A chain of BFD structures involved in a link. *}
. struct _bfd *link_next;
@@
-148,7
+149,7
@@
CODE_FRAGMENT
.
. {* Used by the back end to hold private data. *}
.
.
. {* Used by the back end to hold private data. *}
.
-. union
+. union
. {
. struct aout_data_struct *aout_data;
. struct artdata *aout_ar_data;
. {
. struct aout_data_struct *aout_data;
. struct artdata *aout_ar_data;
@@
-180,7
+181,7
@@
CODE_FRAGMENT
. struct netbsd_core_struct *netbsd_core_data;
. PTR any;
. } tdata;
. struct netbsd_core_struct *netbsd_core_data;
. PTR any;
. } tdata;
-.
+.
. {* Used by the application to hold private data*}
. PTR usrdata;
.
. {* Used by the application to hold private data*}
. PTR usrdata;
.
@@
-218,8
+219,6
@@
CODE_FRAGMENT
struct which ultimately gets passed in to the bfd. When it arrives, copy
it to the following struct so that the data will be available in coffcode.h
where it is needed. The typedef's used are defined in bfd.h */
struct which ultimately gets passed in to the bfd. When it arrives, copy
it to the following struct so that the data will be available in coffcode.h
where it is needed. The typedef's used are defined in bfd.h */
-
-
\f
/*
SECTION
\f
/*
SECTION
@@
-376,7
+375,7
@@
bfd_perror (message)
CONST char *message;
{
if (bfd_get_error () == bfd_error_system_call)
CONST char *message;
{
if (bfd_get_error () == bfd_error_system_call)
- perror((char *)message); /* must be system error then... */
+ perror((char *)message); /* must be system error then...
*/
else {
if (message == NULL || *message == '\0')
fprintf (stderr, "%s\n", bfd_errmsg (bfd_get_error ()));
else {
if (message == NULL || *message == '\0')
fprintf (stderr, "%s\n", bfd_errmsg (bfd_get_error ()));
@@
-510,7
+509,6
@@
bfd_set_error_program_name (name)
_bfd_error_program_name = name;
}
_bfd_error_program_name = name;
}
-
/*
FUNCTION
bfd_get_error_handler
/*
FUNCTION
bfd_get_error_handler
@@
-547,7
+545,6
@@
DESCRIPTION
*/
*/
-
long
bfd_get_reloc_upper_bound (abfd, asect)
bfd *abfd;
long
bfd_get_reloc_upper_bound (abfd, asect)
bfd *abfd;
@@
-584,7
+581,6
@@
DESCRIPTION
The @var{syms} table is also needed for horrible internal magic
reasons.
The @var{syms} table is also needed for horrible internal magic
reasons.
-
*/
long
bfd_canonicalize_reloc (abfd, asect, location, symbols)
*/
long
bfd_canonicalize_reloc (abfd, asect, location, symbols)
@@
-615,7
+611,7
@@
DESCRIPTION
The argument @var{abfd} is ignored.
*/
The argument @var{abfd} is ignored.
*/
-/*ARGSUSED*/
+
void
bfd_set_reloc (ignore_abfd, asect, location, count)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
void
bfd_set_reloc (ignore_abfd, asect, location, count)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
@@
-759,7
+755,7
@@
bfd_get_sign_extend_vma (abfd)
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
return (get_elf_backend_data (abfd)->sign_extend_vma);
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
return (get_elf_backend_data (abfd)->sign_extend_vma);
- bfd_set_error (bfd_error_wrong_format);
+ bfd_set_error (bfd_error_wrong_format);
return -1;
}
return -1;
}
@@
-786,7
+782,6
@@
bfd_vma vma;
return true;
}
return true;
}
-
/*
FUNCTION
bfd_get_mtime
/*
FUNCTION
bfd_get_mtime
@@
-838,7
+833,7
@@
DESCRIPTION
Instead, we want to ask questions like "is this NNN byte sized
object I'm about to try read from file offset YYY reasonable?"
As as example of where we might do this, some object formats
Instead, we want to ask questions like "is this NNN byte sized
object I'm about to try read from file offset YYY reasonable?"
As as example of where we might do this, some object formats
- use string tables for which the first <<sizeof(long)>> bytes of the
+ use string tables for which the first <<sizeof
(long)>> bytes of the
table contain the size of the table itself, including the size bytes.
If an application tries to read what it thinks is one of these
string tables, without some way to validate the size, and for
table contain the size of the table itself, including the size bytes.
If an application tries to read what it thinks is one of these
string tables, without some way to validate the size, and for
@@
-985,7
+980,7
@@
bfd_scan_vma (string, end, base)
int digit;
/* Let the host do it if possible. */
int digit;
/* Let the host do it if possible. */
- if (sizeof
(bfd_vma) <= sizeof
(unsigned long))
+ if (sizeof
(bfd_vma) <= sizeof
(unsigned long))
return (bfd_vma) strtoul (string, (char **) end, base);
/* A negative base makes no sense, and we only need to go as high as hex. */
return (bfd_vma) strtoul (string, (char **) end, base);
/* A negative base makes no sense, and we only need to go as high as hex. */
@@
-1009,7
+1004,7
@@
bfd_scan_vma (string, end, base)
(string[0] == '0') && ((string[1] == 'x') || (string[1] == 'X')))
string += 2;
/* XXX should we also skip over "0b" or "0B" if base is 2? */
(string[0] == '0') && ((string[1] == 'x') || (string[1] == 'X')))
string += 2;
/* XXX should we also skip over "0b" or "0B" if base is 2? */
-
+
/* Speed could be improved with a table like hex_value[] in gas. */
#define HEX_VALUE(c) \
(isxdigit ((unsigned char) c) \
/* Speed could be improved with a table like hex_value[] in gas. */
#define HEX_VALUE(c) \
(isxdigit ((unsigned char) c) \
@@
-1037,7
+1032,7
@@
SYNOPSIS
boolean bfd_copy_private_bfd_data(bfd *ibfd, bfd *obfd);
DESCRIPTION
boolean bfd_copy_private_bfd_data(bfd *ibfd, bfd *obfd);
DESCRIPTION
- Copy private BFD information from the BFD @var{ibfd} to the
+ Copy private BFD information from the BFD @var{ibfd} to the
the BFD @var{obfd}. Return <<true>> on success, <<false>> on error.
Possible error returns are:
the BFD @var{obfd}. Return <<true>> on success, <<false>> on error.
Possible error returns are:
@@
-1058,7
+1053,7
@@
SYNOPSIS
boolean bfd_merge_private_bfd_data(bfd *ibfd, bfd *obfd);
DESCRIPTION
boolean bfd_merge_private_bfd_data(bfd *ibfd, bfd *obfd);
DESCRIPTION
- Merge private BFD information from the BFD @var{ibfd} to the
+ Merge private BFD information from the BFD @var{ibfd} to the
the output file BFD @var{obfd} when linking. Return <<true>>
on success, <<false>> on error. Possible error returns are:
the output file BFD @var{obfd} when linking. Return <<true>>
on success, <<false>> on error. Possible error returns are:
@@
-1131,6
+1126,9
@@
DESCRIPTION
.#define bfd_gc_sections(abfd, link_info) \
. BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
.
.#define bfd_gc_sections(abfd, link_info) \
. BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
.
+.#define bfd_merge_sections(abfd, link_info) \
+. BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
+.
.#define bfd_link_hash_table_create(abfd) \
. BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
.
.#define bfd_link_hash_table_create(abfd) \
. BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
.
This page took
0.031584 seconds
and
4
git commands to generate.