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