Commit | Line | Data |
---|---|---|
479f6503 ILT |
1 | 2008-03-29 Ian Lance Taylor <iant@google.com> |
2 | ||
ab794b6b ILT |
3 | * output.cc |
4 | (Output_section::Input_section_sort_entry::has_priority): New | |
5 | function. | |
6 | (Output_section::Input_section_sort_entry::match_file_name): New | |
7 | function. | |
8 | (Output_section::Input_section_sort_entry::match_section_name): | |
9 | Remove. | |
10 | (Output_section::Input_section_sort_entry::match_section_name_prefix): | |
11 | Remove. | |
12 | (Output_section::Input_section_sort_entry::match_section_file): | |
13 | Remove. | |
14 | (Output_section::Input_section_sort_compare::operator()): Rewrite | |
15 | using new Input_section_sort_entry functions. Sort crtbegin and | |
16 | crtend first. Sort sections with no priority before sections with | |
17 | a priority. | |
18 | * testsuite/initpri1.c (d3): Check j != 4. | |
19 | (cd5): New constructor/destructor function. | |
20 | (main): Check j != 2. | |
21 | ||
479f6503 ILT |
22 | * symtab.cc (Symbol_table::add_from_object): If we don't use the |
23 | new symbol when resolving, don't call set_is_default. | |
24 | * testsuite/ver_test_7.cc: New file. | |
25 | * testsuite/ver_test_7.sh: New file. | |
26 | * testsuite/Makefile.am (ver_test_7.so): New target. | |
27 | (ver_test_7.o): New target. | |
28 | (check_SCRIPTS): Add ver_test_7.sh. | |
29 | (check_DATA): Add ver_test_7.syms. | |
30 | (ver_test_7.syms): New target. | |
31 | ||
2fd32231 ILT |
32 | 2008-03-28 Ian Lance Taylor <iant@google.com> |
33 | ||
34 | * layout.cc (Layout::layout): If we see an input section with a | |
35 | name that needs sorting, set the must_sort flag for the output | |
36 | section. | |
37 | (Layout::make_output_section): If the name of the output section | |
38 | indicates that it might require sorting, set the may_sort flag. | |
39 | * output.h (Output_section::may_sort_attached_input_sections): New | |
40 | function. | |
41 | (Output_section::set_may_sort_attached_input_sections): New | |
42 | function. | |
43 | (Output_section::must_sort_attached_input_sections): New | |
44 | function. | |
45 | (Output_section::set_must_sort_attached_input_sections): New | |
46 | function. | |
47 | (class Output_section): Declare Input_section_sort_entry. Define | |
48 | Input_section_sort_compare. Declare | |
49 | sort_attached_input_sections. Add new fields: | |
50 | may_sort_attached_input_sections_, | |
51 | must_sort_attached_input_sections_, | |
52 | attached_input_sections_are_sorted_. | |
53 | * output.cc (Output_section::Output_section): Initialize new | |
54 | fields. | |
55 | (Output_section::add_input_section): Add an entry to | |
56 | input_sections_ if may_sort or must_sort are true. | |
57 | (Output_section::set_final_data_size): Call | |
58 | sort_attached_input_sections if necessary. | |
59 | (Output_section::Input_section_sort_entry): Define new class. | |
60 | (Output_section::Input_section_sort_compare::operator()): New | |
61 | function. | |
62 | (Output_section::sort_attached_input_sections): New function. | |
63 | * configure.ac: Check whether the compiler supports constructor | |
64 | priorities. Define a CONSTRUCTOR_PRIORITY automake conditional. | |
65 | * testsuite/initpri1.c: New file. | |
66 | * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if | |
67 | CONSTRUCTOR_PRIORITY. | |
68 | (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables. | |
69 | (initpri1_LDFLAGS): New variable. | |
70 | * configure, Makefile.in, testsuite/Makefile.in: Rebuild. | |
71 | ||
18e6b24e ILT |
72 | 2008-03-27 Ian Lance Taylor <iant@google.com> |
73 | ||
49bdd526 ILT |
74 | * common.cc (Sort_commons::operator): Correct sorting algorithm. |
75 | * testsuite/common_test_1.c: New file. | |
76 | * testsuite/Makefile.am (check_PROGRAMS): Add common_test_1. | |
77 | (common_test_1_SOURCES): New variable. | |
78 | (common_test_1_DEPENDENCIES): New variable. | |
79 | (common_test_1_LDFLAGS): New variable. | |
80 | ||
18e6b24e ILT |
81 | * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_ |
82 | and commons_ correctly when NAME/VERSION does not override | |
83 | NAME/NULL. | |
84 | * testsuite/ver_test_6.c: New file. | |
85 | * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6 | |
86 | (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables. | |
87 | (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables. | |
88 | ||
04bf7072 ILT |
89 | 2008-03-26 Ian Lance Taylor <iant@google.com> |
90 | ||
5871526f ILT |
91 | * symtab.cc (Symbol_table::add_from_relobj): Don't set the version |
92 | of an undefined symbol from a version script. | |
93 | * testsuite/Makefile.am (ver_test_5.so): New target. | |
94 | (ver_test_5.o): New target. | |
95 | (check_SCRIPTS): Add ver_test_5.sh. | |
96 | (check_DATA): Add ver_test_5.syms. | |
97 | (ver_test_5.syms): New target. | |
98 | * testsuite/ver_test_5.cc: New file. | |
99 | * testsuite/ver_test_5.script: New file. | |
100 | * testsuite/ver_test_5.sh: New file. | |
101 | * Makefile.in, testsuite/Makefile.in: Rebuild. | |
102 | ||
04bf7072 ILT |
103 | PR gold/5986 |
104 | Fix problems building gold with gcc 4.3.0. | |
105 | * gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define. | |
106 | (gold_error_at_location, gold_warning_at_location): Use it. | |
107 | * configure.ac: Check whether we can compile and use a template | |
108 | function with a printf attribute. | |
109 | * x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value | |
110 | when jumping over bytes. | |
111 | * object.cc: Instantiate Object::read_section_data. | |
112 | * debug.h: Include <cstring> | |
113 | * dwarf_reader.cc: Include <algorithm> | |
114 | * main.cc: Include <cstring>. | |
115 | * options.cc: Include <cstring>. | |
116 | * output.cc: Include <cstring>. | |
117 | * script.cc: Include <cstring>. | |
118 | * script.h: Include <string>. | |
119 | * symtab.cc: Include <cstring> and <algorithm>. | |
120 | * target-select.cc: Include <cstring>. | |
121 | * version.cc: Include <string>. | |
122 | * testsuite/testmain.cc: Include <cstdlib>. | |
123 | * configure, config.in: Rebuild. | |
124 | ||
874c5b28 ILT |
125 | 2008-03-25 Ian Lance Taylor <iant@google.com> |
126 | ||
819d6c3a ILT |
127 | * options.cc: Include "../bfd/bfdver.h". |
128 | (options::help): Print bug reporting address. | |
129 | ||
f4b2c6f5 ILT |
130 | * version.cc (print_version): Adjust output for current value of |
131 | BFD_VERSION_STRING. | |
132 | ||
133 | * NEWS: New file. | |
134 | ||
e96caa79 ILT |
135 | * options.cc (options::help): Print list of supported targets. |
136 | * target-select.h: Include <vector>. | |
137 | (class Target_selector): Make machine_, size_, and is_big_endian_ | |
138 | fields const. Add bfd_name_ and instantiated_target_ fields. | |
139 | (Target_selector::Target_selector): Add bfd_name parameter. | |
140 | (Target_selector::recognize): Make non-virtual, call | |
141 | do_recognize. | |
142 | (Target_selector::recognize_by_name): Make non-virtual, call | |
143 | do_recognize_by_name. | |
144 | (Target_selector::supported_names): New function. | |
145 | (Target_selector::bfd_name): New function. | |
146 | (Target_selector::do_instantiate_target): New pure virtual | |
147 | function. | |
148 | (Target_selector::do_recognize): New virtual function. | |
149 | (Target_selector::do_recognize_by_name): New virtual function. | |
150 | (Target_selector::instantiate_target): New private function. | |
151 | (supported_target_names): Declare. | |
152 | * target-select.cc (Target_selector::Target_selector): Update for | |
153 | new parameter and fields. | |
154 | (select_target_by_name): Check that the name matches before | |
155 | calling recognize_by_name. | |
156 | (supported_target_names): New function. | |
157 | * i386.cc (class Target_selector_i386): Update Target_selector | |
158 | constructor call. Remove recognize and recognize_by_name. Add | |
159 | do_instantiate_target. | |
160 | * x86_64.cc (class Target_selector_x86_64): Likewise. | |
161 | * testsuite/testfile.cc (class Target_selector_test): Update for | |
162 | changes to Target_selector. | |
163 | ||
874c5b28 ILT |
164 | * README: Rewrite, with some notes on unsupported features. |
165 | ||
0a65a3a7 CC |
166 | 2008-03-24 Cary Coutant <ccoutant@google.com> |
167 | ||
168 | * i386.cc (Target_i386::Got_type): New enum declaration. | |
169 | (Target_i386::Scan::local): Updated callers of Output_data_got | |
170 | member functions. | |
171 | (Target_i386::Scan::global): Likewise. | |
172 | (Target_i386::Relocate::relocate): Likewise. | |
173 | (Target_i386::Relocate::relocate_tls): Likewise. | |
174 | * object.h (Got_offset_list): New class. | |
175 | (Sized_relobj::local_has_got_offset): Added got_type parameter. | |
176 | (Sized_relobj::local_got_offset): Likewise. | |
177 | (Sized_relobj::set_local_got_offset): Likewise. | |
178 | (Sized_relobj::local_has_tls_got_offset): Removed. | |
179 | (Sized_relobj::local_tls_got_offset): Removed. | |
180 | (Sized_relobj::set_local_tls_got_offset): Removed. | |
181 | (Sized_relobj::Local_got_offsets): Changed to store a list of offsets. | |
182 | * output.cc (Output_data_got::add_global): Added got_type parameter. | |
183 | (Output_data_got::add_global_with_rel): Likewise. | |
184 | (Output_data_got::add_global_with_rela): Likewise. | |
185 | (Output_data_got::add_global_pair_with_rel): New function. | |
186 | (Output_data_got::add_global_pair_with_rela): New function. | |
187 | (Output_data_got::add_local): Added got_type parameter. | |
188 | (Output_data_got::add_local_with_rel): Likewise. | |
189 | (Output_data_got::add_local_with_rela): Likewise. | |
190 | (Output_data_got::add_local_pair_with_rel): New function. | |
191 | (Output_data_got::add_local_pair_with_rela): New function. | |
192 | (Output_data_got::add_global_tls): Removed. | |
193 | (Output_data_got::add_global_tls_with_rel): Removed. | |
194 | (Output_data_got::add_global_tls_with_rela): Removed. | |
195 | (Output_data_got::add_local_tls): Removed. | |
196 | (Output_data_got::add_local_tls_with_rel): Removed. | |
197 | (Output_data_got::add_local_tls_with_rela): Removed. | |
198 | * output.h (Output_data_got::add_global): Added got_type parameter. | |
199 | (Output_data_got::add_global_with_rel): Likewise. | |
200 | (Output_data_got::add_global_with_rela): Likewise. | |
201 | (Output_data_got::add_global_pair_with_rel): New function. | |
202 | (Output_data_got::add_global_pair_with_rela): New function. | |
203 | (Output_data_got::add_local): Added got_type parameter. | |
204 | (Output_data_got::add_local_with_rel): Likewise. | |
205 | (Output_data_got::add_local_with_rela): Likewise. | |
206 | (Output_data_got::add_local_pair_with_rel): New function. | |
207 | (Output_data_got::add_local_pair_with_rela): New function. | |
208 | (Output_data_got::add_global_tls): Removed. | |
209 | (Output_data_got::add_global_tls_with_rel): Removed. | |
210 | (Output_data_got::add_global_tls_with_rela): Removed. | |
211 | (Output_data_got::add_local_tls): Removed. | |
212 | (Output_data_got::add_local_tls_with_rel): Removed. | |
213 | (Output_data_got::add_local_tls_with_rela): Removed. | |
214 | * resolve.cc (Symbol::override_base_with_special): Removed | |
215 | reference to has_got_offset_ field. | |
216 | * symtab.cc (Symbol::init_fields): Replaced initialization | |
217 | of got_offset_ with got_offsets_. Removed initialization | |
218 | of has_got_offset_ | |
53fcba31 | 219 | * symtab.h (Symbol::has_got_offset): Aded got_type parameter. |
0a65a3a7 CC |
220 | (Symbol::got_offset): Likewise. |
221 | (Symbol::set_got_offset): Likewise. | |
222 | (Symbol::has_tls_got_offset): Removed. | |
223 | (Symbol::tls_got_offset): Removed. | |
224 | (Symbol::set_tls_got_offset): Removed. | |
225 | (Symbol::got_offset_): Removed. | |
226 | (Symbol::tls_mod_got_offset_): Removed. | |
227 | (Symbol::tls_pair_got_offset_): Removed. | |
228 | (Symbol::got_offsets_): New field. | |
229 | (Symbol::has_got_offset): Removed. | |
230 | (Symbol::has_tls_mod_got_offset): Removed. | |
231 | (Symbol::has_tls_pair_got_offset): Removed. | |
232 | * x86_64.cc (Target_x86_64::Got_type): New enum declaration. | |
233 | (Target_x86_64::Scan::local): Updated callers of Output_data_got | |
234 | member functions. | |
235 | (Target_x86_64::Scan::global): Likewise. | |
236 | (Target_x86_64::Relocate::relocate): Likewise. | |
237 | (Target_x86_64::Relocate::relocate_tls): Likewise. | |
238 | ||
bd52eafb BE |
239 | 2008-03-25 Ben Elliston <bje@au.ibm.com> |
240 | ||
241 | * yyscript.y: Fix spelling error in comment. | |
242 | ||
8b105e34 ILT |
243 | 2008-03-24 Ian Lance Taylor <iant@google.com> |
244 | ||
8ed814a9 ILT |
245 | * options.h (class General_options): Define build_id option. |
246 | * layout.h (class Layout): Declare write_build_id, create_note, | |
247 | create_build_id. Add build_id_note_ member. | |
248 | * layout.cc: Include <cerrno>, <fcntl.h>, <unistd.h>, | |
249 | "libiberty.h", "md5.h", "sha1.h". | |
250 | (Layout::Layout): Initialize eh_frame_data_, | |
251 | eh_frame_hdr_section_, and build_id_note_. | |
252 | (Layout::finalize): Call create_build_id. | |
253 | (Layout::create_note): New function, broken out of | |
254 | Layout::create_gold_note. | |
255 | (Layout::create_gold_note): Call create_note. | |
256 | (Layout::create_build_id): New function. | |
257 | (Layout::write_build_id): New function. | |
258 | (Close_task_runner::run): Call write_build_id. | |
259 | ||
8b105e34 ILT |
260 | * x86_64.cc: Correct license to GPLv3. |
261 | ||
086a1841 ILT |
262 | 2008-03-23 Ian Lance Taylor <iant@google.com> |
263 | ||
264 | * options.cc: Include "demangle.h". | |
265 | (parse_optional_string): New function. | |
266 | (parse_long_option): Handle takes_optional_argument. | |
267 | (parse_short_option): Update dash_z initializer. Handle | |
268 | takes_optional_argument. | |
269 | (General_options::General_options): Initialize do_demangle_. | |
270 | (General_options::finalize): Set do_demangle_. Handle demangling | |
271 | style. | |
272 | * options.h (parse_optional_string): Declare. | |
273 | (struct One_option): Add optional_arg field. Update constructor. | |
274 | Update call constructor calls. Add takes_optional_argument | |
275 | function. | |
276 | (DEFINE_var): Add optional_arg__ parameter. Change all callers. | |
277 | (DEFINE_optional_string): Define. | |
278 | (General_options::demangle): Change from DEFINE_bool to | |
279 | DEFINE_optional_string. | |
280 | (General_options::no_demangle): New function. | |
281 | (General_options::do_demangle): New function. | |
282 | (General_options::set_do_demangle): New function. | |
283 | (General_options::execstack_status_): Move definition to end of | |
284 | class definition. | |
285 | (General_options::static_): Likewise. | |
286 | (General_options::do_demangle_): New field. | |
287 | * object.cc (big_endian>::get_symbol_location_info): Call | |
288 | Options::do_demangle, not Options::demangle. | |
289 | * symtab.cc (demangle): Likewise. | |
290 | ||
cbb93e63 ILT |
291 | 2008-03-22 Ian Lance Taylor <iant@google.com> |
292 | ||
293 | * gold.h: Include <cstddef> and <sys/types.h> | |
294 | * options.h: Include <cstring>. | |
295 | ||
ec531623 ILT |
296 | 2008-03-21 Ian Lance Taylor <iant@google.com> |
297 | ||
298 | * Added source code to GNU binutils. | |
299 |