1 2018-04-09 Alan Modra <amodra@gmail.com>
3 * powerpc.cc (Target_powerpc::Track_tls::maybe_skip_tls_get_addr_call):
4 Handle inline plt sequence relocs.
5 (Stub_table::Plt_stub_key::Plt_stub_key): Likewise.
6 (Target_powerpc::Scan::reloc_needs_plt_for_ifunc): Likewise.
7 (Target_powerpc::Relocate::relocate): Likewise.
9 2018-04-09 Alan Modra <amodra@gmail.com>
11 * powerpc.cc (Target_powerpc::lplt_): New variable.
12 (Target_powerpc::lplt_section): Associated accessor.
13 (Target_powerpc::plt_off): Handle local non-ifunc symbols.
14 (Target_powerpc::make_lplt_section): New function.
15 (Target_powerpc::make_local_plt_entry): New function.
16 (Powerpc_relobj::do_relocate_sections): Write out lplt.
17 (Output_data_plt_powerpc::first_plt_entry_offset): Zero for lplt.
18 (Output_data_plt_powerpc::add_local_entry): New function.
19 (Output_data_plt_powerpc::do_write): Ignore lplt.
20 (Target_powerpc::make_iplt_section): Make lplt first.
21 (Target_powerpc::make_brlt_section): Make .branch_lt relro.
22 (Target_powerpc::Scan::local): Handle PLT16 relocs.
24 2018-04-09 Alan Modra <amodra@gmail.com>
26 * powerpc.cc (Target_powerpc::plt_off): New functions.
27 (is_plt16_reloc): New function.
28 (Stub_table::plt_off): Use Target_powerpc::plt_off.
29 (Stub_table::plt_call_size): Use plt_off.
30 (Stub_table::do_write): Likewise.
31 (Target_powerpc::Scan::get_reference_flags): Return RELATIVE_REF
32 for PLT16 relocations.
33 (Target_powerpc::Scan::reloc_needs_plt_for_ifunc): Return true
34 for PLT16 relocations.
35 (Target_powerpc::Scan::global): Make a PLT entry for PLT16 relocations.
36 (Target_powerpc::Relocate::relocate): Support PLT16 relocations.
37 (Powerpc_scan_relocatable_reloc::global_strategy): Return RELOC_SPECIAL
38 for ppc32 plt16 relocs.
40 2018-04-06 Cary Coutant <ccoutant@gmail.com>
42 * object.cc (Sized_relobj_file::include_section_group): Store
43 reference to Kept_section info for discarded comdat sections
44 regardless of size. Move size checking to map_to_kept_section.
45 (Sized_relobj_file::include_linkonce_section): Likewise.
46 (Sized_relobj_file::map_to_kept_section): Add section name parameter.
47 Insert size checking logic from above functions.
48 (Sized_relobj_file::find_kept_section_object): New method.
49 (Sized_relobj_file::get_symbol_name): New method.
50 * object.h (Sized_relobj_file::map_to_kept_section): Add section_name
51 parameter. Adjust all callers.
52 (Sized_relobj_file::find_kept_section_object): New method.
53 (Sized_relobj_file::get_symbol_name): New method.
54 (Sized_relobj_file::Kept_comdat_section): Replace object and shndx
55 fields with sh_size, kept_section, symndx, and is_comdat fields.
56 (Sized_relobj_file::set_kept_comdat_section): Replace kept_object
57 and kept_shndx parameters with is_comdat, symndx, sh_size, and
59 (Sized_relobj_file::get_kept_comdat_section): Likewise.
60 * target-reloc.h (enum Comdat_behavior): Change CB_WARNING to CB_ERROR.
61 Adjust all references.
62 (issue_undefined_symbol_error): New function template.
63 (relocate_section): Pass section name to map_to_kept_section.
64 Move discarded section code to new function above.
65 * aarch64.cc (Target_aarch64::scan_reloc_section_for_stubs): Move
66 declaration for gsym out one level. Call issue_discarded_error.
67 * arm.cc (Target_arm::scan_reloc_section_for_stubs): Likewise.
68 * powerpc.cc (Relocate_comdat_behavior): Change CB_WARNING to CB_ERROR.
70 2018-04-05 Cary Coutant <ccoutant@gmail.com>
72 * target-reloc.h (relocate_section): Add local symbol index or global
73 symbol name to warning about relocation that refers to discarded
76 2018-04-05 James Cowgill <james.cowgill@mips.com>
78 Revert previous patch and apply revised patch.
81 * mips.cc (Mips_got_info::record_got_page_entry): Don't insert
82 Got_page_entry for object's GOT.
83 (Mips_got_info::add_got_page_entries): Add all pages from from's GOT.
84 Rename to add_got_page_count.
85 (Got_page_entry): Remove num_pages.
87 2018-04-05 James Cowgill <james.cowgill@mips.com>
90 * mips.cc (Mips_got_info::record_got_page_entry): Fetch existing
91 page entries for the object's GOT.
93 2018-04-05 Alan Modra <amodra@gmail.com>
95 * powerpc.cc (Target_powerpc::make_brlt_section): Make .branch_lt relro.
97 2018-04-04 Nick Clifton <nickc@redhat.com>
99 * po/es.po: Updated Spanish translation.
101 2018-04-02 Cary Coutant <ccoutant@gmail.com>
104 * incremental.cc (can_incremental_update): Check for unwind section
106 * layout.h (Layout::layout): Add sh_type parameter.
107 * layout.cc (Layout::layout): Likewise.
108 (Layout::layout_reloc): Create new output reloc section if data
109 section does not already have one.
110 (Layout::layout_eh_frame): Check for unwind section type.
111 (Layout::make_eh_frame_section): Use unwind section type for .eh_frame
113 * object.h (Sized_relobj_file::Shdr_write): New typedef.
114 (Sized_relobj_file::layout_section): Add sh_type parameter.
115 (Sized_relobj_file::Deferred_layout::Deferred_layout): Add sh_type
117 * object.cc (Sized_relobj_file::check_eh_frame_flags): Check for
119 (Sized_relobj_file::layout_section): Add sh_type parameter; pass it
121 (Sized_relobj_file::do_layout): Make local copy of sh_type.
122 Force .eh_frame sections to unwind section type.
123 Pass sh_type to layout_section.
124 (Sized_relobj_file<size, big_endian>::do_layout_deferred_sections):
125 Pass sh_type to layout_section.
126 * output.cc (Output_section::Output_section): Initialize reloc_section_.
127 * output.h (Output_section::reloc_section): New method.
128 (Output_section::set_reloc_section): New method.
129 (Output_section::reloc_section_): New data member.
130 * target.h (Target::unwind_section_type): New method.
131 (Target::Target_info::unwind_section_type): New data member.
133 * aarch64.cc (aarch64_info): Add unwind_section_type.
134 * arm.cc (arm_info, arm_nacl_info): Likewise.
135 * i386.cc (i386_info, i386_nacl_info, iamcu_info): Likewise.
136 * mips.cc (mips_info, mips_nacl_info): Likewise.
137 * powerpc.cc (powerpc_info): Likewise.
138 * s390.cc (s390_info): Likewise.
139 * sparc.cc (sparc_info): Likewise.
140 * tilegx.cc (tilegx_info): Likewise.
141 * x86_64.cc (x86_64_info, x86_64_nacl_info): Likewise.
143 * testsuite/Makefile.am (pr23016_1, pr23016_2): New test cases.
144 * testsuite/Makefile.in: Regenerate.
145 * testsuite/testfile.cc: Add unwind_section_type.
146 * testsuite/pr23016_1.sh: New test script.
147 * testsuite/pr23016_1a.s: New source file.
148 * testsuite/pr23016_1b.s: New source file.
149 * testsuite/pr23016_2.sh: New test script.
150 * testsuite/pr23016_2a.s: New source file.
151 * testsuite/pr23016_2b.s: New source file.
153 2018-03-28 Cary Coutant <ccoutant@gmail.com>
157 * configure.ac: Call AC_USE_SYSTEM_EXTENSIONS.
158 Replace check for --enable-plugins with AC_PLUGINS.
159 * options.cc (parse_plugin, parse_plugin_opt): Remove #ifdef.
160 (General_options::finalize): Check if plugins enabled.
161 * options.h (--plugin, --plugin-opt): Define even if plugins not
163 * Makefile.in: Regenerate.
164 * aclocal.m4: Regenerate.
165 * configure: Regenerate.
166 * testsuite/Makefile.in: Regenerate.
168 2018-03-28 Cary Coutant <ccoutant@gmail.com>
171 * aarch64-reloc.def: Add TLSLE_LDST* relocations.
172 * aarch64.cc (Target_aarch64::optimize_tls_reloc): Likewise.
173 (Target_aarch64::Scan::local): Likewise.
174 (Target_aarch64::Scan::global): Likewise.
175 (Target_aarch64::Relocate::relocate): Likewise.
176 (Target_aarch64::Relocate::relocate_tls): Likewise.
178 2018-03-27 Roland McGrath <mcgrathr@google.com>
180 * testsuite/split_x86_64.sh: Fix bad regexp.
182 2018-03-26 Cary Coutant <ccoutant@gmail.com>
185 * plugin.cc (Sized_pluginobj::do_add_symbols): Use a real section
186 index instead of SHN_ABS for defined symbols.
187 * testsuite/Makefile.am (plugin_pr22868): New test case.
188 * testsuite/Makefile.in: Regenerate
189 * testsuite/plugin_pr22868.sh: New test script.
190 * testsuite/plugin_pr22868_a.c: New source file.
191 * testsuite/plugin_pr22868_b.c: New source file.
193 2018-03-23 Cary Coutant <ccoutant@gmail.com>
195 * plugin.cc (link_or_copy_file): Remove newlines from warning messages.
196 Add pedantic check for return value from ::write.
198 2018-03-23 Cary Coutant <ccoutant@gmail.com>
200 * debug.h (DEBUG_PLUGIN): New constant.
201 (DEBUG_ALL): Add DEBUG_PLUGIN.
202 (debug_string_to_enum): Likewise.
203 * plugin.cc (make_sized_plugin_object): Add filename parameter.
204 (Plugin_recorder): New class.
205 (Plugin_manager::~Plugin_manager): Delete recorder_.
206 (Plugin_manager::load_plugins): Create and initialize recorder_.
207 (Plugin_manager::claim_file): Record claimed and unclaimed files.
208 (Plugin_manager::make_plugin_object): Use object name as name for
209 plugin object, if available.
210 (Plugin_manager::add_input_file): Record replacement files.
211 (Sized_pluginobj::do_add_symbols): Record plugin symbols.
212 (Plugin_finish::run): Call Plugin_recorder::finish().
213 (make_sized_plugin_object): Add filename parameter and pass to
214 Sized_pluginobj constructor.
215 * plugin.h (Plugin::filename): New method.
216 (Plugin::recorder): New method.
217 (Plugin::recorder_): New data member.
219 2018-03-07 Sriraman Tallam <tmsriram@google.com>
221 * layout.cc (Layout::default_section_order): Check for text section
223 (Layout::text_section_name_mapping): New static member.
224 (Layout::text_section_name_mapping_count): New static member.
225 (Layout::match_section_name): New static function.
226 (Layout::output_section_name): Check for text section prefixes.
227 * layout.h (Output_section_order::ORDER_TEXT_HOT): New enum value.
228 (Output_section_order::ORDER_TEXT_STARTUP): New enum value.
229 (Output_section_order::ORDER_TEXT_EXIT): New enum value.
230 (Output_section_order::ORDER_TEXT_UNLIKELY): New enum value.
231 (Layout::text_section_name_mapping): New static member.
232 (Layout::text_section_name_mapping_count): New static member.
233 (Layout::match_section_name): New static function.
234 * options.h (keep_text_section_prefix): New -z option.
235 * testsuite/Makefile.am (keep_text_section_prefix): New test.
236 * testsuite/Makefile.in: Regenerate.
237 * testsuite/keep_text_section_prefix.cc: New test source.
238 * testsuite/keep_text_section_prefix.sh: New test script.
240 2018-02-22 Sriraman Tallam <tmsriram@google.com>
242 * plugin.cc (get_wrap_symbols): New plugin interface.
243 (load): Add get_wrap_symbols to transfer vector.
244 * plugin-api.h (ld_plugin_get_wrap_symbols): New plugin interface.
245 * testsuite/plugin_test.c (onload): Call and check get_wrap_symbols
247 * testsuite/plugin_test_wrap_symbols.sh: New test script.
248 * testsuite/plugin_test_wrap_symbols_1.cc: New file.
249 * testsuite/plugin_test_wrap_symbols_2.cc: New file.
250 * testsuite/Makefile.am (plugin_test_wrap_symbols): New test.
251 * testsuite/Makefile.in: Regenerate.
253 2018-02-07 Sriraman Tallam <tmsriram@google.com>
255 * expression.cc (Symbol_expression::set_expr_sym_in_real_elf):
257 (Unary_expression::set_expr_sym_in_real_elf): New method.
258 (Binary_expression::set_expr_sym_in_real_elf): New method.
259 (Trinary_expression::set_expr_sym_in_real_elf): New method.
260 * plugin.cc (get_symbol_resolution_info): Fix symbol resolution if
261 defined or used in defsyms.
262 * plugin.h (Plugin_manager::is_defsym_def): New method.
263 (Plugin_manager::Plugin_manager): Initialize defsym_defines_set_.
264 (Plugin_manager::defsym_defines_set_): New member.
265 (Plugin_manager::Defsym_defines_set): New typedef.
266 * script.cc (Script_options::set_defsym_uses_in_real_elf): New method.
267 (Script_options::find_defsym_defs): New method.
268 * script.h (Expression::set_expr_sym_in_real_elf): New method.
269 (Symbol_assignment::is_defsym): New method.
270 (Symbol_assignment::value): New method.
271 (Script_options::find_defsym_defs): New method.
272 (Script_options::set_defsym_uses_in_real_elf): New method.
273 * testsuite/Makefile.am (plugin_test_defsym): New test.
274 * testsuite/Makefile.in: Regenerate.
275 * testsuite/plugin_test.c: Check for new symbol resolution.
276 * testsuite/plugin_test_defsym.sh: New script.
277 * testsuite/plugin_test_defsym.c: New test source.
279 2018-02-07 Alan Modra <amodra@gmail.com>
281 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
282 * options.h: Remove --speculate-indirect-jumps support.
283 * powerpc.cc: Likewise.
285 2018-02-02 Cary Coutant <ccoutant@gmail.com>
288 * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog): Add
289 support for DWARF-4 line number tables.
290 * dwarf_reader.h (Sized_dwarf_line_info::max_ops_per_insn): New field.
292 2018-01-18 Alan Modra <amodra@gmail.com>
294 * powerpc.cc (param_plt_align): New function supplying default
295 --plt-align values. Use it..
296 (Stub_table::plt_call_align): ..here, and..
297 (Output_data_glink::global_entry_align): ..here.
298 (Stub_table::stub_align): Correct 32-bit minimum alignment.
300 2018-01-17 Alan Modra <amodra@gmail.com>
302 * options.h (speculate_indirect_jumps): New option.
303 * powerpc.cc (beqctrm, beqctrlm, crseteq): New insn constants.
304 (output_bctr): New function.
305 (Stub_table::plt_call_size): Add space for speculation barrier.
306 (Stub_table::branch_stub_size): Likewise.
307 (Output_data_glink::pltresolve_size): Likewise.
308 (Stub_table::do_write): Output speculation barriers.
310 2018-01-17 Alan Modra <amodra@gmail.com>
312 * options.h (plt_align): Support for PowerPC32 too.
313 * powerpc.cc (Stub_table::stub_align): Heed --plt-align for 32-bit.
314 (Stub_table::plt_call_size, branch_stub_size): Tidy.
315 (Stub_table::plt_call_align): Implement using stub_align.
316 (Output_data_glink::global_entry_align): New function.
317 (Output_data_glink::global_entry_off): New function.
318 (Output_data_glink::global_entry_address): Use global_entry_off.
319 (Output_data_glink::pltresolve_size): New function, replacing
320 pltresolve_size_ constant. Update all uses.
321 (Output_data_glink::add_global_entry): Align offset.
322 (Output_data_glink::set_final_data_size): Use global_entry_align.
323 (Stub_table::do_write): Don't pad __glink_PLTrelsolve with nops.
324 Tidy stub output. Use global_entry_off.
326 2018-01-15 Cary Coutant <ccoutant@gmail.com>
329 * options.h (-fuse-ld): Add correct helparg.
331 2018-01-15 Nick Clifton <nickc@redhat.com>
333 * po/uk.po: Updated Ukranian translation.
335 2018-01-13 Nick Clifton <nickc@redhat.com>
337 * po/gold.pot: Regenerated.
339 2018-01-13 Nick Clifton <nickc@redhat.com>
343 2018-01-12 Cary Coutant <ccoutant@gmail.com>
345 * NEWS: Add new features in 1.15.
346 * version.cc (version_string): Bump to 1.15.
348 2018-01-12 Sterling Augustine <saugustine@google.com>
350 * cref.cc (Cref_inputs::Cref_table_compare::operator): Add
351 conditionals and calls to is_forwarder.
353 2018-01-03 Alan Modra <amodra@gmail.com>
355 Update year range in copyright notice of all files.
357 For older changes see ChangeLog-2017
359 Copyright (C) 2018 Free Software Foundation, Inc.
361 Copying and distribution of this file, with or without modification,
362 are permitted in any medium without royalty provided the copyright
363 notice and this notice are preserved.
369 version-control: never