MIPS/GAS: Use non-zero frag offset directly in PIC branch relaxation
[deliverable/binutils-gdb.git] / gold / ChangeLog
CommitLineData
7ee7ff70
AM
12017-06-23 Alan Modra <amodra@gmail.com>
2
3 * options.h (General_options): Add plt_localentry.
4 * powerpc.cc (Target_powerpc::st_other): New function.
5 (Target_powerpc::plt_localentry0_, plt_localentry0_init_,
6 has_localentry0_): New vars.
7 (Target_powerpc::plt_localentry0, set_has_localentry0,
8 is_elfv2_localentry0): New functions.
9 (Target_powerpc::Branch_info::mark_pltcall): Don't set tocsave or
10 return true for localentry:0 calls.
11 (Stub_table::Plt_stub_ent::localentry0_): New var.
12 (Stub_table::add_plt_call_entry): Set localentry0_ and has_localentry0_.
13 Don't set r2save_ for localentry:0 calls.
14 (Output_data_glink::do_write): Save r2 in __glink_PLTresolve for elfv2.
15 (Target_powerpc::scan_relocs): Default plt_localentry0_.
16 (Target_powerpc::do_finalize_sections): Set DT_PPC64_OPT.
17 (Target_powerpc::Relocate::relocate): Don't require nop following
18 calls for localentry:0 plt calls, and don't change nop.
19
7e57d19e
AM
202017-06-23 Alan Modra <amodra@gmail.com>
21
22 * powerpc.cc (Target_powerpc::tocsave_loc_): New var.
23 (Target_powerpc::mark_pltcall, add_tocsave, tocsave_loc): New functions.
24 (Target_powerpc::Branch_info::tocsave_): New var.
25 (Target_powerpc::Branch_info::mark_pltcall): New function.
26 (Target_powerpc::Branch_info::make_stub): Pass tocsave_ to
27 add_plt_call_entry.
28 (Stub_table::Plt_stub_ent): Make public. Add r2save_.
29 (Stub_table::add_plt_call_entry): Add bool tocsave_ param. Set
30 r2save_.
31 (Stub_table::find_plt_call_entry): Return Plt_stub_ent*. Adjust
32 use throughout.
33 (Stub_table::do_write): Conditionally output r2 save in plt stubs.
34 (Target_powerpc::Scan::local): Handle R_PPC64_TOCSAVE.
35 (Target_powerpc::Scan::global): Likewise.
36 (Target_powerpc::Relocate::relocate): Skip r2 save in plt call stub
37 with tocsave reloc. Replace header tocsave nop with r2 save.
38 * symtab.h (struct Symbol_location_hash): Make public.
39
bdab445c
AM
402017-06-21 Alan Modra <amodra@gmail.com>
41
42 * powerpc.cc (Plt_stub_key): Rename from Plt_stub_ent. Remove indx_.
43 (Plt_stub_key_hash): Rename from Plt_stub_ent_hash.
44 (struct Plt_stub_ent): New.
45 (Plt_stub_entries): Map from Plt_stub_key to Plt_stub_ent. Adjust
46 use throughout file.
47
69431bab
EC
482017-06-20 Eric Christopher <echristo@gmail.com>
49
50 * aarch64.cc (scan_reloc_for_stub): Use plt_address_for_global to
51 calculate the symbol value.
52 (scan_reloc_section_for_stubs): Allow stubs to be created for
53 section symbols.
54 (maybe_apply_stub): Handle creating stubs for weak symbols to
55 match the code in scan_reloc_for_stub.
56
94de2a2c
JC
572017-06-20 James Clarke <jrtc27@jrtc27.com>
58
59 * powerpc.cc (Stub_table::define_stub_syms): Always include object's
60 uniq_ value.
61
c092b67b
EC
622017-06-15 Eric Christopher <echristo@gmail.com>
63
64 * aarch64.cc: Fix a few typos and grammar-os.
65
37de058a
JW
662017-06-15 Jiong Wang <jiong.wang@arm.com>
67
68 * aarch64.cc (Insn_utilities::is_mrs_tpidr_el0): New method.
69 (AArch64_relobj<size, big_endian>::try_fix_erratum_843419_optimized):
70 Return ture for some TLS relaxed sequences.
71
81b6fe3b
EC
722017-06-07 Eric Christopher <echristo@gmail.com>
73
74 * aarch64.cc (maybe_apply_stub): Add debug logging for looking
75 up stubs to undefined symbols and early return rather than
76 fail to look them up.
77 (scan_reloc_for_stub): Add debug logging for no stub creation
78 for undefined symbols.
79
590b87ff
AM
802017-05-23 Alan Modra <amodra@gmail.com>
81
82 PR 21503
83 * options.h: Add --emit-stub-syms option.
84 * powerpc.cc (object_id): New.
85 (Powerpc_relobj): Add uniq_ and accessor. Sort variables for
86 better packing.
87 (Powerpc_dynobj): Sort variables for better packing.
88 (Target_powerpc::define_local): New function.
89 (Target_powerpc::group_sections): Pass stub table size to
90 Stub_table constructor.
91 (Target_powerpc::do_relax): Define stub and glink symbols.
92 (Stub_table): Add uniq_ variable, and id param to constructor.
93 (Stub_table::Plt_stub_ent): Add indx_ variable.
94 (Stub_table::Branch_stub_entries): Move typedef earlier.
95 (Stub_table::branch_stub_size): Replace "to" parameter with a
96 Branch_stub_entries iterator.
97 (Stub_table::add_long_branch_entry): Adjust to suit.
98 (Stub_table::add_plt_call_entry): Set indx_.
99 (Stub_table::define_stub_syms): New function.
100
0c38a3d1
EC
1012017-05-15 Eric Christopher <echristo@gmail.com>
102
103 * layout.cc (Layout::segment_precedes): Add a case for testing
104 pointer equality when determining which segment precedes
105 another.
106
67f46fed
JC
1072017-05-13 James Clarke <jrtc27@jrtc27.com>
108
109 PR gold/21444
110 * gold.cc (Target_sparc::Relocate::relocate_tls): Local
111 variables are final for position-independent executables. This
112 has to be consistent with Target_sparc::Scan::local otherwise
113 they will disagree as to whether local-exec is used.
114
6bf56e74
IK
1152017-05-12 Igor Kudrin <ikudrin@accesssoftek.com>
116
117 PR gold/21430
118 * aarch64.cc
119 (AArch64_relobj::convert_input_section_to_relaxed_section):
120 Set the section offset to -1ULL.
121 (Target_aarch64::relocate_section): Adjust the view in case
122 of a relaxed input section.
123 * testsuite/Makefile.am (pr21430): New test.
124 * testsuite/Makefile.in: Regenerate
125 * testsuite/pr21430.s: New test source file.
126 * testsuite/pr21430.sh: New test script.
127
a61d92b7
AM
1282017-04-27 Alan Modra <amodra@gmail.com>
129
130 * testsuite/plugin_section_order.c (onload): Add missing break.
131
aab2c177
VR
1322017-03-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
133
134 * mips.cc (Mips_got_entry::hash()): Shift addend to reduce
135 possibility of collisions.
136 (Mips_got_entry::equals): Fix case for GOT_TLS_LDM
137 entries.
138
4d78db49
VR
1392017-03-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
140
141 * mips.cc (Mips_relobj::merge_processor_specific_data_): New data
142 member.
143 (Mips_relobj::merge_processor_specific_data): New method.
144 (Mips_relobj::do_read_symbols): Set merge_processor_specific_data_
145 to false, only if the input file is a binary or if object has no
146 contents except the section name string table and an empty symbol
147 table with the undefined symbol.
148 (Target_mips::do_finalize_sections): Refactor. Skip empty object files
149 for merging processor-specific data.
150
152c92b2
VR
1512017-03-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
152
153 * mips.cc (Target_mips::Relocate::calculated_value_): New data
154 member.
155 (Target_mips::Relocate::calculate_only_): Likewise.
156 (Target_mips::Relocate::relocate): Handle multiple consecutive
157 relocations with the same offset.
158
1728969e
VR
1592017-03-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
160
1e1247c8
VR
161 * mips.cc (Target_mips::Relocate::relocate): Remove redundant
162 checks for relocatable link.
163 (Mips_relocate_functions::reljalr): Likewise.
1728969e 164
c3847462
VR
1652017-03-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
166
1e1247c8
VR
167 * mips.cc (class Mips_output_section_options): New class.
168 (Target_mips::do_make_output_section): New method.
c3847462 169
453018bf
VR
1702017-03-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
171
1e1247c8
VR
172 * mips.cc (Mips_relocate_functions::rel26): Don't print relocation
173 overflow error message.
174 (Target_mips::relocate_special_relocatable): Improve relocation
175 overflow error message.
176 (Target_mips::Relocate::relocate): Likewise.
177
1782017-03-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
179
180 * mips.cc (symbol_refs_local): Return false if a symbol
181 is from a dynamic object.
182 (Target_mips::got_section): Make _GLOBAL_OFFSET_TABLE_ STV_HIDDEN.
183 (Target_mips::set_gp): Refactor. Make _gp STT_NOTYPE and
184 STB_LOCAL.
185 (Target_mips::do_finalize_sections): Set _gp after all the checks
186 for creating .got are done.
187 (Target_mips::Scan::global): Remove unused code.
453018bf 188
6528b6eb
AM
1892017-02-22 Alan Modra <amodra@gmail.com>
190
191 * powerpc.cc (Target_powerpc::make_iplt_section): Check that
192 output_section exists before attempting add_output_section_data.
193 (Target_powerpc::make_brlt_section): Likewise.
194
f9029569
VR
1952017-02-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
196
197 * mips.cc (Target_mips::Scan::get_reference_flags): Remove
198 gold_unreachable from default case.
199
e242ece1
VR
2002017-02-15 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
201
202 PR gold/21111
f9029569
VR
203 * mips.cc (Mips_relocate_functions::relhigher): New method.
204 (Mips_relocate_functions::relhighest): Likewise.
205 (mips_get_size_for_reloc): Add support for relocs: R_MIPS_HIGHER and
206 R_MIPS_HIGHEST.
207 (Target_mips::Scan::local): Add support for relocs: R_MIPS_HIGHER,
208 R_MIPS_HIGHEST, R_MICROMIPS_HIGHER and R_MICROMIPS_HIGHEST.
209 (Target_mips::Scan::global): Likewise.
210 (Target_mips::Scan::get_reference_flags): Likewise.
211 (Target_mips::Relocate::relocate): Call static methods for resolving
212 HIGHER and HIGHEST relocations.
e242ece1 213
4aebb631
RC
2142017-02-03 Rahul Chaudhry <rahulchaudhry@google.com>
215
216 * x86_64.cc (Target_x86_64::do_can_check_for_function_pointers):
217 Return true even when building pie binaries.
218 (Target_x86_64::possible_function_pointer_reloc): Check opcode
219 for R_X86_64_PC32 relocations.
220 (Target_x86_64::local_reloc_may_be_function_pointer): Pass
221 extra arguments to local_reloc_may_be_function_pointer.
222 (Target_x86_64::global_reloc_may_be_function_pointer): Likewise.
223 * gc.h (gc_process_relocs): Add check for STT_FUNC.
224 * testsuite/Makefile.am (icf_safe_pie_test): New test case.
225 * testsuite/Makefile.in: Regenerate.
226 * testsuite/icf_safe_pie_test.sh: New shell script.
227
e666304e
AM
2282017-02-03 Alan Modra <amodra@gmail.com>
229
230 * powerpc.cc (Powerpc_relobj::make_toc_relative): Don't crash
231 when no .toc section exists.
232
ed35cc4a
CC
2332017-01-31 Cary Coutant <ccoutant@gmail.com>
234
235 PR gold/21090
236 * x86_64.cc (Target_x86_64::can_convert_mov_to_lea): Add check
237 for predefined symbol.
238 (Target_x86_64::Relocate::relocate): Fix formatting.
239
741bcbe9
RC
2402017-01-23 Rahul Chaudhry <rahulchaudhry@google.com>
241
242 * testsuite/icf_safe_so_test.sh: Use "set -e".
243 * testsuite/icf_safe_test.sh: Likewise.
244 * testsuite/icf_test.sh: Likewise.
245
04bc2a28
VR
2462017-01-23 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
247
248 * mips.cc (Mips_output_data_plt::rel_plt): Remove const from return
249 type.
250 (Target_mips::make_plt_entry): Make the sh_info field of .rel.plt
251 point to .plt.
252
c1f59f8f
VR
2532017-01-23 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
254
255 PR gold/21054
256 * mips.cc (Mips_got_info::record_global_got_symbol): Don't add symbol
257 to the dynamic symbol table if it is forced to local visibility.
258 (Target_mips::do_finalize_sections): Don't add __RLD_MAP symbol to the
259 dynamic symbol table if it is forced to local visibility.
260
a24df305
NC
2612017-01-20 Nick Clifton <nickc@redhat.com>
262
263 * aarch64.cc (Stub_template_repertoire): Change ST_E_835769_INSNS
264 from a pointer to an array.
265
857e829e
L
2662017-01-13 H.J. Lu <hongjiu.lu@intel.com>
267
268 PR gold/21040
269 * powerpc.cc (Powerpc_relobj<size, big_endian>::make_toc_relative):
270 Cast 0x80008000 to uint64_t.
271
aca5eec6
CC
2722017-01-12 Cary Coutant <ccoutant@gmail.com>
273
274 * object.cc (Sized_relobj_file): Fix byte counts for calls to memmem.
275
6624f3a1
CC
2762017-01-11 Cary Coutant <ccoutant@gmail.com>
277
278 PR gold/21040
279 * x86_64.cc (Output_data_plt_x86_64_bnd::do_fill_first_plt_entry):
280 Remove unnecessary 'typename' keyword.
281 (Output_data_plt_x86_64_bnd::do_fill_plt_entry): Likewise.
282 (Output_data_plt_x86_64_bnd::fill_aplt_entry): Likewise.
283 (Output_data_plt_x86_64_bnd::do_fill_tlsdesc_entry): Likewise.
284 (Output_data_plt_x86_64_bnd::do_write): Likewise.
285
976e204b
CC
2862017-01-11 Cary Coutant <ccoutant@gmail.com>
287
288 PR gold/21040
289 * x86_64.cc (Output_data_plt_x86_64_bnd::do_fill_first_plt_entry):
290 Remove unnecessary 'typename' keyword.
291 (Output_data_plt_x86_64_bnd::do_fill_plt_entry): Likewise.
292 (Output_data_plt_x86_64_bnd::do_fill_tlsdesc_entry): Likewise.
293 (Output_data_plt_x86_64_bnd::fill_aplt_entry): Likewise.
294 * testsuite/copy_test_relro_1.cc (p, b, c, q): Add separate extern
295 declarations.
296
1fa5f68b
CC
2972017-01-11 Cary Coutant <ccoutant@gmail.com>
298
299 PR gold/21039
300 * testsuite/script_test_13.sh: Adjust patterns to work for i386.
301 * testsuite/script_test_15a.sh: Likewise.
302 * testsuite/script_test_15b.sh: Likewise.
303 * testsuite/script_test_15c.sh: Likewise.
304
5edad15d
AM
3052017-01-11 Alan Modra <amodra@gmail.com>
306
307 * powerpc.cc (class Powerpc_copy_relocs): New.
308 (Powerpc_copy_relocs::emit): New function.
309 (Powerpc_relobj::relatoc_, toc_, no_toc_opt_): New variables.
310 (Powerpc_relobj::toc_shndx, set_no_toc_opt, no_toc_opt): New inlines.
311 (Powerpc_relobj::do_relocate_sections): New function.
312 (Powerpc_relobj::make_toc_relative): Likewise.
313 (Powerpc_relobj::do_find_special_sections): Stash away .rela.toc
314 and .toc too.
315 (ok_lo_toc_insn): Move earlier, and handle more insns.
316 (Target_powerpc::Scan::local): If optimizing toc accesses, set
317 no_toc_opt for entries we can't edit. Check insn validity.
318 Emit "toc optimization is not supported" warning, downgraded
319 from error.
320 (Target_powerpc::Scan::global): Likewise.
321 (Target_powerpc::Relocate::relocate): Edit TOC indirect code
322 to TOC relative. Don't emit "toc optimization is not supported"
323 error here.
324
98461510
CC
3252017-01-10 Cary Coutant <ccoutant@gmail.com>
326
327 * aarch64.cc (AArch64_relobj::do_relocate_sections): Call
328 Sized_relobj_file::relocate_section_range().
329 * arm.cc (Arm_relobj::do_relocate_sections): Likewise.
330 * object.h (Sized_relobj_file::relocate_section_range): New method.
331 * reloc.cc (Sized_relobj_file::do_relocate_sections): Move
332 implementation...
333 (Sized_relobj_file::relocate_section_range): ...to new method.
334
f7fd19e2
AM
3352017-01-10 Alan Modra <amodra@gmail.com>
336
337 * testsuite/ver_test_8.sh: Accept .TOC. in lieu of
338 _GLOBAL_OFFSET_TABLE_. Allow zero count.
339 * testsuite/copy_test_relro_1.cc (c, q): New vars.
340 * testsuite/copy_test_relro.cc: Rewrite to test read-only
341 status of variables directly. Reference new vars in
342 read-only data.
343
f159cdb6
AM
3442017-01-10 Alan Modra <amodra@gmail.com>
345
346 * options.h: Add --secure-plt option.
347 * powerpc.cc (Target_powerpc::Scan::local): Detect and error
348 on -fPIC -mbss-plt code.
349 (Target_powerpc::Scan::global): Likewise.
350
3254d32c
AM
3512017-01-09 Alan Modra <amodra@gmail.com>
352
353 * powerpc.cc (Target_powerpc::make_plt_section): Point sh_info of
354 ".rela.plt" at ".plt".
355
0e123f69
AM
3562017-01-07 Alan Modra <amodra@gmail.com>
357
358 * powerpc.cc: Use shorter equivalent elfcpp typedef for
359 Reltype and reloc_size throughout.
360 (Target_powerpc::symval_for_branch): Exclude dynamic symbols.
361 (Target_powerpc::Scan::local): Use local var r_sym.
362 (Target_powerpc::Scan::global: Likewise.
363 (Target_powerpc::Relocate::relocate): Delete shadowing r_sym.
364
2571583a
AM
3652017-01-02 Alan Modra <amodra@gmail.com>
366
367 Update year range in copyright notice of all files.
368
5c1ad6b5 369For older changes see ChangeLog-2016
3499769a 370\f
5c1ad6b5 371Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
372
373Copying and distribution of this file, with or without modification,
374are permitted in any medium without royalty provided the copyright
375notice and this notice are preserved.
376
377Local Variables:
378mode: change-log
379left-margin: 8
380fill-column: 74
381version-control: never
382End:
This page took 0.096633 seconds and 4 git commands to generate.