Commit | Line | Data |
---|---|---|
4f2a9edd ILT |
1 | 2008-04-15 Ian Lance Taylor <iant@google.com> |
2 | ||
3 | * sparc.cc: Add definitions for Output_data_plt_sparc class | |
4 | constants. | |
5 | ||
f5314dd5 DM |
6 | 2008-04-14 David S. Miller <davem@davemloft.net> |
7 | ||
8 | * sparc.cc: New file. | |
9 | * Makefile.am (TARGETSOURCES): Add sparc.cc | |
10 | (ALL_TARGETOBJS): Add sparc.$(OBJEXT) | |
11 | * configure.tgt: Document targ_extra_size and | |
12 | targ_extra_big_endian. Add entries for sparc-* and | |
13 | sparc64-*. | |
14 | * configure.ac: Handle targ_extra_size and | |
15 | targ_extra_big_endian. | |
16 | * Makefile.in: Rebuild. | |
17 | * configure: Likewise. | |
18 | * po/POTFILES.in: Likewise. | |
19 | * po/gold.pot: Likewise. | |
20 | ||
154e0e9a ILT |
21 | 2008-04-14 Ian Lance Taylor <iant@google.com> |
22 | ||
23 | * layout.cc (Layout::Layout): Initialize sections_are_attached_. | |
24 | (Layout::get_output_section): Ignore SHF_WRITE and SHF_EXECINSTR | |
25 | in the name/type/flags to section mapping. Don't call | |
26 | allocate_output_section. | |
27 | (Layout::choose_output_section): Change parameter from adjust_name | |
28 | to is_input_section. Don't permit input sections after sections | |
29 | are attached to segments. Don't call allocate_output_section. | |
30 | (Layout::layout_eh_frame): Call update_flags_for_input_section, | |
31 | not write_enable_output_section. | |
32 | (Layout::make_output_section): Don't push to | |
33 | unattached_section_list_ nor call attach_to_segment. Call | |
34 | attach_section_to_segment if sections are attached. | |
35 | (Layout::attach_sections_to_segments): New function. | |
36 | (Layout::attach_section_to_segment): New function. | |
37 | (Layout::attach_allocated_section_to_segment): Rename from | |
38 | attach_to_segment. Remove flags parameter. | |
39 | (Layout::allocate_output_section): Remove function. | |
40 | (Layout::write_enable_output_section): Remove function. | |
41 | * layout.h (class Layout): Update for above changes. Add new | |
42 | field sections_are_attached_. | |
43 | * output.h (Output_section::update_flags_for_input_section): New | |
44 | function. | |
45 | * output.cc (Output_section::add_input_section): Call | |
46 | update_flags_for_input_section. | |
47 | * gold.cc (queue_middle_tasks): Call attach_sections_to_segments. | |
48 | ||
009a67a2 CC |
49 | 2008-04-11 Cary Coutant <ccoutant@google.com> |
50 | ||
51 | * i386.cc (Target_i386::got_mod_index_entry): Restore code previously | |
52 | thought unnecessary. | |
53 | * x86_64.cc (Target_x86_64::got_mod_index_entry): Likewise. | |
54 | ||
759b1a24 ILT |
55 | 2008-04-11 Ian Lance Taylor <iant@google.com> |
56 | ||
57 | * output.h (class Output_section_data): Remove inline definition | |
58 | of set_addralign. | |
59 | * output.cc (Output_section_data::set_addralign): New function. | |
60 | ||
c2b45e22 CC |
61 | 2008-04-11 Cary Coutant <ccoutant@google.com> |
62 | ||
63 | Add support for TLS descriptors for i386 and x86_64. | |
64 | * i386.cc (Target_i386::Relocate::tls_desc_gd_to_ie): New function. | |
65 | (Target_i386::Relocate::tls_desc_gd_to_le): New function. | |
66 | (Target_i386::Got_type): Add GOT_TYPE_TLS_NOFFSET and | |
67 | GOT_TYPE_TLS_DESC. | |
68 | (Target_i386::got_mod_index_entry): Remove unnecessary code. | |
69 | (Target_i386::Scan::local): Implement R_386_TLS_GOTDESC and | |
70 | R_386_TLS_DESC_CALL relocations. Fix problem with initial-exec | |
71 | relocations. | |
72 | (Target_i386::Scan::global): Fix problem with GD-to-IE relaxation. | |
73 | Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations; | |
74 | Fix problem with initial-exec relocations. | |
75 | (Target_i386::Relocate::relocate_tls): Likewise. | |
76 | (Target_i386::Relocate::tls_gd_to_ie): Fix problem with GD-to-IE | |
77 | relaxation. | |
78 | * output.cc (Output_data_dynamic::Dynamic_entry::write): Add | |
79 | support for section-plus-offset dynamic table entries. | |
80 | * output.h (Output_data_dynamic::add_section_plus_offset): New function. | |
81 | (Output_data_dynamic::Dynamic_entry): Add support for | |
82 | section-plus-offset dynamic table entries. | |
83 | (Output_data_dynamic::Classification): Likewise. | |
84 | (Output_data_dynamic::classification_): Renamed offset_. | |
85 | * x86_64.cc (Target_x86_64::Relocate::tls_desc_gd_to_ie): New function. | |
86 | (Target_x86_64::Relocate::tls_desc_gd_to_le): New function. | |
87 | (Target_x86_64::make_plt_section): New function. | |
88 | (Target_x86_64::reserve_tlsdesc_entries): New function. | |
89 | (Output_data_plt_x86_64::Output_data_plt_x86_64): Add new parameter. | |
90 | (Output_data_plt_x86_64::reserve_tlsdesc_entry): New function. | |
91 | (Output_data_plt_x86_64::has_tlsdesc_entry): New function. | |
92 | (Output_data_plt_x86_64::get_tlsdesc_got_offset): New function. | |
93 | (Output_data_plt_x86_64::get_tlsdesc_plt_offset): New function. | |
94 | (Output_data_plt_x86_64::tlsdesc_plt_entry): New field. | |
95 | (Output_data_plt_x86_64::set_final_data_size): Move out of line; | |
96 | add extra PLT entry for TLS descriptors. | |
97 | (Output_data_plt_x86_64::got_): New field. | |
98 | (Output_data_plt_x86_64::tlsdesc_got_offset_): New field. | |
99 | (Output_data_plt_x86_64::Output_data_plt_x86_64): Initialize new | |
100 | fields. | |
101 | (Output_data_plt_x86_64::do_write): Write extra PLT entry for TLS | |
102 | descriptors. | |
103 | (Target_x86_64::make_plt_entry): Factor out make_plt_section. | |
104 | (Target_x86_64::got_mod_index_entry): Remove unnecessary code. | |
105 | (Target_x86_64::Scan::local): Implement R_386_TLS_GOTDESC and | |
106 | R_386_TLS_DESC_CALL relocations. | |
107 | (Target_x86_64::Scan::global): Likewise. | |
108 | (Target_x86_64::do_finalize_sections): Add dynamic table entries | |
109 | for TLS descriptors. | |
110 | (Relocate::relocate_tls): Fix problem with GD-to-IE relaxation. | |
111 | Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations. | |
112 | (Target_x86_64::Relocate::tls_gd_to_ie): Fix problem with | |
113 | GD-to-IE relaxation. | |
114 | * configure.ac: Export new conditional variables TLS_GNU2_DIALECT | |
115 | and TLS_DESCRIPTORS. | |
116 | * Makefile.in: Rebuild. | |
117 | * configure: Rebuild. | |
118 | * testsuite/Makefile.am (tls_shared_gd_to_ie_test): New target. | |
119 | (tls_test_shared2.so): New target. | |
120 | (tls_shared_gd_to_ie_test_SOURCES): New variable. | |
121 | (tls_shared_gd_to_ie_test_DEPENDENCIES): New variable. | |
122 | (tls_shared_gd_to_ie_test_LDFLAGS): New variable. | |
123 | (tls_shared_gd_to_ie_test_LDADD): New variable. | |
124 | (tls_shared_gnu2_gd_to_ie_test): New target. | |
125 | (tls_test_gnu2.o, tls_test_file2_gnu2.o, tls_test_gnu2_shared2.so): | |
126 | New targets. | |
127 | (tls_shared_gnu2_gd_to_ie_test_SOURCES): New variable. | |
128 | (ls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): New variable. | |
129 | (tls_shared_gnu2_gd_to_ie_test_LDFLAGS): New variable. | |
130 | (tls_shared_gnu2_gd_to_ie_test_LDADD): New variable. | |
131 | (tls_shared_gnu2_test): New target. | |
132 | (tls_test_gnu2_shared.so): New target. | |
133 | (tls_shared_gnu2_test_SOURCES): New variable. | |
134 | (tls_shared_gnu2_test_DEPENDENCIES): New variable. | |
135 | (tls_shared_gnu2_test_LDFLAGS): New variable. | |
136 | (tls_shared_gnu2_test_LDADD): New variable. | |
137 | * testsuite/Makefile.in: Rebuild. | |
138 | * testsuite/Makefile. | |
139 | ||
83bfb6b7 ILT |
140 | 2008-04-11 Ian Lance Taylor <iant@google.com> |
141 | ||
142 | * testsuite/Makefile.am (justsyms_2r.o): Add dependency on | |
143 | justsyms.t. | |
144 | * testsuite/Makefile.in: Rebuild. | |
145 | ||
146 | * testsuite/script_test_2a.cc (script_test_string_a): Make 8 bytes | |
147 | long. | |
148 | * testsuite/script_test_2.cc (main): Adjust test. | |
149 | ||
706e1f5e ILT |
150 | 2008-04-11 David S. Miller <davem@davemloft.net> |
151 | Ian Lance Taylor <iant@google.com> | |
152 | ||
153 | * options.h (General_options): Add entries for '-Y' and | |
154 | '-relax'. | |
155 | * options.cc (General_options:finalize): If -Y was used, add those | |
156 | entries to the library path instead of the default "/lib" and | |
157 | "/usr/lib". | |
158 | ||
7c98e6bb DM |
159 | 2008-04-11 David S. Miller <davem@davemloft.net> |
160 | ||
161 | * testsuite/justsyms.t: Start at 0x100. | |
162 | * testsuite/justsyms_1.cc: Adjust justsyms_string assertion. | |
83bfb6b7 ILT |
163 | * testsuite/script_test_2b.cc (script_test_string_b): Make 8 bytes |
164 | long. | |
165 | * testsuite/script_test_2.cc: Adjust string and section length | |
166 | checks. | |
7c98e6bb | 167 | |
99a37bfd ILT |
168 | 2008-04-09 Ian Lance Taylor <iant@google.com> |
169 | ||
2cefc357 ILT |
170 | PR gold/5996 |
171 | * script-sections.cc (Sections_element::allocate_to_segment): Add | |
172 | orphan parameter. | |
173 | (Output_section_definition::allocate_to_segment): Likewise. | |
174 | (Orphan_output_section::allocate_to_segment): Likewise. | |
175 | (Script_sections::attach_sections_using_phdrs_clause): Don't | |
176 | propagate non-PT_LOAD segments to orphan sections. | |
177 | * testsuite/Makefile.am (script_test_3.stdout): Generate using | |
178 | readelf rather than objdump. | |
179 | * testsuite/script_test_3.sh: Adjust accordingly. Test that | |
180 | .interp section and PT_INTERP segment are the same size. | |
181 | * testsuite/Makefile.in: Rebuild. | |
182 | ||
99a37bfd ILT |
183 | * symtab.cc (Symbol_table::add_from_dynobj): Only look for weak |
184 | aliases for symbols defined in the same object. | |
185 | * testsuite/Makefile.am (check_PROGRAMS): Add weak_alias_test. | |
186 | (weak_alias_test_SOURCES): New variable. | |
187 | (weak_alias_test_DEPENDENCIES): New variable. | |
188 | (weak_alias_test_LDFLAGS): New variable. | |
189 | (weak_alias_test_LDADD): New variable. | |
190 | (weak_alias_test_1_pic.o, weak_alias_test_1.so): New targets. | |
191 | (weak_alias_test_2_pic.o, weak_alias_test_2.so): New targets. | |
192 | (weak_alias_test_3.o): New target. | |
193 | (weak_alias_test_4_pic.o, weak_alias_test_4.so): New targets. | |
194 | * testsuite/weak_alias_test_main.cc: New file. | |
195 | * testsuite/weak_alias_test_1.cc: New file. | |
196 | * testsuite/weak_alias_test_2.cc: New file. | |
197 | * testsuite/weak_alias_test_3.cc: New file. | |
198 | ||
780e49c5 ILT |
199 | 2008-04-08 Ian Lance Taylor <iant@google.com> |
200 | ||
cdb0b8f5 ILT |
201 | * options.h (class General_options): Add --noinhibit-exec option. |
202 | * main.cc (main): Check --noinhibit-exec. | |
203 | ||
0864d551 ILT |
204 | * options.h (class General_options): Define --wrap as a special |
205 | option. Add wrap_symbols_ field. | |
206 | (General_options::any_wrap_symbols): New function. | |
207 | (General_options::is_wrap_symbol): New function. | |
208 | * options.cc (General_options::parse_wrap): New function. | |
209 | (General_options::General_options): Initialize wrap_symbols_. | |
210 | * symtab.cc (Symbol_table::wrap_symbol): New function. | |
211 | (Symbol_table::add_from_object): Handle --wrap. | |
212 | * symtab.h (class Symbol_table): Declare wrap_symbol. | |
213 | * target.h (Target::wrap_char): New function. | |
214 | (Target::Target_info): Add wrap_char field. | |
215 | * i386.cc (Target_i386::i386_info): Initialize wrap_char. | |
216 | * x86_64.cc (Target_x86_64::x86_64_info): Likewise. | |
217 | * testsuite/testfile.cc (Target_test::test_target_info): | |
218 | Likewise. | |
219 | ||
789aa6de ILT |
220 | * errors.cc (Errors::undefined_symbol): Mention symbol version if |
221 | there is one. | |
222 | ||
2c38906f ILT |
223 | * layout.h (class Layout): Add added_eh_frame_data_ field. |
224 | * layout.cc (Layout::Layout): Initialize new field. | |
225 | (Layout::layout_eh_frame): Don't add eh_frame_data_ to .eh_frame | |
226 | output section until we find a section we merged successfully. | |
227 | * object.cc (Sized_relobj::check_eh_frame_flags): Don't require | |
228 | that the size be non-zero. | |
229 | ||
780e49c5 ILT |
230 | * merge.cc (Object_merge_map::get_output_offset): Remove inline |
231 | qualifier. | |
232 | ||
7fcd0256 ILT |
233 | 2008-04-08 Craig Silverstein <csilvers@google.com> |
234 | ||
235 | * configure.ac: Export new conditional variable HAVE_ZLIB. | |
236 | * testsuite/Makefile.am (flagstest_o_specialfile): Condition | |
237 | on HAVE_ZLIB. | |
238 | (flagstest_o_specialfile_and_compress_debug_sections): Likewise. | |
239 | * configure, Makefile.in, testsuite/Makefile.in: Rebuild. | |
240 | ||
6835af53 ILT |
241 | 2008-04-07 Ian Lance Taylor <iant@google.com> |
242 | ||
e24f324c ILT |
243 | * version.cc (version_string): Set to "1.5". |
244 | ||
a036edd8 ILT |
245 | * x86_64.cc (Target_x86_64::Scan): Change from struct to class. |
246 | Add issued_non_pic_error_ field. Declare check_non_pic. | |
247 | (Target_x86_64::Scan::check_non_pic): New function. | |
248 | (Target_x86_64::Scan::local): Call check_non_pic as appropriate. | |
249 | (Target_x86_64::Scan::global): Likewise. | |
250 | ||
624f8810 ILT |
251 | * output.cc (Output_reloc<SHT_REL>::local_section_offset): Add |
252 | addend parameter. Change caller. Handle merge sections. | |
253 | (Output_reloc<SHT_REL>::symbol_value): Change parameter type from | |
254 | Address to Addend. Don't add in the result of | |
255 | local_section_offset, pass down the addend and use the returned | |
256 | value. | |
257 | * output.h (class Output_reloc<SHT_REL>): Add Addend typedef. | |
258 | Update declarations of local_section_offset and symbol_value. | |
259 | * testsuite/two_file_test_1.cc (t18): New function. | |
260 | * testsuite/two_file_test_2.cc (f18): New function. | |
261 | * testsuite/two_file_test_main.cc (main): Call t18. | |
262 | * testsuite/two_file_test.h (t18, f18): Declare. | |
263 | ||
6835af53 ILT |
264 | * configure.ac: Don't test for objdump, c++filt, or readelf. |
265 | * testsuite/Makefile.am: Remove READELF and OBJDUMP_AND_CPPFILT | |
266 | conditionals. | |
267 | (TEST_READELF): New variable. | |
268 | (TEST_OBJDUMP, TEST_CXXFILT, TEST_STRIP): New variables. | |
269 | (check_PROGRAMS): Add two_file_strip_test. | |
270 | (two_file_strip_test): New target. | |
271 | (check_PROGRAMS): Add two_file_same_shared_strip_test. | |
272 | (two_file_same_shared_strip_test_SOURCES): New variable. | |
273 | (two_file_same_shared_strip_test_DEPENDENCIES): New variable. | |
274 | (two_file_same_shared_strip_test_LDFLAGS): New variable. | |
275 | (two_file_same_shared_strip_test_LDADD): New variable. | |
276 | (two_file_shared_strip.so): New target. | |
277 | (ver_test_2.syms, ver_test_4.syms): Use TEST_READELF. | |
278 | (ver_test_5.syms, ver_test_7.syms): Likewise. | |
279 | (ver_matching_test.stdout): Use TEST_OBJDUMP and TEST_CXXFILT. | |
280 | (strip_test_3.stdout): Use TEST_OBJDUMP. | |
281 | * configure, Makefile.in, testsuite/Makefile.in: Rebuild. | |
282 | ||
86925eef CC |
283 | 2008-04-04 Cary Coutant <ccoutant@google.com> |
284 | ||
285 | * symtab.h (Symbol::is_weak_undefined): New function. | |
286 | (Symbol::is_strong_undefined): New function. | |
287 | (Symbol::is_absolute): New function. | |
288 | (Symbol::needs_plt_entry): Exclude weak undefined symbols. | |
289 | (Symbol::needs_dynamic_reloc): Exclude weak undefined and | |
290 | absolute symbols. | |
291 | * testsuite/Makefile.am (check_PROGRAMS): Add weak_undef_test. | |
292 | (weak_undef_test): New target. | |
293 | * testsuite/Makefile.in: Rebuild. | |
294 | * testsuite/weak_undef_file1.cc: New file. | |
295 | * testsuite/weak_undef_file2.cc: New file. | |
296 | * testsuite/weak_undef_test.cc: New file. | |
297 | ||
126f3ece ILT |
298 | 2008-04-03 Craig Silverstein <csilvers@google.com> |
299 | ||
300 | * compressed_output.h (class Output_compressed_section): Use | |
301 | unsigned buffer. | |
302 | * compressed_output.cc (zlib_compress): Use unsigned buffers, | |
303 | add zlib header. | |
304 | (zlib_compressed_suffix): Removed. | |
305 | (Output_compressed_section::set_final_data_size): Use unsigned | |
306 | buffers. | |
307 | * testsuite/Makefile.am (flagstest_compress_debug_sections): | |
308 | Fix linker invocation. | |
309 | (flagstest_o_specialfile_and_compress_debug_sections): | |
310 | Likewise. | |
311 | * testsuite/Makefile.in: Regenerated. | |
312 | ||
deae2a14 DM |
313 | 2008-04-02 David S. Miller <davem@davemloft.net> |
314 | ||
315 | * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog, | |
316 | Sized_dwarf_line_info::process_one_opcode): Use Swap_unaligned. | |
317 | ||
70752818 ILT |
318 | 2008-04-02 Craig Silverstein <csilvers@google.com> |
319 | ||
320 | * TODO: New file. | |
321 | ||
39d0cb0e ILT |
322 | 2008-04-02 Ian Lance Taylor <iant@google.com> |
323 | ||
324 | * fileread.cc (File_read::find_view): Add byteshift and vshifted | |
325 | parameters. Update for new key type to views_. Change all | |
326 | callers. | |
327 | (File_read::read): Adjust for byteshift in returned view. | |
328 | (File_read::add_view): New function, broken out of | |
329 | find_and_make_view. | |
330 | (File_read::make_view): New function, broken out of | |
331 | find_and_make_view. | |
332 | (File_read::find_or_make_view): Add offset and aligned | |
333 | parameters. Rewrite accordingly. Change all callers. | |
334 | (File_read::get_view): Add offset and aligned parameters. Adjust | |
335 | for byteshift in return value. | |
336 | (File_read::get_lasting_view): Likewise. | |
337 | * fileread.h (class File_read): Update declarations. | |
338 | (class File_read::View): Add byteshift_ field. Add byteshift to | |
339 | constructor. Add byteshift method. | |
340 | * archive.h (Archive::clear_uncached_views): New function. | |
341 | (Archive::get_view): Add aligned parameter. Change all callers. | |
342 | * object.h (Object::get_view): Add aligned parameter. Change all | |
343 | callers. | |
344 | (Object::get_lasting_view): Likewise. | |
345 | ||
346 | * fileread.cc (File_read::release): Don't call clear_views if | |
347 | there are multiple objects. | |
348 | * fileread.h (File_read::clear_uncached_views): New function. | |
349 | * archive.cc (Add_archive_symbols::run): Call clear_uncached_views | |
350 | on the archive. | |
351 | ||
a1207466 CC |
352 | 2008-03-31 Cary Coutant <ccoutant@google.com> |
353 | ||
354 | Add thin archive support. | |
355 | * archive.cc (Archive::armagt): New const. | |
356 | (Archive::setup): Remove task parameter and calls to unlock. | |
357 | (Archive::unlock_nested_archives): New function. | |
358 | (Archive::read_header): Add nested_off parameter. Change | |
359 | all callers. | |
360 | (Archive::interpret_header): Likewise. | |
361 | (Archive::include_all_members): Change to handle thin | |
362 | archives. | |
363 | (Archive::include_member): Likewise. | |
364 | * archive.h (Archive::Archive): Add new parameters and | |
365 | initializers. | |
366 | (Archive::armagt): New const. | |
367 | (Archive::setup): Remove task parameter. | |
368 | (Archive::unlock_nested_archives): New function. | |
369 | (Archive::read_header): Add nested_off parameter. | |
370 | (Archive::interpret_header): Likewise. | |
371 | (Archive::Nested_archive_table): New typedef. | |
372 | (Archive::is_thin_archive_): New field. | |
373 | (Archive::nested_archives_): New field. | |
374 | (Archive::options_): New field. | |
375 | (Archive::dirpath_): New field. | |
376 | (Archive::task_): New field. | |
377 | * readsyms.cc (Read_symbols::do_read_symbols): Add check | |
378 | for thin archives. Pass additional parameters to | |
379 | Archive::Archive. Unlock the archive file after calling | |
380 | Archive::setup. | |
381 | ||
479f6503 ILT |
382 | 2008-03-29 Ian Lance Taylor <iant@google.com> |
383 | ||
686c8caf ILT |
384 | * symtab.cc (Symbol_table::do_define_as_constant): Don't force a |
385 | version symbol to be local. | |
386 | * testsuite/ver_test_4.sh: New file. | |
387 | * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_4.sh. | |
388 | (check_DATA): Add ver_test_4.syms. | |
389 | (ver_test_4.syms): New target. | |
390 | * testsuite/Makefile.in: Rebuild. | |
391 | ||
ab794b6b ILT |
392 | * output.cc |
393 | (Output_section::Input_section_sort_entry::has_priority): New | |
394 | function. | |
395 | (Output_section::Input_section_sort_entry::match_file_name): New | |
396 | function. | |
397 | (Output_section::Input_section_sort_entry::match_section_name): | |
398 | Remove. | |
399 | (Output_section::Input_section_sort_entry::match_section_name_prefix): | |
400 | Remove. | |
401 | (Output_section::Input_section_sort_entry::match_section_file): | |
402 | Remove. | |
403 | (Output_section::Input_section_sort_compare::operator()): Rewrite | |
404 | using new Input_section_sort_entry functions. Sort crtbegin and | |
405 | crtend first. Sort sections with no priority before sections with | |
406 | a priority. | |
407 | * testsuite/initpri1.c (d3): Check j != 4. | |
408 | (cd5): New constructor/destructor function. | |
409 | (main): Check j != 2. | |
410 | ||
479f6503 ILT |
411 | * symtab.cc (Symbol_table::add_from_object): If we don't use the |
412 | new symbol when resolving, don't call set_is_default. | |
413 | * testsuite/ver_test_7.cc: New file. | |
414 | * testsuite/ver_test_7.sh: New file. | |
415 | * testsuite/Makefile.am (ver_test_7.so): New target. | |
416 | (ver_test_7.o): New target. | |
417 | (check_SCRIPTS): Add ver_test_7.sh. | |
418 | (check_DATA): Add ver_test_7.syms. | |
419 | (ver_test_7.syms): New target. | |
420 | ||
2fd32231 ILT |
421 | 2008-03-28 Ian Lance Taylor <iant@google.com> |
422 | ||
423 | * layout.cc (Layout::layout): If we see an input section with a | |
424 | name that needs sorting, set the must_sort flag for the output | |
425 | section. | |
426 | (Layout::make_output_section): If the name of the output section | |
427 | indicates that it might require sorting, set the may_sort flag. | |
428 | * output.h (Output_section::may_sort_attached_input_sections): New | |
429 | function. | |
430 | (Output_section::set_may_sort_attached_input_sections): New | |
431 | function. | |
432 | (Output_section::must_sort_attached_input_sections): New | |
433 | function. | |
434 | (Output_section::set_must_sort_attached_input_sections): New | |
435 | function. | |
436 | (class Output_section): Declare Input_section_sort_entry. Define | |
437 | Input_section_sort_compare. Declare | |
438 | sort_attached_input_sections. Add new fields: | |
439 | may_sort_attached_input_sections_, | |
440 | must_sort_attached_input_sections_, | |
441 | attached_input_sections_are_sorted_. | |
442 | * output.cc (Output_section::Output_section): Initialize new | |
443 | fields. | |
444 | (Output_section::add_input_section): Add an entry to | |
445 | input_sections_ if may_sort or must_sort are true. | |
446 | (Output_section::set_final_data_size): Call | |
447 | sort_attached_input_sections if necessary. | |
448 | (Output_section::Input_section_sort_entry): Define new class. | |
449 | (Output_section::Input_section_sort_compare::operator()): New | |
450 | function. | |
451 | (Output_section::sort_attached_input_sections): New function. | |
452 | * configure.ac: Check whether the compiler supports constructor | |
453 | priorities. Define a CONSTRUCTOR_PRIORITY automake conditional. | |
454 | * testsuite/initpri1.c: New file. | |
455 | * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if | |
456 | CONSTRUCTOR_PRIORITY. | |
457 | (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables. | |
458 | (initpri1_LDFLAGS): New variable. | |
459 | * configure, Makefile.in, testsuite/Makefile.in: Rebuild. | |
460 | ||
18e6b24e ILT |
461 | 2008-03-27 Ian Lance Taylor <iant@google.com> |
462 | ||
49bdd526 ILT |
463 | * common.cc (Sort_commons::operator): Correct sorting algorithm. |
464 | * testsuite/common_test_1.c: New file. | |
465 | * testsuite/Makefile.am (check_PROGRAMS): Add common_test_1. | |
466 | (common_test_1_SOURCES): New variable. | |
467 | (common_test_1_DEPENDENCIES): New variable. | |
468 | (common_test_1_LDFLAGS): New variable. | |
469 | ||
18e6b24e ILT |
470 | * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_ |
471 | and commons_ correctly when NAME/VERSION does not override | |
472 | NAME/NULL. | |
473 | * testsuite/ver_test_6.c: New file. | |
474 | * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6 | |
475 | (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables. | |
476 | (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables. | |
477 | ||
04bf7072 ILT |
478 | 2008-03-26 Ian Lance Taylor <iant@google.com> |
479 | ||
5871526f ILT |
480 | * symtab.cc (Symbol_table::add_from_relobj): Don't set the version |
481 | of an undefined symbol from a version script. | |
482 | * testsuite/Makefile.am (ver_test_5.so): New target. | |
483 | (ver_test_5.o): New target. | |
484 | (check_SCRIPTS): Add ver_test_5.sh. | |
485 | (check_DATA): Add ver_test_5.syms. | |
486 | (ver_test_5.syms): New target. | |
487 | * testsuite/ver_test_5.cc: New file. | |
488 | * testsuite/ver_test_5.script: New file. | |
489 | * testsuite/ver_test_5.sh: New file. | |
490 | * Makefile.in, testsuite/Makefile.in: Rebuild. | |
491 | ||
04bf7072 ILT |
492 | PR gold/5986 |
493 | Fix problems building gold with gcc 4.3.0. | |
494 | * gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define. | |
495 | (gold_error_at_location, gold_warning_at_location): Use it. | |
496 | * configure.ac: Check whether we can compile and use a template | |
497 | function with a printf attribute. | |
498 | * x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value | |
499 | when jumping over bytes. | |
500 | * object.cc: Instantiate Object::read_section_data. | |
501 | * debug.h: Include <cstring> | |
502 | * dwarf_reader.cc: Include <algorithm> | |
503 | * main.cc: Include <cstring>. | |
504 | * options.cc: Include <cstring>. | |
505 | * output.cc: Include <cstring>. | |
506 | * script.cc: Include <cstring>. | |
507 | * script.h: Include <string>. | |
508 | * symtab.cc: Include <cstring> and <algorithm>. | |
509 | * target-select.cc: Include <cstring>. | |
510 | * version.cc: Include <string>. | |
511 | * testsuite/testmain.cc: Include <cstdlib>. | |
512 | * configure, config.in: Rebuild. | |
513 | ||
874c5b28 ILT |
514 | 2008-03-25 Ian Lance Taylor <iant@google.com> |
515 | ||
819d6c3a ILT |
516 | * options.cc: Include "../bfd/bfdver.h". |
517 | (options::help): Print bug reporting address. | |
518 | ||
f4b2c6f5 ILT |
519 | * version.cc (print_version): Adjust output for current value of |
520 | BFD_VERSION_STRING. | |
521 | ||
522 | * NEWS: New file. | |
523 | ||
e96caa79 ILT |
524 | * options.cc (options::help): Print list of supported targets. |
525 | * target-select.h: Include <vector>. | |
526 | (class Target_selector): Make machine_, size_, and is_big_endian_ | |
527 | fields const. Add bfd_name_ and instantiated_target_ fields. | |
528 | (Target_selector::Target_selector): Add bfd_name parameter. | |
529 | (Target_selector::recognize): Make non-virtual, call | |
530 | do_recognize. | |
531 | (Target_selector::recognize_by_name): Make non-virtual, call | |
532 | do_recognize_by_name. | |
533 | (Target_selector::supported_names): New function. | |
534 | (Target_selector::bfd_name): New function. | |
535 | (Target_selector::do_instantiate_target): New pure virtual | |
536 | function. | |
537 | (Target_selector::do_recognize): New virtual function. | |
538 | (Target_selector::do_recognize_by_name): New virtual function. | |
539 | (Target_selector::instantiate_target): New private function. | |
540 | (supported_target_names): Declare. | |
541 | * target-select.cc (Target_selector::Target_selector): Update for | |
542 | new parameter and fields. | |
543 | (select_target_by_name): Check that the name matches before | |
544 | calling recognize_by_name. | |
545 | (supported_target_names): New function. | |
546 | * i386.cc (class Target_selector_i386): Update Target_selector | |
547 | constructor call. Remove recognize and recognize_by_name. Add | |
548 | do_instantiate_target. | |
549 | * x86_64.cc (class Target_selector_x86_64): Likewise. | |
550 | * testsuite/testfile.cc (class Target_selector_test): Update for | |
551 | changes to Target_selector. | |
552 | ||
874c5b28 ILT |
553 | * README: Rewrite, with some notes on unsupported features. |
554 | ||
0a65a3a7 CC |
555 | 2008-03-24 Cary Coutant <ccoutant@google.com> |
556 | ||
557 | * i386.cc (Target_i386::Got_type): New enum declaration. | |
558 | (Target_i386::Scan::local): Updated callers of Output_data_got | |
559 | member functions. | |
560 | (Target_i386::Scan::global): Likewise. | |
561 | (Target_i386::Relocate::relocate): Likewise. | |
562 | (Target_i386::Relocate::relocate_tls): Likewise. | |
563 | * object.h (Got_offset_list): New class. | |
564 | (Sized_relobj::local_has_got_offset): Added got_type parameter. | |
565 | (Sized_relobj::local_got_offset): Likewise. | |
566 | (Sized_relobj::set_local_got_offset): Likewise. | |
567 | (Sized_relobj::local_has_tls_got_offset): Removed. | |
568 | (Sized_relobj::local_tls_got_offset): Removed. | |
569 | (Sized_relobj::set_local_tls_got_offset): Removed. | |
570 | (Sized_relobj::Local_got_offsets): Changed to store a list of offsets. | |
571 | * output.cc (Output_data_got::add_global): Added got_type parameter. | |
572 | (Output_data_got::add_global_with_rel): Likewise. | |
573 | (Output_data_got::add_global_with_rela): Likewise. | |
574 | (Output_data_got::add_global_pair_with_rel): New function. | |
575 | (Output_data_got::add_global_pair_with_rela): New function. | |
576 | (Output_data_got::add_local): Added got_type parameter. | |
577 | (Output_data_got::add_local_with_rel): Likewise. | |
578 | (Output_data_got::add_local_with_rela): Likewise. | |
579 | (Output_data_got::add_local_pair_with_rel): New function. | |
580 | (Output_data_got::add_local_pair_with_rela): New function. | |
581 | (Output_data_got::add_global_tls): Removed. | |
582 | (Output_data_got::add_global_tls_with_rel): Removed. | |
583 | (Output_data_got::add_global_tls_with_rela): Removed. | |
584 | (Output_data_got::add_local_tls): Removed. | |
585 | (Output_data_got::add_local_tls_with_rel): Removed. | |
586 | (Output_data_got::add_local_tls_with_rela): Removed. | |
587 | * output.h (Output_data_got::add_global): Added got_type parameter. | |
588 | (Output_data_got::add_global_with_rel): Likewise. | |
589 | (Output_data_got::add_global_with_rela): Likewise. | |
590 | (Output_data_got::add_global_pair_with_rel): New function. | |
591 | (Output_data_got::add_global_pair_with_rela): New function. | |
592 | (Output_data_got::add_local): Added got_type parameter. | |
593 | (Output_data_got::add_local_with_rel): Likewise. | |
594 | (Output_data_got::add_local_with_rela): Likewise. | |
595 | (Output_data_got::add_local_pair_with_rel): New function. | |
596 | (Output_data_got::add_local_pair_with_rela): New function. | |
597 | (Output_data_got::add_global_tls): Removed. | |
598 | (Output_data_got::add_global_tls_with_rel): Removed. | |
599 | (Output_data_got::add_global_tls_with_rela): Removed. | |
600 | (Output_data_got::add_local_tls): Removed. | |
601 | (Output_data_got::add_local_tls_with_rel): Removed. | |
602 | (Output_data_got::add_local_tls_with_rela): Removed. | |
603 | * resolve.cc (Symbol::override_base_with_special): Removed | |
604 | reference to has_got_offset_ field. | |
605 | * symtab.cc (Symbol::init_fields): Replaced initialization | |
606 | of got_offset_ with got_offsets_. Removed initialization | |
607 | of has_got_offset_ | |
53fcba31 | 608 | * symtab.h (Symbol::has_got_offset): Aded got_type parameter. |
0a65a3a7 CC |
609 | (Symbol::got_offset): Likewise. |
610 | (Symbol::set_got_offset): Likewise. | |
611 | (Symbol::has_tls_got_offset): Removed. | |
612 | (Symbol::tls_got_offset): Removed. | |
613 | (Symbol::set_tls_got_offset): Removed. | |
614 | (Symbol::got_offset_): Removed. | |
615 | (Symbol::tls_mod_got_offset_): Removed. | |
616 | (Symbol::tls_pair_got_offset_): Removed. | |
617 | (Symbol::got_offsets_): New field. | |
618 | (Symbol::has_got_offset): Removed. | |
619 | (Symbol::has_tls_mod_got_offset): Removed. | |
620 | (Symbol::has_tls_pair_got_offset): Removed. | |
621 | * x86_64.cc (Target_x86_64::Got_type): New enum declaration. | |
622 | (Target_x86_64::Scan::local): Updated callers of Output_data_got | |
623 | member functions. | |
624 | (Target_x86_64::Scan::global): Likewise. | |
625 | (Target_x86_64::Relocate::relocate): Likewise. | |
626 | (Target_x86_64::Relocate::relocate_tls): Likewise. | |
627 | ||
bd52eafb BE |
628 | 2008-03-25 Ben Elliston <bje@au.ibm.com> |
629 | ||
630 | * yyscript.y: Fix spelling error in comment. | |
631 | ||
8b105e34 ILT |
632 | 2008-03-24 Ian Lance Taylor <iant@google.com> |
633 | ||
8ed814a9 ILT |
634 | * options.h (class General_options): Define build_id option. |
635 | * layout.h (class Layout): Declare write_build_id, create_note, | |
636 | create_build_id. Add build_id_note_ member. | |
637 | * layout.cc: Include <cerrno>, <fcntl.h>, <unistd.h>, | |
638 | "libiberty.h", "md5.h", "sha1.h". | |
639 | (Layout::Layout): Initialize eh_frame_data_, | |
640 | eh_frame_hdr_section_, and build_id_note_. | |
641 | (Layout::finalize): Call create_build_id. | |
642 | (Layout::create_note): New function, broken out of | |
643 | Layout::create_gold_note. | |
644 | (Layout::create_gold_note): Call create_note. | |
645 | (Layout::create_build_id): New function. | |
646 | (Layout::write_build_id): New function. | |
647 | (Close_task_runner::run): Call write_build_id. | |
648 | ||
8b105e34 ILT |
649 | * x86_64.cc: Correct license to GPLv3. |
650 | ||
086a1841 ILT |
651 | 2008-03-23 Ian Lance Taylor <iant@google.com> |
652 | ||
653 | * options.cc: Include "demangle.h". | |
654 | (parse_optional_string): New function. | |
655 | (parse_long_option): Handle takes_optional_argument. | |
656 | (parse_short_option): Update dash_z initializer. Handle | |
657 | takes_optional_argument. | |
658 | (General_options::General_options): Initialize do_demangle_. | |
659 | (General_options::finalize): Set do_demangle_. Handle demangling | |
660 | style. | |
661 | * options.h (parse_optional_string): Declare. | |
662 | (struct One_option): Add optional_arg field. Update constructor. | |
663 | Update call constructor calls. Add takes_optional_argument | |
664 | function. | |
665 | (DEFINE_var): Add optional_arg__ parameter. Change all callers. | |
666 | (DEFINE_optional_string): Define. | |
667 | (General_options::demangle): Change from DEFINE_bool to | |
668 | DEFINE_optional_string. | |
669 | (General_options::no_demangle): New function. | |
670 | (General_options::do_demangle): New function. | |
671 | (General_options::set_do_demangle): New function. | |
672 | (General_options::execstack_status_): Move definition to end of | |
673 | class definition. | |
674 | (General_options::static_): Likewise. | |
675 | (General_options::do_demangle_): New field. | |
676 | * object.cc (big_endian>::get_symbol_location_info): Call | |
677 | Options::do_demangle, not Options::demangle. | |
678 | * symtab.cc (demangle): Likewise. | |
679 | ||
cbb93e63 ILT |
680 | 2008-03-22 Ian Lance Taylor <iant@google.com> |
681 | ||
682 | * gold.h: Include <cstddef> and <sys/types.h> | |
683 | * options.h: Include <cstring>. | |
684 | ||
ec531623 ILT |
685 | 2008-03-21 Ian Lance Taylor <iant@google.com> |
686 | ||
687 | * Added source code to GNU binutils. | |
688 |