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