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