Change gdbarch software_single_step frame_info to regcache
[deliverable/binutils-gdb.git] / gold / ChangeLog
CommitLineData
c13b08db
CC
12016-11-21 Cary Coutant <ccoutant@gmail.com>
2
3 PR gold/20693
4 * gold.cc (queue_middle_tasks): Force valid target earlier.
5
b32e1756
IK
62016-11-21 Igor Kudrin <ikudrin@accesssoftek.com>
7
8 * layout.cc: Include windows.h and rpcdce.h (for MinGW32).
9 (Layout::create_build_id): Generate uuid using UuidCreate().
10
7a34932b
LY
112016-11-04 Loïc Yhuel <loic.yhuel@softathome.com>
12
13 * configure.ac: add missing '$'.
14 * configure: Regenerate.
15
ac423761
GN
162016-10-21 Gergely Nagy <ngg@tresorit.com>
17
18 PR gold/17704
19 * icf.cc (match_sections): Add new parameter section_addraligns.
20 Check section alignment and keep the section with the strictest
21 alignment.
22 (find_identical_sections): New local variable section_addraligns.
23 Store each section's alignment.
24 * testsuite/pr17704a_test.s: New file.
25 * testsuite/Makefile.am (pr17704a_test): New test.
26 * testsuite/Makefile.in: Regenerate.
27
c25aa1e1
AM
282016-10-06 Alan Modra <amodra@gmail.com>
29
30 * powerpc.cc (Target_powerpc::Relocate::relocate): Add fall
31 through comment.
32 * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise.
33
d8e90251
AM
342016-10-06 Alan Modra <amodra@gmail.com>
35
36 * aarch64.cc: Spell fall through comments as "// Fall through.".
37 * arm.cc: Likewise.
38 * mips.cc: Likewise.
39 * powerpc.cc: Likewise.
40 * s390.cc: Likewise.
41 * sparc.cc: Likewise.
42 * x86_64.cc: Likewise.
43 * powerpc.cc (Target_powerpc::Relocate::relocate): Add missing
44 fall through comments.
45 * sparc.cc: (Target_sparc::Scan::global): Likewise.
46 (Target_sparc::Relocate::relocate): Likewise.
47 * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise.
48 * resolve.cc (symbol_to_bits): Add missing break.
49
e3f07b5b
CC
502016-09-26 Cary Coutant <ccoutant@gmail.com>
51
52 PR gold/20238
53 * symtab.cc (Symbol_table::define_default_version): Check that
54 unversioned symbol is defined.
55
c5da1932
VZ
562016-09-26 Vlad Zakharov <vzakhar@synopsys.com>
57
58 * Makefile.in: Regenerate.
59 * configure: Likewise.
60 * testsuite/Makefile.in: Likewise.
61
24228130
AM
622016-09-26 Alan Modra <amodra@gmail.com>
63
64 * aarch64.cc (Target_aarch64::is_erratum_835769_sequence): Avoid
65 compiler warning.
66 * output.cc (Output_segment::set_section_addresses): Likewise.
153679d5 67 * testsuite/Makefile.in: Regenerate.
24228130 68
bc99685c
DK
692016-09-02 Doug Kwan <dougkwan@google.com>
70
71 * arm.cc (Target_arm::Target_arm): Move method definition outside of
72 class definition. Add code to handle --target1-rel, --target1-abs
73 and --target2= options.
74 (Target_arm::get_reloc_reloc_type): Change method to be non-static
75 and const.
76 (Target_arm::target1_is_rel_, Target_arm::target2_reloc_): New data
77 member declaration.
78 (Target_arm::Scan::local, Target_arm::Scan::global,
79 Target_arm::Relocate::relocate,
80 Target_arm::Relocatable_size_for_reloc::get_size_for_reloc): Adjust
81 call to Target_arm::get_real_reloc_type.
82 (Target_arm::get_real_reloc_type): Use command line options to
83 determine real types of R_ARM_TARGET1 and R_ARM_TARGET2.
84 * options.h (--target1-rel, --target1-abs, --target2): New ARM-only
85 options.
86
8a37735f
AM
872016-08-31 Alan Modra <amodra@gmail.com>
88
89 * powerpc.cc (class Stub_control): Delete stub14_group_size_
90 and has14_. Add group_size_.
91 (Stub_control::can_add_to_stub_group): Adjust to suit. Print
92 debug info when switching to adding sections before stubs.
93
afe002dd
AM
942016-08-31 Alan Modra <amodra@gmail.com>
95
96 * debug.h (DEBUG_TARGET): New.
97 (DEBUG_ALL): Add DEBUG_TARGET.
98 (gold_debug): Delete FORMAT param.
99 * powerpc.cc (Stub_control::can_add_to_stub_group): Print debug ourput.
100
57f6d32d
AM
1012016-08-30 Alan Modra <amodra@gmail.com>
102
103 PR 20523
104 * powerpc.cc (class Stub_control): Add has14_. Comment owner_.
105 (Stub_control::can_add_to_stub_group): Correct grouping of
106 sections containing 14-bit external branches. When returning
107 false, set state_ to reflect the fact that we have one section
108 for the next group. Rewrite most of function for clarity.
109 Add and expand comments.
110 (Target_powerpc::do_relax): Print stub group size retry in hex.
111
6395d38b
HS
1122016-08-26 Han Shen <shenhan@google.com>
113
114 PR gold/20529 - relaxing loop never ends.
115
116 * powerpc.cc (Stub_table::min_size_threshold_): New member to
117 limit size.
118 (Stub_table::set_min_size_threshold): New member function.
119 (Stub_table::set_address_and_size): Add code to only allow size
120 increase.
121 (Target_powerpc::do_relax): Add code to record last size.
122
1130c90e
RM
1232016-08-23 Roland McGrath <roland@hack.frob.com>
124
125 * options.h (General_options): Grok -z stack-size.
126 * output.h (Output_segment::set_size): New method.
127 * layout.cc (Layout::create_executable_stack_info): Renamed to ...
128 (Layout::create_stack_segment): ... this. Always create the
129 segment if -z stack-size was used.
130 (Layout::set_segment_offsets): Don't call ->set_offset on the
131 PT_GNU_STACK segment.
132
9f84726c
BS
1332016-08-15 Bharathi Seshadri <bseshadr@cisco.com>
134
135 * options.h (General_options): Add --be8 option.
136 * arm.cc (Arm_relobj::do_relocate_sections): Add code to swap for be8.
137 (Output_data_plt_arm_standard::do_fill_first_plt_entry): Likewise.
138 (Output_data_plt_arm_short::do_fill_plt_entry): Likewise.
139 (Output_data_plt_arm_long::do_fill_plt_entry): Likewise.
140 (Target_arm::do_adjust_elf_header): Do EF_ARM_BE8 adjustment.
141
a4aa1f5f
CC
1422016-08-17 Cary Coutant <ccoutant@gmail.com>
143
144 * i386.cc (Target_i386): Reset skip_call_tls_get_addr_ after printing
145 error message.
146 * testsuite/Makefile.am (pr20216a): Add missing dependencies.
147 (pr20308a): Add -Bgcctestdir/ to compile rules.
148 * testsuite/Makefile.in: Regenerate.
149
3785f51a
RM
1502016-08-12 Roland McGrath <roland@hack.frob.com>
151
152 PR gold/20462
153 * script-sections.cc (Script_sections::release_segments):
154 Reset this->segments_created_.
155
f300578f
RM
1562016-08-12 Roland McGrath <roland@hack.frob.com>
157
158 * yyscript.y (HIDDEN): New %token.
159 (assignment): Handle HIDDEN(string = expr) syntax.
160 * script.cc (script_keyword_parsecodes): Add HIDDEN.
161
f5713901
CC
1622016-08-10 Cary Coutant <ccoutant@gmail.com>
163
164 PR gold/20216
165 * x86_64.cc (Target_x86_64::Relocate::relocate): Add check for
166 R_X86_64_GOTPCREL. Reset skip_call_tls_get_addr_ after printing
167 error message.
168 * testsuite/Makefile.am (pr20216_gd.o): Add -Bgcctestdir/.
169 (pr20216_ld.o): Likewise.
170 * testsuite/Makefile.in: Regenerate.
171
2c00092d
JC
1722016-08-10 James Clarke <jrtc27@jrtc27.com>
173
174 PR gold/20443
175 * symtab.cc (Symbol_table::add_from_relobj): Handle NULL symbols,
176 which will be present for STT_SPARC_REGISTER.
177 (Symbol_table::add_from_pluginobj): Likewise.
178 (Symbol_table::add_from_dynobj): Likewise.
179 (Symbol_table::add_from_incrobj): Removed dead code.
180
007801ee
JC
1812016-08-10 James Clarke <jrtc27@jrtc27.com>
182
183 PR gold/20442
184 * sparc.cc (Target_sparc::Relocate::relocate): R_SPARC_GOTDATA_OP_LOX10
185 should fall back on R_SPARC_GOT10, not R_SPARC_GOT13.
186
55872e49
JC
1872016-08-10 James Clarke <jrtc27@jrtc27.com>
188
189 PR gold/20441
190 * sparc.cc (Target_sparc::Scan::check_non_pic): Allow R_SPARC_32 on
191 sparc64.
192
6e256507
CC
1932016-06-29 Cary Coutant <ccoutant@gmail.com>
194
6e256507
CC
195 PR gold/20310
196 * testsuite/dynamic_list.sh: Remove check for _ZdlPv.
197
8db8e694
CC
1982016-06-29 Cary Coutant <ccoutant@gmail.com>
199
200 * testsuite/Makefile.am (MOSTLYCLEANFILES): Add eh_test_2.
201 * testsuite/Makefile.in: Regenerate.
202
068e05ba
AM
2032016-06-30 Alan Modra <amodra@gmail.com>
204
205 * testsuite/Makefile.am (memory_test, memory_test_2): Pass
206 -Wl,-z to gcc, not plain -z.
207 * testsuite/Makefile.in: Regenerate.
208
b287eca3
L
2092016-06-29 H.J. Lu <hongjiu.lu@intel.com>
210
211 PR gold/20308
212 * i386.cc (Target_i386::Relocate::relocate): Allow
213 R_386_GOT32X relocation against ___tls_get_addr.
214 (Target_i386::Relocate::tls_gd_to_ie): Support indirect
215 call to __tls_get_addr.
216 (Target_i386::Relocate::tls_gd_to_le): Likewise.
217 (Target_i386::Relocate::tls_ld_to_le): Likewise.
218 * testsuite/Makefile.am (check_PROGRAMS): Add pr20308a_test,
219 pr20308b_test, pr20308c_test, pr20308d_test, pr20308e_test.
220 (pr20308a_test_SOURCES): New.
221 (pr20308a_test_DEPENDENCIES): Likewise.
222 (pr20308a_test_CFLAGS): Likewise.
223 (pr20308a_test_LDFLAGS): Likewise.
224 (pr20308a_test_LDADD): Likewise.
225 (pr20308b_test_SOURCES): Likewise.
226 (pr20308b_test_DEPENDENCIES): Likewise.
227 (pr20308b_test_CFLAGS): Likewise.
228 (pr20308b_test_LDFLAGS): Likewise.
229 (pr20308b_test_LDADD): Likewise.
230 (pr20308c_test_SOURCES): Likewise.
231 (pr20308c_test_DEPENDENCIES): Likewise.
232 (pr20308c_test_CFLAGS): Likewise.
233 (pr20308c_test_LDFLAGS): Likewise.
234 (pr20308c_test_LDADD): Likewise.
235 (pr20308d_test_SOURCES): Likewise.
236 (pr20308d_test_DEPENDENCIES): Likewise.
237 (pr20308d_test_CFLAGS): Likewise.
238 (pr20308d_test_LDFLAGS): Likewise.
239 (pr20308d_test_LDADD): Likewise.
240 (pr20308e_test_SOURCES): Likewise.
241 (pr20308e_test_DEPENDENCIES): Likewise.
242 (pr20308e_test_CFLAGS): Likewise.
243 (pr20308e_test_LDFLAGS): Likewise.
244 (pr20308e_test_LDADD): Likewise.
245 (pr20308a.so): Likewise.
246 (pr20308b.so): Likewise.
247 (pr20308_gd.o): Likewise.
248 (pr20308_ld.o): Likewise.
249 (MOSTLYCLEANFILES): Add pr20308a.so pr20308b.so.
250 * testsuite/Makefile.in: Regenerated.
251 * testsuite/pr20308_def.c: New file.
252 * testsuite/pr20308_gd.S: Likewise.
253 * testsuite/pr20308_ld.S: Likewise.
254 * testsuite/pr20308_main.c: Likewise.
255
ad961eab
L
2562016-06-29 H.J. Lu <hongjiu.lu@intel.com>
257
258 PR gold/20216
259 * configure.ac (DEFAULT_TARGET_X86_64_OR_X32): New
260 AM_CONDITIONAL.
261 * configure: Regenerated.
262 * x86_64.cc (Target_x86_64<size>::Relocate::relocate): Allow
263 R_X86_64_GOTPCRELX relocation against __tls_get_addr.
264 (Target_x86_64<size>::Relocate::tls_gd_to_ie): Support indirect
265 call to __tls_get_addr.
266 (Target_x86_64<size>::Relocate::tls_gd_to_le): Likewise.
267 (Target_x86_64<size>::Relocate::tls_ld_to_le): Likewise.
268 * testsuite/Makefile.am (check_PROGRAMS): Add pr20216a_test,
269 pr20216b_test, pr20216c_test, pr20216d_test, pr20216e_test.
270 (pr20216a_test_SOURCES): New.
271 (pr20216a_test_DEPENDENCIES): Likewise.
272 (pr20216a_test_CFLAGS): Likewise.
273 (pr20216a_test_LDFLAGS): Likewise.
274 (pr20216a_test_LDADD): Likewise.
275 (pr20216b_test_SOURCES): Likewise.
276 (pr20216b_test_DEPENDENCIES): Likewise.
277 (pr20216b_test_CFLAGS): Likewise.
278 (pr20216b_test_LDFLAGS): Likewise.
279 (pr20216b_test_LDADD): Likewise.
280 (pr20216c_test_SOURCES): Likewise.
281 (pr20216c_test_DEPENDENCIES): Likewise.
282 (pr20216c_test_CFLAGS): Likewise.
283 (pr20216c_test_LDFLAGS): Likewise.
284 (pr20216c_test_LDADD): Likewise.
285 (pr20216d_test_SOURCES): Likewise.
286 (pr20216d_test_DEPENDENCIES): Likewise.
287 (pr20216d_test_CFLAGS): Likewise.
288 (pr20216d_test_LDFLAGS): Likewise.
289 (pr20216d_test_LDADD): Likewise.
290 (pr20216e_test_SOURCES): Likewise.
291 (pr20216e_test_DEPENDENCIES): Likewise.
292 (pr20216e_test_CFLAGS): Likewise.
293 (pr20216e_test_LDFLAGS): Likewise.
294 (pr20216e_test_LDADD): Likewise.
295 (pr20216a.so): Likewise.
296 (pr20216b.so): Likewise.
297 (pr20216_gd.o): Likewise.
298 (pr20216_ld.o): Likewise.
299 (MOSTLYCLEANFILES): Add pr20216a.so pr20216b.so.
300 * testsuite/Makefile.in: Regenerated.
301 * testsuite/pr20216_def.c: New file.
302 * testsuite/pr20216_gd.S: Likewise.
303 * testsuite/pr20216_ld.S: Likewise.
304 * testsuite/pr20216_main.c: Likewise.
305
bebf0132
AM
3062016-06-29 Alan Modra <amodra@gmail.com>
307
308 * script_test_12.t: Delete .plt, specify 64k page size.
309 * script_test_12i.t: Likewise.
310
1275dd72
AM
3112016-06-29 Alan Modra <amodra@gmail.com>
312
313 * testsuite/plugin_layout_with_alignment.c: Explicitly align all
314 variables.
315
38ac44ac
AM
3162016-06-29 Alan Modra <amodra@gmail.com>
317
318 * testsuite/Makefile.am (copy_test_protected): Disable for powerpc.
319 * testsuite/Makefile.in: Regenerate.
320
5627d875
IK
3212016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
322
323 * aarch64-reloc.def (NONE): New relocation.
324 * aarch64.cc (Target_aarch64::Scan::local): Handle R_AARCH64_NONE.
325 (Target_aarch64::Scan::global): Likewise.
326 * testsuite/Makefile.am (aarch64_reloc_none): New test.
327 * testsuite/Makefile.in: Regenerate.
328 * testsuite/aarch64_reloc_none.s: New test source file.
329 * testsuite/aarch64_reloc_none.sh: New test script.
330
3a4f096e
ST
3312016-06-28 Sriraman Tallam <tmsriram@google.com>
332
333 * x86_64.cc (Lazy_view): New class.
334 (can_convert_mov_to_lea): Templatize function. Make the function
335 check for appropriate relocation types and use the view parameter
336 to get section contents.
337 (can_convert_callq_to_direct): New function.
338 (Target_x86_64<size>::Scan::global): Refactor.
339 (Target_x86_64<size>::Relocate::relocate): Refactor. Change any indirect
340 call via GOT that can be converted.
341 * testsuite/Makefile.am (x86_64_indirect_call_to_direct.sh): New test.
342 * testsuite/Makefile.in: Regenerate.
343 * testsuite/x86_64_indirect_call_to_direct1.s: New file.
344 * testsuite/x86_64_indirect_jump_to_direct1.s: New file.
345
8032ac03
IK
3462016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
347
348 * aarch64.cc (Target_aarch64::Scan::local): Move the call to got_section
349 from the top level to the places of its use.
350
f224a3c5
IK
3512016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
352
353 PR gold/18098
354 * script-c.h (Sort_wildcard): Add SORT_WILDCARD_BY_INIT_PRIORITY.
355 * script-sections.cc (Input_section_sorter::get_init_priority): New method.
356 (Input_section_sorter::operator()): Handle SORT_WILDCARD_BY_INIT_PRIORITY.
357 (Output_section_element_input::print): Likewise.
358 * script.cc (script_keyword_parsecodes): Add entry SORT_BY_INIT_PRIORITY.
359 * yyscript.y (SORT_BY_INIT_PRIORITY): New token.
360 (wildcard_section): Handle SORT_BY_INIT_PRIORITY.
361
362 * testsuite/Makefile.am (script_test_14): New test.
363 * testsuite/Makefile.in: Regenerate.
364 * testsuite/script_test_14.s: New test source file.
365 * testsuite/script_test_14.sh: New test script.
366 * testsuite/script_test_14.t: New test linker script.
367
7160c10d
JC
3682016-06-28 James Clarke <jrtc27@jrtc27.com>
369
370 * sparc.cc (Target_sparc::Scan::local): Don't convert R_SPARC_32
371 to R_SPARC_RELATIVE if class is ELFCLASS64.
372 (Target_sparc::Scan::global): Likewise.
373
3ca25b56
CC
3742016-06-23 Cary Coutant <ccoutant@gmail.com>
375 Igor Kudrin <ikudrin@accesssoftek.com>
376
377 PR gold/15370
378 * script-sections.cc
379 (Output_section_element_input::set_section_addresses): Keep bin_count
380 separate from input_pattern_count.
381 * testsuite/script_test_12.t: Add another section .x4.
382 * testsuite/script_test_12i.t: Likewise.
383 * testsuite/script_test_12a.c: Likewise.
384 * testsuite/script_test_12b.c: Likewise.
385
2ec060b7
IK
3862016-06-23 Igor Kudrin <ikudrin@accesssoftek.com>
387
388 * gold-threads.cc (impl_threads::Lock_impl_threads): Fix typos.
389
6b1edb94
L
3902016-06-22 H.J. Lu <hongjiu.lu@intel.com>
391
392 PR ld/20283
393 * NEWS: Mention --enable-relro.
394 * configure.ac: Add --enable-relro.
395 (DEFAULT_LD_Z_RELRO): New. Set by --enable-relro and default
396 to 1.
397 * config.in: Regenerated.
398 * configure: Likewise.
399 * options.h (General_options::relro): Default to
400 DEFAULT_LD_Z_RELRO.
401
f70be8a4
CC
4022016-06-20 Cary Coutant <ccoutant@gmail.com>
403
404 * NEWS: Add new features in 1.12.
405 * version.cc (version_string): Bump to 1.12.
406
8474a88f
L
4072016-06-20 H.J. Lu <hongjiu.lu@intel.com>
408
409 PR gold/20245
410 * i386.cc (Target_i386::first_plt_entry_offset): Return 0 if
411 plt_ is NULL.
412 (Target_i386::plt_entry_size): Likewise.
413 (Target_x86_64<size>::first_plt_entry_offset): Likewise.
414 (Target_x86_64<size>::plt_entry_size): Likewise.
415
a8ecc9fe
VR
4162016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
417
418 * mips.cc (Target_mips::Target_mips): Initialize rld_map_.
419 (Target_mips::rld_map_): New data member.
420 (Target_mips::do_finalize_sections): Add support for
421 DT_MIPS_RLD_MAP and DT_MIPS_RLD_MAP_REL dynamic tags,
422 .rld_map section, and __RLD_MAP symbol.
423 (Target_mips::do_dynamic_tag_custom_value): Add support for
424 DT_MIPS_RLD_MAP_REL dynamic tag.
425 * output.cc (Output_data_dynamic::get_entry_offset): New method
426 definition.
427 * output.h (Output_data_dynamic::get_entry_offset): New method
428 declaration.
429
beceef50
VR
4302016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
431
432 * mips.cc (Mips_relocate_functions::relpc16): Add unaligned check.
433
f5b11759
VR
4342016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
435
436 * mips.cc (relocation_needs_la25_stub): Add support for relocs:
437 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
438 (hi16_reloc): Add support for R_MIPS_PCHI16 relocation.
439 (is_matching_lo16_reloc): Likewise.
440 (lo16_reloc): Add support for R_MIPS_PCLO16 relocation.
441 (Mips_output_data_plt::plt_entry_r6): New static data member for
442 R6 PLT entry.
443 (Target_mips::is_output_r6): New method.
444 (Target_mips::Mips_mach): Add new enum constants.
445 (Mips_relocate_functions::Status): Likewise.
446 (Mips_relocate_functions::pchi16_relocs): New static data member.
447 (Mips_relocate_functions::relpc21): New method.
448 (Mips_relocate_functions::relpc26): Likewise.
449 (Mips_relocate_functions::relpc18): Likewise.
450 (Mips_relocate_functions::relpc19): Likewise.
451 (Mips_relocate_functions::relpchi16): Likewise.
452 (Mips_relocate_functions::do_relpchi16): Likewise.
453 (Mips_relocate_functions::relpclo16): Likewise.
454 (Mips_output_data_plt::do_write): Add support for Mips r6 plt
455 entry.
456 (Target_mips::mips_32bit_flags): Add E_MIPS_ARCH_32R6 support.
457 (Target_mips::elf_mips_mach): Add E_MIPS_ARCH_32R6 and
458 E_MIPS_ARCH_64R6 support.
459 (Target_mips::update_abiflags_isa): Likewise.
460 (mips_get_size_for_reloc): Add support for relocs: R_MIPS_PCHI16,
461 R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3 and
462 R_MIPS_PC19_S2.
463 (Target_mips::Scan::local): Add support for relocs: R_MIPS_PCHI16
464 and R_MIPS_PCLO16.
465 (Target_mips::Scan::global): Add support for relocs:
466 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
467 (Target_mips::Relocate::relocate): Call functions for resolving
468 Mips32r6 and Mips64r6 relocations, and print error message for
469 STATUS_PCREL_UNALIGNED.
470 (Target_mips::Scan::get_reference_flags): Add support for relocs:
471 R_MIPS_PCHI16, R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2,
472 R_MIPS_PC18_S3 and R_MIPS_PC19_S2.
473 (Target_mips::elf_mips_mach_name): Add E_MIPS_ARCH_32R6 and
474 E_MIPS_ARCH_64R6 support.
475
3328c04b
L
4762016-06-13 H.J. Lu <hongjiu.lu@intel.com>
477
478 PR gold/20246
479 * testsuite/script_test_2.t: Add .got.plt after .got.
480
b52717c0
VR
4812016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
482
483 * mips.cc (struct Mips_abiflags): New struct.
484 (Mips_relobj::Mips_relobj): Initialize attributes_section_data_
485 and abiflags_.
486 (Mips_relobj::~Mips_relobj): Delete object pointed by
487 attributes_section_data_.
488 (Mips_relobj::abiflags): New method.
489 (Mips_relobj::attributes_section_data): Likewise.
490 (Mips_relobj::attributes_section_data_): New data member.
491 (Mips_relobj::abiflags_): Likewise.
492 (class Mips_output_section_abiflags): New class.
493 (Target_mips::Target_mips): Initialize attributes_section_data_,
494 abiflags_ and has_abiflags_section_.
495 (Target_mips::do_should_include_section): Don't emit input
496 .MIPS.abiflags sections to output .MIPS.abiflags.
497 (Target_mips::Mips_mach): Add new enum constants.
498 (Target_mips::mips_isa_ext_mach): New method.
499 (Target_mips::mips_isa_ext): Likewise.
500 (Target_mips::update_abiflags_isa): Likewise.
501 (Target_mips::infer_abiflags): Likewise.
502 (Target_mips::create_abiflags): Likewise.
503 (Target_mips::fp_abi_string): Likewise.
504 (Target_mips::select_fp_abi): Likewise.
505 (Target_mips::merge_obj_attributes): Likewise.
506 (Target_mips::merge_obj_abiflags): Likewise.
507 (Target_mips::level_rev): Likewise.
508 (Target_mips::merge_obj_e_flags): Rename from
509 merge_processor_specific_flags. Remove dyn_obj argument,
510 call update_abiflags_isa when needed, compare NaN encodings and
511 compare FP64 state.
512 (Target_mips::add_machine_extensions): Add two machine extensions
513 and fix one.
514 (Target_mips::attributes_section_data_): New data member.
515 (Target_mips::abiflags_): Likewise.
516 (Target_mips::has_abiflags_section_): Likewise.
517 (Mips_relobj::do_read_symbols): Read .gnu.attributes and
518 .MIPS.abiflags sections if they exists.
519 (Target_mips::elf_mips_mach): Add E_MIPS_MACH_5900 and
520 E_MIPS_MACH_OCTEON3 support.
521 (Target_mips::do_adjust_elf_header): Setup EI_ABIVERSION flag.
522 (Target_mips::do_finalize_sections): Merge .gnu.attributes and
523 .MIPS.abiflags sections from input. Create these sections if
524 needed.
525 (Target_mips::elf_mips_mach_name): Add E_MIPS_MACH_5900 and
526 E_MIPS_MACH_OCTEON3 support, and change strings for
527 E_MIPS_MACH_LS2E, E_MIPS_MACH_LS2F and E_MIPS_MACH_LS3A just
528 to match bfd.
529
82e49872
VR
5302016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
531
532 * mips.cc (Mips_relobj::Mips_relobj): Initialize
533 has_reginfo_section_.
534 (Mips_relobj::has_reginfo_section_): New data member.
535 (Mips_relobj::has_reginfo_section): New method.
536 (class Mips_output_section_reginfo): Change base class to
537 Output_section_data, and set masks of the output .reginfo section
538 in constructor.
539 (Mips_output_section_reginfo::as_mips_output_section_reginfo):
540 Remove.
541 (Mips_output_section_reginfo::set_masks): Likewise.
542 (Mips_output_section_reginfo::set_final_data_size): Likewise.
543 (Mips_output_section_reginfo::do_print_to_mapfile): New method.
544 (Target_mips::do_make_output_section): Remove.
545 (Mips_relobj::do_read_symbols): Set has_reginfo_section_ to true
546 if the object contains a .reginfo section.
547 (Target_mips::do_finalize_sections): Create a .reginfo output
548 section if needed.
549
a080d84d
AV
5502016-06-09 Artemiy Volkov <artemiyv@acm.org>
551
552 * mips.cc (Mips_output_data_got::do_write): Add missing template
553 args via typedef.
554
40d85a7f
MK
5552016-05-30 Marcin Kościelnicki <koriakin@0x04.net>
556
557 PR/19960
558 * s390.cc (Target_s390::ss_code_st_r14): Removed.
559 (Target_s390::ss_code_l_r14): Removed.
560 (Target_s390::ss_code_ear): Removed.
561 (Target_s390::ss_code_c): Removed.
562 (Target_s390::ss_match_st_r14): New function.
563 (Target_s390::ss_match_l_r14): New function.
564 (Target_s390::ss_match_mcount): Call ss_match_{l,st}_r14 instead
565 of matching code directly.
566 (Target_s390::ss_match_ear): New function.
567 (Target_s390::ss_match_c): New function.
568 (Target_s390::do_calls_non_split): Call ss_match_{ear,c} instead
569 of matching code directly.
570
6eeb0170
CC
5712016-05-19 Cary Coutant <ccoutant@gmail.com>
572
573 PR gold/19823
574 * copy-relocs.cc (Copy_relocs::make_copy_reloc): Add object
575 parameter; check for protected symbol.
576 * copy-relocs.h (Copy_relocs::make_copy_reloc): Add object parameter.
577 * mips.cc (Mips_copy_relocs): Adjust call to make_copy_reloc.
578 * symtab.cc (Symbol::init_fields): Initialize is_protected_.
579 (Symbol_table::add_from_dynobj): Mark protected symbols.
580 * symtab.h (Symbol::is_protected): New method.
581 (Symbol::set_is_protected): New method.
582 (Symbol::is_protected_): New data member.
583
584 * testsuite/Makefile.am (copy_test_protected): New test.
585 * testsuite/Makefile.in: Regenerate.
586 * testsuite/copy_test.cc (main): Add legal reference to protected
587 symbol.
588 * testsuite/copy_test_v1.cc (main): Likewise.
589 * testsuite/copy_test_2.cc (ip): Add protected symbol.
590 * testsuite/copy_test_protected.cc: New test source file.
591 * testsuite/copy_test_protected.sh: New test script.
592
15eb1beb
VR
5932016-05-19 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
594
595 * mips.cc (Mips_got_entry::Mips_got_entry): Remove object argument
596 for global got symbols, and set addend to 0.
597 (Mips_got_entry::hash): Change hash algorithm.
598 (Mips_got_entry::equals): Refactor.
599 (Mips_got_entry::object): Return input object for local got symbols
600 from union d.
601 (Mips_got_entry::addend): Change return of the relocation addend.
602 (Mips_got_entry::addend_): Move from union d.
603 (Mips_got_entry::object_): Move into union d.
604 (class Mips_symbol_hash): New class.
605 (Mips_got_info::Global_got_entry_set): New type.
606 (Mips_got_info::global_got_symbols): Change return type to
607 Global_got_entry_set.
608 (Mips_got_info::global_got_symbols_): Change type to
609 Global_got_entry_set.
610 (Mips_symbol::hash): New method.
611 (Mips_output_data_la25_stub::symbols_): Change type to std::vector.
612 (Mips_output_data_mips_stubs::Mips_stubs_entry_set): New type.
613 (Mips_output_data_mips_stubs::symbols_): Change type to
614 Mips_stubs_entry_set.
615 (Mips_got_info::record_global_got_symbol): Don't pass object
616 argument when creating global got symbol.
617 (Mips_got_info::record_got_entry): Remove find before inserting
618 got entries.
619 (Mips_got_info::add_reloc_only_entries): Change type of iterator
620 to Global_got_entry_set.
621 (Mips_got_info::count_got_symbols): Likewise.
622 (Mips_output_data_la25_stub::create_la25_stub): Use push_back
623 for adding entries to symbols_.
624 (Mips_output_data_la25_stub::do_write): Change type of iterator
625 to std::vector.
626 (Mips_output_data_mips_stubs::set_lazy_stub_offsets): Change type
627 of iterator to Mips_stubs_entry_set.
628 (Mips_output_data_mips_stubs::set_needs_dynsym_value): Likewise.
629 (Mips_output_data_mips_stubs::do_write): Likewise.
630
5c28a503
HS
6312016-05-06 Han Shen <shenhan@google.com>
632
633 PR gold/19987.
634
635 * aarch64-reloc.def: New relocation type.
636 * aarch64.cc (AArch64_relocate_functions::Page): Changed to public.
637 (Target_aarch64::Scan::local): Add R_AARCH64_LD64_GOTPAGE_LO15.
638 (Target_aarch64::Scan::global): Add R_AARCH64_LD64_GOTPAGE_LO15.
639 (Target_aarch64::Relocate::relocate): Implement R_AARCH64_LD64_GOTPAGE_LO15.
640
786a118c
NC
6412016-04-28 Nick Clifton <nickc@redhat.com>
642
643 * po/zh_CN.po: Updated Chinese (simplified) translation.
644
6fd8e7c2
L
6452016-04-15 H.J. Lu <hongjiu.lu@intel.com>
646
647 * Makefile.in: Regenerated with automake 1.11.6.
648 * aclocal.m4: Likewise.
649 * testsuite/Makefile.in: Likewise.
650
b60ecbc6
CC
6512016-03-30 Cary Coutant <ccoutant@gmail.com>
652
653 PR gold/16979
654 * symtab.cc (Symbol_table::define_default_version): Check for case
655 where symbols are both in different shared objects.
656
ed700649
CC
6572016-03-27 Cary Coutant <ccoutant@gmail.com>
658
659 PR gold/16111
660 * i386.cc (Target_i386): Add check for fully-resolved symbol for
661 R_386_GOTOFF.
662
9780e045
NC
6632016-03-22 Nick Clifton <nickc@redhat.com>
664
665 * configure: Regenerate.
666
648c5cbb
CC
6672016-03-21 Cary Coutant <ccoutant@gmail.com>
668
669 PR gold/19842
670 * errors.cc (Errors::undefined_symbol): Add info message when
671 symbol should have been provided by a plugin.
672 * target-reloc.h (issue_undefined_symbol_error): Check for
673 placeholder symbols defined in discarded sections.
674 * testsuite/Makefile.am (plugin_test_9b): New test case.
675 * testsuite/Makefile.in: Regenerate.
676 * testsuite/plugin_test_9b_elf.cc: New test source file.
677 * testsuite/plugin_test_9b_ir.cc: New test source file.
678
698400bf
CC
6792016-03-20 Cary Coutant <ccoutant@gmail.com>
680
681 PR gold/19002
682 * ehframe.cc (Eh_frame::read_fde): Check for dropped functions.
683 * testsuite/Makefile.am (eh_test_2): New test.
684 * testsuite/Makefile.in: Regenerate.
685 * testsuite/eh_test_2.sh: New test script.
686 * testsuite/eh_test_a.cc (bar): Make it comdat.
687 * testsuite/eh_test_b.cc (bar): Add a duplicate copy.
688
01b84e25
VR
6892016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
690
691 * mips.cc (Mips_relobj::is_n64_): Remove.
692 (Target_mips::ei_class_): Likewise.
693 (Mips_relobj::is_newabi): Call methods.
694 (Mips_relobj::is_n64): Change checking for N64 ABI.
695 (Target_mips::is_output_n64): Likewise.
696 (Target_mips::merge_processor_specific_flags): Remove ei_class
697 argument, and remove comparing ei_class.
698 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
699 of the ELF header.
700 (Target_mips::do_finalize_sections): Don't pass ei_class argument
701 to merge_processor_specific_flags.
702 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and
703 change checking for N64 ABI.
704
47a9f4fc
VR
7052016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
706
707 * mips.cc (enum Special_relocation_symbol): New enum type.
708 (is_readonly_section): New function.
709 (eh_reloc): Likewise.
710 (Mips_got_entry::is_section_symbol_): New member.
711 (Mips_got_entry::is_section_symbol): New method.
712 (Mips_got_info::record_local_got_symbol): Add is_section_symbol
713 argument.
714 (Mips_relobj::mips_elf_options_section_name): New method.
715 (Mips_output_data_got::record_local_got_symbol): Add
716 is_section_symbol argument, and pass it to
717 Mips_got_info::record_local_got_symbol.
718 (Mips_output_data_got::got_offset): Add addend argument, and pass
719 it to Relobj::local_got_offset.
720 (struct Mips_output_reloc_writer): New type.
721 (class Mips_output_data_reloc): New class.
722 (Mips_output_data_plt::Reloc_section): Change type to
723 Mips_output_data_reloc.
724 (Target_mips::Reloc_section): Likewise.
725 (Mips_reloc_types::get_r_addend): Remove unsigned from return type.
726 (Mips_classify_reloc::get_r_type2): New method.
727 (Mips_classify_reloc::get_r_type3): Likewise.
728 (Mips_classify_reloc::get_r_ssym): Likewise.
729 (Target_mips::Reloca_section): Remove.
730 (Relocate::should_apply_static_reloc): Rename from
731 should_apply_r_mips_32_reloc.
732 (Target_mips::copy_reloc): Replace Reltype parameter with r_type
733 and r_offset.
734 (Mips_relocate_functions::Valtype): New type.
735 (Mips_relocate_functions::Valtype64): New type.
736 (Mips_relocate_functions::check_overflow): New method.
737 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public
738 interface.
739 (Mips_relocate_functions::mips_reloc_shuffle): Likewise.
740 (Mips_relocate_functions::rel16): Add support for resolving
741 relocations for Mips64.
742 (Mips_relocate_functions::rel32): Likewise.
743 (Mips_relocate_functions::reljalr): Likewise.
744 (Mips_relocate_functions::relpc32): Likewise.
745 (Mips_relocate_functions::rel26): Likewise.
746 (Mips_relocate_functions::relpc16): Likewise.
747 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
748 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
749 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
750 (Mips_relocate_functions::do_relhi16): Likewise.
751 (Mips_relocate_functions::do_relgot16_local): Likewise.
752 (Mips_relocate_functions::rello16): Likewise.
753 (Mips_relocate_functions::relgot): Likewise.
754 (Mips_relocate_functions::relgotpage): Likewise.
755 (Mips_relocate_functions::relgotofst): Likewise.
756 (Mips_relocate_functions::relgot_hi16): Likewise.
757 (Mips_relocate_functions::relgot_lo16): Likewise.
758 (Mips_relocate_functions::relgprel): Likewise.
759 (Mips_relocate_functions::relgprel32): Likewise.
760 (Mips_relocate_functions::tlsrelhi16): Likewise.
761 (Mips_relocate_functions::tlsrello16): Likewise.
762 (Mips_relocate_functions::tlsrel32): Likewise.
763 (Mips_relocate_functions::relsub): Likewise.
764 (Mips_relocate_functions::releh): New method.
765 (Mips_relocate_functions::rel64): Likewise.
766 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and
767 pass it to Mips_got_entry.
768 (Mips_got_info::add_local_entries): Pass addend argument
769 to code functions, and for STT_SECTION symbols call
770 add_symbolless_local_addend.
771 (Mips_got_info::add_tls_entries): Pass addend argument to code
772 functions.
773 (Mips_relobj::do_read_symbols): Read gp value that was used to
774 create object.
775 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
776 instruction. Opcode for instruction will be selected later.
777 (Target_mips::gc_process_relocs): Add case for SHT_RELA.
778 (Target_mips::scan_relocatable_relocs): Likewise.
779 (Target_mips::emit_relocs_scan): Likewise.
780 (Target_mips::relocate_relocs): Likewise.
781 (Target_mips::do_finalize_sections): Skip objects for merging
782 processor specific flags in which all input sections will be
783 discarded.
784 (mips_get_size_for_reloc): Add case for R_MIPS_EH.
785 (Target_mips::Scan::get_reference_flags): Likewise.
786 (Target_mips::relocate_special_relocatable): Call rel26 method with
787 calculate_only and calculated_value arguments.
788 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
789 dynamic relocation against a readonly sections, and pass
790 is_section_symbol to Mips_got_info::record_local_got_symbol.
791 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
792 dynamic relocation against a readonly sections, and pass r_type
793 and r_offset to Target_mips::copy_reloc.
794 (Target_mips::Relocate::relocate): Add support for resolving
795 relocations for Mips64.
796 (Target_mips::mips_info): Add case for Mips64 default dynamic
797 linker name.
798 (Target_selector_mips): Correct emulation names.
799
1a08ae21
VR
8002016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
801
802 * mips.cc (class Mips_output_data_la25_stub): Add
803 do_print_to_mapfile function.
804
c2fa9ced
VR
8052016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
806
807 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
808 elf_r_info.
809
fd91f002
L
8102016-03-09 H.J. Lu <hongjiu.lu@intel.com>
811
812 * testsuite/plugin_layout_with_alignment.cc: Renamed to ..
813 * testsuite/plugin_layout_with_alignment.c: This.
814 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated.
815 (plugin_layout_with_alignment): Likewise.
816 * testsuite/Makefile.in: Regenerated.
817
7ff6eb49
CC
8182016-03-08 Cary Coutant <ccoutant@gmail.com>
819
820 PR 19751
821 * testsuite/Makefile.am (retain_symbols_file_test): Remove check
822 for constructor.
823 * testsuite/Makefile.in: Regenerate.
824 * testsuite/dynamic_list.sh: Likewise.
825 * testsuite/retain_symbols_file_test.sh: Likewise.
826
202736be
CC
8272016-03-08 Cary Coutant <ccoutant@gmail.com>
828
829 PR 19751
830 * arm.cc (Reloc_stub::Key::name): Add unused attribute.
831 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.
832
c32482d6
CC
8332016-03-08 Cary Coutant <ccoutant@gmail.com>
834 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
835
836 * output.cc (Output_reloc_writer): New type.
837 (Output_data_reloc_base::do_write): Move implementation to template
838 in output.h and replace with invocation of template.
839 * output.h (Output_file): Move to top of file.
840 (Output_reloc::get_symbol_index): Move to public interface.
841 (Output_reloc::get_address): Likewise.
842 (Output_data_reloc_base::do_write_generic): New function template.
843
8d04e81d
CC
8442016-03-04 Cary Coutant <ccoutant@gmail.com>
845
846 PR gold/19019
847 PR gold/19763
848 * symtab.cc: Instantiate Sized_symbol::init_constant and
849 Sized_symbol::init_undefined.
850
dc1c8a16
CC
8512016-03-03 Cary Coutant <ccoutant@gmail.com>
852
853 PR gold/19019
854 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
855 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
856 * mips.cc (Target_mips::make_symbol): Adjust function signature.
857 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
858 (Target_sparc::do_is_defined_by_abi): Remove test for
859 STT_SPARC_REGISTER.
860 (Target_sparc::Register_symbol): New struct type.
861 (Target_sparc::register_syms_): New data member.
862 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
863 (Target_sparc::make_symbol): New function.
864 (Target_sparc::do_finalize_sections): Add register symbols and new
865 dynamic table entries.
866 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
867 (Symbol_table::add_target_global_symbol): New function.
868 (Symbol_table::target_symbols_): New data member.
869 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
870 (Symbol_table::Symbol_table): Initialize target_symbols_.
871 (Symbol_table::add_from_object): Pass additional parameters to
872 Target::make_symbol.
873 (Symbol_table::define_special_symbol): Likewise.
874 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
875 undefined symbol value.
876 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
877 (Symbol_table::sized_finalize): Likewise.
878 (Symbol_table::sized_write_globals): Likewise.
879 * target.h (Sized_target::make_symbol): Add name, st_type, object,
880 st_shndx, and value parameters.
881
9b738e36 8822016-03-03 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
a06ed37d
RÁE
883
884 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
885 LDPK_WEAKUNDEF symbols.
886
3f1f41f5
L
8872016-03-03 Than McIntosh <thanm@google.com>
888
889 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
890 and get_input_section_alignment in transfer vector.
891 (get_input_section_alignment): New function.
892 (get_input_section_size): New function.
893 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
894 * testsuite/Makefile.in: [Regenerate.]
895 * testsuite/plugin_section_alignment.cc: New test file.
896 * testsuite/plugin_layout_with_alignment.cc: New test file.
897 * testsuite/plugin_layout_with_alignment.sh: New test file.
898
9b738e36 8992016-03-03 Evgenii Stepanov <eugenis@google.com>
95ecdfbf
ES
900
901 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
902 parameter.
903 * plugin.cc (get_symbols_v3): New function.
904 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
905 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
906 new version.
907
fc5a9bd5
CC
9082016-02-26 Egor Kochetov <egor.kochetov@intel.com>
909 Cary Coutant <ccoutant@gmail.com>
910
911 PR gold/19735
912 * ehframe.h (Cie::fde_encoding): New method.
913 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
914 address ranges.
915
1cd17042
L
9162016-02-15 H.J. Lu <hongjiu.lu@intel.com>
917
918 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
919 -mrelax-relocations=yes to $(TEST_AS).
920 (x86_64_mov_to_lea6.o): Likewise.
921 (x86_64_overflow_pc32.o): Remove duplicated target.
922 * testsuite/Makefile.in: Regenerated.
923
2b63aca3
MK
9242016-02-15 Marcin Kościelnicki <koriakin@0x04.net>
925
926 * s390.cc (Target_s390::match_view_u): New helper method.
927 (Target_s390::do_is_call_to_non_split): New method.
928 (Target_s390::ss_code_st_r14): New const.
929 (Target_s390::ss_code_l_r14): New const.
930 (Target_s390::ss_code_bras_8): New const.
931 (Target_s390::ss_code_l_basr): New const.
932 (Target_s390::ss_code_a_basr): New const.
933 (Target_s390::ss_code_ear): New const.
934 (Target_s390::ss_code_c): New const.
935 (Target_s390::ss_code_larl): New const.
936 (Target_s390::ss_code_brasl): New const.
937 (Target_s390::ss_code_jg): New const.
938 (Target_s390::ss_code_jgl): New const.
939 (Target_s390::ss_match_mcount): New helper method.
940 (Target_s390::ss_match_l): New helper method.
941 (Target_s390::ss_match_ahi): New helper method.
942 (Target_s390::ss_match_alfi): New helper method.
943 (Target_s390::ss_match_cr): New helper method.
944 (Target_s390::do_calls_non_split): New method.
945 * testsuite/Makefile.am: Added new tests.
946 * testsuite/Makefile.in: Regenerate.
947 * testsuite/split_s390.sh: New test.
948 * testsuite/split_s390_1_a1.s: New test.
949 * testsuite/split_s390_1_a2.s: New test.
950 * testsuite/split_s390_1_n1.s: New test.
951 * testsuite/split_s390_1_n2.s: New test.
952 * testsuite/split_s390_1_z1.s: New test.
953 * testsuite/split_s390_1_z2.s: New test.
954 * testsuite/split_s390_1_z3.s: New test.
955 * testsuite/split_s390_1_z4.s: New test.
956 * testsuite/split_s390_2_ns.s: New test.
957 * testsuite/split_s390_2_s.s: New test.
958 * testsuite/split_s390x_1_a1.s: New test.
959 * testsuite/split_s390x_1_a2.s: New test.
960 * testsuite/split_s390x_1_n1.s: New test.
961 * testsuite/split_s390x_1_n2.s: New test.
962 * testsuite/split_s390x_1_z1.s: New test.
963 * testsuite/split_s390x_1_z2.s: New test.
964 * testsuite/split_s390x_1_z3.s: New test.
965 * testsuite/split_s390x_1_z4.s: New test.
966 * testsuite/split_s390x_2_ns.s: New test.
967 * testsuite/split_s390x_2_s.s: New test.
968
e3dbf582
HS
9692016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
970
971 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
972 info message for every erratum 843419 found and fixed.
973
17ecd016
CC
9742016-02-07 Cary Coutant <ccoutant@gmail.com>
975
976 PR gold/18695
977 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
978 information to relocation overflow errors.
979
7c8b700c
CC
9802016-02-06 Cary Coutant <ccoutant@gmail.com>
981
17ecd016 982 PR gold/18695
7c8b700c
CC
983 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
984 overflow checking when symbol value + addend < 0.
985
b7a4e9d8
CC
9862016-02-06 Cary Coutant <ccoutant@gmail.com>
987
988 PR gold/19577
989 * reloc.h (Limits): New class.
990 (Bits::has_overflow32): Use min/max values from Limits.
991 (Bits::has_unsigned_overflow32): Likewise.
992 (Bits::has_signed_unsigned_overflow32): Likewise.
993 (Bits::has_overflow): Likewise.
994 (Bits::has_unsigned_overflow): Likewise.
995 (Bits::has_signed_unsigned_overflow64): Likewise.
996
19ef3f4d
CC
9972016-02-06 Cary Coutant <ccoutant@gmail.com>
998
999 PR gold/19567
1000 * reloc.h (Relocate_functions::Overflow_check): Add comments.
1001 * x86_64.cc (X86_64_relocate_functions): New class.
1002 (Target_x86_64::Relocate::relocate): Use the new class.
1003 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
1004 (x32_overflow_pc32): New test case.
1005 * testsuite/Makefile.in: Regenerate.
1006 * testsuite/x32_overflow_pc32.sh: New script.
1007 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
1008
72c55146
CC
10092016-02-06 Cary Coutant <ccoutant@gmail.com>
1010
1011 PR gold/19577
1012 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
1013 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
1014
2bf48941
CC
10152016-02-06 Cary Coutant <ccoutant@gmail.com>
1016
3b8bcce8 1017 PR gold/19577
2bf48941
CC
1018 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
1019 comparison.
1020 (Bits::has_unsigned_overflow): Likewise.
1021
bd8d853f
MK
10222016-02-06 Marcin Kościelnicki <koriakin@0x04.net>
1023
1024 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
1025 parameters.
1026 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
1027 and view_size to is_call_to_non_split.
1028 * target.cc (Target::is_call_to_non_split): Add view and view_size
1029 parameters.
1030 * target.h (class Target): Likewise.
1031
84d543b7
ST
10322016-02-05 Sriraman Tallam <tmsriram@google.com>
1033
1034 * icf.cc (get_rel_addend): New function.
1035 (get_section_contents): Move merge section addend computation to a
1036 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
1037 Fix bug to not read past the length of the section.
1038
c34c98ed
CC
10392016-02-05 Cary Coutant <ccoutant@gmail.com>
1040 Andrew Senkevich <andrew.senkevich@intel.com>
1041
1042 PR gold/18695
1043 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
1044 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
1045 R_X86_64_PLT32.
1046 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
1047 * testsuite/x86_64_overflow_pc32.sh: New test script.
1048 * testsuite/x86_64_overflow_pc32.s: New source file.
1049
10502016-02-05 Cary Coutant <ccoutant@gmail.com>
44803b5d
CC
1051
1052 PR gold/18695
1053 * reloc.h (Relocate_functions::Address): New typedef.
1054 (Relocate_functions::Addendtype): New typedef.
1055 (Relocate_functions::Overflow_check): New enum type.
1056 (Relocate_functions::Reloc_status): New enum type.
1057 (Relocate_functions::check_overflow): New function template.
1058 (Relocate_functions::rel): Add check parameter; check for overflow.
1059 (Relocate_functions::rel_unaligned): Likewise.
1060 (Relocate_functions::rela): Likewise.
1061 (Relocate_functions::pcrel): Likewise.
1062 (Relocate_functions::pcrel_unaligned): Likewise.
1063 (Relocate_functions::pcrela): Likewise.
1064 (Relocate_functions::rel8): Adjust parameter types.
1065 (Relocate_functions::rela8): Likewise.
1066 (Relocate_functions::pcrel8): Likewise.
1067 (Relocate_functions::pcrela8): Likewise.
1068 (Relocate_functions::rel16): Likewise.
1069 (Relocate_functions::rela168): Likewise.
1070 (Relocate_functions::pcrel16): Likewise.
1071 (Relocate_functions::pcrela16): Likewise.
1072 (Relocate_functions::rel32): Likewise.
1073 (Relocate_functions::rel32_unaligned): Likewise.
1074 (Relocate_functions::rela32): Likewise.
1075 (Relocate_functions::pcrel32): Likewise.
1076 (Relocate_functions::pcrel32_unaligned): Likewise.
1077 (Relocate_functions::pcrela32): Likewise.
1078 (Relocate_functions::rel8_check): New function.
1079 (Relocate_functions::rela8_check): New function.
1080 (Relocate_functions::pcrel8_check): New function.
1081 (Relocate_functions::pcrela8_check): New function.
1082 (Relocate_functions::rel16_check): New function.
1083 (Relocate_functions::rela168_check): New function.
1084 (Relocate_functions::pcrel16_check): New function.
1085 (Relocate_functions::pcrela16_check): New function.
1086 (Relocate_functions::rel32_check): New function.
1087 (Relocate_functions::rel32_unaligned_check): New function.
1088 (Relocate_functions::rela32_check): New function.
1089 (Relocate_functions::pcrel32_check): New function.
1090 (Relocate_functions::pcrel32_unaligned_check): New function.
1091 (Relocate_functions::pcrela32_check): New function.
1092 (Bits::has_unsigned_overflow32): New function.
1093 (Bits::has_unsigned_overflow): New function.
1094 * testsuite/Makefile.am (overflow_unittest): New test.
1095 * testsuite/Makefile.in: Regenerate.
1096 * testsuite/overflow_unittest.cc: New source file.
1097
4f038ee5
AM
10982016-02-04 Alan Modra <amodra@gmail.com>
1099
1100 * powerpc.cc (relocate): Adjust last patch for big-endian.
1101
85fabe71
AM
11022016-02-02 Alan Modra <amodra@gmail.com>
1103
1104 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
1105
9a472eda
HS
11062016-01-15 Han Shen <shenhan@google.com>
1107
1108 PR gold/19472 - need pc-relative stubs.
1109
1110 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
1111 stub type for DSOs and pie executables.
1112
41549dfb
L
11132016-01-12 H.J. Lu <hongjiu.lu@intel.com>
1114
1115 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
1116 'typename'.
1117
8a8880cb
CC
11182016-01-12 Cary Coutant <ccoutant@gmail.com>
1119
1120 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
1121 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
1122 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
1123 specializations) New method.
1124
d21f123b
CC
11252016-01-11 Cary Coutant <ccoutant@gmail.com>
1126
1127 PR gold/19353
1128 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
1129 we have a TLS segment for GD-to-IE optimization.
1130 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
1131 Adjust all calls.
1132 (Target_i386::tls_desc_gd_to_ie): Likewise.
1133 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
1134 for TLSDESC GD-to-IE optimizations.
1135 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
1136 Adjust all calls.
1137 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
1138 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
1139 for TLSDESC GD-to-IE optimizations.
1140
4d625b70
CC
11412016-01-11 Cary Coutant <ccoutant@gmail.com>
1142
1143 Refactor gold to enable support for MIPS-64 relocation format.
1144
1145 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
1146 (gc_process_relocs): Remove sh_type template parameter.
1147 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
1148 * object.h (Sized_relobj_file::split_stack_adjust): Add target
1149 parameter.
1150 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
1151 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
1152 specializations) Remove.
1153 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
1154 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
1155 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
1156 (Sized_relobj_file::split_stack_adjust): Add target parameter.
1157 Adjust all callers.
1158 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
1159 Target::get_r_sym() to get r_sym field from relocations.
1160 (Track_relocs::next_symndx): Call Target::get_r_sym().
1161 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
1162 add Classify_reloc template parameter. Use for accessing r_sym and
1163 r_type.
1164 (relocate_section): Likewise.
1165 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
1166 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
1167 (Default_scan_relocatable_relocs::Reltype): New typedef.
1168 (Default_scan_relocatable_relocs::reloc_size): New const.
1169 (Default_scan_relocatable_relocs::sh_type): New const.
1170 (Default_scan_relocatable_relocs::get_r_sym): New method.
1171 (Default_scan_relocatable_relocs::get_r_type): New method.
1172 (Default_emit_relocs_strategy): New class.
1173 (scan_relocatable_relocs): Replace sh_type template parameter with
1174 Scan_relocatable_relocs class. Use it to access r_sym and r_type
1175 fields.
1176 (relocate_relocs): Replace sh_type template parameter with
1177 Classify_reloc class. Use it to access r_sym and r_type fields.
1178 * target.h (Target::is_call_to_non_split): Replace r_type parameter
1179 with pointer to relocation. Adjust all callers.
1180 (Target::do_is_call_to_non_split): Likewise.
1181 (Target::emit_relocs_scan): New virtual method.
1182 (Sized_target::get_r_sym): New virtual method.
1183 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
1184 with pointer to relocation.
1185
1186 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
1187 (Target_aarch64::Relocatable_size_for_reloc): Remove.
1188 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
1189 (Target_aarch64::scan_relocs): Likewise.
1190 (Target_aarch64::relocate_section): Likewise.
1191 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
1192 Remove.
1193 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
1194 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
1195 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
1196 template parameter.
1197 (Target_arm::emit_relocs_scan): New method.
1198 (Target_arm::Relocatable_size_for_reloc): Replace with...
1199 (Target_arm::Classify_reloc): ...this.
1200 (Target_arm::gc_process_relocs): Use Classify_reloc.
1201 (Target_arm::scan_relocs): Likewise.
1202 (Target_arm::relocate_section): Likewise.
1203 (Target_arm::scan_relocatable_relocs): Likewise.
1204 (Target_arm::relocate_relocs): Likewise.
1205 * i386.cc (Target_i386::emit_relocs_scan): New method.
1206 (Target_i386::Relocatable_size_for_reloc): Replace with...
1207 (Target_i386::Classify_reloc): ...this.
1208 (Target_i386::gc_process_relocs): Use Classify_reloc.
1209 (Target_i386::scan_relocs): Likewise.
1210 (Target_i386::relocate_section): Likewise.
1211 (Target_i386::scan_relocatable_relocs): Likewise.
1212 (Target_i386::relocate_relocs): Likewise.
1213 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
1214 parameter.
1215 (Mips_reloc_types): New class template.
1216 (Mips_classify_reloc): New class template.
1217 (Target_mips::Reltype): New typedef.
1218 (Target_mips::Relatype): New typedef.
1219 (Target_mips::emit_relocs_scan): New method.
1220 (Target_mips::get_r_sym): New method.
1221 (Target_mips::Relocatable_size_for_reloc): Replace with
1222 Mips_classify_reloc.
1223 (Target_mips::copy_reloc): Use Mips_classify_reloc.
1224 (Target_mips::gc_process_relocs): Likewise.
1225 (Target_mips::scan_relocs): Likewise.
1226 (Target_mips::relocate_section): Likewise.
1227 (Target_mips::scan_relocatable_relocs): Likewise.
1228 (Target_mips::relocate_relocs): Likewise.
1229 (mips_get_size_for_reloc): New function, factored out from
1230 Relocatable_size_for_reloc::get_size_for_reloc.
1231 (Target_mips::Scan::local): Use Mips_classify_reloc.
1232 (Target_mips::Scan::global): Likewise.
1233 (Target_mips::Relocate::relocate): Likewise.
1234 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
1235 (Target_powerpc::Relocatable_size_for_reloc): Remove.
1236 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
1237 (Target_powerpc::scan_relocs): Likewise.
1238 (Target_powerpc::relocate_section): Likewise.
1239 (Powerpc_scan_relocatable_reloc): Convert to class template.
1240 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
1241 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
1242 (Powerpc_scan_relocatable_reloc::sh_type): New const.
1243 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
1244 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
1245 (Target_powerpc::scan_relocatable_relocs): Use
1246 Powerpc_scan_relocatable_reloc.
1247 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
1248 * s390.cc (Target_s390::emit_relocs_scan): New method.
1249 (Target_s390::Relocatable_size_for_reloc): Remove.
1250 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
1251 (Target_s390::scan_relocs): Likewise.
1252 (Target_s390::relocate_section): Likewise.
1253 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
1254 Remove.
1255 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
1256 (Target_s390::relocate_relocs): Use Default_classify_reloc.
1257 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
1258 (Target_sparc::Relocatable_size_for_reloc): Remove.
1259 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
1260 (Target_sparc::scan_relocs): Likewise.
1261 (Target_sparc::relocate_section): Likewise.
1262 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
1263 Remove.
1264 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
1265 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
1266 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
1267 (Target_tilegx::Relocatable_size_for_reloc): Remove.
1268 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
1269 (Target_tilegx::scan_relocs): Likewise.
1270 (Target_tilegx::relocate_section): Likewise.
1271 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
1272 Remove.
1273 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
1274 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
1275 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
1276 (Target_x86_64::Relocatable_size_for_reloc): Remove.
1277 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
1278 (Target_x86_64::scan_relocs): Likewise.
1279 (Target_x86_64::relocate_section): Likewise.
1280 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
1281 Remove.
1282 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
1283 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
1284
1285 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
1286
6f2750fe
AM
12872016-01-01 Alan Modra <amodra@gmail.com>
1288
1289 Update year range in copyright notice of all files.
1290
3499769a
AM
1291For older changes see ChangeLog-0815
1292\f
1293Copyright (C) 2016 Free Software Foundation, Inc.
1294
1295Copying and distribution of this file, with or without modification,
1296are permitted in any medium without royalty provided the copyright
1297notice and this notice are preserved.
1298
1299Local Variables:
1300mode: change-log
1301left-margin: 8
1302fill-column: 74
1303version-control: never
1304End:
This page took 0.112343 seconds and 4 git commands to generate.