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