From 72223188299c3e5c9208c8ceb4dafe118f5b6b32 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 6 Apr 2005 15:33:03 +0000 Subject: 2005-04-06 Jakub Jelinek * 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 * 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. --- ld/ld.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'ld/ld.h') diff --git a/ld/ld.h b/ld/ld.h index 70b7f8f..1af628a 100644 --- a/ld/ld.h +++ b/ld/ld.h @@ -1,6 +1,6 @@ /* ld.h -- general linker header file Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004 + 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -89,28 +89,15 @@ struct map_symbol_def { struct map_symbol_def *next; }; -/* Extra information we hold on sections */ -typedef struct lean_user_section_struct { - /* For output sections: pointer to the section where this data will go. */ - struct lang_input_statement_struct *file; -} lean_section_userdata_type; - /* The initial part of fat_user_section_struct has to be idential with lean_user_section_struct. */ typedef struct fat_user_section_struct { - /* For output sections: pointer to the section where this data will go. */ - struct lang_input_statement_struct *file; /* For input sections, when writing a map file: head / tail of a linked list of hash table entries for symbols defined in this section. */ struct map_symbol_def *map_symbol_def_head; struct map_symbol_def **map_symbol_def_tail; } fat_section_userdata_type; -#define SECTION_USERDATA_SIZE \ - (command_line.reduce_memory_overheads \ - ? sizeof (lean_section_userdata_type) \ - : sizeof (fat_section_userdata_type)) - #define get_userdata(x) ((x)->userdata) #define BYTE_SIZE (1) -- cgit v1.1