diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-04-06 15:33:03 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-04-06 15:33:03 +0000 |
commit | 72223188299c3e5c9208c8ceb4dafe118f5b6b32 (patch) | |
tree | 3866144d895cd790e9d9f7f0e56a206179d8a561 /ld/ldlang.h | |
parent | 52f3cf45e3df5d88b68004c07077549c8634e209 (diff) | |
download | fsf-binutils-gdb-72223188299c3e5c9208c8ceb4dafe118f5b6b32.zip fsf-binutils-gdb-72223188299c3e5c9208c8ceb4dafe118f5b6b32.tar.gz fsf-binutils-gdb-72223188299c3e5c9208c8ceb4dafe118f5b6b32.tar.bz2 |
2005-04-06 Jakub Jelinek <jakub@redhat.com>
* ldlang.c: Formatting.
(walk_wild_consider_section): Remember return value from wildcardp.
(is_simple_wild): Use strcspn instead of 2 strpbrk calls and strlen.
(wild_spec_can_overlap): Use strcspn instead of strpbrk and strlen.
2005-04-06 Robert O'Callahan <rocallahan@novell.com>
* ld.h (lean_section_userdata_type): Remove.
(fat_section_userdata_type): Remove file field.
(SECTION_USERDATA_SIZE): Remove.
* ldlang.c (init_os): Eliminate initialization of unused
lean_section_userdata_type.
* ldlang.h (callback_t, walk_wild_section_handler_t): New
typedefs.
(struct lang_wild_statement_struct): Add walk_wild_section_handler
and handler_data fields.
* ldlang.c (callback_t): Removed.
(walk_wild_consider_section, walk_wild_section_general,
section_iterator_callback, find_section, is_simple_wild,
match_simple_wild, walk_wild_section_specs1_wild0,
walk_wild_section_specs1_wild1, walk_wild_section_specs2_wild1,
walk_wild_section_specs3_wild2, walk_wild_section_specs4_wild2,
wild_spec_can_overlap, analyze_walk_wild_section_handler): New
functions.
(lang_add_wild): Call analyze_walk_wild_section_handler.
(walk_wild_section): Renamed to walk_wild_section_general and
created a wrapper function.
(section_iterator_callback_data): New typedef.
Diffstat (limited to 'ld/ldlang.h')
-rw-r--r-- | ld/ldlang.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/ld/ldlang.h b/ld/ldlang.h index eb54a59..7b399e3 100644 --- a/ld/ldlang.h +++ b/ld/ldlang.h @@ -298,7 +298,17 @@ typedef struct union lang_statement_union *file; } lang_afile_asection_pair_statement_type; -typedef struct lang_wild_statement_struct +typedef struct lang_wild_statement_struct lang_wild_statement_type; + +typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *, + asection *, lang_input_statement_type *, void *); + +typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *, + lang_input_statement_type *, + callback_t callback, + void *data); + +struct lang_wild_statement_struct { lang_statement_header_type header; const char *filename; @@ -306,7 +316,10 @@ typedef struct lang_wild_statement_struct struct wildcard_list *section_list; bfd_boolean keep_sections; lang_statement_list_type children; -} lang_wild_statement_type; + + walk_wild_section_handler_t walk_wild_section_handler; + struct wildcard_list *handler_data[4]; +}; typedef struct lang_address_statement_struct { |