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