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