PR gdb/16483 - simplify "info frame-filters" output
[deliverable/binutils-gdb.git] / gold / ChangeLog
CommitLineData
6b1edb94
L
12016-06-22 H.J. Lu <hongjiu.lu@intel.com>
2
3 PR ld/20283
4 * NEWS: Mention --enable-relro.
5 * configure.ac: Add --enable-relro.
6 (DEFAULT_LD_Z_RELRO): New. Set by --enable-relro and default
7 to 1.
8 * config.in: Regenerated.
9 * configure: Likewise.
10 * options.h (General_options::relro): Default to
11 DEFAULT_LD_Z_RELRO.
12
f70be8a4
CC
132016-06-20 Cary Coutant <ccoutant@gmail.com>
14
15 * NEWS: Add new features in 1.12.
16 * version.cc (version_string): Bump to 1.12.
17
8474a88f
L
182016-06-20 H.J. Lu <hongjiu.lu@intel.com>
19
20 PR gold/20245
21 * i386.cc (Target_i386::first_plt_entry_offset): Return 0 if
22 plt_ is NULL.
23 (Target_i386::plt_entry_size): Likewise.
24 (Target_x86_64<size>::first_plt_entry_offset): Likewise.
25 (Target_x86_64<size>::plt_entry_size): Likewise.
26
a8ecc9fe
VR
272016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
28
29 * mips.cc (Target_mips::Target_mips): Initialize rld_map_.
30 (Target_mips::rld_map_): New data member.
31 (Target_mips::do_finalize_sections): Add support for
32 DT_MIPS_RLD_MAP and DT_MIPS_RLD_MAP_REL dynamic tags,
33 .rld_map section, and __RLD_MAP symbol.
34 (Target_mips::do_dynamic_tag_custom_value): Add support for
35 DT_MIPS_RLD_MAP_REL dynamic tag.
36 * output.cc (Output_data_dynamic::get_entry_offset): New method
37 definition.
38 * output.h (Output_data_dynamic::get_entry_offset): New method
39 declaration.
40
beceef50
VR
412016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
42
43 * mips.cc (Mips_relocate_functions::relpc16): Add unaligned check.
44
f5b11759
VR
452016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
46
47 * mips.cc (relocation_needs_la25_stub): Add support for relocs:
48 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
49 (hi16_reloc): Add support for R_MIPS_PCHI16 relocation.
50 (is_matching_lo16_reloc): Likewise.
51 (lo16_reloc): Add support for R_MIPS_PCLO16 relocation.
52 (Mips_output_data_plt::plt_entry_r6): New static data member for
53 R6 PLT entry.
54 (Target_mips::is_output_r6): New method.
55 (Target_mips::Mips_mach): Add new enum constants.
56 (Mips_relocate_functions::Status): Likewise.
57 (Mips_relocate_functions::pchi16_relocs): New static data member.
58 (Mips_relocate_functions::relpc21): New method.
59 (Mips_relocate_functions::relpc26): Likewise.
60 (Mips_relocate_functions::relpc18): Likewise.
61 (Mips_relocate_functions::relpc19): Likewise.
62 (Mips_relocate_functions::relpchi16): Likewise.
63 (Mips_relocate_functions::do_relpchi16): Likewise.
64 (Mips_relocate_functions::relpclo16): Likewise.
65 (Mips_output_data_plt::do_write): Add support for Mips r6 plt
66 entry.
67 (Target_mips::mips_32bit_flags): Add E_MIPS_ARCH_32R6 support.
68 (Target_mips::elf_mips_mach): Add E_MIPS_ARCH_32R6 and
69 E_MIPS_ARCH_64R6 support.
70 (Target_mips::update_abiflags_isa): Likewise.
71 (mips_get_size_for_reloc): Add support for relocs: R_MIPS_PCHI16,
72 R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3 and
73 R_MIPS_PC19_S2.
74 (Target_mips::Scan::local): Add support for relocs: R_MIPS_PCHI16
75 and R_MIPS_PCLO16.
76 (Target_mips::Scan::global): Add support for relocs:
77 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
78 (Target_mips::Relocate::relocate): Call functions for resolving
79 Mips32r6 and Mips64r6 relocations, and print error message for
80 STATUS_PCREL_UNALIGNED.
81 (Target_mips::Scan::get_reference_flags): Add support for relocs:
82 R_MIPS_PCHI16, R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2,
83 R_MIPS_PC18_S3 and R_MIPS_PC19_S2.
84 (Target_mips::elf_mips_mach_name): Add E_MIPS_ARCH_32R6 and
85 E_MIPS_ARCH_64R6 support.
86
3328c04b
L
872016-06-13 H.J. Lu <hongjiu.lu@intel.com>
88
89 PR gold/20246
90 * testsuite/script_test_2.t: Add .got.plt after .got.
91
b52717c0
VR
922016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
93
94 * mips.cc (struct Mips_abiflags): New struct.
95 (Mips_relobj::Mips_relobj): Initialize attributes_section_data_
96 and abiflags_.
97 (Mips_relobj::~Mips_relobj): Delete object pointed by
98 attributes_section_data_.
99 (Mips_relobj::abiflags): New method.
100 (Mips_relobj::attributes_section_data): Likewise.
101 (Mips_relobj::attributes_section_data_): New data member.
102 (Mips_relobj::abiflags_): Likewise.
103 (class Mips_output_section_abiflags): New class.
104 (Target_mips::Target_mips): Initialize attributes_section_data_,
105 abiflags_ and has_abiflags_section_.
106 (Target_mips::do_should_include_section): Don't emit input
107 .MIPS.abiflags sections to output .MIPS.abiflags.
108 (Target_mips::Mips_mach): Add new enum constants.
109 (Target_mips::mips_isa_ext_mach): New method.
110 (Target_mips::mips_isa_ext): Likewise.
111 (Target_mips::update_abiflags_isa): Likewise.
112 (Target_mips::infer_abiflags): Likewise.
113 (Target_mips::create_abiflags): Likewise.
114 (Target_mips::fp_abi_string): Likewise.
115 (Target_mips::select_fp_abi): Likewise.
116 (Target_mips::merge_obj_attributes): Likewise.
117 (Target_mips::merge_obj_abiflags): Likewise.
118 (Target_mips::level_rev): Likewise.
119 (Target_mips::merge_obj_e_flags): Rename from
120 merge_processor_specific_flags. Remove dyn_obj argument,
121 call update_abiflags_isa when needed, compare NaN encodings and
122 compare FP64 state.
123 (Target_mips::add_machine_extensions): Add two machine extensions
124 and fix one.
125 (Target_mips::attributes_section_data_): New data member.
126 (Target_mips::abiflags_): Likewise.
127 (Target_mips::has_abiflags_section_): Likewise.
128 (Mips_relobj::do_read_symbols): Read .gnu.attributes and
129 .MIPS.abiflags sections if they exists.
130 (Target_mips::elf_mips_mach): Add E_MIPS_MACH_5900 and
131 E_MIPS_MACH_OCTEON3 support.
132 (Target_mips::do_adjust_elf_header): Setup EI_ABIVERSION flag.
133 (Target_mips::do_finalize_sections): Merge .gnu.attributes and
134 .MIPS.abiflags sections from input. Create these sections if
135 needed.
136 (Target_mips::elf_mips_mach_name): Add E_MIPS_MACH_5900 and
137 E_MIPS_MACH_OCTEON3 support, and change strings for
138 E_MIPS_MACH_LS2E, E_MIPS_MACH_LS2F and E_MIPS_MACH_LS3A just
139 to match bfd.
140
82e49872
VR
1412016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
142
143 * mips.cc (Mips_relobj::Mips_relobj): Initialize
144 has_reginfo_section_.
145 (Mips_relobj::has_reginfo_section_): New data member.
146 (Mips_relobj::has_reginfo_section): New method.
147 (class Mips_output_section_reginfo): Change base class to
148 Output_section_data, and set masks of the output .reginfo section
149 in constructor.
150 (Mips_output_section_reginfo::as_mips_output_section_reginfo):
151 Remove.
152 (Mips_output_section_reginfo::set_masks): Likewise.
153 (Mips_output_section_reginfo::set_final_data_size): Likewise.
154 (Mips_output_section_reginfo::do_print_to_mapfile): New method.
155 (Target_mips::do_make_output_section): Remove.
156 (Mips_relobj::do_read_symbols): Set has_reginfo_section_ to true
157 if the object contains a .reginfo section.
158 (Target_mips::do_finalize_sections): Create a .reginfo output
159 section if needed.
160
a080d84d
AV
1612016-06-09 Artemiy Volkov <artemiyv@acm.org>
162
163 * mips.cc (Mips_output_data_got::do_write): Add missing template
164 args via typedef.
165
40d85a7f
MK
1662016-05-30 Marcin Koƛcielnicki <koriakin@0x04.net>
167
168 PR/19960
169 * s390.cc (Target_s390::ss_code_st_r14): Removed.
170 (Target_s390::ss_code_l_r14): Removed.
171 (Target_s390::ss_code_ear): Removed.
172 (Target_s390::ss_code_c): Removed.
173 (Target_s390::ss_match_st_r14): New function.
174 (Target_s390::ss_match_l_r14): New function.
175 (Target_s390::ss_match_mcount): Call ss_match_{l,st}_r14 instead
176 of matching code directly.
177 (Target_s390::ss_match_ear): New function.
178 (Target_s390::ss_match_c): New function.
179 (Target_s390::do_calls_non_split): Call ss_match_{ear,c} instead
180 of matching code directly.
181
6eeb0170
CC
1822016-05-19 Cary Coutant <ccoutant@gmail.com>
183
184 PR gold/19823
185 * copy-relocs.cc (Copy_relocs::make_copy_reloc): Add object
186 parameter; check for protected symbol.
187 * copy-relocs.h (Copy_relocs::make_copy_reloc): Add object parameter.
188 * mips.cc (Mips_copy_relocs): Adjust call to make_copy_reloc.
189 * symtab.cc (Symbol::init_fields): Initialize is_protected_.
190 (Symbol_table::add_from_dynobj): Mark protected symbols.
191 * symtab.h (Symbol::is_protected): New method.
192 (Symbol::set_is_protected): New method.
193 (Symbol::is_protected_): New data member.
194
195 * testsuite/Makefile.am (copy_test_protected): New test.
196 * testsuite/Makefile.in: Regenerate.
197 * testsuite/copy_test.cc (main): Add legal reference to protected
198 symbol.
199 * testsuite/copy_test_v1.cc (main): Likewise.
200 * testsuite/copy_test_2.cc (ip): Add protected symbol.
201 * testsuite/copy_test_protected.cc: New test source file.
202 * testsuite/copy_test_protected.sh: New test script.
203
15eb1beb
VR
2042016-05-19 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
205
206 * mips.cc (Mips_got_entry::Mips_got_entry): Remove object argument
207 for global got symbols, and set addend to 0.
208 (Mips_got_entry::hash): Change hash algorithm.
209 (Mips_got_entry::equals): Refactor.
210 (Mips_got_entry::object): Return input object for local got symbols
211 from union d.
212 (Mips_got_entry::addend): Change return of the relocation addend.
213 (Mips_got_entry::addend_): Move from union d.
214 (Mips_got_entry::object_): Move into union d.
215 (class Mips_symbol_hash): New class.
216 (Mips_got_info::Global_got_entry_set): New type.
217 (Mips_got_info::global_got_symbols): Change return type to
218 Global_got_entry_set.
219 (Mips_got_info::global_got_symbols_): Change type to
220 Global_got_entry_set.
221 (Mips_symbol::hash): New method.
222 (Mips_output_data_la25_stub::symbols_): Change type to std::vector.
223 (Mips_output_data_mips_stubs::Mips_stubs_entry_set): New type.
224 (Mips_output_data_mips_stubs::symbols_): Change type to
225 Mips_stubs_entry_set.
226 (Mips_got_info::record_global_got_symbol): Don't pass object
227 argument when creating global got symbol.
228 (Mips_got_info::record_got_entry): Remove find before inserting
229 got entries.
230 (Mips_got_info::add_reloc_only_entries): Change type of iterator
231 to Global_got_entry_set.
232 (Mips_got_info::count_got_symbols): Likewise.
233 (Mips_output_data_la25_stub::create_la25_stub): Use push_back
234 for adding entries to symbols_.
235 (Mips_output_data_la25_stub::do_write): Change type of iterator
236 to std::vector.
237 (Mips_output_data_mips_stubs::set_lazy_stub_offsets): Change type
238 of iterator to Mips_stubs_entry_set.
239 (Mips_output_data_mips_stubs::set_needs_dynsym_value): Likewise.
240 (Mips_output_data_mips_stubs::do_write): Likewise.
241
5c28a503
HS
2422016-05-06 Han Shen <shenhan@google.com>
243
244 PR gold/19987.
245
246 * aarch64-reloc.def: New relocation type.
247 * aarch64.cc (AArch64_relocate_functions::Page): Changed to public.
248 (Target_aarch64::Scan::local): Add R_AARCH64_LD64_GOTPAGE_LO15.
249 (Target_aarch64::Scan::global): Add R_AARCH64_LD64_GOTPAGE_LO15.
250 (Target_aarch64::Relocate::relocate): Implement R_AARCH64_LD64_GOTPAGE_LO15.
251
786a118c
NC
2522016-04-28 Nick Clifton <nickc@redhat.com>
253
254 * po/zh_CN.po: Updated Chinese (simplified) translation.
255
6fd8e7c2
L
2562016-04-15 H.J. Lu <hongjiu.lu@intel.com>
257
258 * Makefile.in: Regenerated with automake 1.11.6.
259 * aclocal.m4: Likewise.
260 * testsuite/Makefile.in: Likewise.
261
b60ecbc6
CC
2622016-03-30 Cary Coutant <ccoutant@gmail.com>
263
264 PR gold/16979
265 * symtab.cc (Symbol_table::define_default_version): Check for case
266 where symbols are both in different shared objects.
267
ed700649
CC
2682016-03-27 Cary Coutant <ccoutant@gmail.com>
269
270 PR gold/16111
271 * i386.cc (Target_i386): Add check for fully-resolved symbol for
272 R_386_GOTOFF.
273
9780e045
NC
2742016-03-22 Nick Clifton <nickc@redhat.com>
275
276 * configure: Regenerate.
277
648c5cbb
CC
2782016-03-21 Cary Coutant <ccoutant@gmail.com>
279
280 PR gold/19842
281 * errors.cc (Errors::undefined_symbol): Add info message when
282 symbol should have been provided by a plugin.
283 * target-reloc.h (issue_undefined_symbol_error): Check for
284 placeholder symbols defined in discarded sections.
285 * testsuite/Makefile.am (plugin_test_9b): New test case.
286 * testsuite/Makefile.in: Regenerate.
287 * testsuite/plugin_test_9b_elf.cc: New test source file.
288 * testsuite/plugin_test_9b_ir.cc: New test source file.
289
698400bf
CC
2902016-03-20 Cary Coutant <ccoutant@gmail.com>
291
292 PR gold/19002
293 * ehframe.cc (Eh_frame::read_fde): Check for dropped functions.
294 * testsuite/Makefile.am (eh_test_2): New test.
295 * testsuite/Makefile.in: Regenerate.
296 * testsuite/eh_test_2.sh: New test script.
297 * testsuite/eh_test_a.cc (bar): Make it comdat.
298 * testsuite/eh_test_b.cc (bar): Add a duplicate copy.
299
01b84e25
VR
3002016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
301
302 * mips.cc (Mips_relobj::is_n64_): Remove.
303 (Target_mips::ei_class_): Likewise.
304 (Mips_relobj::is_newabi): Call methods.
305 (Mips_relobj::is_n64): Change checking for N64 ABI.
306 (Target_mips::is_output_n64): Likewise.
307 (Target_mips::merge_processor_specific_flags): Remove ei_class
308 argument, and remove comparing ei_class.
309 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
310 of the ELF header.
311 (Target_mips::do_finalize_sections): Don't pass ei_class argument
312 to merge_processor_specific_flags.
313 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and
314 change checking for N64 ABI.
315
47a9f4fc
VR
3162016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
317
318 * mips.cc (enum Special_relocation_symbol): New enum type.
319 (is_readonly_section): New function.
320 (eh_reloc): Likewise.
321 (Mips_got_entry::is_section_symbol_): New member.
322 (Mips_got_entry::is_section_symbol): New method.
323 (Mips_got_info::record_local_got_symbol): Add is_section_symbol
324 argument.
325 (Mips_relobj::mips_elf_options_section_name): New method.
326 (Mips_output_data_got::record_local_got_symbol): Add
327 is_section_symbol argument, and pass it to
328 Mips_got_info::record_local_got_symbol.
329 (Mips_output_data_got::got_offset): Add addend argument, and pass
330 it to Relobj::local_got_offset.
331 (struct Mips_output_reloc_writer): New type.
332 (class Mips_output_data_reloc): New class.
333 (Mips_output_data_plt::Reloc_section): Change type to
334 Mips_output_data_reloc.
335 (Target_mips::Reloc_section): Likewise.
336 (Mips_reloc_types::get_r_addend): Remove unsigned from return type.
337 (Mips_classify_reloc::get_r_type2): New method.
338 (Mips_classify_reloc::get_r_type3): Likewise.
339 (Mips_classify_reloc::get_r_ssym): Likewise.
340 (Target_mips::Reloca_section): Remove.
341 (Relocate::should_apply_static_reloc): Rename from
342 should_apply_r_mips_32_reloc.
343 (Target_mips::copy_reloc): Replace Reltype parameter with r_type
344 and r_offset.
345 (Mips_relocate_functions::Valtype): New type.
346 (Mips_relocate_functions::Valtype64): New type.
347 (Mips_relocate_functions::check_overflow): New method.
348 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public
349 interface.
350 (Mips_relocate_functions::mips_reloc_shuffle): Likewise.
351 (Mips_relocate_functions::rel16): Add support for resolving
352 relocations for Mips64.
353 (Mips_relocate_functions::rel32): Likewise.
354 (Mips_relocate_functions::reljalr): Likewise.
355 (Mips_relocate_functions::relpc32): Likewise.
356 (Mips_relocate_functions::rel26): Likewise.
357 (Mips_relocate_functions::relpc16): Likewise.
358 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
359 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
360 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
361 (Mips_relocate_functions::do_relhi16): Likewise.
362 (Mips_relocate_functions::do_relgot16_local): Likewise.
363 (Mips_relocate_functions::rello16): Likewise.
364 (Mips_relocate_functions::relgot): Likewise.
365 (Mips_relocate_functions::relgotpage): Likewise.
366 (Mips_relocate_functions::relgotofst): Likewise.
367 (Mips_relocate_functions::relgot_hi16): Likewise.
368 (Mips_relocate_functions::relgot_lo16): Likewise.
369 (Mips_relocate_functions::relgprel): Likewise.
370 (Mips_relocate_functions::relgprel32): Likewise.
371 (Mips_relocate_functions::tlsrelhi16): Likewise.
372 (Mips_relocate_functions::tlsrello16): Likewise.
373 (Mips_relocate_functions::tlsrel32): Likewise.
374 (Mips_relocate_functions::relsub): Likewise.
375 (Mips_relocate_functions::releh): New method.
376 (Mips_relocate_functions::rel64): Likewise.
377 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and
378 pass it to Mips_got_entry.
379 (Mips_got_info::add_local_entries): Pass addend argument
380 to code functions, and for STT_SECTION symbols call
381 add_symbolless_local_addend.
382 (Mips_got_info::add_tls_entries): Pass addend argument to code
383 functions.
384 (Mips_relobj::do_read_symbols): Read gp value that was used to
385 create object.
386 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
387 instruction. Opcode for instruction will be selected later.
388 (Target_mips::gc_process_relocs): Add case for SHT_RELA.
389 (Target_mips::scan_relocatable_relocs): Likewise.
390 (Target_mips::emit_relocs_scan): Likewise.
391 (Target_mips::relocate_relocs): Likewise.
392 (Target_mips::do_finalize_sections): Skip objects for merging
393 processor specific flags in which all input sections will be
394 discarded.
395 (mips_get_size_for_reloc): Add case for R_MIPS_EH.
396 (Target_mips::Scan::get_reference_flags): Likewise.
397 (Target_mips::relocate_special_relocatable): Call rel26 method with
398 calculate_only and calculated_value arguments.
399 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
400 dynamic relocation against a readonly sections, and pass
401 is_section_symbol to Mips_got_info::record_local_got_symbol.
402 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
403 dynamic relocation against a readonly sections, and pass r_type
404 and r_offset to Target_mips::copy_reloc.
405 (Target_mips::Relocate::relocate): Add support for resolving
406 relocations for Mips64.
407 (Target_mips::mips_info): Add case for Mips64 default dynamic
408 linker name.
409 (Target_selector_mips): Correct emulation names.
410
1a08ae21
VR
4112016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
412
413 * mips.cc (class Mips_output_data_la25_stub): Add
414 do_print_to_mapfile function.
415
c2fa9ced
VR
4162016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
417
418 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
419 elf_r_info.
420
fd91f002
L
4212016-03-09 H.J. Lu <hongjiu.lu@intel.com>
422
423 * testsuite/plugin_layout_with_alignment.cc: Renamed to ..
424 * testsuite/plugin_layout_with_alignment.c: This.
425 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated.
426 (plugin_layout_with_alignment): Likewise.
427 * testsuite/Makefile.in: Regenerated.
428
7ff6eb49
CC
4292016-03-08 Cary Coutant <ccoutant@gmail.com>
430
431 PR 19751
432 * testsuite/Makefile.am (retain_symbols_file_test): Remove check
433 for constructor.
434 * testsuite/Makefile.in: Regenerate.
435 * testsuite/dynamic_list.sh: Likewise.
436 * testsuite/retain_symbols_file_test.sh: Likewise.
437
202736be
CC
4382016-03-08 Cary Coutant <ccoutant@gmail.com>
439
440 PR 19751
441 * arm.cc (Reloc_stub::Key::name): Add unused attribute.
442 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.
443
c32482d6
CC
4442016-03-08 Cary Coutant <ccoutant@gmail.com>
445 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
446
447 * output.cc (Output_reloc_writer): New type.
448 (Output_data_reloc_base::do_write): Move implementation to template
449 in output.h and replace with invocation of template.
450 * output.h (Output_file): Move to top of file.
451 (Output_reloc::get_symbol_index): Move to public interface.
452 (Output_reloc::get_address): Likewise.
453 (Output_data_reloc_base::do_write_generic): New function template.
454
8d04e81d
CC
4552016-03-04 Cary Coutant <ccoutant@gmail.com>
456
457 PR gold/19019
458 PR gold/19763
459 * symtab.cc: Instantiate Sized_symbol::init_constant and
460 Sized_symbol::init_undefined.
461
dc1c8a16
CC
4622016-03-03 Cary Coutant <ccoutant@gmail.com>
463
464 PR gold/19019
465 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
466 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
467 * mips.cc (Target_mips::make_symbol): Adjust function signature.
468 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
469 (Target_sparc::do_is_defined_by_abi): Remove test for
470 STT_SPARC_REGISTER.
471 (Target_sparc::Register_symbol): New struct type.
472 (Target_sparc::register_syms_): New data member.
473 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
474 (Target_sparc::make_symbol): New function.
475 (Target_sparc::do_finalize_sections): Add register symbols and new
476 dynamic table entries.
477 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
478 (Symbol_table::add_target_global_symbol): New function.
479 (Symbol_table::target_symbols_): New data member.
480 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
481 (Symbol_table::Symbol_table): Initialize target_symbols_.
482 (Symbol_table::add_from_object): Pass additional parameters to
483 Target::make_symbol.
484 (Symbol_table::define_special_symbol): Likewise.
485 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
486 undefined symbol value.
487 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
488 (Symbol_table::sized_finalize): Likewise.
489 (Symbol_table::sized_write_globals): Likewise.
490 * target.h (Sized_target::make_symbol): Add name, st_type, object,
491 st_shndx, and value parameters.
492
9b738e36 4932016-03-03 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
a06ed37d
RÁE
494
495 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
496 LDPK_WEAKUNDEF symbols.
497
3f1f41f5
L
4982016-03-03 Than McIntosh <thanm@google.com>
499
500 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
501 and get_input_section_alignment in transfer vector.
502 (get_input_section_alignment): New function.
503 (get_input_section_size): New function.
504 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
505 * testsuite/Makefile.in: [Regenerate.]
506 * testsuite/plugin_section_alignment.cc: New test file.
507 * testsuite/plugin_layout_with_alignment.cc: New test file.
508 * testsuite/plugin_layout_with_alignment.sh: New test file.
509
9b738e36 5102016-03-03 Evgenii Stepanov <eugenis@google.com>
95ecdfbf
ES
511
512 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
513 parameter.
514 * plugin.cc (get_symbols_v3): New function.
515 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
516 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
517 new version.
518
fc5a9bd5
CC
5192016-02-26 Egor Kochetov <egor.kochetov@intel.com>
520 Cary Coutant <ccoutant@gmail.com>
521
522 PR gold/19735
523 * ehframe.h (Cie::fde_encoding): New method.
524 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
525 address ranges.
526
1cd17042
L
5272016-02-15 H.J. Lu <hongjiu.lu@intel.com>
528
529 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
530 -mrelax-relocations=yes to $(TEST_AS).
531 (x86_64_mov_to_lea6.o): Likewise.
532 (x86_64_overflow_pc32.o): Remove duplicated target.
533 * testsuite/Makefile.in: Regenerated.
534
2b63aca3
MK
5352016-02-15 Marcin Koƛcielnicki <koriakin@0x04.net>
536
537 * s390.cc (Target_s390::match_view_u): New helper method.
538 (Target_s390::do_is_call_to_non_split): New method.
539 (Target_s390::ss_code_st_r14): New const.
540 (Target_s390::ss_code_l_r14): New const.
541 (Target_s390::ss_code_bras_8): New const.
542 (Target_s390::ss_code_l_basr): New const.
543 (Target_s390::ss_code_a_basr): New const.
544 (Target_s390::ss_code_ear): New const.
545 (Target_s390::ss_code_c): New const.
546 (Target_s390::ss_code_larl): New const.
547 (Target_s390::ss_code_brasl): New const.
548 (Target_s390::ss_code_jg): New const.
549 (Target_s390::ss_code_jgl): New const.
550 (Target_s390::ss_match_mcount): New helper method.
551 (Target_s390::ss_match_l): New helper method.
552 (Target_s390::ss_match_ahi): New helper method.
553 (Target_s390::ss_match_alfi): New helper method.
554 (Target_s390::ss_match_cr): New helper method.
555 (Target_s390::do_calls_non_split): New method.
556 * testsuite/Makefile.am: Added new tests.
557 * testsuite/Makefile.in: Regenerate.
558 * testsuite/split_s390.sh: New test.
559 * testsuite/split_s390_1_a1.s: New test.
560 * testsuite/split_s390_1_a2.s: New test.
561 * testsuite/split_s390_1_n1.s: New test.
562 * testsuite/split_s390_1_n2.s: New test.
563 * testsuite/split_s390_1_z1.s: New test.
564 * testsuite/split_s390_1_z2.s: New test.
565 * testsuite/split_s390_1_z3.s: New test.
566 * testsuite/split_s390_1_z4.s: New test.
567 * testsuite/split_s390_2_ns.s: New test.
568 * testsuite/split_s390_2_s.s: New test.
569 * testsuite/split_s390x_1_a1.s: New test.
570 * testsuite/split_s390x_1_a2.s: New test.
571 * testsuite/split_s390x_1_n1.s: New test.
572 * testsuite/split_s390x_1_n2.s: New test.
573 * testsuite/split_s390x_1_z1.s: New test.
574 * testsuite/split_s390x_1_z2.s: New test.
575 * testsuite/split_s390x_1_z3.s: New test.
576 * testsuite/split_s390x_1_z4.s: New test.
577 * testsuite/split_s390x_2_ns.s: New test.
578 * testsuite/split_s390x_2_s.s: New test.
579
e3dbf582
HS
5802016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
581
582 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
583 info message for every erratum 843419 found and fixed.
584
17ecd016
CC
5852016-02-07 Cary Coutant <ccoutant@gmail.com>
586
587 PR gold/18695
588 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
589 information to relocation overflow errors.
590
7c8b700c
CC
5912016-02-06 Cary Coutant <ccoutant@gmail.com>
592
17ecd016 593 PR gold/18695
7c8b700c
CC
594 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
595 overflow checking when symbol value + addend < 0.
596
b7a4e9d8
CC
5972016-02-06 Cary Coutant <ccoutant@gmail.com>
598
599 PR gold/19577
600 * reloc.h (Limits): New class.
601 (Bits::has_overflow32): Use min/max values from Limits.
602 (Bits::has_unsigned_overflow32): Likewise.
603 (Bits::has_signed_unsigned_overflow32): Likewise.
604 (Bits::has_overflow): Likewise.
605 (Bits::has_unsigned_overflow): Likewise.
606 (Bits::has_signed_unsigned_overflow64): Likewise.
607
19ef3f4d
CC
6082016-02-06 Cary Coutant <ccoutant@gmail.com>
609
610 PR gold/19567
611 * reloc.h (Relocate_functions::Overflow_check): Add comments.
612 * x86_64.cc (X86_64_relocate_functions): New class.
613 (Target_x86_64::Relocate::relocate): Use the new class.
614 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
615 (x32_overflow_pc32): New test case.
616 * testsuite/Makefile.in: Regenerate.
617 * testsuite/x32_overflow_pc32.sh: New script.
618 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
619
72c55146
CC
6202016-02-06 Cary Coutant <ccoutant@gmail.com>
621
622 PR gold/19577
623 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
624 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
625
2bf48941
CC
6262016-02-06 Cary Coutant <ccoutant@gmail.com>
627
3b8bcce8 628 PR gold/19577
2bf48941
CC
629 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
630 comparison.
631 (Bits::has_unsigned_overflow): Likewise.
632
bd8d853f
MK
6332016-02-06 Marcin Koƛcielnicki <koriakin@0x04.net>
634
635 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
636 parameters.
637 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
638 and view_size to is_call_to_non_split.
639 * target.cc (Target::is_call_to_non_split): Add view and view_size
640 parameters.
641 * target.h (class Target): Likewise.
642
84d543b7
ST
6432016-02-05 Sriraman Tallam <tmsriram@google.com>
644
645 * icf.cc (get_rel_addend): New function.
646 (get_section_contents): Move merge section addend computation to a
647 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
648 Fix bug to not read past the length of the section.
649
c34c98ed
CC
6502016-02-05 Cary Coutant <ccoutant@gmail.com>
651 Andrew Senkevich <andrew.senkevich@intel.com>
652
653 PR gold/18695
654 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
655 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
656 R_X86_64_PLT32.
657 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
658 * testsuite/x86_64_overflow_pc32.sh: New test script.
659 * testsuite/x86_64_overflow_pc32.s: New source file.
660
6612016-02-05 Cary Coutant <ccoutant@gmail.com>
44803b5d
CC
662
663 PR gold/18695
664 * reloc.h (Relocate_functions::Address): New typedef.
665 (Relocate_functions::Addendtype): New typedef.
666 (Relocate_functions::Overflow_check): New enum type.
667 (Relocate_functions::Reloc_status): New enum type.
668 (Relocate_functions::check_overflow): New function template.
669 (Relocate_functions::rel): Add check parameter; check for overflow.
670 (Relocate_functions::rel_unaligned): Likewise.
671 (Relocate_functions::rela): Likewise.
672 (Relocate_functions::pcrel): Likewise.
673 (Relocate_functions::pcrel_unaligned): Likewise.
674 (Relocate_functions::pcrela): Likewise.
675 (Relocate_functions::rel8): Adjust parameter types.
676 (Relocate_functions::rela8): Likewise.
677 (Relocate_functions::pcrel8): Likewise.
678 (Relocate_functions::pcrela8): Likewise.
679 (Relocate_functions::rel16): Likewise.
680 (Relocate_functions::rela168): Likewise.
681 (Relocate_functions::pcrel16): Likewise.
682 (Relocate_functions::pcrela16): Likewise.
683 (Relocate_functions::rel32): Likewise.
684 (Relocate_functions::rel32_unaligned): Likewise.
685 (Relocate_functions::rela32): Likewise.
686 (Relocate_functions::pcrel32): Likewise.
687 (Relocate_functions::pcrel32_unaligned): Likewise.
688 (Relocate_functions::pcrela32): Likewise.
689 (Relocate_functions::rel8_check): New function.
690 (Relocate_functions::rela8_check): New function.
691 (Relocate_functions::pcrel8_check): New function.
692 (Relocate_functions::pcrela8_check): New function.
693 (Relocate_functions::rel16_check): New function.
694 (Relocate_functions::rela168_check): New function.
695 (Relocate_functions::pcrel16_check): New function.
696 (Relocate_functions::pcrela16_check): New function.
697 (Relocate_functions::rel32_check): New function.
698 (Relocate_functions::rel32_unaligned_check): New function.
699 (Relocate_functions::rela32_check): New function.
700 (Relocate_functions::pcrel32_check): New function.
701 (Relocate_functions::pcrel32_unaligned_check): New function.
702 (Relocate_functions::pcrela32_check): New function.
703 (Bits::has_unsigned_overflow32): New function.
704 (Bits::has_unsigned_overflow): New function.
705 * testsuite/Makefile.am (overflow_unittest): New test.
706 * testsuite/Makefile.in: Regenerate.
707 * testsuite/overflow_unittest.cc: New source file.
708
4f038ee5
AM
7092016-02-04 Alan Modra <amodra@gmail.com>
710
711 * powerpc.cc (relocate): Adjust last patch for big-endian.
712
85fabe71
AM
7132016-02-02 Alan Modra <amodra@gmail.com>
714
715 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
716
9a472eda
HS
7172016-01-15 Han Shen <shenhan@google.com>
718
719 PR gold/19472 - need pc-relative stubs.
720
721 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
722 stub type for DSOs and pie executables.
723
41549dfb
L
7242016-01-12 H.J. Lu <hongjiu.lu@intel.com>
725
726 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
727 'typename'.
728
8a8880cb
CC
7292016-01-12 Cary Coutant <ccoutant@gmail.com>
730
731 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
732 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
733 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
734 specializations) New method.
735
d21f123b
CC
7362016-01-11 Cary Coutant <ccoutant@gmail.com>
737
738 PR gold/19353
739 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
740 we have a TLS segment for GD-to-IE optimization.
741 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
742 Adjust all calls.
743 (Target_i386::tls_desc_gd_to_ie): Likewise.
744 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
745 for TLSDESC GD-to-IE optimizations.
746 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
747 Adjust all calls.
748 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
749 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
750 for TLSDESC GD-to-IE optimizations.
751
4d625b70
CC
7522016-01-11 Cary Coutant <ccoutant@gmail.com>
753
754 Refactor gold to enable support for MIPS-64 relocation format.
755
756 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
757 (gc_process_relocs): Remove sh_type template parameter.
758 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
759 * object.h (Sized_relobj_file::split_stack_adjust): Add target
760 parameter.
761 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
762 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
763 specializations) Remove.
764 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
765 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
766 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
767 (Sized_relobj_file::split_stack_adjust): Add target parameter.
768 Adjust all callers.
769 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
770 Target::get_r_sym() to get r_sym field from relocations.
771 (Track_relocs::next_symndx): Call Target::get_r_sym().
772 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
773 add Classify_reloc template parameter. Use for accessing r_sym and
774 r_type.
775 (relocate_section): Likewise.
776 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
777 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
778 (Default_scan_relocatable_relocs::Reltype): New typedef.
779 (Default_scan_relocatable_relocs::reloc_size): New const.
780 (Default_scan_relocatable_relocs::sh_type): New const.
781 (Default_scan_relocatable_relocs::get_r_sym): New method.
782 (Default_scan_relocatable_relocs::get_r_type): New method.
783 (Default_emit_relocs_strategy): New class.
784 (scan_relocatable_relocs): Replace sh_type template parameter with
785 Scan_relocatable_relocs class. Use it to access r_sym and r_type
786 fields.
787 (relocate_relocs): Replace sh_type template parameter with
788 Classify_reloc class. Use it to access r_sym and r_type fields.
789 * target.h (Target::is_call_to_non_split): Replace r_type parameter
790 with pointer to relocation. Adjust all callers.
791 (Target::do_is_call_to_non_split): Likewise.
792 (Target::emit_relocs_scan): New virtual method.
793 (Sized_target::get_r_sym): New virtual method.
794 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
795 with pointer to relocation.
796
797 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
798 (Target_aarch64::Relocatable_size_for_reloc): Remove.
799 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
800 (Target_aarch64::scan_relocs): Likewise.
801 (Target_aarch64::relocate_section): Likewise.
802 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
803 Remove.
804 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
805 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
806 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
807 template parameter.
808 (Target_arm::emit_relocs_scan): New method.
809 (Target_arm::Relocatable_size_for_reloc): Replace with...
810 (Target_arm::Classify_reloc): ...this.
811 (Target_arm::gc_process_relocs): Use Classify_reloc.
812 (Target_arm::scan_relocs): Likewise.
813 (Target_arm::relocate_section): Likewise.
814 (Target_arm::scan_relocatable_relocs): Likewise.
815 (Target_arm::relocate_relocs): Likewise.
816 * i386.cc (Target_i386::emit_relocs_scan): New method.
817 (Target_i386::Relocatable_size_for_reloc): Replace with...
818 (Target_i386::Classify_reloc): ...this.
819 (Target_i386::gc_process_relocs): Use Classify_reloc.
820 (Target_i386::scan_relocs): Likewise.
821 (Target_i386::relocate_section): Likewise.
822 (Target_i386::scan_relocatable_relocs): Likewise.
823 (Target_i386::relocate_relocs): Likewise.
824 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
825 parameter.
826 (Mips_reloc_types): New class template.
827 (Mips_classify_reloc): New class template.
828 (Target_mips::Reltype): New typedef.
829 (Target_mips::Relatype): New typedef.
830 (Target_mips::emit_relocs_scan): New method.
831 (Target_mips::get_r_sym): New method.
832 (Target_mips::Relocatable_size_for_reloc): Replace with
833 Mips_classify_reloc.
834 (Target_mips::copy_reloc): Use Mips_classify_reloc.
835 (Target_mips::gc_process_relocs): Likewise.
836 (Target_mips::scan_relocs): Likewise.
837 (Target_mips::relocate_section): Likewise.
838 (Target_mips::scan_relocatable_relocs): Likewise.
839 (Target_mips::relocate_relocs): Likewise.
840 (mips_get_size_for_reloc): New function, factored out from
841 Relocatable_size_for_reloc::get_size_for_reloc.
842 (Target_mips::Scan::local): Use Mips_classify_reloc.
843 (Target_mips::Scan::global): Likewise.
844 (Target_mips::Relocate::relocate): Likewise.
845 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
846 (Target_powerpc::Relocatable_size_for_reloc): Remove.
847 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
848 (Target_powerpc::scan_relocs): Likewise.
849 (Target_powerpc::relocate_section): Likewise.
850 (Powerpc_scan_relocatable_reloc): Convert to class template.
851 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
852 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
853 (Powerpc_scan_relocatable_reloc::sh_type): New const.
854 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
855 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
856 (Target_powerpc::scan_relocatable_relocs): Use
857 Powerpc_scan_relocatable_reloc.
858 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
859 * s390.cc (Target_s390::emit_relocs_scan): New method.
860 (Target_s390::Relocatable_size_for_reloc): Remove.
861 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
862 (Target_s390::scan_relocs): Likewise.
863 (Target_s390::relocate_section): Likewise.
864 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
865 Remove.
866 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
867 (Target_s390::relocate_relocs): Use Default_classify_reloc.
868 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
869 (Target_sparc::Relocatable_size_for_reloc): Remove.
870 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
871 (Target_sparc::scan_relocs): Likewise.
872 (Target_sparc::relocate_section): Likewise.
873 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
874 Remove.
875 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
876 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
877 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
878 (Target_tilegx::Relocatable_size_for_reloc): Remove.
879 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
880 (Target_tilegx::scan_relocs): Likewise.
881 (Target_tilegx::relocate_section): Likewise.
882 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
883 Remove.
884 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
885 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
886 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
887 (Target_x86_64::Relocatable_size_for_reloc): Remove.
888 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
889 (Target_x86_64::scan_relocs): Likewise.
890 (Target_x86_64::relocate_section): Likewise.
891 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
892 Remove.
893 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
894 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
895
896 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
897
6f2750fe
AM
8982016-01-01 Alan Modra <amodra@gmail.com>
899
900 Update year range in copyright notice of all files.
901
3499769a
AM
902For older changes see ChangeLog-0815
903\f
904Copyright (C) 2016 Free Software Foundation, Inc.
905
906Copying and distribution of this file, with or without modification,
907are permitted in any medium without royalty provided the copyright
908notice and this notice are preserved.
909
910Local Variables:
911mode: change-log
912left-margin: 8
913fill-column: 74
914version-control: never
915End:
This page took 0.092961 seconds and 4 git commands to generate.