Fix improper handling of R_SPARC_GOTDATA_OP_LOX10 relocation.
[deliverable/binutils-gdb.git] / gold / ChangeLog
1 2016-08-10 James Clarke <jrtc27@jrtc27.com>
2
3 PR gold/20442
4 * sparc.cc (Target_sparc::Relocate::relocate): R_SPARC_GOTDATA_OP_LOX10
5 should fall back on R_SPARC_GOT10, not R_SPARC_GOT13.
6
7 2016-08-10 James Clarke <jrtc27@jrtc27.com>
8
9 PR gold/20441
10 * sparc.cc (Target_sparc::Scan::check_non_pic): Allow R_SPARC_32 on
11 sparc64.
12
13 2016-06-29 Cary Coutant <ccoutant@gmail.com>
14
15 PR gold/20310
16 * testsuite/dynamic_list.sh: Remove check for _ZdlPv.
17
18 2016-06-29 Cary Coutant <ccoutant@gmail.com>
19
20 * testsuite/Makefile.am (MOSTLYCLEANFILES): Add eh_test_2.
21 * testsuite/Makefile.in: Regenerate.
22
23 2016-06-30 Alan Modra <amodra@gmail.com>
24
25 * testsuite/Makefile.am (memory_test, memory_test_2): Pass
26 -Wl,-z to gcc, not plain -z.
27 * testsuite/Makefile.in: Regenerate.
28
29 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
30
31 PR gold/20308
32 * i386.cc (Target_i386::Relocate::relocate): Allow
33 R_386_GOT32X relocation against ___tls_get_addr.
34 (Target_i386::Relocate::tls_gd_to_ie): Support indirect
35 call to __tls_get_addr.
36 (Target_i386::Relocate::tls_gd_to_le): Likewise.
37 (Target_i386::Relocate::tls_ld_to_le): Likewise.
38 * testsuite/Makefile.am (check_PROGRAMS): Add pr20308a_test,
39 pr20308b_test, pr20308c_test, pr20308d_test, pr20308e_test.
40 (pr20308a_test_SOURCES): New.
41 (pr20308a_test_DEPENDENCIES): Likewise.
42 (pr20308a_test_CFLAGS): Likewise.
43 (pr20308a_test_LDFLAGS): Likewise.
44 (pr20308a_test_LDADD): Likewise.
45 (pr20308b_test_SOURCES): Likewise.
46 (pr20308b_test_DEPENDENCIES): Likewise.
47 (pr20308b_test_CFLAGS): Likewise.
48 (pr20308b_test_LDFLAGS): Likewise.
49 (pr20308b_test_LDADD): Likewise.
50 (pr20308c_test_SOURCES): Likewise.
51 (pr20308c_test_DEPENDENCIES): Likewise.
52 (pr20308c_test_CFLAGS): Likewise.
53 (pr20308c_test_LDFLAGS): Likewise.
54 (pr20308c_test_LDADD): Likewise.
55 (pr20308d_test_SOURCES): Likewise.
56 (pr20308d_test_DEPENDENCIES): Likewise.
57 (pr20308d_test_CFLAGS): Likewise.
58 (pr20308d_test_LDFLAGS): Likewise.
59 (pr20308d_test_LDADD): Likewise.
60 (pr20308e_test_SOURCES): Likewise.
61 (pr20308e_test_DEPENDENCIES): Likewise.
62 (pr20308e_test_CFLAGS): Likewise.
63 (pr20308e_test_LDFLAGS): Likewise.
64 (pr20308e_test_LDADD): Likewise.
65 (pr20308a.so): Likewise.
66 (pr20308b.so): Likewise.
67 (pr20308_gd.o): Likewise.
68 (pr20308_ld.o): Likewise.
69 (MOSTLYCLEANFILES): Add pr20308a.so pr20308b.so.
70 * testsuite/Makefile.in: Regenerated.
71 * testsuite/pr20308_def.c: New file.
72 * testsuite/pr20308_gd.S: Likewise.
73 * testsuite/pr20308_ld.S: Likewise.
74 * testsuite/pr20308_main.c: Likewise.
75
76 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
77
78 PR gold/20216
79 * configure.ac (DEFAULT_TARGET_X86_64_OR_X32): New
80 AM_CONDITIONAL.
81 * configure: Regenerated.
82 * x86_64.cc (Target_x86_64<size>::Relocate::relocate): Allow
83 R_X86_64_GOTPCRELX relocation against __tls_get_addr.
84 (Target_x86_64<size>::Relocate::tls_gd_to_ie): Support indirect
85 call to __tls_get_addr.
86 (Target_x86_64<size>::Relocate::tls_gd_to_le): Likewise.
87 (Target_x86_64<size>::Relocate::tls_ld_to_le): Likewise.
88 * testsuite/Makefile.am (check_PROGRAMS): Add pr20216a_test,
89 pr20216b_test, pr20216c_test, pr20216d_test, pr20216e_test.
90 (pr20216a_test_SOURCES): New.
91 (pr20216a_test_DEPENDENCIES): Likewise.
92 (pr20216a_test_CFLAGS): Likewise.
93 (pr20216a_test_LDFLAGS): Likewise.
94 (pr20216a_test_LDADD): Likewise.
95 (pr20216b_test_SOURCES): Likewise.
96 (pr20216b_test_DEPENDENCIES): Likewise.
97 (pr20216b_test_CFLAGS): Likewise.
98 (pr20216b_test_LDFLAGS): Likewise.
99 (pr20216b_test_LDADD): Likewise.
100 (pr20216c_test_SOURCES): Likewise.
101 (pr20216c_test_DEPENDENCIES): Likewise.
102 (pr20216c_test_CFLAGS): Likewise.
103 (pr20216c_test_LDFLAGS): Likewise.
104 (pr20216c_test_LDADD): Likewise.
105 (pr20216d_test_SOURCES): Likewise.
106 (pr20216d_test_DEPENDENCIES): Likewise.
107 (pr20216d_test_CFLAGS): Likewise.
108 (pr20216d_test_LDFLAGS): Likewise.
109 (pr20216d_test_LDADD): Likewise.
110 (pr20216e_test_SOURCES): Likewise.
111 (pr20216e_test_DEPENDENCIES): Likewise.
112 (pr20216e_test_CFLAGS): Likewise.
113 (pr20216e_test_LDFLAGS): Likewise.
114 (pr20216e_test_LDADD): Likewise.
115 (pr20216a.so): Likewise.
116 (pr20216b.so): Likewise.
117 (pr20216_gd.o): Likewise.
118 (pr20216_ld.o): Likewise.
119 (MOSTLYCLEANFILES): Add pr20216a.so pr20216b.so.
120 * testsuite/Makefile.in: Regenerated.
121 * testsuite/pr20216_def.c: New file.
122 * testsuite/pr20216_gd.S: Likewise.
123 * testsuite/pr20216_ld.S: Likewise.
124 * testsuite/pr20216_main.c: Likewise.
125
126 2016-06-29 Alan Modra <amodra@gmail.com>
127
128 * script_test_12.t: Delete .plt, specify 64k page size.
129 * script_test_12i.t: Likewise.
130
131 2016-06-29 Alan Modra <amodra@gmail.com>
132
133 * testsuite/plugin_layout_with_alignment.c: Explicitly align all
134 variables.
135
136 2016-06-29 Alan Modra <amodra@gmail.com>
137
138 * testsuite/Makefile.am (copy_test_protected): Disable for powerpc.
139 * testsuite/Makefile.in: Regenerate.
140
141 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
142
143 * aarch64-reloc.def (NONE): New relocation.
144 * aarch64.cc (Target_aarch64::Scan::local): Handle R_AARCH64_NONE.
145 (Target_aarch64::Scan::global): Likewise.
146 * testsuite/Makefile.am (aarch64_reloc_none): New test.
147 * testsuite/Makefile.in: Regenerate.
148 * testsuite/aarch64_reloc_none.s: New test source file.
149 * testsuite/aarch64_reloc_none.sh: New test script.
150
151 2016-06-28 Sriraman Tallam <tmsriram@google.com>
152
153 * x86_64.cc (Lazy_view): New class.
154 (can_convert_mov_to_lea): Templatize function. Make the function
155 check for appropriate relocation types and use the view parameter
156 to get section contents.
157 (can_convert_callq_to_direct): New function.
158 (Target_x86_64<size>::Scan::global): Refactor.
159 (Target_x86_64<size>::Relocate::relocate): Refactor. Change any indirect
160 call via GOT that can be converted.
161 * testsuite/Makefile.am (x86_64_indirect_call_to_direct.sh): New test.
162 * testsuite/Makefile.in: Regenerate.
163 * testsuite/x86_64_indirect_call_to_direct1.s: New file.
164 * testsuite/x86_64_indirect_jump_to_direct1.s: New file.
165
166 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
167
168 * aarch64.cc (Target_aarch64::Scan::local): Move the call to got_section
169 from the top level to the places of its use.
170
171 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
172
173 PR gold/18098
174 * script-c.h (Sort_wildcard): Add SORT_WILDCARD_BY_INIT_PRIORITY.
175 * script-sections.cc (Input_section_sorter::get_init_priority): New method.
176 (Input_section_sorter::operator()): Handle SORT_WILDCARD_BY_INIT_PRIORITY.
177 (Output_section_element_input::print): Likewise.
178 * script.cc (script_keyword_parsecodes): Add entry SORT_BY_INIT_PRIORITY.
179 * yyscript.y (SORT_BY_INIT_PRIORITY): New token.
180 (wildcard_section): Handle SORT_BY_INIT_PRIORITY.
181
182 * testsuite/Makefile.am (script_test_14): New test.
183 * testsuite/Makefile.in: Regenerate.
184 * testsuite/script_test_14.s: New test source file.
185 * testsuite/script_test_14.sh: New test script.
186 * testsuite/script_test_14.t: New test linker script.
187
188 2016-06-28 James Clarke <jrtc27@jrtc27.com>
189
190 * sparc.cc (Target_sparc::Scan::local): Don't convert R_SPARC_32
191 to R_SPARC_RELATIVE if class is ELFCLASS64.
192 (Target_sparc::Scan::global): Likewise.
193
194 2016-06-23 Cary Coutant <ccoutant@gmail.com>
195 Igor Kudrin <ikudrin@accesssoftek.com>
196
197 PR gold/15370
198 * script-sections.cc
199 (Output_section_element_input::set_section_addresses): Keep bin_count
200 separate from input_pattern_count.
201 * testsuite/script_test_12.t: Add another section .x4.
202 * testsuite/script_test_12i.t: Likewise.
203 * testsuite/script_test_12a.c: Likewise.
204 * testsuite/script_test_12b.c: Likewise.
205
206 2016-06-23 Igor Kudrin <ikudrin@accesssoftek.com>
207
208 * gold-threads.cc (impl_threads::Lock_impl_threads): Fix typos.
209
210 2016-06-22 H.J. Lu <hongjiu.lu@intel.com>
211
212 PR ld/20283
213 * NEWS: Mention --enable-relro.
214 * configure.ac: Add --enable-relro.
215 (DEFAULT_LD_Z_RELRO): New. Set by --enable-relro and default
216 to 1.
217 * config.in: Regenerated.
218 * configure: Likewise.
219 * options.h (General_options::relro): Default to
220 DEFAULT_LD_Z_RELRO.
221
222 2016-06-20 Cary Coutant <ccoutant@gmail.com>
223
224 * NEWS: Add new features in 1.12.
225 * version.cc (version_string): Bump to 1.12.
226
227 2016-06-20 H.J. Lu <hongjiu.lu@intel.com>
228
229 PR gold/20245
230 * i386.cc (Target_i386::first_plt_entry_offset): Return 0 if
231 plt_ is NULL.
232 (Target_i386::plt_entry_size): Likewise.
233 (Target_x86_64<size>::first_plt_entry_offset): Likewise.
234 (Target_x86_64<size>::plt_entry_size): Likewise.
235
236 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
237
238 * mips.cc (Target_mips::Target_mips): Initialize rld_map_.
239 (Target_mips::rld_map_): New data member.
240 (Target_mips::do_finalize_sections): Add support for
241 DT_MIPS_RLD_MAP and DT_MIPS_RLD_MAP_REL dynamic tags,
242 .rld_map section, and __RLD_MAP symbol.
243 (Target_mips::do_dynamic_tag_custom_value): Add support for
244 DT_MIPS_RLD_MAP_REL dynamic tag.
245 * output.cc (Output_data_dynamic::get_entry_offset): New method
246 definition.
247 * output.h (Output_data_dynamic::get_entry_offset): New method
248 declaration.
249
250 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
251
252 * mips.cc (Mips_relocate_functions::relpc16): Add unaligned check.
253
254 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
255
256 * mips.cc (relocation_needs_la25_stub): Add support for relocs:
257 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
258 (hi16_reloc): Add support for R_MIPS_PCHI16 relocation.
259 (is_matching_lo16_reloc): Likewise.
260 (lo16_reloc): Add support for R_MIPS_PCLO16 relocation.
261 (Mips_output_data_plt::plt_entry_r6): New static data member for
262 R6 PLT entry.
263 (Target_mips::is_output_r6): New method.
264 (Target_mips::Mips_mach): Add new enum constants.
265 (Mips_relocate_functions::Status): Likewise.
266 (Mips_relocate_functions::pchi16_relocs): New static data member.
267 (Mips_relocate_functions::relpc21): New method.
268 (Mips_relocate_functions::relpc26): Likewise.
269 (Mips_relocate_functions::relpc18): Likewise.
270 (Mips_relocate_functions::relpc19): Likewise.
271 (Mips_relocate_functions::relpchi16): Likewise.
272 (Mips_relocate_functions::do_relpchi16): Likewise.
273 (Mips_relocate_functions::relpclo16): Likewise.
274 (Mips_output_data_plt::do_write): Add support for Mips r6 plt
275 entry.
276 (Target_mips::mips_32bit_flags): Add E_MIPS_ARCH_32R6 support.
277 (Target_mips::elf_mips_mach): Add E_MIPS_ARCH_32R6 and
278 E_MIPS_ARCH_64R6 support.
279 (Target_mips::update_abiflags_isa): Likewise.
280 (mips_get_size_for_reloc): Add support for relocs: R_MIPS_PCHI16,
281 R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3 and
282 R_MIPS_PC19_S2.
283 (Target_mips::Scan::local): Add support for relocs: R_MIPS_PCHI16
284 and R_MIPS_PCLO16.
285 (Target_mips::Scan::global): Add support for relocs:
286 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
287 (Target_mips::Relocate::relocate): Call functions for resolving
288 Mips32r6 and Mips64r6 relocations, and print error message for
289 STATUS_PCREL_UNALIGNED.
290 (Target_mips::Scan::get_reference_flags): Add support for relocs:
291 R_MIPS_PCHI16, R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2,
292 R_MIPS_PC18_S3 and R_MIPS_PC19_S2.
293 (Target_mips::elf_mips_mach_name): Add E_MIPS_ARCH_32R6 and
294 E_MIPS_ARCH_64R6 support.
295
296 2016-06-13 H.J. Lu <hongjiu.lu@intel.com>
297
298 PR gold/20246
299 * testsuite/script_test_2.t: Add .got.plt after .got.
300
301 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
302
303 * mips.cc (struct Mips_abiflags): New struct.
304 (Mips_relobj::Mips_relobj): Initialize attributes_section_data_
305 and abiflags_.
306 (Mips_relobj::~Mips_relobj): Delete object pointed by
307 attributes_section_data_.
308 (Mips_relobj::abiflags): New method.
309 (Mips_relobj::attributes_section_data): Likewise.
310 (Mips_relobj::attributes_section_data_): New data member.
311 (Mips_relobj::abiflags_): Likewise.
312 (class Mips_output_section_abiflags): New class.
313 (Target_mips::Target_mips): Initialize attributes_section_data_,
314 abiflags_ and has_abiflags_section_.
315 (Target_mips::do_should_include_section): Don't emit input
316 .MIPS.abiflags sections to output .MIPS.abiflags.
317 (Target_mips::Mips_mach): Add new enum constants.
318 (Target_mips::mips_isa_ext_mach): New method.
319 (Target_mips::mips_isa_ext): Likewise.
320 (Target_mips::update_abiflags_isa): Likewise.
321 (Target_mips::infer_abiflags): Likewise.
322 (Target_mips::create_abiflags): Likewise.
323 (Target_mips::fp_abi_string): Likewise.
324 (Target_mips::select_fp_abi): Likewise.
325 (Target_mips::merge_obj_attributes): Likewise.
326 (Target_mips::merge_obj_abiflags): Likewise.
327 (Target_mips::level_rev): Likewise.
328 (Target_mips::merge_obj_e_flags): Rename from
329 merge_processor_specific_flags. Remove dyn_obj argument,
330 call update_abiflags_isa when needed, compare NaN encodings and
331 compare FP64 state.
332 (Target_mips::add_machine_extensions): Add two machine extensions
333 and fix one.
334 (Target_mips::attributes_section_data_): New data member.
335 (Target_mips::abiflags_): Likewise.
336 (Target_mips::has_abiflags_section_): Likewise.
337 (Mips_relobj::do_read_symbols): Read .gnu.attributes and
338 .MIPS.abiflags sections if they exists.
339 (Target_mips::elf_mips_mach): Add E_MIPS_MACH_5900 and
340 E_MIPS_MACH_OCTEON3 support.
341 (Target_mips::do_adjust_elf_header): Setup EI_ABIVERSION flag.
342 (Target_mips::do_finalize_sections): Merge .gnu.attributes and
343 .MIPS.abiflags sections from input. Create these sections if
344 needed.
345 (Target_mips::elf_mips_mach_name): Add E_MIPS_MACH_5900 and
346 E_MIPS_MACH_OCTEON3 support, and change strings for
347 E_MIPS_MACH_LS2E, E_MIPS_MACH_LS2F and E_MIPS_MACH_LS3A just
348 to match bfd.
349
350 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
351
352 * mips.cc (Mips_relobj::Mips_relobj): Initialize
353 has_reginfo_section_.
354 (Mips_relobj::has_reginfo_section_): New data member.
355 (Mips_relobj::has_reginfo_section): New method.
356 (class Mips_output_section_reginfo): Change base class to
357 Output_section_data, and set masks of the output .reginfo section
358 in constructor.
359 (Mips_output_section_reginfo::as_mips_output_section_reginfo):
360 Remove.
361 (Mips_output_section_reginfo::set_masks): Likewise.
362 (Mips_output_section_reginfo::set_final_data_size): Likewise.
363 (Mips_output_section_reginfo::do_print_to_mapfile): New method.
364 (Target_mips::do_make_output_section): Remove.
365 (Mips_relobj::do_read_symbols): Set has_reginfo_section_ to true
366 if the object contains a .reginfo section.
367 (Target_mips::do_finalize_sections): Create a .reginfo output
368 section if needed.
369
370 2016-06-09 Artemiy Volkov <artemiyv@acm.org>
371
372 * mips.cc (Mips_output_data_got::do_write): Add missing template
373 args via typedef.
374
375 2016-05-30 Marcin Koƛcielnicki <koriakin@0x04.net>
376
377 PR/19960
378 * s390.cc (Target_s390::ss_code_st_r14): Removed.
379 (Target_s390::ss_code_l_r14): Removed.
380 (Target_s390::ss_code_ear): Removed.
381 (Target_s390::ss_code_c): Removed.
382 (Target_s390::ss_match_st_r14): New function.
383 (Target_s390::ss_match_l_r14): New function.
384 (Target_s390::ss_match_mcount): Call ss_match_{l,st}_r14 instead
385 of matching code directly.
386 (Target_s390::ss_match_ear): New function.
387 (Target_s390::ss_match_c): New function.
388 (Target_s390::do_calls_non_split): Call ss_match_{ear,c} instead
389 of matching code directly.
390
391 2016-05-19 Cary Coutant <ccoutant@gmail.com>
392
393 PR gold/19823
394 * copy-relocs.cc (Copy_relocs::make_copy_reloc): Add object
395 parameter; check for protected symbol.
396 * copy-relocs.h (Copy_relocs::make_copy_reloc): Add object parameter.
397 * mips.cc (Mips_copy_relocs): Adjust call to make_copy_reloc.
398 * symtab.cc (Symbol::init_fields): Initialize is_protected_.
399 (Symbol_table::add_from_dynobj): Mark protected symbols.
400 * symtab.h (Symbol::is_protected): New method.
401 (Symbol::set_is_protected): New method.
402 (Symbol::is_protected_): New data member.
403
404 * testsuite/Makefile.am (copy_test_protected): New test.
405 * testsuite/Makefile.in: Regenerate.
406 * testsuite/copy_test.cc (main): Add legal reference to protected
407 symbol.
408 * testsuite/copy_test_v1.cc (main): Likewise.
409 * testsuite/copy_test_2.cc (ip): Add protected symbol.
410 * testsuite/copy_test_protected.cc: New test source file.
411 * testsuite/copy_test_protected.sh: New test script.
412
413 2016-05-19 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
414
415 * mips.cc (Mips_got_entry::Mips_got_entry): Remove object argument
416 for global got symbols, and set addend to 0.
417 (Mips_got_entry::hash): Change hash algorithm.
418 (Mips_got_entry::equals): Refactor.
419 (Mips_got_entry::object): Return input object for local got symbols
420 from union d.
421 (Mips_got_entry::addend): Change return of the relocation addend.
422 (Mips_got_entry::addend_): Move from union d.
423 (Mips_got_entry::object_): Move into union d.
424 (class Mips_symbol_hash): New class.
425 (Mips_got_info::Global_got_entry_set): New type.
426 (Mips_got_info::global_got_symbols): Change return type to
427 Global_got_entry_set.
428 (Mips_got_info::global_got_symbols_): Change type to
429 Global_got_entry_set.
430 (Mips_symbol::hash): New method.
431 (Mips_output_data_la25_stub::symbols_): Change type to std::vector.
432 (Mips_output_data_mips_stubs::Mips_stubs_entry_set): New type.
433 (Mips_output_data_mips_stubs::symbols_): Change type to
434 Mips_stubs_entry_set.
435 (Mips_got_info::record_global_got_symbol): Don't pass object
436 argument when creating global got symbol.
437 (Mips_got_info::record_got_entry): Remove find before inserting
438 got entries.
439 (Mips_got_info::add_reloc_only_entries): Change type of iterator
440 to Global_got_entry_set.
441 (Mips_got_info::count_got_symbols): Likewise.
442 (Mips_output_data_la25_stub::create_la25_stub): Use push_back
443 for adding entries to symbols_.
444 (Mips_output_data_la25_stub::do_write): Change type of iterator
445 to std::vector.
446 (Mips_output_data_mips_stubs::set_lazy_stub_offsets): Change type
447 of iterator to Mips_stubs_entry_set.
448 (Mips_output_data_mips_stubs::set_needs_dynsym_value): Likewise.
449 (Mips_output_data_mips_stubs::do_write): Likewise.
450
451 2016-05-06 Han Shen <shenhan@google.com>
452
453 PR gold/19987.
454
455 * aarch64-reloc.def: New relocation type.
456 * aarch64.cc (AArch64_relocate_functions::Page): Changed to public.
457 (Target_aarch64::Scan::local): Add R_AARCH64_LD64_GOTPAGE_LO15.
458 (Target_aarch64::Scan::global): Add R_AARCH64_LD64_GOTPAGE_LO15.
459 (Target_aarch64::Relocate::relocate): Implement R_AARCH64_LD64_GOTPAGE_LO15.
460
461 2016-04-28 Nick Clifton <nickc@redhat.com>
462
463 * po/zh_CN.po: Updated Chinese (simplified) translation.
464
465 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
466
467 * Makefile.in: Regenerated with automake 1.11.6.
468 * aclocal.m4: Likewise.
469 * testsuite/Makefile.in: Likewise.
470
471 2016-03-30 Cary Coutant <ccoutant@gmail.com>
472
473 PR gold/16979
474 * symtab.cc (Symbol_table::define_default_version): Check for case
475 where symbols are both in different shared objects.
476
477 2016-03-27 Cary Coutant <ccoutant@gmail.com>
478
479 PR gold/16111
480 * i386.cc (Target_i386): Add check for fully-resolved symbol for
481 R_386_GOTOFF.
482
483 2016-03-22 Nick Clifton <nickc@redhat.com>
484
485 * configure: Regenerate.
486
487 2016-03-21 Cary Coutant <ccoutant@gmail.com>
488
489 PR gold/19842
490 * errors.cc (Errors::undefined_symbol): Add info message when
491 symbol should have been provided by a plugin.
492 * target-reloc.h (issue_undefined_symbol_error): Check for
493 placeholder symbols defined in discarded sections.
494 * testsuite/Makefile.am (plugin_test_9b): New test case.
495 * testsuite/Makefile.in: Regenerate.
496 * testsuite/plugin_test_9b_elf.cc: New test source file.
497 * testsuite/plugin_test_9b_ir.cc: New test source file.
498
499 2016-03-20 Cary Coutant <ccoutant@gmail.com>
500
501 PR gold/19002
502 * ehframe.cc (Eh_frame::read_fde): Check for dropped functions.
503 * testsuite/Makefile.am (eh_test_2): New test.
504 * testsuite/Makefile.in: Regenerate.
505 * testsuite/eh_test_2.sh: New test script.
506 * testsuite/eh_test_a.cc (bar): Make it comdat.
507 * testsuite/eh_test_b.cc (bar): Add a duplicate copy.
508
509 2016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
510
511 * mips.cc (Mips_relobj::is_n64_): Remove.
512 (Target_mips::ei_class_): Likewise.
513 (Mips_relobj::is_newabi): Call methods.
514 (Mips_relobj::is_n64): Change checking for N64 ABI.
515 (Target_mips::is_output_n64): Likewise.
516 (Target_mips::merge_processor_specific_flags): Remove ei_class
517 argument, and remove comparing ei_class.
518 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
519 of the ELF header.
520 (Target_mips::do_finalize_sections): Don't pass ei_class argument
521 to merge_processor_specific_flags.
522 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and
523 change checking for N64 ABI.
524
525 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
526
527 * mips.cc (enum Special_relocation_symbol): New enum type.
528 (is_readonly_section): New function.
529 (eh_reloc): Likewise.
530 (Mips_got_entry::is_section_symbol_): New member.
531 (Mips_got_entry::is_section_symbol): New method.
532 (Mips_got_info::record_local_got_symbol): Add is_section_symbol
533 argument.
534 (Mips_relobj::mips_elf_options_section_name): New method.
535 (Mips_output_data_got::record_local_got_symbol): Add
536 is_section_symbol argument, and pass it to
537 Mips_got_info::record_local_got_symbol.
538 (Mips_output_data_got::got_offset): Add addend argument, and pass
539 it to Relobj::local_got_offset.
540 (struct Mips_output_reloc_writer): New type.
541 (class Mips_output_data_reloc): New class.
542 (Mips_output_data_plt::Reloc_section): Change type to
543 Mips_output_data_reloc.
544 (Target_mips::Reloc_section): Likewise.
545 (Mips_reloc_types::get_r_addend): Remove unsigned from return type.
546 (Mips_classify_reloc::get_r_type2): New method.
547 (Mips_classify_reloc::get_r_type3): Likewise.
548 (Mips_classify_reloc::get_r_ssym): Likewise.
549 (Target_mips::Reloca_section): Remove.
550 (Relocate::should_apply_static_reloc): Rename from
551 should_apply_r_mips_32_reloc.
552 (Target_mips::copy_reloc): Replace Reltype parameter with r_type
553 and r_offset.
554 (Mips_relocate_functions::Valtype): New type.
555 (Mips_relocate_functions::Valtype64): New type.
556 (Mips_relocate_functions::check_overflow): New method.
557 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public
558 interface.
559 (Mips_relocate_functions::mips_reloc_shuffle): Likewise.
560 (Mips_relocate_functions::rel16): Add support for resolving
561 relocations for Mips64.
562 (Mips_relocate_functions::rel32): Likewise.
563 (Mips_relocate_functions::reljalr): Likewise.
564 (Mips_relocate_functions::relpc32): Likewise.
565 (Mips_relocate_functions::rel26): Likewise.
566 (Mips_relocate_functions::relpc16): Likewise.
567 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
568 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
569 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
570 (Mips_relocate_functions::do_relhi16): Likewise.
571 (Mips_relocate_functions::do_relgot16_local): Likewise.
572 (Mips_relocate_functions::rello16): Likewise.
573 (Mips_relocate_functions::relgot): Likewise.
574 (Mips_relocate_functions::relgotpage): Likewise.
575 (Mips_relocate_functions::relgotofst): Likewise.
576 (Mips_relocate_functions::relgot_hi16): Likewise.
577 (Mips_relocate_functions::relgot_lo16): Likewise.
578 (Mips_relocate_functions::relgprel): Likewise.
579 (Mips_relocate_functions::relgprel32): Likewise.
580 (Mips_relocate_functions::tlsrelhi16): Likewise.
581 (Mips_relocate_functions::tlsrello16): Likewise.
582 (Mips_relocate_functions::tlsrel32): Likewise.
583 (Mips_relocate_functions::relsub): Likewise.
584 (Mips_relocate_functions::releh): New method.
585 (Mips_relocate_functions::rel64): Likewise.
586 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and
587 pass it to Mips_got_entry.
588 (Mips_got_info::add_local_entries): Pass addend argument
589 to code functions, and for STT_SECTION symbols call
590 add_symbolless_local_addend.
591 (Mips_got_info::add_tls_entries): Pass addend argument to code
592 functions.
593 (Mips_relobj::do_read_symbols): Read gp value that was used to
594 create object.
595 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
596 instruction. Opcode for instruction will be selected later.
597 (Target_mips::gc_process_relocs): Add case for SHT_RELA.
598 (Target_mips::scan_relocatable_relocs): Likewise.
599 (Target_mips::emit_relocs_scan): Likewise.
600 (Target_mips::relocate_relocs): Likewise.
601 (Target_mips::do_finalize_sections): Skip objects for merging
602 processor specific flags in which all input sections will be
603 discarded.
604 (mips_get_size_for_reloc): Add case for R_MIPS_EH.
605 (Target_mips::Scan::get_reference_flags): Likewise.
606 (Target_mips::relocate_special_relocatable): Call rel26 method with
607 calculate_only and calculated_value arguments.
608 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
609 dynamic relocation against a readonly sections, and pass
610 is_section_symbol to Mips_got_info::record_local_got_symbol.
611 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
612 dynamic relocation against a readonly sections, and pass r_type
613 and r_offset to Target_mips::copy_reloc.
614 (Target_mips::Relocate::relocate): Add support for resolving
615 relocations for Mips64.
616 (Target_mips::mips_info): Add case for Mips64 default dynamic
617 linker name.
618 (Target_selector_mips): Correct emulation names.
619
620 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
621
622 * mips.cc (class Mips_output_data_la25_stub): Add
623 do_print_to_mapfile function.
624
625 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
626
627 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
628 elf_r_info.
629
630 2016-03-09 H.J. Lu <hongjiu.lu@intel.com>
631
632 * testsuite/plugin_layout_with_alignment.cc: Renamed to ..
633 * testsuite/plugin_layout_with_alignment.c: This.
634 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated.
635 (plugin_layout_with_alignment): Likewise.
636 * testsuite/Makefile.in: Regenerated.
637
638 2016-03-08 Cary Coutant <ccoutant@gmail.com>
639
640 PR 19751
641 * testsuite/Makefile.am (retain_symbols_file_test): Remove check
642 for constructor.
643 * testsuite/Makefile.in: Regenerate.
644 * testsuite/dynamic_list.sh: Likewise.
645 * testsuite/retain_symbols_file_test.sh: Likewise.
646
647 2016-03-08 Cary Coutant <ccoutant@gmail.com>
648
649 PR 19751
650 * arm.cc (Reloc_stub::Key::name): Add unused attribute.
651 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.
652
653 2016-03-08 Cary Coutant <ccoutant@gmail.com>
654 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
655
656 * output.cc (Output_reloc_writer): New type.
657 (Output_data_reloc_base::do_write): Move implementation to template
658 in output.h and replace with invocation of template.
659 * output.h (Output_file): Move to top of file.
660 (Output_reloc::get_symbol_index): Move to public interface.
661 (Output_reloc::get_address): Likewise.
662 (Output_data_reloc_base::do_write_generic): New function template.
663
664 2016-03-04 Cary Coutant <ccoutant@gmail.com>
665
666 PR gold/19019
667 PR gold/19763
668 * symtab.cc: Instantiate Sized_symbol::init_constant and
669 Sized_symbol::init_undefined.
670
671 2016-03-03 Cary Coutant <ccoutant@gmail.com>
672
673 PR gold/19019
674 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
675 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
676 * mips.cc (Target_mips::make_symbol): Adjust function signature.
677 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
678 (Target_sparc::do_is_defined_by_abi): Remove test for
679 STT_SPARC_REGISTER.
680 (Target_sparc::Register_symbol): New struct type.
681 (Target_sparc::register_syms_): New data member.
682 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
683 (Target_sparc::make_symbol): New function.
684 (Target_sparc::do_finalize_sections): Add register symbols and new
685 dynamic table entries.
686 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
687 (Symbol_table::add_target_global_symbol): New function.
688 (Symbol_table::target_symbols_): New data member.
689 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
690 (Symbol_table::Symbol_table): Initialize target_symbols_.
691 (Symbol_table::add_from_object): Pass additional parameters to
692 Target::make_symbol.
693 (Symbol_table::define_special_symbol): Likewise.
694 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
695 undefined symbol value.
696 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
697 (Symbol_table::sized_finalize): Likewise.
698 (Symbol_table::sized_write_globals): Likewise.
699 * target.h (Sized_target::make_symbol): Add name, st_type, object,
700 st_shndx, and value parameters.
701
702 2016-03-03 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
703
704 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
705 LDPK_WEAKUNDEF symbols.
706
707 2016-03-03 Than McIntosh <thanm@google.com>
708
709 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
710 and get_input_section_alignment in transfer vector.
711 (get_input_section_alignment): New function.
712 (get_input_section_size): New function.
713 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
714 * testsuite/Makefile.in: [Regenerate.]
715 * testsuite/plugin_section_alignment.cc: New test file.
716 * testsuite/plugin_layout_with_alignment.cc: New test file.
717 * testsuite/plugin_layout_with_alignment.sh: New test file.
718
719 2016-03-03 Evgenii Stepanov <eugenis@google.com>
720
721 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
722 parameter.
723 * plugin.cc (get_symbols_v3): New function.
724 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
725 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
726 new version.
727
728 2016-02-26 Egor Kochetov <egor.kochetov@intel.com>
729 Cary Coutant <ccoutant@gmail.com>
730
731 PR gold/19735
732 * ehframe.h (Cie::fde_encoding): New method.
733 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
734 address ranges.
735
736 2016-02-15 H.J. Lu <hongjiu.lu@intel.com>
737
738 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
739 -mrelax-relocations=yes to $(TEST_AS).
740 (x86_64_mov_to_lea6.o): Likewise.
741 (x86_64_overflow_pc32.o): Remove duplicated target.
742 * testsuite/Makefile.in: Regenerated.
743
744 2016-02-15 Marcin Koƛcielnicki <koriakin@0x04.net>
745
746 * s390.cc (Target_s390::match_view_u): New helper method.
747 (Target_s390::do_is_call_to_non_split): New method.
748 (Target_s390::ss_code_st_r14): New const.
749 (Target_s390::ss_code_l_r14): New const.
750 (Target_s390::ss_code_bras_8): New const.
751 (Target_s390::ss_code_l_basr): New const.
752 (Target_s390::ss_code_a_basr): New const.
753 (Target_s390::ss_code_ear): New const.
754 (Target_s390::ss_code_c): New const.
755 (Target_s390::ss_code_larl): New const.
756 (Target_s390::ss_code_brasl): New const.
757 (Target_s390::ss_code_jg): New const.
758 (Target_s390::ss_code_jgl): New const.
759 (Target_s390::ss_match_mcount): New helper method.
760 (Target_s390::ss_match_l): New helper method.
761 (Target_s390::ss_match_ahi): New helper method.
762 (Target_s390::ss_match_alfi): New helper method.
763 (Target_s390::ss_match_cr): New helper method.
764 (Target_s390::do_calls_non_split): New method.
765 * testsuite/Makefile.am: Added new tests.
766 * testsuite/Makefile.in: Regenerate.
767 * testsuite/split_s390.sh: New test.
768 * testsuite/split_s390_1_a1.s: New test.
769 * testsuite/split_s390_1_a2.s: New test.
770 * testsuite/split_s390_1_n1.s: New test.
771 * testsuite/split_s390_1_n2.s: New test.
772 * testsuite/split_s390_1_z1.s: New test.
773 * testsuite/split_s390_1_z2.s: New test.
774 * testsuite/split_s390_1_z3.s: New test.
775 * testsuite/split_s390_1_z4.s: New test.
776 * testsuite/split_s390_2_ns.s: New test.
777 * testsuite/split_s390_2_s.s: New test.
778 * testsuite/split_s390x_1_a1.s: New test.
779 * testsuite/split_s390x_1_a2.s: New test.
780 * testsuite/split_s390x_1_n1.s: New test.
781 * testsuite/split_s390x_1_n2.s: New test.
782 * testsuite/split_s390x_1_z1.s: New test.
783 * testsuite/split_s390x_1_z2.s: New test.
784 * testsuite/split_s390x_1_z3.s: New test.
785 * testsuite/split_s390x_1_z4.s: New test.
786 * testsuite/split_s390x_2_ns.s: New test.
787 * testsuite/split_s390x_2_s.s: New test.
788
789 2016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
790
791 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
792 info message for every erratum 843419 found and fixed.
793
794 2016-02-07 Cary Coutant <ccoutant@gmail.com>
795
796 PR gold/18695
797 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
798 information to relocation overflow errors.
799
800 2016-02-06 Cary Coutant <ccoutant@gmail.com>
801
802 PR gold/18695
803 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
804 overflow checking when symbol value + addend < 0.
805
806 2016-02-06 Cary Coutant <ccoutant@gmail.com>
807
808 PR gold/19577
809 * reloc.h (Limits): New class.
810 (Bits::has_overflow32): Use min/max values from Limits.
811 (Bits::has_unsigned_overflow32): Likewise.
812 (Bits::has_signed_unsigned_overflow32): Likewise.
813 (Bits::has_overflow): Likewise.
814 (Bits::has_unsigned_overflow): Likewise.
815 (Bits::has_signed_unsigned_overflow64): Likewise.
816
817 2016-02-06 Cary Coutant <ccoutant@gmail.com>
818
819 PR gold/19567
820 * reloc.h (Relocate_functions::Overflow_check): Add comments.
821 * x86_64.cc (X86_64_relocate_functions): New class.
822 (Target_x86_64::Relocate::relocate): Use the new class.
823 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
824 (x32_overflow_pc32): New test case.
825 * testsuite/Makefile.in: Regenerate.
826 * testsuite/x32_overflow_pc32.sh: New script.
827 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
828
829 2016-02-06 Cary Coutant <ccoutant@gmail.com>
830
831 PR gold/19577
832 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
833 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
834
835 2016-02-06 Cary Coutant <ccoutant@gmail.com>
836
837 PR gold/19577
838 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
839 comparison.
840 (Bits::has_unsigned_overflow): Likewise.
841
842 2016-02-06 Marcin Koƛcielnicki <koriakin@0x04.net>
843
844 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
845 parameters.
846 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
847 and view_size to is_call_to_non_split.
848 * target.cc (Target::is_call_to_non_split): Add view and view_size
849 parameters.
850 * target.h (class Target): Likewise.
851
852 2016-02-05 Sriraman Tallam <tmsriram@google.com>
853
854 * icf.cc (get_rel_addend): New function.
855 (get_section_contents): Move merge section addend computation to a
856 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
857 Fix bug to not read past the length of the section.
858
859 2016-02-05 Cary Coutant <ccoutant@gmail.com>
860 Andrew Senkevich <andrew.senkevich@intel.com>
861
862 PR gold/18695
863 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
864 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
865 R_X86_64_PLT32.
866 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
867 * testsuite/x86_64_overflow_pc32.sh: New test script.
868 * testsuite/x86_64_overflow_pc32.s: New source file.
869
870 2016-02-05 Cary Coutant <ccoutant@gmail.com>
871
872 PR gold/18695
873 * reloc.h (Relocate_functions::Address): New typedef.
874 (Relocate_functions::Addendtype): New typedef.
875 (Relocate_functions::Overflow_check): New enum type.
876 (Relocate_functions::Reloc_status): New enum type.
877 (Relocate_functions::check_overflow): New function template.
878 (Relocate_functions::rel): Add check parameter; check for overflow.
879 (Relocate_functions::rel_unaligned): Likewise.
880 (Relocate_functions::rela): Likewise.
881 (Relocate_functions::pcrel): Likewise.
882 (Relocate_functions::pcrel_unaligned): Likewise.
883 (Relocate_functions::pcrela): Likewise.
884 (Relocate_functions::rel8): Adjust parameter types.
885 (Relocate_functions::rela8): Likewise.
886 (Relocate_functions::pcrel8): Likewise.
887 (Relocate_functions::pcrela8): Likewise.
888 (Relocate_functions::rel16): Likewise.
889 (Relocate_functions::rela168): Likewise.
890 (Relocate_functions::pcrel16): Likewise.
891 (Relocate_functions::pcrela16): Likewise.
892 (Relocate_functions::rel32): Likewise.
893 (Relocate_functions::rel32_unaligned): Likewise.
894 (Relocate_functions::rela32): Likewise.
895 (Relocate_functions::pcrel32): Likewise.
896 (Relocate_functions::pcrel32_unaligned): Likewise.
897 (Relocate_functions::pcrela32): Likewise.
898 (Relocate_functions::rel8_check): New function.
899 (Relocate_functions::rela8_check): New function.
900 (Relocate_functions::pcrel8_check): New function.
901 (Relocate_functions::pcrela8_check): New function.
902 (Relocate_functions::rel16_check): New function.
903 (Relocate_functions::rela168_check): New function.
904 (Relocate_functions::pcrel16_check): New function.
905 (Relocate_functions::pcrela16_check): New function.
906 (Relocate_functions::rel32_check): New function.
907 (Relocate_functions::rel32_unaligned_check): New function.
908 (Relocate_functions::rela32_check): New function.
909 (Relocate_functions::pcrel32_check): New function.
910 (Relocate_functions::pcrel32_unaligned_check): New function.
911 (Relocate_functions::pcrela32_check): New function.
912 (Bits::has_unsigned_overflow32): New function.
913 (Bits::has_unsigned_overflow): New function.
914 * testsuite/Makefile.am (overflow_unittest): New test.
915 * testsuite/Makefile.in: Regenerate.
916 * testsuite/overflow_unittest.cc: New source file.
917
918 2016-02-04 Alan Modra <amodra@gmail.com>
919
920 * powerpc.cc (relocate): Adjust last patch for big-endian.
921
922 2016-02-02 Alan Modra <amodra@gmail.com>
923
924 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
925
926 2016-01-15 Han Shen <shenhan@google.com>
927
928 PR gold/19472 - need pc-relative stubs.
929
930 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
931 stub type for DSOs and pie executables.
932
933 2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
934
935 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
936 'typename'.
937
938 2016-01-12 Cary Coutant <ccoutant@gmail.com>
939
940 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
941 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
942 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
943 specializations) New method.
944
945 2016-01-11 Cary Coutant <ccoutant@gmail.com>
946
947 PR gold/19353
948 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
949 we have a TLS segment for GD-to-IE optimization.
950 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
951 Adjust all calls.
952 (Target_i386::tls_desc_gd_to_ie): Likewise.
953 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
954 for TLSDESC GD-to-IE optimizations.
955 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
956 Adjust all calls.
957 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
958 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
959 for TLSDESC GD-to-IE optimizations.
960
961 2016-01-11 Cary Coutant <ccoutant@gmail.com>
962
963 Refactor gold to enable support for MIPS-64 relocation format.
964
965 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
966 (gc_process_relocs): Remove sh_type template parameter.
967 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
968 * object.h (Sized_relobj_file::split_stack_adjust): Add target
969 parameter.
970 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
971 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
972 specializations) Remove.
973 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
974 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
975 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
976 (Sized_relobj_file::split_stack_adjust): Add target parameter.
977 Adjust all callers.
978 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
979 Target::get_r_sym() to get r_sym field from relocations.
980 (Track_relocs::next_symndx): Call Target::get_r_sym().
981 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
982 add Classify_reloc template parameter. Use for accessing r_sym and
983 r_type.
984 (relocate_section): Likewise.
985 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
986 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
987 (Default_scan_relocatable_relocs::Reltype): New typedef.
988 (Default_scan_relocatable_relocs::reloc_size): New const.
989 (Default_scan_relocatable_relocs::sh_type): New const.
990 (Default_scan_relocatable_relocs::get_r_sym): New method.
991 (Default_scan_relocatable_relocs::get_r_type): New method.
992 (Default_emit_relocs_strategy): New class.
993 (scan_relocatable_relocs): Replace sh_type template parameter with
994 Scan_relocatable_relocs class. Use it to access r_sym and r_type
995 fields.
996 (relocate_relocs): Replace sh_type template parameter with
997 Classify_reloc class. Use it to access r_sym and r_type fields.
998 * target.h (Target::is_call_to_non_split): Replace r_type parameter
999 with pointer to relocation. Adjust all callers.
1000 (Target::do_is_call_to_non_split): Likewise.
1001 (Target::emit_relocs_scan): New virtual method.
1002 (Sized_target::get_r_sym): New virtual method.
1003 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
1004 with pointer to relocation.
1005
1006 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
1007 (Target_aarch64::Relocatable_size_for_reloc): Remove.
1008 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
1009 (Target_aarch64::scan_relocs): Likewise.
1010 (Target_aarch64::relocate_section): Likewise.
1011 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
1012 Remove.
1013 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
1014 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
1015 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
1016 template parameter.
1017 (Target_arm::emit_relocs_scan): New method.
1018 (Target_arm::Relocatable_size_for_reloc): Replace with...
1019 (Target_arm::Classify_reloc): ...this.
1020 (Target_arm::gc_process_relocs): Use Classify_reloc.
1021 (Target_arm::scan_relocs): Likewise.
1022 (Target_arm::relocate_section): Likewise.
1023 (Target_arm::scan_relocatable_relocs): Likewise.
1024 (Target_arm::relocate_relocs): Likewise.
1025 * i386.cc (Target_i386::emit_relocs_scan): New method.
1026 (Target_i386::Relocatable_size_for_reloc): Replace with...
1027 (Target_i386::Classify_reloc): ...this.
1028 (Target_i386::gc_process_relocs): Use Classify_reloc.
1029 (Target_i386::scan_relocs): Likewise.
1030 (Target_i386::relocate_section): Likewise.
1031 (Target_i386::scan_relocatable_relocs): Likewise.
1032 (Target_i386::relocate_relocs): Likewise.
1033 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
1034 parameter.
1035 (Mips_reloc_types): New class template.
1036 (Mips_classify_reloc): New class template.
1037 (Target_mips::Reltype): New typedef.
1038 (Target_mips::Relatype): New typedef.
1039 (Target_mips::emit_relocs_scan): New method.
1040 (Target_mips::get_r_sym): New method.
1041 (Target_mips::Relocatable_size_for_reloc): Replace with
1042 Mips_classify_reloc.
1043 (Target_mips::copy_reloc): Use Mips_classify_reloc.
1044 (Target_mips::gc_process_relocs): Likewise.
1045 (Target_mips::scan_relocs): Likewise.
1046 (Target_mips::relocate_section): Likewise.
1047 (Target_mips::scan_relocatable_relocs): Likewise.
1048 (Target_mips::relocate_relocs): Likewise.
1049 (mips_get_size_for_reloc): New function, factored out from
1050 Relocatable_size_for_reloc::get_size_for_reloc.
1051 (Target_mips::Scan::local): Use Mips_classify_reloc.
1052 (Target_mips::Scan::global): Likewise.
1053 (Target_mips::Relocate::relocate): Likewise.
1054 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
1055 (Target_powerpc::Relocatable_size_for_reloc): Remove.
1056 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
1057 (Target_powerpc::scan_relocs): Likewise.
1058 (Target_powerpc::relocate_section): Likewise.
1059 (Powerpc_scan_relocatable_reloc): Convert to class template.
1060 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
1061 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
1062 (Powerpc_scan_relocatable_reloc::sh_type): New const.
1063 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
1064 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
1065 (Target_powerpc::scan_relocatable_relocs): Use
1066 Powerpc_scan_relocatable_reloc.
1067 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
1068 * s390.cc (Target_s390::emit_relocs_scan): New method.
1069 (Target_s390::Relocatable_size_for_reloc): Remove.
1070 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
1071 (Target_s390::scan_relocs): Likewise.
1072 (Target_s390::relocate_section): Likewise.
1073 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
1074 Remove.
1075 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
1076 (Target_s390::relocate_relocs): Use Default_classify_reloc.
1077 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
1078 (Target_sparc::Relocatable_size_for_reloc): Remove.
1079 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
1080 (Target_sparc::scan_relocs): Likewise.
1081 (Target_sparc::relocate_section): Likewise.
1082 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
1083 Remove.
1084 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
1085 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
1086 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
1087 (Target_tilegx::Relocatable_size_for_reloc): Remove.
1088 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
1089 (Target_tilegx::scan_relocs): Likewise.
1090 (Target_tilegx::relocate_section): Likewise.
1091 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
1092 Remove.
1093 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
1094 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
1095 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
1096 (Target_x86_64::Relocatable_size_for_reloc): Remove.
1097 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
1098 (Target_x86_64::scan_relocs): Likewise.
1099 (Target_x86_64::relocate_section): Likewise.
1100 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
1101 Remove.
1102 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
1103 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
1104
1105 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
1106
1107 2016-01-01 Alan Modra <amodra@gmail.com>
1108
1109 Update year range in copyright notice of all files.
1110
1111 For older changes see ChangeLog-0815
1112 \f
1113 Copyright (C) 2016 Free Software Foundation, Inc.
1114
1115 Copying and distribution of this file, with or without modification,
1116 are permitted in any medium without royalty provided the copyright
1117 notice and this notice are preserved.
1118
1119 Local Variables:
1120 mode: change-log
1121 left-margin: 8
1122 fill-column: 74
1123 version-control: never
1124 End:
This page took 0.055663 seconds and 5 git commands to generate.