PR 21847, Don't default PowerPC64 to --plt-localentry
[deliverable/binutils-gdb.git] / gold / ChangeLog
CommitLineData
8b5f1ed8
AM
12017-07-29 Alan Modra <amodra@gmail.com>
2
3 PR 21847
4 * powerpc.cc (Target_powerpc::scan_relocs): Default to
5 --no-plt-localentry.
6
49ba15a2
L
72017-07-28 H.J. Lu <hongjiu.lu@intel.com>
8
9 PR gold/21857
10 * compressed_output.cc (Output_compressed_section::set_final_data_size):
11 Call put_ch_reserved to clear the reserved field for 64-bit ELF.
12
104f0515
L
132017-07-26 H.J. Lu <hongjiu.lu@intel.com>
14
15 * mips.cc (Mips_relocate_functions): Add "llu" suffix to
16 0x800080008000.
17
15a3a14f
AM
182017-07-23 Alan Modra <amodra@gmail.com>
19
20 * powerpc.cc (glink_eh_frame_fde_64v2): Correct advance to
21 restore of LR.
22 (glink_eh_frame_fde_64v1): Advance to restore of LR at latest
23 possible insn.
24
de194d85
YC
252017-07-18 Nick Clifton <nickc@redhat.com>
26
27 PR 21775
28 * aarch64.cc: Fix spelling typos.
29 * arm.cc: Likewise.
30 * layout.cc: Likewise.
31 * powerpc.cc: Likewise.
32 * x86_64.cc: Likewise.
33
429d795d
AM
342017-07-12 Alan Modra <amodra@gmail.com>
35
36 * po/es.po: Update from translationproject.org/latest/gold/.
37 * po/fi.po: Likewise.
38 * po/fr.po: Likewise.
39 * po/id.po: Likewise.
40 * po/it.po: Likewise.
41 * po/vi.po: Likewise.
42 * po/zh_CN.po: Likewise.
43 * po/ja.po: New file from translationproject.org.
44 * po/sv.po: Likewise.
45 * po/uk.po: Likewise.
46
b7d7d459
CC
472017-07-06 Han Shen <shenhan@google.com>
48
49 PR gold/21491
50 * aarch64.cc (Erratum_stub::invalidate_erratum_stub): New method.
51 (Erratum_stub::is_invalidated_erratum_stub): New method.
52 (Stub_table::relocate_reloc_stub): Renamed from "relocate_stub".
53 (Stub_table::relocate_reloc_stubs): Renamed from "relocate_stubs".
54 (Stub_table::relocate_erratum_stub): New method.
55 (AArch64_relobj::fix_errata_and_relocate_erratum_stubs): Renamed from
56 "fix_errata".
57 (Target_aarch64::relocate_reloc_stub): Renamed from "relocate_stub".
58
7ee7ff70
AM
592017-06-23 Alan Modra <amodra@gmail.com>
60
61 * options.h (General_options): Add plt_localentry.
62 * powerpc.cc (Target_powerpc::st_other): New function.
63 (Target_powerpc::plt_localentry0_, plt_localentry0_init_,
64 has_localentry0_): New vars.
65 (Target_powerpc::plt_localentry0, set_has_localentry0,
66 is_elfv2_localentry0): New functions.
67 (Target_powerpc::Branch_info::mark_pltcall): Don't set tocsave or
68 return true for localentry:0 calls.
69 (Stub_table::Plt_stub_ent::localentry0_): New var.
70 (Stub_table::add_plt_call_entry): Set localentry0_ and has_localentry0_.
71 Don't set r2save_ for localentry:0 calls.
72 (Output_data_glink::do_write): Save r2 in __glink_PLTresolve for elfv2.
73 (Target_powerpc::scan_relocs): Default plt_localentry0_.
74 (Target_powerpc::do_finalize_sections): Set DT_PPC64_OPT.
75 (Target_powerpc::Relocate::relocate): Don't require nop following
76 calls for localentry:0 plt calls, and don't change nop.
77
7e57d19e
AM
782017-06-23 Alan Modra <amodra@gmail.com>
79
80 * powerpc.cc (Target_powerpc::tocsave_loc_): New var.
81 (Target_powerpc::mark_pltcall, add_tocsave, tocsave_loc): New functions.
82 (Target_powerpc::Branch_info::tocsave_): New var.
83 (Target_powerpc::Branch_info::mark_pltcall): New function.
84 (Target_powerpc::Branch_info::make_stub): Pass tocsave_ to
85 add_plt_call_entry.
86 (Stub_table::Plt_stub_ent): Make public. Add r2save_.
87 (Stub_table::add_plt_call_entry): Add bool tocsave_ param. Set
88 r2save_.
89 (Stub_table::find_plt_call_entry): Return Plt_stub_ent*. Adjust
90 use throughout.
91 (Stub_table::do_write): Conditionally output r2 save in plt stubs.
92 (Target_powerpc::Scan::local): Handle R_PPC64_TOCSAVE.
93 (Target_powerpc::Scan::global): Likewise.
94 (Target_powerpc::Relocate::relocate): Skip r2 save in plt call stub
95 with tocsave reloc. Replace header tocsave nop with r2 save.
96 * symtab.h (struct Symbol_location_hash): Make public.
97
bdab445c
AM
982017-06-21 Alan Modra <amodra@gmail.com>
99
100 * powerpc.cc (Plt_stub_key): Rename from Plt_stub_ent. Remove indx_.
101 (Plt_stub_key_hash): Rename from Plt_stub_ent_hash.
102 (struct Plt_stub_ent): New.
103 (Plt_stub_entries): Map from Plt_stub_key to Plt_stub_ent. Adjust
104 use throughout file.
105
69431bab
EC
1062017-06-20 Eric Christopher <echristo@gmail.com>
107
108 * aarch64.cc (scan_reloc_for_stub): Use plt_address_for_global to
109 calculate the symbol value.
110 (scan_reloc_section_for_stubs): Allow stubs to be created for
111 section symbols.
112 (maybe_apply_stub): Handle creating stubs for weak symbols to
113 match the code in scan_reloc_for_stub.
114
94de2a2c
JC
1152017-06-20 James Clarke <jrtc27@jrtc27.com>
116
117 * powerpc.cc (Stub_table::define_stub_syms): Always include object's
118 uniq_ value.
119
c092b67b
EC
1202017-06-15 Eric Christopher <echristo@gmail.com>
121
122 * aarch64.cc: Fix a few typos and grammar-os.
123
37de058a
JW
1242017-06-15 Jiong Wang <jiong.wang@arm.com>
125
126 * aarch64.cc (Insn_utilities::is_mrs_tpidr_el0): New method.
127 (AArch64_relobj<size, big_endian>::try_fix_erratum_843419_optimized):
128 Return ture for some TLS relaxed sequences.
129
81b6fe3b
EC
1302017-06-07 Eric Christopher <echristo@gmail.com>
131
132 * aarch64.cc (maybe_apply_stub): Add debug logging for looking
133 up stubs to undefined symbols and early return rather than
134 fail to look them up.
135 (scan_reloc_for_stub): Add debug logging for no stub creation
136 for undefined symbols.
137
590b87ff
AM
1382017-05-23 Alan Modra <amodra@gmail.com>
139
140 PR 21503
141 * options.h: Add --emit-stub-syms option.
142 * powerpc.cc (object_id): New.
143 (Powerpc_relobj): Add uniq_ and accessor. Sort variables for
144 better packing.
145 (Powerpc_dynobj): Sort variables for better packing.
146 (Target_powerpc::define_local): New function.
147 (Target_powerpc::group_sections): Pass stub table size to
148 Stub_table constructor.
149 (Target_powerpc::do_relax): Define stub and glink symbols.
150 (Stub_table): Add uniq_ variable, and id param to constructor.
151 (Stub_table::Plt_stub_ent): Add indx_ variable.
152 (Stub_table::Branch_stub_entries): Move typedef earlier.
153 (Stub_table::branch_stub_size): Replace "to" parameter with a
154 Branch_stub_entries iterator.
155 (Stub_table::add_long_branch_entry): Adjust to suit.
156 (Stub_table::add_plt_call_entry): Set indx_.
157 (Stub_table::define_stub_syms): New function.
158
0c38a3d1
EC
1592017-05-15 Eric Christopher <echristo@gmail.com>
160
161 * layout.cc (Layout::segment_precedes): Add a case for testing
162 pointer equality when determining which segment precedes
163 another.
164
67f46fed
JC
1652017-05-13 James Clarke <jrtc27@jrtc27.com>
166
167 PR gold/21444
168 * gold.cc (Target_sparc::Relocate::relocate_tls): Local
169 variables are final for position-independent executables. This
170 has to be consistent with Target_sparc::Scan::local otherwise
171 they will disagree as to whether local-exec is used.
172
6bf56e74
IK
1732017-05-12 Igor Kudrin <ikudrin@accesssoftek.com>
174
175 PR gold/21430
176 * aarch64.cc
177 (AArch64_relobj::convert_input_section_to_relaxed_section):
178 Set the section offset to -1ULL.
179 (Target_aarch64::relocate_section): Adjust the view in case
180 of a relaxed input section.
181 * testsuite/Makefile.am (pr21430): New test.
182 * testsuite/Makefile.in: Regenerate
183 * testsuite/pr21430.s: New test source file.
184 * testsuite/pr21430.sh: New test script.
185
a61d92b7
AM
1862017-04-27 Alan Modra <amodra@gmail.com>
187
188 * testsuite/plugin_section_order.c (onload): Add missing break.
189
aab2c177
VR
1902017-03-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
191
192 * mips.cc (Mips_got_entry::hash()): Shift addend to reduce
193 possibility of collisions.
194 (Mips_got_entry::equals): Fix case for GOT_TLS_LDM
195 entries.
196
4d78db49
VR
1972017-03-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
198
199 * mips.cc (Mips_relobj::merge_processor_specific_data_): New data
200 member.
201 (Mips_relobj::merge_processor_specific_data): New method.
202 (Mips_relobj::do_read_symbols): Set merge_processor_specific_data_
203 to false, only if the input file is a binary or if object has no
204 contents except the section name string table and an empty symbol
205 table with the undefined symbol.
206 (Target_mips::do_finalize_sections): Refactor. Skip empty object files
207 for merging processor-specific data.
208
152c92b2
VR
2092017-03-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
210
211 * mips.cc (Target_mips::Relocate::calculated_value_): New data
212 member.
213 (Target_mips::Relocate::calculate_only_): Likewise.
214 (Target_mips::Relocate::relocate): Handle multiple consecutive
215 relocations with the same offset.
216
1728969e
VR
2172017-03-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
218
1e1247c8
VR
219 * mips.cc (Target_mips::Relocate::relocate): Remove redundant
220 checks for relocatable link.
221 (Mips_relocate_functions::reljalr): Likewise.
1728969e 222
c3847462
VR
2232017-03-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
224
1e1247c8
VR
225 * mips.cc (class Mips_output_section_options): New class.
226 (Target_mips::do_make_output_section): New method.
c3847462 227
453018bf
VR
2282017-03-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
229
1e1247c8
VR
230 * mips.cc (Mips_relocate_functions::rel26): Don't print relocation
231 overflow error message.
232 (Target_mips::relocate_special_relocatable): Improve relocation
233 overflow error message.
234 (Target_mips::Relocate::relocate): Likewise.
235
2362017-03-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
237
238 * mips.cc (symbol_refs_local): Return false if a symbol
239 is from a dynamic object.
240 (Target_mips::got_section): Make _GLOBAL_OFFSET_TABLE_ STV_HIDDEN.
241 (Target_mips::set_gp): Refactor. Make _gp STT_NOTYPE and
242 STB_LOCAL.
243 (Target_mips::do_finalize_sections): Set _gp after all the checks
244 for creating .got are done.
245 (Target_mips::Scan::global): Remove unused code.
453018bf 246
6528b6eb
AM
2472017-02-22 Alan Modra <amodra@gmail.com>
248
249 * powerpc.cc (Target_powerpc::make_iplt_section): Check that
250 output_section exists before attempting add_output_section_data.
251 (Target_powerpc::make_brlt_section): Likewise.
252
f9029569
VR
2532017-02-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
254
255 * mips.cc (Target_mips::Scan::get_reference_flags): Remove
256 gold_unreachable from default case.
257
e242ece1
VR
2582017-02-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
259
260 PR gold/21111
f9029569
VR
261 * mips.cc (Mips_relocate_functions::relhigher): New method.
262 (Mips_relocate_functions::relhighest): Likewise.
263 (mips_get_size_for_reloc): Add support for relocs: R_MIPS_HIGHER and
264 R_MIPS_HIGHEST.
265 (Target_mips::Scan::local): Add support for relocs: R_MIPS_HIGHER,
266 R_MIPS_HIGHEST, R_MICROMIPS_HIGHER and R_MICROMIPS_HIGHEST.
267 (Target_mips::Scan::global): Likewise.
268 (Target_mips::Scan::get_reference_flags): Likewise.
269 (Target_mips::Relocate::relocate): Call static methods for resolving
270 HIGHER and HIGHEST relocations.
e242ece1 271
4aebb631
RC
2722017-02-03 Rahul Chaudhry <rahulchaudhry@google.com>
273
274 * x86_64.cc (Target_x86_64::do_can_check_for_function_pointers):
275 Return true even when building pie binaries.
276 (Target_x86_64::possible_function_pointer_reloc): Check opcode
277 for R_X86_64_PC32 relocations.
278 (Target_x86_64::local_reloc_may_be_function_pointer): Pass
279 extra arguments to local_reloc_may_be_function_pointer.
280 (Target_x86_64::global_reloc_may_be_function_pointer): Likewise.
281 * gc.h (gc_process_relocs): Add check for STT_FUNC.
282 * testsuite/Makefile.am (icf_safe_pie_test): New test case.
283 * testsuite/Makefile.in: Regenerate.
284 * testsuite/icf_safe_pie_test.sh: New shell script.
285
e666304e
AM
2862017-02-03 Alan Modra <amodra@gmail.com>
287
288 * powerpc.cc (Powerpc_relobj::make_toc_relative): Don't crash
289 when no .toc section exists.
290
ed35cc4a
CC
2912017-01-31 Cary Coutant <ccoutant@gmail.com>
292
293 PR gold/21090
294 * x86_64.cc (Target_x86_64::can_convert_mov_to_lea): Add check
295 for predefined symbol.
296 (Target_x86_64::Relocate::relocate): Fix formatting.
297
741bcbe9
RC
2982017-01-23 Rahul Chaudhry <rahulchaudhry@google.com>
299
300 * testsuite/icf_safe_so_test.sh: Use "set -e".
301 * testsuite/icf_safe_test.sh: Likewise.
302 * testsuite/icf_test.sh: Likewise.
303
04bc2a28
VR
3042017-01-23 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
305
306 * mips.cc (Mips_output_data_plt::rel_plt): Remove const from return
307 type.
308 (Target_mips::make_plt_entry): Make the sh_info field of .rel.plt
309 point to .plt.
310
c1f59f8f
VR
3112017-01-23 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
312
313 PR gold/21054
314 * mips.cc (Mips_got_info::record_global_got_symbol): Don't add symbol
315 to the dynamic symbol table if it is forced to local visibility.
316 (Target_mips::do_finalize_sections): Don't add __RLD_MAP symbol to the
317 dynamic symbol table if it is forced to local visibility.
318
a24df305
NC
3192017-01-20 Nick Clifton <nickc@redhat.com>
320
321 * aarch64.cc (Stub_template_repertoire): Change ST_E_835769_INSNS
322 from a pointer to an array.
323
857e829e
L
3242017-01-13 H.J. Lu <hongjiu.lu@intel.com>
325
326 PR gold/21040
327 * powerpc.cc (Powerpc_relobj<size, big_endian>::make_toc_relative):
328 Cast 0x80008000 to uint64_t.
329
aca5eec6
CC
3302017-01-12 Cary Coutant <ccoutant@gmail.com>
331
332 * object.cc (Sized_relobj_file): Fix byte counts for calls to memmem.
333
6624f3a1
CC
3342017-01-11 Cary Coutant <ccoutant@gmail.com>
335
336 PR gold/21040
337 * x86_64.cc (Output_data_plt_x86_64_bnd::do_fill_first_plt_entry):
338 Remove unnecessary 'typename' keyword.
339 (Output_data_plt_x86_64_bnd::do_fill_plt_entry): Likewise.
340 (Output_data_plt_x86_64_bnd::fill_aplt_entry): Likewise.
341 (Output_data_plt_x86_64_bnd::do_fill_tlsdesc_entry): Likewise.
342 (Output_data_plt_x86_64_bnd::do_write): Likewise.
343
976e204b
CC
3442017-01-11 Cary Coutant <ccoutant@gmail.com>
345
346 PR gold/21040
347 * x86_64.cc (Output_data_plt_x86_64_bnd::do_fill_first_plt_entry):
348 Remove unnecessary 'typename' keyword.
349 (Output_data_plt_x86_64_bnd::do_fill_plt_entry): Likewise.
350 (Output_data_plt_x86_64_bnd::do_fill_tlsdesc_entry): Likewise.
351 (Output_data_plt_x86_64_bnd::fill_aplt_entry): Likewise.
352 * testsuite/copy_test_relro_1.cc (p, b, c, q): Add separate extern
353 declarations.
354
1fa5f68b
CC
3552017-01-11 Cary Coutant <ccoutant@gmail.com>
356
357 PR gold/21039
358 * testsuite/script_test_13.sh: Adjust patterns to work for i386.
359 * testsuite/script_test_15a.sh: Likewise.
360 * testsuite/script_test_15b.sh: Likewise.
361 * testsuite/script_test_15c.sh: Likewise.
362
5edad15d
AM
3632017-01-11 Alan Modra <amodra@gmail.com>
364
365 * powerpc.cc (class Powerpc_copy_relocs): New.
366 (Powerpc_copy_relocs::emit): New function.
367 (Powerpc_relobj::relatoc_, toc_, no_toc_opt_): New variables.
368 (Powerpc_relobj::toc_shndx, set_no_toc_opt, no_toc_opt): New inlines.
369 (Powerpc_relobj::do_relocate_sections): New function.
370 (Powerpc_relobj::make_toc_relative): Likewise.
371 (Powerpc_relobj::do_find_special_sections): Stash away .rela.toc
372 and .toc too.
373 (ok_lo_toc_insn): Move earlier, and handle more insns.
374 (Target_powerpc::Scan::local): If optimizing toc accesses, set
375 no_toc_opt for entries we can't edit. Check insn validity.
376 Emit "toc optimization is not supported" warning, downgraded
377 from error.
378 (Target_powerpc::Scan::global): Likewise.
379 (Target_powerpc::Relocate::relocate): Edit TOC indirect code
380 to TOC relative. Don't emit "toc optimization is not supported"
381 error here.
382
98461510
CC
3832017-01-10 Cary Coutant <ccoutant@gmail.com>
384
385 * aarch64.cc (AArch64_relobj::do_relocate_sections): Call
386 Sized_relobj_file::relocate_section_range().
387 * arm.cc (Arm_relobj::do_relocate_sections): Likewise.
388 * object.h (Sized_relobj_file::relocate_section_range): New method.
389 * reloc.cc (Sized_relobj_file::do_relocate_sections): Move
390 implementation...
391 (Sized_relobj_file::relocate_section_range): ...to new method.
392
f7fd19e2
AM
3932017-01-10 Alan Modra <amodra@gmail.com>
394
395 * testsuite/ver_test_8.sh: Accept .TOC. in lieu of
396 _GLOBAL_OFFSET_TABLE_. Allow zero count.
397 * testsuite/copy_test_relro_1.cc (c, q): New vars.
398 * testsuite/copy_test_relro.cc: Rewrite to test read-only
399 status of variables directly. Reference new vars in
400 read-only data.
401
f159cdb6
AM
4022017-01-10 Alan Modra <amodra@gmail.com>
403
404 * options.h: Add --secure-plt option.
405 * powerpc.cc (Target_powerpc::Scan::local): Detect and error
406 on -fPIC -mbss-plt code.
407 (Target_powerpc::Scan::global): Likewise.
408
3254d32c
AM
4092017-01-09 Alan Modra <amodra@gmail.com>
410
411 * powerpc.cc (Target_powerpc::make_plt_section): Point sh_info of
412 ".rela.plt" at ".plt".
413
0e123f69
AM
4142017-01-07 Alan Modra <amodra@gmail.com>
415
416 * powerpc.cc: Use shorter equivalent elfcpp typedef for
417 Reltype and reloc_size throughout.
418 (Target_powerpc::symval_for_branch): Exclude dynamic symbols.
419 (Target_powerpc::Scan::local): Use local var r_sym.
420 (Target_powerpc::Scan::global: Likewise.
421 (Target_powerpc::Relocate::relocate): Delete shadowing r_sym.
422
2571583a
AM
4232017-01-02 Alan Modra <amodra@gmail.com>
424
425 Update year range in copyright notice of all files.
426
5c1ad6b5 427For older changes see ChangeLog-2016
3499769a 428\f
5c1ad6b5 429Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
430
431Copying and distribution of this file, with or without modification,
432are permitted in any medium without royalty provided the copyright
433notice and this notice are preserved.
434
435Local Variables:
436mode: change-log
437left-margin: 8
438fill-column: 74
439version-control: never
440End:
This page took 0.097956 seconds and 4 git commands to generate.