You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
(bfd *, struct bfd_link_needed_list **);
extern bfd_boolean bfd_elf_size_dynamic_sections
(bfd *, const char *, const char *, const char *, const char * const *,
- struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *);
+ struct bfd_link_info *, struct bfd_section **,
+ struct bfd_elf_version_tree *);
+extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr
+ (bfd *, struct bfd_link_info *);
extern void bfd_elf_set_dt_needed_name
(bfd *, const char *);
extern const char *bfd_elf_get_dt_soname
extern void _bfd_elf_provide_symbol
(struct bfd_link_info *, const char *, bfd_vma);
+extern void _bfd_elf_provide_section_bound_symbols
+ (struct bfd_link_info *, struct bfd_section *sec, const char *, const char *);
+
extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
struct bfd_symbol *symbol;
struct bfd_symbol **symbol_ptr_ptr;
- struct bfd_link_order *link_order_head;
- struct bfd_link_order *link_order_tail;
+ /* Early in the link process, map_head and map_tail are used to build
+ a list of input sections attached to an output section. Later,
+ output sections use these fields for a list of bfd_link_order
+ structs. */
+ union {
+ struct bfd_link_order *link_order;
+ struct bfd_section *s;
+ } map_head, map_tail;
} asection;
/* These sections are global, and are managed by BFD. The application
/* Macros to handle insertion and deletion of a bfd's sections. These
only handle the list pointers, ie. do not adjust section_count,
target_index etc. */
-#define bfd_section_double_list_remove(ABFD, S) \
+#define bfd_section_list_remove(ABFD, S) \
do \
{ \
asection *_s = S; \
else \
(ABFD)->sections = _next; \
if (_next) \
- { \
- _next->prev = _prev; \
- _s->next = NULL; \
- } \
+ _next->prev = _prev; \
else \
(ABFD)->section_last = _prev; \
} \
while (0)
-#define bfd_section_list_remove(ABFD, PS) \
- bfd_section_double_list_remove ((ABFD), *(PS))
-#define bfd_section_double_list_append(ABFD, S) \
+#define bfd_section_list_append(ABFD, S) \
do \
{ \
asection *_s = S; \
_abfd->section_last->next = _s; \
} \
else \
- _abfd->sections = _s; \
+ { \
+ _s->prev = NULL; \
+ _abfd->sections = _s; \
+ } \
_abfd->section_last = _s; \
} \
while (0)
-#define bfd_section_double_list_insert_after(ABFD, A, S) \
+#define bfd_section_list_prepend(ABFD, S) \
do \
{ \
- asection *_a = A; \
asection *_s = S; \
- if (_a) \
+ bfd *_abfd = ABFD; \
+ _s->prev = NULL; \
+ if (_abfd->sections) \
+ { \
+ _s->next = _abfd->sections; \
+ _abfd->sections->prev = _s; \
+ } \
+ else \
{ \
- asection *_next = _a->next; \
- _s->next = _next; \
- _s->prev = _a; \
- _a->next = _s; \
- if (_next) \
- _s->next->prev = _s; \
- else \
- (ABFD)->section_last = _s; \
+ _s->next = NULL; \
+ _abfd->section_last = _s; \
} \
+ _abfd->sections = _s; \
+ } \
+ while (0)
+#define bfd_section_list_insert_after(ABFD, A, S) \
+ do \
+ { \
+ asection *_a = A; \
+ asection *_s = S; \
+ asection *_next = _a->next; \
+ _s->next = _next; \
+ _s->prev = _a; \
+ _a->next = _s; \
+ if (_next) \
+ _next->prev = _s; \
else \
- bfd_section_double_list_append ((ABFD), (S)); \
+ (ABFD)->section_last = _s; \
} \
while (0)
-#define bfd_section_double_list_insert_before(ABFD, B, S) \
+#define bfd_section_list_insert_before(ABFD, B, S) \
do \
{ \
asection *_b = B; \
asection *_s = S; \
- if (_b) \
- { \
- asection *_prev = _b->prev; \
- _s->prev = _prev; \
- _s->next = _b; \
- _b->prev = _s; \
- if (_prev) \
- _prev->next = _s; \
- else \
- (ABFD)->sections = _s; \
- } \
+ asection *_prev = _b->prev; \
+ _s->prev = _prev; \
+ _s->next = _b; \
+ _b->prev = _s; \
+ if (_prev) \
+ _prev->next = _s; \
else \
- bfd_section_double_list_append ((ABFD), (S)); \
+ (ABFD)->sections = _s; \
} \
while (0)
-#define bfd_section_list_insert(ABFD, PS, S) \
- bfd_section_double_list_insert_before ((ABFD), *(PS), (S))
#define bfd_section_removed_from_list(ABFD, S) \
- ((S)->next == NULL && (S) != (ABFD)->section_last)
+ ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
void bfd_section_list_clear (bfd *);
asection *bfd_make_section_old_way (bfd *abfd, const char *name);
+asection *bfd_make_section_anyway_with_flags
+ (bfd *abfd, const char *name, flagword flags);
+
asection *bfd_make_section_anyway (bfd *abfd, const char *name);
+asection *bfd_make_section_with_flags
+ (bfd *, const char *name, flagword flags);
+
asection *bfd_make_section (bfd *, const char *name);
bfd_boolean bfd_set_section_flags
#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
BFD_SEND (obfd, _bfd_copy_private_section_data, \
(ibfd, isection, obfd, osection))
-void _bfd_strip_section_from_output
- (struct bfd_link_info *info, asection *section);
-
bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);