Commit | Line | Data |
---|---|---|
ab27f80c PA |
1 | 2017-06-26 Pedro Alves <palves@redhat.com> |
2 | ||
3 | PR binutils/21665 | |
4 | * libbfd.c (_bfd_generic_get_section_contents): Add "count", not | |
5 | "sz". | |
6 | ||
1f473e3d L |
7 | 2017-06-26 H.J. Lu <hongjiu.lu@intel.com> |
8 | ||
9 | PR binutils/21665 | |
10 | * libbfd.c (_bfd_generic_get_section_contents_in_window): Add | |
11 | a missing line. | |
12 | ||
b417536f MR |
13 | 2017-06-26 Maciej W. Rozycki <macro@imgtec.com> |
14 | ||
15 | * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit. | |
16 | * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set | |
17 | E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'. | |
18 | (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending | |
19 | `bfd_mach_mips6000' rather than `bfd_mach_mips4000'. | |
20 | ||
0630b49c L |
21 | 2017-06-26 H.J. Lu <hongjiu.lu@intel.com> |
22 | ||
23 | PR binutils/21665 | |
24 | * compress.c (bfd_get_full_section_contents): Don't check the | |
25 | file size here. | |
26 | * libbfd.c (_bfd_generic_get_section_contents): Check for and | |
27 | reject a section whoes size + offset is greater than the size | |
28 | of the entire file. | |
29 | (_bfd_generic_get_section_contents_in_window): Likewise. | |
515a4464 | 30 | |
04e15b4a NC |
31 | 2017-06-26 Nick Clifton <nickc@redhat.com> |
32 | ||
33 | PR binutils/21670 | |
34 | * tekhex.c (getvalue): Check for the source pointer exceeding the | |
35 | end pointer before the first byte is read. | |
36 | ||
cfd14a50 NC |
37 | 2017-06-26 Nick Clifton <nickc@redhat.com> |
38 | ||
39 | PR binutils/21665 | |
40 | * opncls.c (get_build_id): Check that the section is beig enough | |
41 | to contain the whole note. | |
42 | * compress.c (bfd_get_full_section_contents): Check for and reject | |
43 | a section whoes size is greater than the size of the entire file. | |
44 | * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not | |
45 | contain a notes section. | |
46 | ||
93ec5e23 AK |
47 | 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com> |
48 | ||
49 | * elf64-s390.c (elf_s390_additional_program_headers): Add NULL | |
50 | pointer checks. | |
51 | (elf_s390_modify_segment_map): Likewise. | |
52 | (bfd_elf_s390_set_options): Lisewise. | |
53 | ||
57963c05 AM |
54 | 2017-06-26 Alan Modra <amodra@gmail.com> |
55 | ||
56 | * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj | |
57 | a --just-syms bfd. | |
58 | (_bfd_elf_size_group_sections): Skip --just-syms bfds. | |
59 | (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and | |
60 | .preinit_array on --just-syms bfds. | |
61 | (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds. | |
62 | (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise. | |
63 | (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise. | |
64 | ||
5cc4ca83 ST |
65 | 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org> |
66 | ||
67 | * elf.c (find_link): Bounds check "hint". | |
68 | ||
bff0500d TP |
69 | 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com> |
70 | ||
71 | * elf32-arm.c (using_thumb_only): Update list of architectures in | |
72 | BFD_ASSERT for which the logic is valid. | |
73 | (using_thumb2_bl): Likewise. | |
74 | (using_thumb2): Likewise and return true for ARMv8-R. | |
75 | (arch_has_arm_nop): Likewise. | |
76 | (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch | |
77 | merging logic. Update commentis for value 15 of v8m_baseline, | |
78 | v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide | |
79 | merging of value 15 of Tag_CPU_arch. | |
80 | ||
4aa57d6a JW |
81 | 2017-06-23 Jiong Wang <jiong.wang@arm.com> |
82 | ||
83 | * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to | |
84 | BFD_RELOC_AARCH64_ADR_GOT_PAGE | |
85 | * bfd-in2.h: Regenerate. | |
86 | ||
5d8763a3 L |
87 | 2017-06-22 H.J. Lu <hongjiu.lu@intel.com> |
88 | ||
89 | * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move | |
90 | the error_alignment label forward. Properly align program | |
91 | property note section. | |
92 | ||
e652757b EC |
93 | 2017-06-22 Eric Christopher <echristo@gmail.com> |
94 | ||
95 | * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than | |
96 | abs to fix a truncation warning. | |
97 | ||
84da4cf8 L |
98 | 2017-06-22 H.J. Lu <hongjiu.lu@intel.com> |
99 | ||
100 | * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve | |
101 | local undefined weak symbol to 0. | |
102 | * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise. | |
103 | ||
48580982 L |
104 | 2017-06-22 H.J. Lu <hongjiu.lu@intel.com> |
105 | ||
106 | * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk | |
107 | is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK. | |
108 | (elf_i386_link_setup_gnu_properties): If info->shstk is set, | |
109 | turn on GNU_PROPERTY_X86_FEATURE_1_IBT. | |
110 | * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If | |
111 | info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK. | |
112 | (elf_x86_64_link_setup_gnu_properties): If info->shstk is set, | |
113 | turn on GNU_PROPERTY_X86_FEATURE_1_IBT. | |
114 | ||
ee2fdd6f L |
115 | 2017-06-22 H.J. Lu <hongjiu.lu@intel.com> |
116 | ||
117 | * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New. | |
118 | (elf_i386_lazy_ibt_plt_entry): Likewise. | |
119 | (elf_i386_pic_lazy_ibt_plt0_entry): Likewise. | |
120 | (elf_i386_non_lazy_ibt_plt_entry): Likewise. | |
121 | (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise. | |
122 | (elf_i386_eh_frame_lazy_ibt_plt): Likewise. | |
123 | (elf_i386_lazy_plt_layout): Likewise. | |
124 | (elf_i386_non_lazy_plt_layout): Likewise. | |
125 | (elf_i386_link_hash_entry): Add plt_second. | |
126 | (elf_i386_link_hash_table): Add plt_second and | |
127 | plt_second_eh_frame. | |
128 | (elf_i386_allocate_dynrelocs): Use the second PLT if needed. | |
129 | (elf_i386_size_dynamic_sections): Use .plt.got unwind info for | |
130 | the second PLT. Check the second PLT. | |
131 | (elf_i386_relocate_section): Use the second PLT to resolve | |
132 | PLT reference if needed. | |
133 | (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if | |
134 | needed. | |
135 | (elf_i386_finish_dynamic_sections): Set sh_entsize on the | |
136 | second PLT. Generate unwind info for the second PLT. | |
137 | (elf_i386_plt_type): Add plt_second. | |
138 | (elf_i386_get_synthetic_symtab): Support the second PLT. | |
139 | (elf_i386_parse_gnu_properties): Support | |
140 | GNU_PROPERTY_X86_FEATURE_1_AND. | |
141 | (elf_i386_merge_gnu_properties): Support | |
142 | GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn | |
143 | on GNU_PROPERTY_X86_FEATURE_1_IBT | |
144 | (elf_i386_link_setup_gnu_properties): If info->ibt is set, | |
145 | turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT | |
146 | for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT | |
147 | is set on all relocatable inputs. | |
148 | * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New. | |
149 | (elf_x32_lazy_ibt_plt_entry): Likewise. | |
150 | (elf_x86_64_non_lazy_ibt_plt_entry): Likewise. | |
151 | (elf_x32_non_lazy_ibt_plt_entry): Likewise. | |
152 | (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise. | |
153 | (elf_x32_eh_frame_lazy_ibt_plt): Likewise. | |
154 | (elf_x86_64_lazy_ibt_plt): Likewise. | |
155 | (elf_x32_lazy_ibt_plt): Likewise. | |
156 | (elf_x86_64_non_lazy_ibt_plt): Likewise. | |
157 | (elf_x32_non_lazy_ibt_plt): Likewise. | |
158 | (elf_x86_64_get_synthetic_symtab): Support the second PLT. | |
159 | (elf_x86_64_parse_gnu_properties): Support | |
160 | GNU_PROPERTY_X86_FEATURE_1_AND. | |
161 | (elf_x86_64_merge_gnu_properties): Support | |
162 | GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn | |
163 | on GNU_PROPERTY_X86_FEATURE_1_IBT | |
164 | (elf_x86_64_link_setup_gnu_properties): If info->ibt is set, | |
165 | turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT | |
166 | for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT | |
167 | is set on all relocatable inputs. | |
168 | ||
d19237d9 NC |
169 | 2017-06-22 Nick Clifton <nickc@redhat.com> |
170 | ||
171 | PR binutils/21649 | |
172 | * som.c (setup_sections): NUL terminate the space_strings buffer. | |
173 | Check that the space.name field does not index beyond the end of | |
174 | the space_strings buffer. | |
175 | ||
6879f5a9 NC |
176 | 2017-06-21 Nick Clifton <nickc@redhat.com> |
177 | ||
178 | PR binutils/21646 | |
179 | * coff-sh.c (sh_reloc): Check for an out of range reloc. | |
180 | ||
7adc0a81 NC |
181 | 2017-06-21 Nick Clifton <nickc@redhat.com> |
182 | ||
183 | PR binutils/21639 | |
184 | * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as | |
185 | type of the size parameter. | |
186 | (_bfd_vms_save_counted_string): Add second parameter - the maximum | |
187 | length of the counted string. | |
188 | * vms.h (_bfd_vms_save_sized_string): Update prototype. | |
189 | (_bfd_vms_save_counted_string): Likewise. | |
190 | * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to | |
191 | _bfd_vms_save_counted_string. | |
192 | (_bfd_vms_slurp_ehdr): Likewise. | |
193 | (_bfd_vms_slurp_egsd): Likewise. | |
194 | (Parse_module): Likewise. | |
195 | ||
6e1816be AM |
196 | 2017-06-21 Alan Modra <amodra@gmail.com> |
197 | ||
198 | * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt | |
199 | calls before tocsave calls. | |
200 | (ppc64_elf_relocate_section): Allow localentry:0 plt calls without | |
201 | following nop. | |
202 | ||
20bd1b6b NC |
203 | 2017-06-21 Nick Clifton <nickc@redhat.com> |
204 | ||
205 | PR binutils/21645 | |
206 | * reloc.c (bfd_generic_get_relocated_section_contents): Fail if | |
207 | bfd_get_full_section_contents returns no contents. | |
208 | ||
3de58d95 NC |
209 | 2017-06-21 Nick Clifton <nickc@redhat.com> |
210 | ||
211 | PR binutils/21638 | |
212 | * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized | |
213 | record. | |
214 | ||
cb06d03a NC |
215 | 2017-06-21 Nick Clifton <nickc@redhat.com> |
216 | ||
217 | PR binutils/21637 | |
218 | * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section | |
219 | list. | |
220 | (image_set_ptr): Likewise. | |
221 | (alpha_vms_fix_sec_rel): Likewise. | |
222 | (alpha_vms_slurp_relocs): Likewise. | |
223 | ||
c458d007 NC |
224 | 2017-06-21 Nick Clifton <nickc@redhat.com> |
225 | ||
226 | PR binutils/21633 | |
227 | * ieee.c (ieee_slurp_sections): Check for a NULL return from | |
228 | read_id. | |
229 | (ieee_archive_p): Likewise. | |
230 | (ieee_object_p): Likewise. | |
231 | ||
ce497010 NC |
232 | 2017-06-21 Nick Clifton <nickc@redhat.com> |
233 | ||
234 | PR binutils/21640 | |
235 | * elf.c (setup_group): Zero the group section pointer list after | |
236 | allocation so that loops can be caught. Check for NULL pointers | |
237 | when processing a group list. | |
238 | ||
fd52715c AK |
239 | 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com> |
240 | ||
241 | * elf-s390.h: New file. | |
242 | * elf64-s390.c (struct elf_s390_link_hash_table): Add params | |
243 | field. | |
244 | (elf_s390_additional_program_headers): New function. | |
245 | (elf_s390_modify_segment_map): New function. | |
246 | (bfd_elf_s390_set_options): New function. | |
247 | (elf_backend_additional_program_headers) | |
248 | (elf_backend_modify_segment_map): Add macro definitions. | |
249 | ||
abfa390d L |
250 | 2017-06-19 H.J. Lu <hongjiu.lu@intel.com> |
251 | ||
252 | PR ld/21626 | |
253 | * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check | |
254 | the DYNAMIC bit instead of bfd_count_sections. | |
255 | ||
bc21b167 NC |
256 | 2017-06-19 Nick Clifton <nickc@redhat.com> |
257 | ||
258 | PR binutils/21618 | |
259 | * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record | |
260 | length. | |
261 | (evax_bfd_print_eeom): Likewise. | |
262 | (evax_bfd_print_egsd): Check for an overlarge record length. | |
263 | (evax_bfd_print_etir): Likewise. | |
264 | ||
acb56a83 NC |
265 | 2017-06-19 Nick Clifton <nickc@redhat.com> |
266 | ||
267 | PR binutils/21612 | |
268 | * libieee.h (struct common_header_type): Add end_p field. | |
269 | * ieee.c (this_byte_and_next): Do not advance input_p beyond | |
270 | end_p. | |
271 | (read_id): Check for a length that exceeds the remaining bytes in | |
272 | the input buffer. | |
273 | (ieee_seek): Initialise end_p. | |
274 | (ieee_archive_p): Likewise. | |
275 | (ieee_object_p): Likewise. | |
276 | ||
72e84f96 NC |
277 | 2017-06-19 Nick Clifton <nickc@redhat.com> |
278 | ||
80053e46 NC |
279 | PR binutils/21611 |
280 | * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset | |
281 | before reading the EIHS structure entries. | |
282 | ||
283 | 2017-06-19 Nick Clifton <nickc@redhat.com> | |
284 | ||
285 | PR binutils/21615 | |
72e84f96 NC |
286 | * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for |
287 | gsd_size. Check that there are enough bytes remaining to read the | |
288 | type and size of the next egsd. Check that the size of the egsd | |
289 | does not exceed the size of the record. | |
290 | ||
875ffa3e AM |
291 | 2017-06-19 Alan Modra <amodra@gmail.com> |
292 | ||
293 | * config.bfd: Correct targ_underscore for cris. | |
294 | ||
bdd32e03 AM |
295 | 2017-06-18 Alan Modra <amodra@gmail.com> |
296 | ||
297 | * config.bfd: Correct targ_underscore for epiphany, ip2k, | |
298 | m32c, mn10200, pru, rl78, rx, crisv32 and v850. | |
299 | ||
4b48e2f6 NC |
300 | 2017-06-16 Nick Clifton <nickc@redhat.com> |
301 | ||
302 | * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the | |
303 | bucketlist is empty because there are no symbols to add to the | |
304 | list. | |
305 | ||
7dba9362 AM |
306 | 2017-06-16 Alan Modra <amodra@gmail.com> |
307 | ||
308 | PR ld/20022 | |
309 | PR ld/21557 | |
310 | PR ld/21562 | |
311 | PR ld/21571 | |
312 | * targets.c (struct bfd_target): Add _bfd_define_start_stop. | |
313 | (BFD_JUMP_TABLE_LINK): Likewise. | |
314 | * elf-bfd.h (bfd_elf_define_start_stop): Declare. | |
315 | * elflink.c (_bfd_elf_gc_mark_rsec): Update comment. | |
316 | (bfd_elf_define_start_stop): New function. | |
317 | * linker.c (bfd_generic_define_start_stop): New function. | |
318 | * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init | |
319 | new field. | |
320 | * aout-adobe.c (aout_32_bfd_define_start_stop): Define. | |
321 | * aout-target.h (MY_bfd_define_start_stop): Define. | |
322 | * aout-tic30.c (MY_bfd_define_start_stop): Define. | |
323 | * binary.c (binary_bfd_define_start_stop): Define. | |
324 | * bout.c (b_out_bfd_define_start_stop): Define. | |
325 | * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define. | |
326 | * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define. | |
327 | * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define. | |
328 | * coffcode.h (coff_bfd_define_start_stop): Define. | |
329 | * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define. | |
330 | * i386msdos.c (msdos_bfd_define_start_stop): Define. | |
331 | * i386os9k.c (os9k_bfd_define_start_stop): Define. | |
332 | * ieee.c (ieee_bfd_define_start_stop): Define. | |
333 | * ihex.c (ihex_bfd_define_start_stop): Define. | |
334 | * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define. | |
335 | * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define. | |
336 | * mmo.c (mmo_bfd_define_start_stop): Define. | |
337 | * nlm-target.h (nlm_bfd_define_start_stop): Define. | |
338 | * oasys.c (oasys_bfd_define_start_stop): Define. | |
339 | * pef.c (bfd_pef_bfd_define_start_stop): Define. | |
340 | * plugin.c (bfd_plugin_bfd_define_start_stop): Define. | |
341 | * ppcboot.c (ppcboot_bfd_define_start_stop): Define. | |
342 | * som.c (som_bfd_define_start_stop): Define. | |
343 | * srec.c (srec_bfd_define_start_stop): Define. | |
344 | * tekhex.c (tekhex_bfd_define_start_stop): Define. | |
345 | * versados.c (versados_bfd_define_start_stop): Define. | |
346 | * vms-alpha.c (vms_bfd_define_start_stop): Define. | |
347 | (alpha_vms_bfd_define_start_stop): Define. | |
348 | * xsym.c (bfd_sym_bfd_define_start_stop): Define. | |
349 | * bfd-in2.h: Regenerate. | |
350 | * libbfd.h: Regenerate. | |
351 | ||
d68f1976 JW |
352 | 2017-06-16 Jiong Wang <jiong.wang@arm.com> |
353 | ||
354 | * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use | |
355 | SYMBOL_REFERENCES_LOCAL. | |
356 | ||
6353d82b JW |
357 | 2017-06-15 Jiong Wang <jiong.wang@arm.com> |
358 | ||
359 | PR ld/21532 | |
360 | * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1. | |
361 | (elfNN_aarch64_final_link_relocate): Also propagate relocations to | |
362 | runtime for if there needs copy relocation elimination. | |
363 | (need_copy_relocation_p): New function. Return true for symbol with | |
364 | pc-relative references and if it's against read-only sections. | |
365 | (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p. | |
366 | (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types | |
367 | that are related with accessing external objects. | |
368 | (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change | |
369 | in elfNN_aarch64_check_relocs. | |
370 | ||
63634bb4 NC |
371 | 2017-06-15 Nick Clifton <nickc@redhat.com> |
372 | ||
373 | PR binutils/21582 | |
374 | * ieee.c (ieee_object_p): Use a static buffer to avoid compiler | |
375 | bugs. | |
62b76e4b NC |
376 | PR binutils/21581 |
377 | (ieee_archive_p): Likewise. | |
63634bb4 | 378 | |
76800cba NC |
379 | 2017-06-15 Nick Clifton <nickc@redhat.com> |
380 | ||
381 | PR binutils/21579 | |
382 | * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length. | |
383 | ||
f7e16c2a MF |
384 | 2017-06-14 Max Filippov <jcmvbkbc@gmail.com> |
385 | ||
386 | * elf32-xtensa.c (elf_xtensa_be_plt_entry, | |
387 | elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays, | |
388 | keep both windowed and call0 ABI PLT definitions. | |
389 | (elf_xtensa_create_plt_entry): Use selected ABI to choose upper | |
390 | elf_xtensa_*_plt_entry endex. | |
391 | (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size. | |
392 | ||
f461bbd8 NC |
393 | 2017-06-14 Nick Clifton <nickc@redhat.com> |
394 | ||
395 | PR binutils/21578 | |
396 | * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid | |
397 | flag value. | |
398 | ||
c53d2e6d NC |
399 | 2017-06-14 Nick Clifton <nickc@redhat.com> |
400 | ||
401 | PR binutils/21589 | |
402 | * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the | |
403 | maximum value for the ascic pointer. Check that name processing | |
404 | does not read beyond this value. | |
405 | (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the | |
406 | end of etir record. | |
407 | ||
04f963fd NC |
408 | 2017-06-14 Nick Clifton <nickc@redhat.com> |
409 | ||
410 | PR binutils/21591 | |
411 | * versados.c (versados_mkobject): Zero the allocated tdata structure. | |
412 | (process_otr): Check for an invalid offset in the otr structure. | |
413 | ||
319c2dbe SH |
414 | 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de> |
415 | ||
416 | * config.bfd (epiphany-*-elf): Accept epiphany-*-*. | |
417 | ||
cbd0eecf L |
418 | 2017-06-13 H.J. Lu <hongjiu.lu@intel.com> |
419 | ||
420 | PR ld/20022 | |
421 | PR ld/21557 | |
422 | PR ld/21562 | |
423 | PR ld/21571 | |
424 | * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the | |
425 | vtable field to a union. | |
426 | (_bfd_elf_is_start_stop): Removed. | |
427 | * elf32-i386.c (elf_i386_convert_load_reloc): Also check for | |
428 | __start_SECNAME and __stop_SECNAME symbols. | |
429 | * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise. | |
430 | * elflink.c (_bfd_elf_is_start_stop): Removed. | |
431 | (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling | |
432 | _bfd_elf_is_start_stop. | |
433 | (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and | |
434 | __stop_SECNAME symbols. Updated. | |
435 | (elf_gc_smash_unused_vtentry_relocs): Likewise. | |
436 | (bfd_elf_gc_record_vtinherit): Likewise. | |
437 | (bfd_elf_gc_record_vtentry): Likewise. | |
438 | ||
10bbbc1d NC |
439 | 2017-06-13 Nick Clifton <nickc@redhat.com> |
440 | ||
441 | PR ld/21524 | |
442 | * elflink.c (elf_link_adjust_relocs): Generate an error when | |
443 | encountering a reloc against a symbol removed by garbage | |
444 | collection. | |
445 | ||
5c3ce2bc L |
446 | 2017-06-12 H.J. Lu <hongjiu.lu@intel.com> |
447 | ||
448 | * elf-bfd.h (elf_backend_data): Add struct bfd_link_info * | |
449 | to merge_gnu_properties. | |
450 | * elf-properties.c (elf_merge_gnu_properties): Add struct | |
451 | bfd_link_info * and pass it to merge_gnu_properties. | |
452 | (elf_merge_gnu_property_list): Add struct bfd_link_info * | |
453 | and pass it to elf_merge_gnu_properties. | |
454 | (_bfd_elf_link_setup_gnu_properties): Pass info to | |
455 | elf_merge_gnu_property_list. | |
456 | * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct | |
457 | bfd_link_info *. | |
458 | * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise. | |
459 | ||
9b97dfbf AM |
460 | 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info> |
461 | ||
462 | PR 21564 | |
463 | * binary.c (binary_set_section_contents): Scale lma by octets | |
464 | per byte to set filepos. | |
465 | ||
e3d1d408 CM |
466 | 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com> |
467 | ||
468 | * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate | |
469 | dynamic sections. | |
470 | ||
64aa8e03 CM |
471 | 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com> |
472 | ||
473 | * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to | |
474 | require TEXTREL. | |
475 | ||
a0abe743 CM |
476 | 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com> |
477 | ||
478 | * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to | |
479 | patched section contents for TLS IE reloc. | |
480 | * elf32-arc.c: Remove TCB_SIZE preprocessor macro. | |
481 | ||
f4e6805f CM |
482 | 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com> |
483 | ||
484 | * elf32-arc.c (elf_arc_relocate_section): Added "call" to | |
485 | RELOC_FOR_GLOBAL_SYMBOL macro. | |
486 | ||
cd640291 CM |
487 | 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com> |
488 | ||
489 | * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition | |
490 | changes. | |
491 | ||
7ef0acc1 VG |
492 | 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com> |
493 | ||
494 | * config/tc-arc.c (md_undefined_symbol): Changed. | |
495 | * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed. | |
496 | ||
cc89d0b3 CM |
497 | 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com> |
498 | ||
499 | * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect | |
500 | symbols. | |
501 | ||
9d5c718b CM |
502 | 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com> |
503 | ||
504 | * elf32-arc.c (elf_arc_check_relocs): Added condition to disable | |
505 | warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs. | |
506 | ||
be9e3704 CM |
507 | 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com> |
508 | ||
509 | * elf32-arc.c (ADD_RELA): Changed to only work when dynamic | |
510 | object is created. | |
511 | ||
4ec192e6 RE |
512 | 2017-06-08 Richard Earnshaw <rearnsha@arm.com> |
513 | ||
514 | * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion | |
515 | that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use | |
516 | is non-zero. Add clarifying comments. | |
517 | ||
51fa2693 L |
518 | 2017-06-08 H.J. Lu <hongjiu.lu@intel.com> |
519 | ||
520 | * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol | |
521 | name. Use local IFUNC symbol name string to report unsupported | |
522 | non-PIC call to IFUNC function. | |
523 | (elf_i386_relocate_section): Dump local IFUNC name with minfo | |
524 | when generating R_386_IRELATIVE relocation. | |
525 | (elf_i386_finish_dynamic_symbol): Likewise. | |
526 | * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local | |
527 | IFUNC symbol name. | |
528 | (elf_x86_64_relocate_section): Dump local IFUNC name with minfo | |
529 | when generating R_X86_64_IRELATIVE relocation. | |
530 | (elf_x86_64_finish_dynamic_symbol): Likewise. | |
531 | ||
78e8a2ff JM |
532 | 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com> |
533 | ||
534 | * elf.c (setup_group): Make sure BFD sections are created for all | |
535 | group sections in the input file when processing SHF_GROUP | |
536 | sections. | |
537 | (bfd_section_from_shdr): Avoid duplicating logic already | |
538 | implemented in `setup_group'. | |
539 | ||
9949827b DBR |
540 | 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com> |
541 | ||
542 | PR binutils/21546 | |
543 | * peXXigen.c (pe_print_idata): Use the address of the first thunk | |
544 | if the hint address is zero. | |
545 | ||
0ee3a6db JC |
546 | 2017-06-06 James Clarke <jrtc27@jrtc27.com> |
547 | ||
548 | PR ld/19579 | |
549 | * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check | |
550 | ELF_COMMON_DEF_P for common symbols. | |
551 | ||
7bdf4127 AB |
552 | 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com> |
553 | ||
554 | * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark | |
555 | SEC_GROUP sections as SEC_EXCLUDE. | |
556 | (bfd_elf_set_group_contents): Replace use of abort with an assert. | |
557 | (assign_section_numbers): Use resolve_section_groups flag instead | |
558 | of relocatable link type. | |
559 | (_bfd_elf_init_private_section_data): Use resolve_section_groups | |
560 | flag instead of checking the final_link flag for part of the | |
561 | checks in here. Fix white space as a result. | |
562 | * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag | |
563 | instead of relocatable link type. | |
564 | (bfd_elf_final_link): Likewise. | |
565 | ||
458ad2b8 JM |
566 | 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com> |
567 | ||
568 | * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused | |
569 | variable `bed'. | |
570 | * elf32-score.c (score_elf_final_link_relocate): Likewise. | |
571 | (s3_bfd_score_elf_check_relocs): Likewise. | |
572 | * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. | |
573 | (score_elf_final_link_relocate): Likewise. | |
574 | (s7_bfd_score_elf_check_relocs): Likewise. | |
575 | ||
fbebaf4a JM |
576 | 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com> |
577 | ||
578 | * elflink.c (init_reloc_cookie_rels): Remove unused variable | |
579 | `bed'. | |
580 | ||
056bafd4 MR |
581 | 2017-06-06 Maciej W. Rozycki <macro@imgtec.com> |
582 | ||
583 | * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count' | |
584 | from `reloc_count' rather than decrementing it. | |
585 | * elf.c (bfd_section_from_shdr): Multiply the adjustment to | |
586 | `reloc_count' by `int_rels_per_ext_rel'. | |
587 | * elf32-score.c (score_elf_final_link_relocate): Do not multiply | |
588 | `reloc_count' by `int_rels_per_ext_rel' for last relocation | |
589 | entry determination. | |
590 | (s3_bfd_score_elf_check_relocs): Likewise. | |
591 | * elf32-score7.c (score_elf_final_link_relocate): Likewise. | |
592 | (s7_bfd_score_elf_relocate_section): Likewise. | |
593 | (s7_bfd_score_elf_check_relocs): Likewise. | |
594 | * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove | |
595 | prototype and function. | |
596 | (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'. | |
597 | (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is | |
598 | triple rather than once the sum of REL and RELA relocation entry | |
599 | counts. | |
600 | (bfd_elf64_get_reloc_upper_bound): Remove macro. | |
601 | * elflink.c (_bfd_elf_link_read_relocs): Do not multiply | |
602 | `reloc_count' by `int_rels_per_ext_rel' for internal relocation | |
603 | storage allocation size determination. | |
604 | (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's | |
605 | size by `int_rels_per_ext_rel'. Do not multiply `reloc_count' | |
606 | by `int_rels_per_ext_rel' for last relocation entry | |
607 | determination. | |
608 | (bfd_elf_final_link): Do not multiply `reloc_count' by | |
609 | `int_rels_per_ext_rel' for internal relocation storage | |
610 | allocation size determination. | |
611 | (init_reloc_cookie_rels): Do not multiply `reloc_count' by | |
612 | `int_rels_per_ext_rel' for last relocation entry determination. | |
613 | (elf_gc_smash_unused_vtentry_relocs): Likewise. | |
614 | * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. | |
615 | (_bfd_mips_elf_relocate_section): Likewise. | |
616 | ||
af54f0eb AM |
617 | 2017-06-05 Alan Modra <amodra@gmail.com> |
618 | ||
619 | PR 21529 | |
620 | * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE. | |
621 | ||
6cf3bf88 | 622 | 2017-06-01 John Baldwin <jhb@FreeBSD.org> |
b5430a3c JB |
623 | |
624 | * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to | |
625 | determine structure sizes. | |
626 | (elfcore_grok_freebsd_prstatus): Likewise. | |
627 | ||
f378ab09 AM |
628 | 2017-06-01 Alan Modra <amodra@gmail.com> |
629 | ||
630 | * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0. | |
631 | (ppc64_elf_merge_symbol_attribute): Merge localentry bits from | |
632 | dynamic objects. | |
633 | (is_elfv2_localentry0): New function. | |
634 | (ppc64_elf_tls_setup): Default params->plt_localentry0. | |
635 | (plt_stub_size): Adjust size for tls_get_addr_opt stub. | |
636 | (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved. | |
637 | (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for | |
638 | optimized localentry:0 stubs. | |
639 | (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve. | |
640 | (ppc64_elf_relocate_section): Leave nop unchanged for optimized | |
641 | localentry:0 stubs. | |
642 | (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in | |
643 | DT_PPC64_OPT. | |
644 | * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0. | |
645 | ||
8c65b54f CS |
646 | 2017-05-30 Casey Smith <clegg89@gmail.com> |
647 | ||
648 | PR ld/21523 | |
649 | * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute | |
650 | value when processing the R_ARM_THM_ALU_PREL_11_0 reloc. | |
651 | ||
64984c22 AK |
652 | 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com |
653 | ||
654 | * cpu-arc.c (arc_compatible): New function. | |
655 | ||
37cd3877 AK |
656 | 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com> |
657 | ||
658 | * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry. | |
659 | ||
8e2f54bc L |
660 | 2017-05-30 H.J. Lu <hongjiu.lu@intel.com> |
661 | ||
662 | PR binutils/21519 | |
663 | * bfdio.c (bfd_get_file_size): New function. | |
664 | * bfd-in2.h: Regenerated. | |
665 | ||
8e7f04f1 | 666 | 2017-05-23 Dilian Palauzov <git-dpa@aegee.org> |
667 | ||
668 | * elf32-arc.c (arc_elf_merge_attributes): Add fall through | |
669 | comments. | |
670 | ||
25f94347 L |
671 | 2017-05-22 H.J. Lu <hongjiu.lu@intel.com> |
672 | ||
673 | * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use | |
674 | dynobj instead of htab->elf.dynobj. | |
675 | ||
e5713223 MR |
676 | 2017-05-19 Maciej W. Rozycki <macro@imgtec.com> |
677 | ||
678 | * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype | |
679 | and function. | |
680 | (mips_elf64_canonicalize_dynamic_reloc): Likewise. | |
681 | (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the | |
682 | actual number of internal relocations retrieved. Adjust | |
683 | function description. | |
684 | (bfd_elf64_canonicalize_reloc): Remove macro. | |
685 | (bfd_elf64_canonicalize_dynamic_reloc): Likewise. | |
686 | ||
64517994 JM |
687 | 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com> |
688 | ||
689 | * archures.c (bfd_mach_sparc_v9m8): Define. | |
690 | (bfd_mach_sparc_v8plusm8): Likewise. | |
691 | (bfd_mach_sparc_v9_p): Adjust to M8. | |
692 | (bfd_mach_sparc_64bit_p): Likewise. | |
693 | * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and | |
694 | bfd_mach_sparc_v8plusm8. | |
695 | * bfd-in2.h: Regenerated. | |
696 | * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and | |
697 | sparc:v8plusm8. | |
698 | * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle | |
699 | bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw | |
700 | capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and | |
701 | SHA3. | |
702 | * elf32-sparc.c (elf32_sparc_final_write_processing): Handle | |
703 | bfd_mach_sparc_v8plusm8. | |
704 | ||
eb026f09 AM |
705 | 2017-05-19 Alan Modra <amodra@gmail.com> |
706 | ||
707 | * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep | |
708 | debug and special sections when no non-note alloc sections in an | |
709 | object are kept. | |
710 | ||
535b785f AM |
711 | 2017-05-18 Alan Modra <amodra@gmail.com> |
712 | ||
713 | * arc-got.h: Don't compare boolean values against TRUE or FALSE. | |
714 | * elf-m10300.c: Likewise. | |
715 | * elf.c: Likewise. | |
716 | * elf32-arc.c: Likewise. | |
717 | * elf32-bfin.c: Likewise. | |
718 | * elf32-m68k.c: Likewise. | |
719 | * elf32-nds32.c: Likewise. | |
720 | * elf32-tilepro.c: Likewise. | |
721 | * elflink.c: Likewise. | |
722 | * elfnn-aarch64.c: Likewise. | |
723 | * elfnn-riscv.c: Likewise. | |
724 | * elfxx-tilegx.c: Likewise. | |
725 | * mach-o.c: Likewise. | |
726 | * peXXigen.c: Likewise. | |
727 | * vms-alpha.c: Likewise. | |
728 | * vms-lib.c: Likewise. | |
729 | ||
b7c871ed L |
730 | 2017-05-17 H.J. Lu <hongjiu.lu@intel.com> |
731 | ||
732 | PR ld/20882 | |
733 | * elflink.c (elf_gc_mark_debug_section): New function. | |
734 | (_bfd_elf_gc_mark_extra_sections): Mark any debug sections | |
735 | referenced by kept debug sections. | |
736 | ||
bc4e12de AM |
737 | 2017-05-16 Alan Modra <amodra@gmail.com> |
738 | ||
739 | * elf-m10300.c: Rename occurrences of non_ir_ref. | |
740 | * elf32-arm.c: Likewise. | |
741 | * elf32-bfin.c: Likewise. | |
742 | * elf32-cr16.c: Likewise. | |
743 | * elf32-cris.c: Likewise. | |
744 | * elf32-d10v.c: Likewise. | |
745 | * elf32-dlx.c: Likewise. | |
746 | * elf32-fr30.c: Likewise. | |
747 | * elf32-frv.c: Likewise. | |
748 | * elf32-hppa.c: Likewise. | |
749 | * elf32-i370.c: Likewise. | |
750 | * elf32-i386.c: Likewise. | |
751 | * elf32-iq2000.c: Likewise. | |
752 | * elf32-lm32.c: Likewise. | |
753 | * elf32-m32c.c: Likewise. | |
754 | * elf32-m32r.c: Likewise. | |
755 | * elf32-m68hc1x.c: Likewise. | |
756 | * elf32-m68k.c: Likewise. | |
757 | * elf32-mcore.c: Likewise. | |
758 | * elf32-metag.c: Likewise. | |
759 | * elf32-microblaze.c: Likewise. | |
760 | * elf32-moxie.c: Likewise. | |
761 | * elf32-msp430.c: Likewise. | |
762 | * elf32-mt.c: Likewise. | |
763 | * elf32-nios2.c: Likewise. | |
764 | * elf32-or1k.c: Likewise. | |
765 | * elf32-ppc.c: Likewise. | |
766 | * elf32-rl78.c: Likewise. | |
767 | * elf32-s390.c: Likewise. | |
768 | * elf32-score.c: Likewise. | |
769 | * elf32-score7.c: Likewise. | |
770 | * elf32-sh.c: Likewise. | |
771 | * elf32-tic6x.c: Likewise. | |
772 | * elf32-tilepro.c: Likewise. | |
773 | * elf32-v850.c: Likewise. | |
774 | * elf32-vax.c: Likewise. | |
775 | * elf32-xstormy16.c: Likewise. | |
776 | * elf32-xtensa.c: Likewise. | |
777 | * elf64-alpha.c: Likewise. | |
778 | * elf64-hppa.c: Likewise. | |
779 | * elf64-ia64-vms.c: Likewise. | |
780 | * elf64-mmix.c: Likewise. | |
781 | * elf64-ppc.c: Likewise. | |
782 | * elf64-s390.c: Likewise. | |
783 | * elf64-sh64.c: Likewise. | |
784 | * elf64-x86-64.c: Likewise. | |
785 | * elflink.c: Likewise. | |
786 | * elfnn-aarch64.c: Likewise. | |
787 | * elfnn-ia64.c: Likewise. | |
788 | * elfnn-riscv.c: Likewise. | |
789 | * elfxx-mips.c: Likewise. | |
790 | * elfxx-sparc.c: Likewise. | |
791 | * elfxx-tilegx.c: Likewise. | |
792 | * linker.c: Likewise. | |
793 | ||
4070765b AM |
794 | 2017-05-16 Alan Modra <amodra@gmail.com> |
795 | ||
796 | * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic. | |
797 | * elflink.c (elf_link_add_object_symbols): Update to use | |
798 | non_ir_ref_dynamic. | |
799 | (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to | |
800 | non_ir_ref. | |
801 | * linker.c (_bfd_generic_link_add_one_symbol): Likewise. | |
802 | ||
25499ac7 MR |
803 | 2017-05-15 Maciej W. Rozycki <macro@imgtec.com> |
804 | ||
805 | * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE. | |
806 | ||
73caa85d L |
807 | 2017-05-12 H.J. Lu <hongjiu.lu@intel.com> |
808 | ||
809 | * elf32-i386.c (elf_i386_parse_gnu_properties): Merge | |
810 | GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED | |
811 | properties. | |
812 | * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise. | |
813 | ||
f2c29a16 L |
814 | 2017-05-11 H.J. Lu <hongjiu.lu@intel.com> |
815 | ||
816 | * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd | |
817 | to plt_second. | |
818 | (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame | |
819 | to plt_second/plt_second_eh_frame. | |
820 | (elf_x86_64_link_hash_newfunc): Updated. | |
821 | (elf_x86_64_allocate_dynrelocs): Likewise. | |
822 | (elf_x86_64_size_dynamic_sections): Likewise. | |
823 | (elf_x86_64_relocate_section): Likewise. | |
824 | (elf_x86_64_finish_dynamic_symbol): Likewise. | |
825 | (elf_x86_64_finish_dynamic_sections): Likewise. | |
826 | (elf_x86_64_plt_type): Rename plt_bnd to plt_second. | |
827 | (elf_x86_64_get_synthetic_symtab): Updated. Also scan the | |
828 | .plt.sec section. | |
829 | (elf_backend_setup_gnu_properties): Updated. Create the | |
830 | .plt.sec section instead of the .plt.sec section. | |
831 | ||
dc2be3d2 L |
832 | 2017-05-11 H.J. Lu <hongjiu.lu@intel.com> |
833 | ||
834 | * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert | |
835 | commit 25070364b0ce33eed46aa5d78ebebbec6accec7e. | |
836 | * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse. | |
837 | ||
db84b98a JM |
838 | 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com> |
839 | ||
840 | * elf64-sparc.c (elf64_sparc_set_reloc): New function. | |
841 | (bfd_elf64_set_reloc): Define. | |
842 | (elf64_sparc_write_relocs): Use `canon_reloc_count'. | |
843 | ||
23186865 JM |
844 | 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com> |
845 | ||
846 | * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc. | |
847 | (struct bfd_target): New field _bfd_set_reloc. | |
848 | * bfd.c (bfd_set_reloc): Call backend _set_bfd. | |
849 | * reloc.c (_bfd_generic_set_reloc): New function. | |
850 | * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc. | |
851 | * nlm-target.h (nlm_set_reloc): Likewise. | |
852 | * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise. | |
853 | * aout-tic30.c (MY_set_reloc): Likewise. | |
854 | * aout-target.h (MY_set_reloc): Likewise. | |
855 | * elfxx-target.h (bfd_elfNN_set_reloc): Likewise. | |
856 | * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise. | |
857 | * mach-o-target.c (bfd_mach_o_set_reloc): Likewise. | |
858 | * vms-alpha.c (alpha_vms_set_reloc): Likewise. | |
859 | * aout-adobe.c (aout_32_set_reloc): Likewise. | |
860 | * bout.c (b_out_set_reloc): Likewise. | |
861 | * coff-mips.c (_bfd_ecoff_set_reloc): Likewise. | |
862 | * i386os9k.c (aout_32_set_reloc): Likewise. | |
863 | * ieee.c (ieee_set_reloc): Likewise. | |
864 | * oasys.c (oasys_set_reloc): Likewise. | |
865 | * som.c (som_set_reloc): Likewise. | |
866 | * versados.c (versados_set_reloc): Likewise. | |
867 | * coff64-rs6000.c (rs6000_xcoff64_vec): Add | |
868 | _bfd_generic_set_reloc. | |
869 | (rs6000_xcoff64_aix_vec): LIkewise. | |
870 | * libbfd.c (_bfd_norelocs_set_reloc): New function. | |
871 | * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc. | |
872 | * i386msdos.c (msdos_set_reloc): Define to | |
873 | _bfd_norelocs_set_reloc. | |
874 | * elfcode.h (elf_set_reloc): Define. | |
875 | * bfd-in2.h: Regenerated. | |
876 | ||
aab82f4c L |
877 | 2017-05-10 H.J. Lu <hongjiu.lu@intel.com> |
878 | ||
879 | PR ld/21481 | |
880 | * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd | |
881 | for IFUNC function address. | |
882 | ||
53a346d8 CZ |
883 | 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com> |
884 | ||
885 | * elf32-arc.c (FEATURE_LIST_NAME): Define. | |
886 | (CONFLICT_LIST): Likewise. | |
887 | (opcode/arc-attrs.h): Include. | |
888 | (arc_elf_print_private_bfd_data): Print OSABI v4 flag. | |
889 | (arc_extract_features): New file. | |
890 | (arc_stralloc): Likewise. | |
891 | (arc_elf_merge_attributes): Likewise. | |
892 | (arc_elf_merge_private_bfd_data): Use object attributes. | |
893 | (bfd_arc_get_mach_from_attributes): New function. | |
894 | (arc_elf_object_p): Use object attributes. | |
895 | (arc_elf_final_write_processing): Likewise. | |
896 | (elf32_arc_obj_attrs_arg_type): New function. | |
897 | (elf32_arc_obj_attrs_handle_unknown): Likewise. | |
898 | (elf32_arc_section_from_shdr): Likewise. | |
899 | (elf_backend_obj_attrs_vendor): Define. | |
900 | (elf_backend_obj_attrs_section): Likewise. | |
901 | (elf_backend_obj_attrs_arg_type): Likewise. | |
902 | (elf_backend_obj_attrs_section_type): Likewise. | |
903 | (elf_backend_obj_attrs_handle_unknown): Likewise. | |
904 | (elf_backend_section_from_shdr): Likewise. | |
905 | ||
e645cf40 AG |
906 | 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za> |
907 | ||
908 | PR ld/21458 | |
909 | * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit | |
910 | of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation | |
911 | and the destination is a Thumb symbol. | |
912 | ||
dd9e66ee L |
913 | 2017-05-08 H.J. Lu <hongjiu.lu@intel.com> |
914 | ||
915 | * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing | |
916 | initializer to silence GCC 4.2. | |
917 | * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise. | |
918 | ||
38b12349 L |
919 | 2017-05-08 H.J. Lu <hongjiu.lu@intel.com> |
920 | ||
921 | * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ... | |
922 | (LAZY_PLT_ENTRY_SIZE): This. | |
923 | (NON_LAZY_PLT_ENTRY_SIZE): New. | |
924 | (elf_x86_64_plt0_entry): Renamed to ... | |
925 | (elf_x86_64_lazy_plt0_entry): This. | |
926 | (elf_x86_64_plt_entry): Renamed to ... | |
927 | (elf_x86_64_lazy_plt_entry): This. | |
928 | (elf_x86_64_bnd_plt0_entry): Renamed to ... | |
929 | (elf_x86_64_lazy_bnd_plt0_entry): This. | |
930 | (elf_x86_64_legacy_plt_entry): Removed. | |
931 | (elf_x86_64_bnd_plt_entry): Renamed to ... | |
932 | (elf_x86_64_lazy_bnd_plt_entry): This. | |
933 | (elf_x86_64_legacy_plt2_entry): Renamed to ... | |
934 | (elf_x86_64_non_lazy_plt_entry): This. | |
935 | (elf_x86_64_bnd_plt2_entry): Renamed to ... | |
936 | (elf_x86_64_non_lazy_bnd_plt_entry): This. | |
937 | (elf_x86_64_eh_frame_plt): Renamed to ... | |
938 | (elf_x86_64_eh_frame_lazy_plt): This. | |
939 | (elf_x86_64_eh_frame_bnd_plt): Renamed to ... | |
940 | (elf_x86_64_eh_frame_lazy_bnd_plt): This. | |
941 | (elf_x86_64_eh_frame_plt_got): Renamed to ... | |
942 | (elf_x86_64_eh_frame_non_lazy_plt): This. | |
943 | (elf_x86_64_lazy_plt_layout): New. | |
944 | (elf_x86_64_non_lazy_plt_layout): Likewise. | |
945 | (elf_x86_64_plt_layout): Likewise. | |
946 | (elf_x86_64_backend_data): Remove PLT layout information. Add | |
947 | os for target system. | |
948 | (GET_PLT_ENTRY_SIZE): Removed. | |
949 | (elf_x86_64_lazy_plt): New. | |
950 | (elf_x86_64_non_lazy_plt): Likewise. | |
951 | (elf_x86_64_lazy_bnd_plt): Likewise. | |
952 | (elf_x86_64_non_lazy_bnd_plt): Likewise. | |
953 | (elf_x86-64_arch_bed): Updated. | |
954 | (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt. | |
955 | (elf_x86_64_create_dynamic_sections): Removed. | |
956 | (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call | |
957 | _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section. | |
958 | (elf_x86-64_adjust_dynamic_symbol): Updated. | |
959 | (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header | |
960 | size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate | |
961 | size for PLT0 if there is no PLT0. Get plt_entry_size from | |
962 | non_lazy_plt for non-lazy PLT entries. | |
963 | (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size | |
964 | from non_lazy_plt for non-lazy PLT entries. | |
965 | (elf_x86-64_relocate_section): Updated. Properly get PLT index | |
966 | if there is no PLT0. | |
967 | (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot | |
968 | in the PLT entry with generic PLT layout. Fill the non-lazy PLT | |
969 | entries with non-lazy PLT layout. Don't fill the second and third | |
970 | slots in the PLT entry if there is no PLT0. | |
971 | (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0 | |
972 | if there is no PLT0. Set sh_entsize on the .plt.got section. | |
973 | (compare_relocs): New. | |
974 | (elf_x86_64_plt_type): Likewise. | |
975 | (elf_x86_64_plt): Likewise. | |
976 | (elf_x86_64_nacl_plt): New. Forward declaration. | |
977 | (elf_x86_64_get_plt_sym_val): Removed. | |
978 | (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections | |
979 | against all dynamic relocations. | |
980 | (elf_x86_64_link_setup_gnu_properties): New function. | |
981 | (elf_backend_create_dynamic_sections): Updated. | |
982 | (elf_backend_setup_gnu_properties): New. | |
983 | (elf_x86_64_nacl_plt): New. | |
984 | (elf_x86_64_nacl_arch_bed): Updated. | |
985 | ||
f604c2a2 L |
986 | 2017-05-08 H.J. Lu <hongjiu.lu@intel.com> |
987 | ||
988 | * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ... | |
989 | (LAZY_PLT_ENTRY_SIZE): This. | |
990 | (NON_LAZY_PLT_ENTRY_SIZE): New. | |
991 | (elf_i386_plt0_entry): Renamed to ... | |
992 | (elf_i386_lazy_plt0_entry): This. | |
993 | (elf_i386_plt_entry): Renamed to ... | |
994 | (elf_i386_lazy_plt_entry): This. | |
995 | (elf_i386_pic_plt0_entry): Renamed to ... | |
996 | (elf_i386_pic_lazy_plt0_entry): This. | |
997 | (elf_i386_pic_plt_entry): Renamed to ... | |
998 | (elf_i386_pic_lazy_plt_entry): This. | |
999 | (elf_i386_got_plt_entry): Renamed to ... | |
1000 | (elf_i386_non_lazy_plt_entry): This. | |
1001 | (elf_i386_pic_got_plt_entry): Renamed to ... | |
1002 | (elf_i386_pic_non_lazy_plt_entry): This. | |
1003 | (elf_i386_eh_frame_plt): Renamed to ... | |
1004 | (elf_i386_eh_frame_lazy_plt): This. | |
1005 | (elf_i386_eh_frame_plt_got): Renamed to ... | |
1006 | (elf_i386_eh_frame_non_lazy_plt): This. | |
1007 | (elf_i386_plt_layout): Renamed to ... | |
1008 | (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and | |
1009 | eh_frame_plt_got_size. | |
1010 | (elf_i386_non_lazy_plt_layout): New. | |
1011 | (elf_i386_plt_layout): Likewise. | |
1012 | (elf_i386_non_lazy_plt): Likewise. | |
1013 | (GET_PLT_ENTRY_SIZE): Removed. | |
1014 | (elf_i386_plt): Renamed to ... | |
1015 | (elf_i386_lazy_plt): This. | |
1016 | (elf_i386_backend_data): Remove plt. Rename is_vxworks to os. | |
1017 | (elf_i386_arch_bed): Updated. | |
1018 | (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt. | |
1019 | (elf_i386_create_dynamic_sections): Removed. | |
1020 | (elf_i386_check_relocs): Don't check elf.dynobj. Don't call | |
1021 | _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section. | |
1022 | (elf_i386_adjust_dynamic_symbol): Updated. | |
1023 | (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header | |
1024 | size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate | |
1025 | size for PLT0 if there is no PLT0. | |
1026 | (elf_i386_size_dynamic_sections): Updated. Check whether GOT | |
1027 | output section is discarded only if GOT isn't empty. | |
1028 | (elf_i386_relocate_section): Updated. Properly get PLT index | |
1029 | if there is no PLT0. | |
1030 | (elf_i386_finish_dynamic_symbol): Updated. Don't fill the | |
1031 | second and third slots in the PLT entry if there is no PLT0. | |
1032 | (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0 | |
1033 | if there is no PLT0. Set sh_entsize on the .plt.got section. | |
1034 | (elf_i386_nacl_plt): Forward declaration. | |
1035 | (elf_i386_get_plt_sym_val): Removed. | |
1036 | (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections | |
1037 | against all dynamic relocations. | |
1038 | (elf_i386_link_setup_gnu_properties): New function. | |
1039 | (elf_backend_create_dynamic_sections): Updated. | |
1040 | (elf_backend_setup_gnu_properties): New. | |
1041 | (elf_i386_nacl_plt): Updated. | |
1042 | (elf_i386_nacl_arch_bed): Likewise. | |
1043 | (elf_i386_vxworks_arch_bed): Likewise. | |
1044 | ||
046734ff TP |
1045 | 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com> |
1046 | ||
1047 | * elflink.c (elf_output_implib): Remove executable flag from import | |
1048 | library bfd. | |
1049 | * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import | |
1050 | library is a relocatable object file. | |
1051 | ||
b660e9eb SKS |
1052 | 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> |
1053 | ||
1054 | PR ld/21404 | |
1055 | * elf32-avr.c (avr_should_move_sym): New function. | |
1056 | (avr_should_reduce_sym_size): Likewise. | |
1057 | (avr_should_increase_sym_size): Likewise. | |
1058 | (elf32_avr_relax_delete_bytes): Adjust symbol values | |
1059 | and sizes by calling new functions. | |
1060 | ||
763a5fa4 PD |
1061 | 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com> |
1062 | ||
1063 | * config.bfd (riscv32-*): Enable rv64. | |
1064 | ||
73ec947d AM |
1065 | 2017-05-02 Alan Modra <amodra@gmail.com> |
1066 | ||
1067 | PR 21384 | |
1068 | * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf | |
1069 | rather than h->root.type == bfd_link_hash_new. | |
1070 | (bfd_elf_record_link_assignment): Similarly, call | |
1071 | bfd_elf_link_mark_dynamic_symbol when h->non_elf. | |
1072 | ||
a941291c AM |
1073 | 2017-04-29 Alan Modra <amodra@gmail.com> |
1074 | ||
1075 | PR 21432 | |
1076 | * reloc.c (reloc_offset_in_range): New function. | |
1077 | (bfd_perform_relocation, bfd_install_relocation): Use it. | |
1078 | (_bfd_final_link_relocate): Likewise. | |
1079 | ||
750eaa47 L |
1080 | 2017-04-28 H.J. Lu <hongjiu.lu@intel.com> |
1081 | ||
1082 | * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got | |
1083 | before using .plt.got. | |
1084 | * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise. | |
1085 | ||
5b66fac4 L |
1086 | 2017-04-27 H.J. Lu <hongjiu.lu@intel.com> |
1087 | ||
1088 | * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "=" | |
1089 | instead of "+=" to update 0. | |
1090 | ||
de9a3c42 L |
1091 | 2017-04-27 H.J. Lu <hongjiu.lu@intel.com> |
1092 | ||
1093 | * elf32-i386.c (elf_i386_create_dynamic_sections): Create the | |
1094 | .plt.got section here. | |
1095 | (elf_i386_check_relocs): Don't create the .plt.got section. | |
1096 | * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create | |
1097 | the .plt.got and .plt.bnd sections here. | |
1098 | (elf_x86_64_check_relocs): Don't create the .plt.got nor | |
1099 | .plt.bnd sections. | |
1100 | ||
da3d25af L |
1101 | 2017-04-27 H.J. Lu <hongjiu.lu@intel.com> |
1102 | ||
1103 | * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove | |
1104 | has_bnd_reloc. | |
1105 | (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc. | |
1106 | (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc. | |
1107 | (elf_x86_64_check_relocs): Don't set has_bnd_reloc. | |
1108 | (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of | |
1109 | has_bnd_reloc. | |
1110 | ||
fba37edd L |
1111 | 2017-04-27 H.J. Lu <hongjiu.lu@intel.com> |
1112 | ||
1113 | * elf-bfd.h (elf_backend_data): Change setup_gnu_properties | |
1114 | to return bfd *. | |
1115 | (_bfd_elf_link_setup_gnu_properties): Return bfd *. | |
1116 | * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return | |
1117 | the first relocatable ELF input with GNU properties. | |
1118 | ||
1f78f649 L |
1119 | 2017-04-27 H.J. Lu <hongjiu.lu@intel.com> |
1120 | ||
1121 | * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify | |
1122 | VxWorks for non-PIC. | |
1123 | ||
76c20d54 AM |
1124 | 2017-04-27 Alan Modra <amodra@gmail.com> |
1125 | ||
1126 | * elf-bfd.h (struct elf_backend_data): Make asection param of | |
1127 | elf_backend_eh_frame_address_size const. | |
1128 | (_bfd_elf_eh_frame_address_size): Likewise. | |
1129 | * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise. | |
1130 | * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise. | |
1131 | * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise. | |
1132 | * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise. | |
1133 | * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise. | |
1134 | (next_cie_fde_offset): Constify params. | |
1135 | (offset_adjust, adjust_eh_frame_local_symbols): Likewise. | |
1136 | ||
d7153c4a AM |
1137 | 2017-04-27 Alan Modra <amodra@gmail.com> |
1138 | ||
1139 | * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len. | |
1140 | (_bfd_elf_adjust_eh_frame_global_symbol): Declare. | |
1141 | * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and | |
1142 | aug_data_len. | |
1143 | (offset_adjust): New function. | |
1144 | (_bfd_elf_adjust_eh_frame_global_symbol): Likewise. | |
1145 | (adjust_eh_frame_local_symbols): Likewise. | |
1146 | (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols | |
1147 | after changing anything. Return true if anything changed. | |
1148 | * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call | |
1149 | _bfd_elf_adjust_eh_frame_global_symbol for globals. | |
1150 | ||
641338d8 AM |
1151 | 2017-04-27 Alan Modra <amodra@gmail.com> |
1152 | ||
1153 | * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index | |
1154 | when force_local. | |
1155 | ||
21d68fcd AM |
1156 | 2017-04-27 Alan Modra <amodra@gmail.com> |
1157 | ||
1158 | * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define. | |
1159 | (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it. | |
1160 | (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise. | |
1161 | (ppc_elf_relocate_section): Likewise. Delete silly optimisation | |
1162 | for undef and undefweak dyn_relocs. | |
1163 | * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define. | |
1164 | (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it. | |
1165 | (allocate_got, allocate_dynrelocs): Likewise. | |
1166 | (ppc64_elf_relocate_section): Likewise. | |
1167 | ||
97d343d4 L |
1168 | 2017-04-26 H.J. Lu <hongjiu.lu@intel.com> |
1169 | ||
1170 | * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add | |
1171 | DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section. | |
1172 | * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys | |
1173 | add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section. | |
1174 | ||
04b31182 NC |
1175 | 2017-04-26 Nick Clifton <nickc@redhat.com> |
1176 | ||
1177 | PR binutils/21434 | |
1178 | * reloc.c (bfd_perform_relocation): Check for a negative address | |
1179 | in the reloc. | |
1180 | ||
23ec1e32 MR |
1181 | 2017-04-26 Maciej W. Rozycki <macro@imgtec.com> |
1182 | ||
1183 | PR ld/21334 | |
1184 | * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms' | |
1185 | member. | |
1186 | * elfxx-target.h [!elf_backend_always_renumber_dynsyms] | |
1187 | (elf_backend_always_renumber_dynsyms): Define. | |
1188 | (elfNN_bed): Initialize `always_renumber_dynsyms' member. | |
1189 | * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define. | |
1190 | * elflink.c (bfd_elf_size_dynamic_sections): Also call | |
1191 | `_bfd_elf_link_renumber_dynsyms' if the backend has requested | |
1192 | it. | |
1193 | (bfd_elf_size_dynsym_hash_dynstr): Likewise. | |
1194 | ||
c46cec3a MR |
1195 | 2017-04-26 Maciej W. Rozycki <macro@imgtec.com> |
1196 | ||
1197 | * elflink.c (bfd_elf_size_dynamic_sections): Only call | |
1198 | `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic | |
1199 | sections have been created. | |
1200 | ||
e63d1232 NC |
1201 | 2017-04-26 Nick Clifton <nickc@redhat.com> |
1202 | ||
1203 | PR binutils/21431 | |
1204 | * compress.c (bfd_init_section_compress_status): Check the return | |
1205 | value from bfd_malloc. | |
1206 | ||
9e9821dd L |
1207 | 2017-04-24 H.J. Lu <hongjiu.lu@intel.com> |
1208 | ||
1209 | * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add | |
1210 | no_finish_dynamic_symbol. | |
1211 | (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to | |
1212 | 0. | |
1213 | (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined | |
1214 | weak symbol, don't make it dynamic. | |
1215 | (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC, | |
1216 | set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE | |
1217 | relocation for GOT reference. | |
1218 | (elf_x86_64_finish_dynamic_symbol): Abort if | |
1219 | no_finish_dynamic_symbol isn't 0. | |
1220 | ||
0dc9a308 L |
1221 | 2017-04-24 H.J. Lu <hongjiu.lu@intel.com> |
1222 | ||
1223 | PR ld/21402 | |
1224 | * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't | |
1225 | undefined weak symbol, don't make it dynamic. | |
1226 | (elf_i386_relocate_section): If a symbol isn't dynamic in PIC, | |
1227 | set no_finish_dynamic_symbol and generate R_386_RELATIVE | |
1228 | relocation for R_386_GOT32. | |
1229 | ||
1587442d L |
1230 | 2017-04-24 H.J. Lu <hongjiu.lu@intel.com> |
1231 | ||
1232 | PR ld/21425 | |
1233 | * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks. | |
1234 | ||
7eacd66b AM |
1235 | 2017-04-23 Alan Modra <amodra@gmail.com> |
1236 | ||
1237 | PR 21414 | |
1238 | * section.c (GLOBAL_SYM_INIT): Make available in bfd.h. | |
1239 | * elf.c (lcomm_sym): New. | |
1240 | (_bfd_elf_large_com_section): Use lcomm_sym section symbol. | |
1241 | * bfd-in2.h: Regenerate. | |
1242 | ||
bce964aa AM |
1243 | 2017-04-23 Alan Modra <amodra@gmail.com> |
1244 | ||
1245 | PR 21412 | |
1246 | * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change | |
1247 | parameters and comment. | |
1248 | (_bfd_elf_get_reloc_section): Delete. | |
1249 | (_bfd_elf_plt_get_reloc_section): Declare. | |
1250 | * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section): | |
1251 | New functions. Don't blindly skip over assumed .rel/.rela prefix. | |
1252 | Extracted from.. | |
1253 | (_bfd_elf_get_reloc_section): ..here. Delete. | |
1254 | (assign_section_numbers): Call elf_get_reloc_section. | |
1255 | * elf64-ppc.c (elf_backend_get_reloc_section): Define. | |
1256 | * elfxx-target.h (elf_backend_get_reloc_section): Update. | |
1257 | ||
97e83a10 AM |
1258 | 2017-04-23 Alan Modra <amodra@gmail.com> |
1259 | ||
1260 | PR 21409 | |
1261 | * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when | |
1262 | no symbols. | |
1263 | ||
e133d005 L |
1264 | 2017-04-21 H.J. Lu <hongjiu.lu@intel.com> |
1265 | ||
1266 | PR ld/21402 | |
1267 | * elf32-i386.c (elf_i386_link_hash_entry): Add | |
1268 | no_finish_dynamic_symbol. | |
1269 | (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0. | |
1270 | (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak | |
1271 | symbol, don't make it dynamic in PIE. | |
1272 | (elf_i386_relocate_section): If a symbol isn't dynamic in PIE, | |
1273 | set no_finish_dynamic_symbol and generate R_386_RELATIVE | |
1274 | relocation for R_386_GOT32 | |
1275 | (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol | |
1276 | isn't 0. | |
1277 | ||
3c5fce9b L |
1278 | 2017-04-21 H.J. Lu <hongjiu.lu@intel.com> |
1279 | ||
1280 | PR ld/19617 | |
1281 | PR ld/21086 | |
1282 | * elflink.c (elf_link_add_object_symbols): Require | |
1283 | --no-dynamic-linker with -E/--dynamic-list when creating | |
1284 | dynamic sections. | |
1285 | ||
0fad2956 MR |
1286 | 2017-04-20 Maciej W. Rozycki <macro@imgtec.com> |
1287 | ||
1288 | * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE | |
1289 | if forced local. | |
1290 | ||
64575f78 MR |
1291 | 2017-04-20 Maciej W. Rozycki <macro@imgtec.com> |
1292 | ||
1293 | * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about | |
1294 | dynamic symbol sorting. | |
1295 | ||
59fa66c5 L |
1296 | 2017-04-20 H.J. Lu <hongjiu.lu@intel.com> |
1297 | ||
1298 | PR ld/21382 | |
1299 | * elflink.c (elf_link_add_object_symbols): Preserve | |
1300 | dynamic_ref_after_ir_def when restoring the symbol table for | |
1301 | unneeded dynamic object. | |
1302 | ||
e492d2f8 L |
1303 | 2017-04-19 H.J. Lu <hongjiu.lu@intel.com> |
1304 | ||
1305 | PR ld/21401 | |
1306 | * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort | |
1307 | on on undefined IFUNC symbol in the second PLT. | |
1308 | ||
10169134 WAF |
1309 | 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com> |
1310 | ||
1311 | * peXXigen.c (pe_print_reloc): Correct chunk_end. | |
1312 | ||
954b63d4 AM |
1313 | 2017-04-19 Alan Modra <amodra@gmail.com> |
1314 | ||
1315 | * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak | |
1316 | or make dynamic for info->dynamic_undefined_weak 0 and 1. | |
1317 | * elf32-ppc.c:Formatting. | |
1318 | (ensure_undefweak_dynamic): Don't make dynamic when | |
1319 | info->dynamic_undefined_weak is zero. | |
1320 | (allocate_dynrelocs): Discard undefweak dyn_relocs for | |
1321 | info->dynamic_undefined_weak. Discard undef dyn_relocs when | |
1322 | not default visibility. Discard undef and undefweak | |
1323 | dyn_relocs earlier. | |
1324 | (ppc_elf_relocate_section): Adjust to suit. | |
1325 | * elf64-ppc.c: Formatting. | |
1326 | (ensure_undefweak_dynamic): Don't make dynamic when | |
1327 | info->dynamic_undefined_weak is zero. | |
1328 | (allocate_dynrelocs): Discard undefweak dyn_relocs for | |
1329 | info->dynamic_undefined_weak. Discard them earlier. | |
1330 | ||
e6699019 L |
1331 | 2017-04-17 H.J. Lu <hongjiu.lu@intel.com> |
1332 | ||
1333 | PR ld/21389 | |
1334 | * elflink.c (bfd_elf_size_dynamic_sections): Get soname index | |
1335 | before generating the version definition section. | |
1336 | ||
c5d37467 AM |
1337 | 2017-04-17 Alan Modra <amodra@gmail.com> |
1338 | ||
1339 | * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking | |
1340 | state when a regular object file defines a symbol with | |
1341 | incompatible type to that defined by an earlier shared lib. | |
1342 | ||
63a5468a AM |
1343 | 2017-04-13 Alan Modra <amodra@gmail.com> |
1344 | ||
1345 | * coffcode.h: Wrap some overly long _bfd_error_handler args. | |
1346 | * elf.c: Likewise. | |
1347 | * elf32-arm.c: Likewise. | |
1348 | * elf32-i386.c: Likewise. | |
1349 | * elf32-mep.c: Likewise. | |
1350 | * elf64-ia64-vms.c: Likewise. | |
1351 | * elf64-x86-64.c: Likewise. | |
1352 | * elflink.c: Likewise. | |
1353 | * elfnn-ia64.c: Likewise. | |
1354 | * elfxx-mips.c: Likewise. | |
1355 | ||
dae82561 AM |
1356 | 2017-04-13 Alan Modra <amodra@gmail.com> |
1357 | ||
1358 | * aoutx.h: Use %B and %A in error messages throughout file. | |
1359 | * aout-cris.c: Likewise. | |
1360 | * archive.c: Likewise. | |
1361 | * binary.c: Likewise. | |
1362 | * coff-rs6000.c: Likewise. | |
1363 | * coff-tic4x.c: Likewise. | |
1364 | * coffcode.h: Likewise. | |
1365 | * coffgen.c: Likewise. | |
1366 | * cofflink.c: Likewise. | |
1367 | * coffswap.h: Likewise. | |
1368 | * cpu-arm.c: Likewise. | |
1369 | * elf-eh-frame.c: Likewise. | |
1370 | * elf-m10300.c: Likewise. | |
1371 | * elf.c: Likewise. | |
1372 | * elf32-arc.c: Likewise. | |
1373 | * elf32-arm.c: Likewise. | |
1374 | * elf32-bfin.c: Likewise. | |
1375 | * elf32-frv.c: Likewise. | |
1376 | * elf32-iq2000.c: Likewise. | |
1377 | * elf32-m32c.c: Likewise. | |
1378 | * elf32-microblaze.c: Likewise. | |
1379 | * elf32-nds32.c: Likewise. | |
1380 | * elf32-rl78.c: Likewise. | |
1381 | * elf32-rx.c: Likewise. | |
1382 | * elf32-score.c: Likewise. | |
1383 | * elf32-score7.c: Likewise. | |
1384 | * elf32-sh64.c: Likewise. | |
1385 | * elf32-v850.c: Likewise. | |
1386 | * elf32-vax.c: Likewise. | |
1387 | * elf32-visium.c: Likewise. | |
1388 | * elf64-ia64-vms.c: Likewise. | |
1389 | * elf64-mmix.c: Likewise. | |
1390 | * elf64-sh64.c: Likewise. | |
1391 | * elfcode.h: Likewise. | |
1392 | * elfnn-aarch64.c: Likewise. | |
1393 | * elfnn-ia64.c: Likewise. | |
1394 | * elfxx-mips.c: Likewise. | |
1395 | * hpux-core.c: Likewise. | |
1396 | * ieee.c: Likewise. | |
1397 | * ihex.c: Likewise. | |
1398 | * linker.c: Likewise. | |
1399 | * merge.c: Likewise. | |
1400 | * mmo.c: Likewise. | |
1401 | * oasys.c: Likewise. | |
1402 | * pdp11.c: Likewise. | |
1403 | * peXXigen.c: Likewise. | |
1404 | * rs6000-core.c: Likewise. | |
1405 | * vms-alpha.c: Likewise. | |
1406 | * xcofflink.c: Likewise. | |
1407 | ||
c08bb8dd AM |
1408 | 2017-04-13 Alan Modra <amodra@gmail.com> |
1409 | ||
1410 | * bfd.c (PRINT_TYPE): Define. | |
1411 | (_doprnt): New function. | |
1412 | (error_handler_internal): Use _doprnt. | |
1413 | * coff-arm.c: Put %A and %B arguments to _bfd_error_handler | |
1414 | calls in their natural order, throughout file. | |
1415 | * coff-mcore.c: Likewise. | |
1416 | * coff-ppc.c: Likewise. | |
1417 | * coff-tic80.c: Likewise. | |
1418 | * cofflink.c: Likewise. | |
1419 | * elf-s390-common.c: Likewise. | |
1420 | * elf.c: Likewise. | |
1421 | * elf32-arm.c: Likewise. | |
1422 | * elf32-i386.c: Likewise. | |
1423 | * elf32-m32r.c: Likewise. | |
1424 | * elf32-msp430.c: Likewise. | |
1425 | * elf32-spu.c: Likewise. | |
1426 | * elf64-ia64-vms.c: Likewise. | |
1427 | * elf64-sparc.c: Likewise. | |
1428 | * elf64-x86-64.c: Likewise. | |
1429 | * elflink.c: Likewise. | |
1430 | * elfnn-aarch64.c: Likewise. | |
1431 | * elfnn-ia64.c: Likewise. | |
1432 | * elfxx-mips.c: Likewise. | |
1433 | ||
10463f39 AM |
1434 | 2017-04-13 Alan Modra <amodra@gmail.com> |
1435 | ||
1436 | * elf32-arm.c (arm_type_of_stub): Supply missing args to "long | |
1437 | branch veneers" error. Fix double space and format message. | |
1438 | * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg. | |
1439 | * elf64-ppc.c (tocsave_find): Supply missing %B arg. | |
1440 | ||
4af8774e AM |
1441 | 2017-04-13 Alan Modra <amodra@gmail.com> |
1442 | ||
1443 | * bfd-in2.h: Regenerate. | |
1444 | ||
e4097f5e L |
1445 | 2017-04-11 H.J. Lu <hongjiu.lu@intel.com> |
1446 | ||
1447 | * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the | |
1448 | extra `\n' in warning/error messages. | |
1449 | * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise. | |
1450 | * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise. | |
1451 | ||
537616aa L |
1452 | 2017-04-11 H.J. Lu <hongjiu.lu@intel.com> |
1453 | ||
1454 | * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore | |
1455 | processor-specific properties with generic ELF target vector. | |
1456 | ||
bb1dd176 QZ |
1457 | 2017-04-10 Qing Zhao <qing.zhao@oracle.com> |
1458 | ||
1459 | * elf32-sparc.c (elf_backend_fixup_symbol): New. | |
1460 | * elf64-sparc.c (elf_backend_fixup_symbol): New. | |
1461 | * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New. | |
1462 | (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and | |
1463 | has_non_got_reloc. | |
1464 | (link_hash_newfunc): Initialize has_got_reloc and | |
1465 | has_non_got_reloc. | |
1466 | (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp | |
1467 | section. | |
1468 | (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and | |
1469 | has_non_got_reloc. | |
1470 | (_bfd_sparc_elf_check_relocs): Set has_got_reloc and | |
1471 | has_non_got_reloc. | |
1472 | (_bfd_sparc_elf_fixup_symbol): New function. | |
1473 | (allocate_dynrelocs): Don't allocate space for dynamic | |
1474 | relocations and discard relocations against resolved undefined | |
1475 | weak symbols in executable. Don't make resolved undefined weak | |
1476 | symbols in executable dynamic. Keep dynamic non-GOT/non-PLT | |
1477 | relocation against undefined weak symbols in PIE. | |
1478 | (_bfd_sparc_elf_relocate_section): Don't generate dynamic | |
1479 | relocations against resolved undefined weak symbols in PIE | |
1480 | (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries | |
1481 | without ynamic PLT/GOT relocations for resolved undefined weak | |
1482 | symbols. | |
1483 | Don't generate dynamic relocation against resolved undefined | |
1484 | weak symbol in executable. | |
1485 | (pie_finish_undefweak_symbol): New function. | |
1486 | (_bfd_sparc_elf_finish_dynamic_sections): Call | |
1487 | pie_finish_undefweak_symbol on all symbols in PIE. | |
1488 | * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp. | |
1489 | (_bfd_sparc_elf_fixup_symbol): New function. | |
1490 | ||
d236cfd4 NC |
1491 | 2017-04-10 Nick Clifton <nickc@redhat.com> |
1492 | ||
1493 | * config.bfd: Remove ns32k from obsolete list. | |
1494 | ||
6f9dbcd4 AM |
1495 | 2017-04-10 Alan Modra <amodra@gmail.com> |
1496 | ||
1497 | PR 21287 | |
1498 | * elf.c (special_sections_f): Match .fini_array and .fini_array.*. | |
1499 | (special_sections_i): Likewise for .init_array. | |
1500 | (special_sections_p): Likewise for .preinit_array. | |
1501 | ||
8170f769 L |
1502 | 2017-04-07 H.J. Lu <hongjiu.lu@intel.com> |
1503 | ||
1504 | PR ld/19579 | |
1505 | PR ld/21306 | |
1506 | * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check | |
1507 | ELF_COMMON_DEF_P for common symbols. | |
1508 | * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise. | |
1509 | * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. | |
1510 | * elflink.c (_bfd_elf_merge_symbol): Revert commits | |
1511 | 202ac193bbbecc96a4978d1ac3d17148253f9b01 and | |
1512 | 07492f668d2173da7a2bda3707ff0985e0f460b6. | |
1513 | ||
49f4617b PA |
1514 | 2017-04-07 Pedro Alves <palves@redhat.com> |
1515 | ||
1516 | * opncls.c (bfd_get_debug_link_info): Rename to... | |
1517 | (bfd_get_debug_link_info_1): ... this. Change type of second | |
1518 | parameter to void pointer. Adjust. | |
1519 | (bfd_get_debug_link_info): Reimplement on top of | |
1520 | bfd_get_debug_link_info_1. | |
1521 | (separate_debug_file_exists, separate_alt_debug_file_exists): | |
1522 | Change type of second parameter to void pointer. Adjust. | |
1523 | (get_func_type, check_func_type): Change type of second parameter | |
1524 | to void pointer. | |
1525 | (find_separate_debug_file): Add 'func_data' parameter. Pass it to | |
1526 | the callback functions instead of passing the address of a local. | |
1527 | (bfd_follow_gnu_debuglink): Pass address of unsigned long local to | |
1528 | find_separate_debug_file. | |
1529 | (get_alt_debug_link_info_shim): Change type of second parameter to | |
1530 | void pointer. Adjust. | |
1531 | (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to | |
1532 | find_separate_debug_file. | |
1533 | (get_build_id_name, bfd_boolean check_build_id_file): Change type | |
1534 | of second parameter to void pointer. Adjust. | |
1535 | (bfd_follow_build_id_debuglink): Pass address of bfd_build_id | |
1536 | pointer local to find_separate_debug_file. | |
1537 | ||
1538 | 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510> | |
1fd6d111 TG |
1539 | |
1540 | * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak | |
1541 | external symbols with a definition. | |
1542 | (_bfd_coff_gc_mark_extra_sections): Fix typo. | |
1543 | ||
86abf93a AM |
1544 | 2017-04-07 Alan Modra <amodra@gmail.com> |
1545 | ||
1546 | * po/SRC-POTFILES.in: Regenerate. | |
1547 | ||
8dea77f0 AM |
1548 | 2017-04-05 Alan Modra <amodra@gmail.com> |
1549 | ||
1550 | * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT | |
1551 | reference counting. | |
1552 | ||
477bdd39 JT |
1553 | 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk> |
1554 | ||
1555 | (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than | |
1556 | numbers for DataDirectory entry indicies passed to | |
1557 | add_data_entry(). | |
1558 | ||
a91e1603 L |
1559 | 2017-04-04 H.J. Lu <hongjiu.lu@intel.com> |
1560 | ||
1561 | * elf.c (get_program_header_size): Add a GNU_MBIND segment for | |
1562 | each GNU_MBIND section and align GNU_MBIND section to page size. | |
1563 | (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND | |
1564 | segment for each GNU_MBIND section. | |
1565 | (_bfd_elf_init_private_section_data): Copy sh_info from input | |
1566 | for GNU_MBIND section. | |
1567 | ||
b5292032 PD |
1568 | 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com> |
1569 | ||
1570 | * elfnn-riscv.c (GP_NAME): Delete. | |
1571 | (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL. | |
1572 | (_bfd_riscv_relax_lui): Likewise. | |
1573 | ||
ad32986f NC |
1574 | 2017-04-04 Nick Clifton <nickc@redhat.com> |
1575 | ||
1576 | PR binutils/21342 | |
1577 | * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer | |
1578 | dereference. | |
1579 | (bfd_elf_final_link): Only initialize the extended symbol index | |
1580 | section if there are extended symbol tables to list. | |
1581 | ||
46bed679 L |
1582 | 2017-04-03 H.J. Lu <hongjiu.lu@intel.com> |
1583 | ||
1584 | * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo. | |
1585 | (BFD32_BACKENDS_CFILES): Add elf-properties.c. | |
1586 | * configure.ac (elf): Add elf-properties.lo. | |
1587 | * Makefile.in: Regenerated. | |
1588 | * configure: Likewise. | |
1589 | * elf-bfd.h (elf_property_kind): New. | |
1590 | (elf_property): Likewise. | |
1591 | (elf_property_list): Likewise. | |
1592 | (elf_properties): Likewise. | |
1593 | (_bfd_elf_parse_gnu_properties): Likewise. | |
1594 | (_bfd_elf_get_property): Likewise. | |
1595 | (_bfd_elf_link_setup_gnu_properties): Likewise. | |
1596 | (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties | |
1597 | and setup_gnu_properties. | |
1598 | (elf_obj_tdata): Add properties. | |
1599 | * elf-properties.c: New file. | |
1600 | * elf32-i386.c (elf_i386_parse_gnu_properties): New. | |
1601 | (elf_i386_merge_gnu_properties): Likewise. | |
1602 | (elf_backend_parse_gnu_properties): Likewise. | |
1603 | (elf_backend_merge_gnu_properties): Likewise. | |
1604 | * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise. | |
1605 | (elf_x86_64_merge_gnu_properties): Likewise. | |
1606 | (elf_backend_parse_gnu_properties): Likewise. | |
1607 | (elf_backend_merge_gnu_properties): Likewise. | |
1608 | * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise. | |
1609 | (elf_backend_parse_gnu_properties): Likewise. | |
1610 | (elf_backend_setup_gnu_properties): Likewise. | |
1611 | (elfNN_bed): Add elf_backend_parse_gnu_properties, | |
1612 | elf_backend_merge_gnu_properties and | |
1613 | elf_backend_setup_gnu_properties. | |
1614 | ||
f96bd6c2 PC |
1615 | 2017-03-30 Pip Cet <pipcet@gmail.com> |
1616 | ||
1617 | * elf32-wasm32.c: Add relocation code, two relocs. | |
1618 | * reloc.c: Add wasm32 relocations. | |
1619 | * libbfd.h: Regenerate. | |
1620 | * bfd-in2.h: Regenerate. | |
1621 | * bfd/po/bfd.pot: Regenerate. | |
1622 | ||
e643cb45 NC |
1623 | 2017-03-29 Nick Clifton <nickc@redhat.com> |
1624 | ||
1625 | PR binutils/18025 | |
1626 | * coff-bfd.h (struct coff_section_data): Add new fields: | |
1627 | saved_bias and bias. | |
1628 | * coffgen.c (coff_find_nearest_line_with_names): Cache the bias | |
1629 | computed for PE binaries. | |
1630 | * dwarf2.c (scan_unit_for_symbols): Only warn once about each | |
1631 | missing abbrev. | |
1632 | ||
086554e8 HPN |
1633 | 2017-03-28 Hans-Peter Nilsson <hp@axis.com> |
1634 | ||
1635 | PR ld/16044 | |
1636 | * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT | |
1637 | to handle a local symbol with a hash-symbol-entry; without PLT. | |
1638 | Add BFD_ASSERT for an incidental case with GOT entry present. | |
1639 | (cris_elf_check_relocs): Increment PLT refcount only if the symbol | |
1640 | isn't forced-or-set local. | |
1641 | ||
a6be0538 PC |
1642 | 2017-03-27 Pip Cet <pipcet@gmail.com> |
1643 | ||
1644 | * wasm-module.c: New file to support WebAssembly modules. | |
1645 | * wasm-module.h: New file to support WebAssembly modules. | |
1646 | * doc/webassembly.texi: Start documenting wasm-module.c. | |
1647 | * config.bfd: Add wasm_vec. | |
1648 | * targets.c: Likewise. | |
1649 | * configure.ac: Likewise. | |
1650 | * Makefile.am: Add entries for wasm-module.c. | |
1651 | * Makefile.in: Regenerate. | |
1652 | * configure: Regenerate. | |
1653 | * po/SRC-POTFILES.in: Regenerate. | |
1654 | ||
79b1d3cb PC |
1655 | 2017-03-27 Pip Cet <pipcet@gmail.com> |
1656 | ||
1657 | * cpu-wasm32.c: New file to support wasm32 architecture. | |
1658 | * elf32-wasm32.c: New file to support wasm32 architecture. | |
1659 | * Makefile.am: Add wasm32 architecture. | |
1660 | * archures.c: Likewise. | |
1661 | * config.bfd: Likewise. | |
1662 | * configure.ac: Likewise. | |
1663 | * targets.c: Likewise. | |
1664 | * Makefile.in: Regenerate. | |
1665 | * bfd-in2.h: Regenerate. | |
1666 | * configure: Regenerate. | |
1667 | * po/SRC-POTFILES.in: Regenerate. | |
1668 | ||
aaed6f5b AM |
1669 | 2017-03-20 Alan Modra <amodra@gmail.com> |
1670 | ||
1671 | PR 21266 | |
1672 | * elf64-ppc.c (compare_symbols): Stabilize sort. | |
1673 | ||
82e66161 AM |
1674 | 2017-03-18 Alan Modra <amodra@gmail.com> |
1675 | ||
1676 | * elf64-ppc.c (struct ppc_link_hash_table): Add | |
1677 | local_ifunc_resolver and maybe_local_ifunc_resolver. | |
1678 | (ppc_build_one_stub): Set flags on emitting dynamic | |
1679 | relocation to ifunc. | |
1680 | (ppc64_elf_relocate_section): Likewise. | |
1681 | (ppc64_elf_finish_dynamic_symbol): Likewise. | |
1682 | (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with | |
1683 | local dynamic relocs to ifuncs. | |
1684 | * elf32-ppc.c (struct ppc_elf_link_hash_table): Add | |
1685 | local_ifunc_resolver and maybe_local_ifunc_resolver. | |
1686 | (ppc_elf_relocate_section): Set flag on emitting dynamic | |
1687 | relocation to ifuncs. | |
1688 | (ppc_elf_finish_dynamic_symbol): Likewise. | |
1689 | (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local | |
1690 | dynamic relocs to ifuncs. | |
1691 | ||
f955cccf NC |
1692 | 2017-03-13 Nick Clifton <nickc@redhat.com> |
1693 | ||
1694 | PR binutils/21202 | |
1695 | * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to | |
1696 | BFD_RELOC_AARCH64_TLSDESC_LD64_LO12. | |
1697 | (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to | |
1698 | BFD_RELOC_AARCH64_TLSDESC_ADD_LO12. | |
1699 | * bfd-in2.h: Regenerate. | |
1700 | * libbfd.h: Regenerate. | |
1701 | * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc | |
1702 | names. | |
1703 | (IS_AARCH64_TLSDESC_RELOC): Likewise. | |
1704 | (elfNN_aarch64_howto_table): Likewise. | |
1705 | (aarch64_tls_transition_without_check): Likewise. | |
1706 | (aarch64_reloc_got_type): Likewise. | |
1707 | (elfNN_aarch64_final_link_relocate): Likewise. | |
1708 | (elfNN_aarch64_tls_relax): Likewise. | |
1709 | (elfNN_aarch64_relocate_section): Likewise. | |
1710 | (elfNN_aarch64_gc_sweep_hook): Likewise. | |
1711 | (elfNN_aarch64_check_relocs): Likewise. | |
1712 | * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. | |
1713 | (_bfd_aarch64_elf_resolve_relocation): Likewise. | |
1714 | ||
4aef7643 AM |
1715 | 2017-03-11 Alan Modra <amodra@gmail.com> |
1716 | ||
1717 | * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function | |
1718 | parameter is in fact used. Whitespace fixes. | |
1719 | * elf64-ppc.c: Likewise. | |
1720 | ||
f03265d9 ST |
1721 | 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk> |
1722 | ||
1723 | * rs6000-core.c (CORE_NEW): Simplify macro when | |
1724 | AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning. | |
1725 | ||
b1b07054 AM |
1726 | 2017-03-07 Alan Modra <amodra@gmail.com> |
1727 | ||
1728 | PR 21224 | |
1729 | PR 20519 | |
1730 | * elf64-ppc.c (ppc64_elf_relocate_section): Add missing | |
1731 | dyn_relocs check. | |
1732 | ||
2e0ce1c8 AM |
1733 | 2017-03-05 Alan Modra <amodra@gmail.com> |
1734 | ||
1735 | * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8. | |
1736 | * elf-eh-frame.c (size_of_output_cie_fde): Don't align here. | |
1737 | (next_cie_fde_offset): New function. | |
1738 | (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8. | |
1739 | (_bfd_elf_discard_section_eh_frame): Align zero terminator to | |
1740 | four bytes. Align CIEs to four or eight bytes depending on | |
1741 | per_encoding_aligned8. Align FDEs according to their encoding. | |
1742 | Pad last FDE to output section alignment. | |
1743 | (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove | |
1744 | assertion. | |
1745 | * elf64-ppc.c (glink_eh_frame_cie): Delete padding. | |
1746 | (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c. | |
1747 | (ppc64_elf_finish_dynamic_sections): Adjust to suit. | |
1748 | ||
f98450c6 NC |
1749 | 2017-03-02 Martin Bickel <binutils@ineranves.de> |
1750 | ||
1751 | PR ld/21212 | |
1752 | * elf.c (rewrite_elf_program_header): Do not issue a warning for | |
d20928fa | 1753 | empty segments which have a zero filesz, but a non-zero memsz. |
f98450c6 | 1754 | |
673cff9b AM |
1755 | 2017-03-02 Alan Modra <amodra@gmail.com> |
1756 | ||
1757 | * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo. | |
1758 | ||
3de43e7b AM |
1759 | 2017-02-28 Alan Modra <amodra@gmail.com> |
1760 | ||
1761 | * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change. | |
1762 | (ppc64_elf_relocate_section): Likewise. | |
1763 | ||
4ef97a1b AM |
1764 | 2017-02-28 Alan Modra <amodra@gmail.com> |
1765 | ||
1766 | PR 20995 | |
1767 | * elf32-nios2.c (nios2_elf32_relocate_section): Use htab | |
1768 | rather than elf32_nios2_hash_table or elf_hash_table. | |
1769 | (create_got_section): Likewise. | |
1770 | (nios2_elf32_finish_dynamic_symbol): Likewise. | |
1771 | (nios2_elf32_adjust_dynamic_symbol): Likewise. | |
1772 | (nios2_elf32_size_dynamic_sections): Likewise. | |
1773 | (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot | |
1774 | vars. Use htab equivalents directly instead. Don't create | |
1775 | all dynamic sections on needing just the GOT. Use a goto | |
1776 | rather than a fall-through with reloc test. Ensure | |
1777 | htab->dynobj is set when making dynamic sreloc section. | |
1778 | (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab | |
1779 | equivalent directly instead. Don't segfault on looking for | |
1780 | .dynamic when dynamic sections have not been created. Don't | |
1781 | segfault on .got.plt being discarded. | |
1782 | (nios2_elf32_size_dynamic_sections): Delete plt and got vars. | |
1783 | Don't set "relocs" on .rela.plt. Do handle .sbss. Delete | |
1784 | fixme and another not so relevant comment. | |
1785 | (nios2_elf_add_symbol_hook): Delete dynobj var. If not | |
1786 | already set, set hash table dynobj on creating .sbss. | |
1787 | ||
7ba71655 AM |
1788 | 2017-02-28 Alan Modra <amodra@gmail.com> |
1789 | ||
1790 | * reloc.c (BFD_RELOC_PPC_16DX_HA): New. | |
1791 | * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto. | |
1792 | (ppc64_elf_reloc_type_lookup): Translate new bfd reloc. | |
1793 | (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA. | |
1794 | (ppc64_elf_relocate_section): Likewise. | |
1795 | * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto. | |
1796 | (ppc_elf_reloc_type_lookup): Translate new bfd reloc. | |
1797 | (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc. | |
1798 | * libbfd.h: Regenerate. | |
1799 | * bfd-in2.h: Regenerate. | |
1800 | ||
afbf7e8e AM |
1801 | 2017-02-28 Alan Modra <amodra@gmail.com> |
1802 | ||
1803 | * elflink.c (_bfd_elf_create_dynamic_sections): Don't make | |
1804 | dynamic .data.rel.ro read-only. | |
1805 | * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section | |
1806 | rather than section flags when deciding where copy reloc goes. | |
1807 | * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise. | |
1808 | * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise. | |
1809 | * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise. | |
1810 | * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise. | |
1811 | * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise. | |
1812 | * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise. | |
1813 | * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise. | |
1814 | * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise. | |
1815 | * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise. | |
1816 | * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise. | |
1817 | * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise. | |
1818 | * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise. | |
1819 | * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise. | |
1820 | * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise. | |
1821 | * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise. | |
1822 | * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise. | |
1823 | * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise. | |
1824 | * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise. | |
1825 | * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise. | |
1826 | ||
0e392101 MR |
1827 | 2017-02-28 Maciej W. Rozycki <macro@imgtec.com> |
1828 | ||
1829 | * elfxx-mips.c (mips_elf_perform_relocation): Also handle the | |
1830 | `jalr $0, $25' instruction encoding. | |
1831 | ||
bd757ca7 NC |
1832 | 2017-02-27 Nick Clifton <nickc@redhat.com> |
1833 | ||
1834 | PR ld/21180 | |
1835 | * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid | |
1836 | generating a seg-fault when encountering a symbol that has been | |
1837 | deleted by garbage collection. | |
1838 | ||
034fed0b AM |
1839 | 2017-02-25 Alan Modra <amodra@gmail.com> |
1840 | ||
1841 | * elf32-arc.c (struct dynamic_sections): Delete. | |
1842 | (enum dyn_section_types): Delete. | |
1843 | (dyn_section_names): Delete. | |
1844 | (arc_create_dynamic_sections): Delete. | |
1845 | (elf_arc_finish_dynamic_sections): Don't call the above. Don't | |
1846 | segfault on discarded .rela.plt section. | |
1847 | (elf_arc_size_dynamic_sections): Formatting. Don't call | |
1848 | arc_create_dynamic_sections. Don't allocate memory for sections | |
1849 | handled by the generic linker. Correct code finding relocs in | |
1850 | read-only sections. Set SEC_EXCLUDE on zero size .got, | |
1851 | .got.plt, and .dynbss sections. Do set .interp for pies. | |
1852 | ||
d0f744f9 AW |
1853 | 2017-02-24 Andrew Waterman <andrew@sifive.com> |
1854 | ||
1855 | * elfnn-riscv.c (GP_NAME): New macro. | |
1856 | (riscv_global_pointer_value): Use it. | |
1857 | (_bfd_riscv_relax_lui): If symbol and global pointer are in same | |
1858 | output section, consider only that section's alignment. | |
1859 | ||
5d58c733 MR |
1860 | 2017-02-23 Maciej W. Rozycki <macro@imgtec.com> |
1861 | ||
1862 | * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype. | |
1863 | * elfxx-mips.c (_bfd_mips_relax_section): Remove function. | |
1864 | * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro. | |
1865 | * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise. | |
1866 | ||
c1556ecd MR |
1867 | 2017-02-23 Maciej W. Rozycki <macro@imgtec.com> |
1868 | ||
1869 | * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR> | |
1870 | <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p' | |
1871 | or misaligned. | |
1872 | ||
5499c7c7 AM |
1873 | 2017-02-23 Alan Modra <amodra@gmail.com> |
1874 | ||
1875 | PR 20744 | |
1876 | * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE | |
1877 | 16D relocations. | |
1878 | (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs. | |
1879 | (ppc_elf_relocate_section): Correct calculation for VLE SDAREL | |
1880 | relocs. | |
1881 | ||
902e9fc7 MR |
1882 | 2017-02-22 Maciej W. Rozycki <macro@imgtec.com> |
1883 | ||
1884 | PR ld/20828 | |
1885 | * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version | |
1886 | processing ahead of the call to `elf_gc_sweep_symbol'. | |
1887 | ||
758d96d8 NC |
1888 | 2017-02-22 Nick Clifton <nickc@redhat.com> |
1889 | ||
1890 | PR binutils/21193 | |
1891 | * opncls.c (bfd_create_gnu_debuglink_section): Give the newly | |
1892 | created section 4-byte alignment. | |
1893 | ||
6528b6eb AM |
1894 | 2017-02-22 Alan Modra <amodra@gmail.com> |
1895 | ||
1896 | * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault | |
1897 | on .got or .plt output section being discarded by script. | |
1898 | * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move | |
1899 | vxworks splt temp. | |
1900 | ||
24f1a751 AM |
1901 | 2017-02-21 Alan Modra <amodra@gmail.com> |
1902 | ||
1903 | * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit | |
1904 | DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero. | |
1905 | ||
64487780 AM |
1906 | 2017-02-20 Alan Modra <amodra@gmail.com> |
1907 | ||
1908 | PR 21181 | |
1909 | * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero | |
1910 | if DT_RELSZ/DT_RELASZ is zero. | |
1911 | ||
6438d1be NC |
1912 | 2017-02-17 Nick Clifton <nickc@redhat.com> |
1913 | ||
1914 | * compress.c (bfd_get_full_section_contents): Remember to reduce | |
1915 | compressed size by the sizeof the compression header when | |
1916 | decompressing the contents. | |
1917 | ||
4bc26c69 PA |
1918 | 2017-02-17 Pedro Alves <palves@redhat.com> |
1919 | ||
1920 | * srec.c (Chunk): Rename to ... | |
1921 | (_bfd_srec_len): ... this. | |
1922 | (S3Forced): Rename to ... | |
1923 | (_bfd_srec_forceS3): ... this. | |
1924 | * objcopy.c: Adjust all references. | |
1925 | ||
7ec22e0f PA |
1926 | 2017-02-17 Pedro Alves <palves@redhat.com> |
1927 | ||
1928 | * archive.c (bsd_write_armap): Rename to ... | |
1929 | (_bfd_bsd_write_armap): ... this. | |
1930 | (coff_write_armap): Rename to ... | |
1931 | (_bfd_coff_write_armap): ... this. | |
1932 | * libbfd-in.h (bsd_write_armap): Rename to ... | |
1933 | (_bfd_bsd_write_armap): ... this. | |
1934 | (coff_write_armap): Rename to ... | |
1935 | (_bfd_coff_write_armap): ... this. | |
1936 | * aout-target.h, aout-tic30.c: Adjust all users. | |
1937 | * libbfd.h: Regenerate. | |
1938 | ||
8c8402cc PA |
1939 | 2017-02-17 Pedro Alves <palves@redhat.com> |
1940 | ||
1941 | * bfd-in.h (bfd_read, bfd_write): Adjust to rename. | |
1942 | (warn_deprecated): Rename to ... | |
1943 | (_bfd_warn_deprecated): ... this. | |
1944 | * libbfd.c (warn_deprecated): Rename to ... | |
1945 | (_bfd_warn_deprecated): ... this. | |
1946 | * bfd-in2.h: Regenerate. | |
1947 | ||
c7c3d11b PA |
1948 | 2017-02-17 Pedro Alves <palves@redhat.com> |
1949 | ||
1950 | * bfdio.c (real_ftell): Rename to ... | |
1951 | (_bfd_real_ftell): ... this. | |
1952 | (real_fseek): Rename to ... | |
1953 | (_bfd_real_fseek): ... this. | |
1954 | (real_fopen): Rename to ... | |
1955 | (_bfd_real_fopen): ... this. | |
1956 | * libbfd-in.h (real_ftell): Rename to ... | |
1957 | (_bfd_real_ftell): ... this. | |
1958 | (real_fseek): Rename to ... | |
1959 | (_bfd_real_fseek): ... this. | |
1960 | (real_fopen): Rename to ... | |
1961 | (_bfd_real_fopen): ... this. | |
1962 | * cache.c, dwarf2.c, opncls.c: Adjust all callers. | |
1963 | * libbfd.h: Regenerate. | |
1964 | ||
4265548c PA |
1965 | 2017-02-17 Pedro Alves <palves@redhat.com> |
1966 | ||
1967 | * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers. | |
1968 | * libbfd.c (read_unsigned_leb128): Rename to ... | |
1969 | (_bfd_read_unsigned_leb128): ... this. | |
1970 | (read_signed_leb128): Rename to ... | |
1971 | (_bfd_read_signed_leb128): ... this. | |
1972 | (safe_read_leb128): Rename to ... | |
1973 | (_bfd_safe_read_leb128): ... this. | |
1974 | * libbfd-in.h (read_unsigned_leb128): Rename to ... | |
1975 | (_bfd_read_unsigned_leb128): ... this. | |
1976 | (read_signed_leb128): Rename to ... | |
1977 | (_bfd_read_signed_leb128): ... this. | |
1978 | (safe_read_leb128): Rename to ... | |
1979 | (_bfd_safe_read_leb128): ... this. | |
1980 | * libbfd.h: Renegerate. | |
1981 | ||
3239a423 AB |
1982 | 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com> |
1983 | ||
1984 | * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup | |
1985 | before trying to fine matching file and line information. | |
1986 | ||
90ed9b8b AB |
1987 | 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com> |
1988 | ||
1989 | * dwarf2.c (struct dwarf2_debug): Add orig_bfd member. | |
1990 | (_bfd_dwarf2_slurp_debug_info): If stashed debug information does | |
1991 | not match current bfd, then reload debug information. Record bfd | |
1992 | we're loading debug info for in the stash. If we have debug | |
1993 | informatin in the cache then perform section placement before | |
1994 | returning. | |
1995 | ||
a8c75b76 AM |
1996 | 2017-02-16 Alan Modra <amodra@gmail.com> |
1997 | ||
1998 | PR 21000 | |
1999 | * elf-bfd.h (struct elf_backend_data): Add no_page_alias. | |
2000 | * elfxx-target.h (elf_backend_no_page_alias): Define. | |
2001 | (elfNN_bed): Init new field. | |
2002 | * elf.c (assign_file_positions_for_load_sections): If no_page_alias | |
2003 | ensure PT_LOAD segment starts on a new page. | |
2004 | * elf32-hppa.c (elf_backend_no_page_alias): Define. | |
2005 | ||
247d6c4c AM |
2006 | 2017-02-16 Alan Modra <amodra@gmail.com> |
2007 | ||
2008 | PR 21132 | |
2009 | * elf32-hppa.c (allocate_plt_static): Allocate space for relocs | |
2010 | if pic. | |
2011 | ||
90571206 JW |
2012 | 2017-02-16 Jiong Wang <jiong.wang@arm.com> |
2013 | ||
2014 | * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED. | |
2015 | * bfd-in2.h: Regenerated. | |
2016 | ||
2a568401 L |
2017 | 2017-02-15 H.J. Lu <hongjiu.lu@intel.com> |
2018 | ||
2019 | PR ld/21168 | |
2020 | * elf32-i386.c (elf_i386_relocate_section): Allow | |
2021 | "lea foo@GOT, %reg" in PIC. | |
2022 | ||
a5def14f L |
2023 | 2017-02-15 H.J. Lu <hongjiu.lu@intel.com> |
2024 | ||
2025 | PR ld/20244 | |
2026 | * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC | |
2027 | symbol name when reporting R_386_GOT32/R_386_GOT32X relocation | |
2028 | error against local IFUNC symbol without a base register for | |
2029 | PIC. | |
2030 | ||
174d0a74 MR |
2031 | 2017-02-15 Maciej W. Rozycki <macro@imgtec.com> |
2032 | ||
2033 | * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than | |
2034 | `%P: %H:' with `info->callbacks->einfo'. | |
2035 | (ppc_elf_relocate_section): Likewise. | |
2036 | * elf64-ppc.c (ppc64_elf_check_relocs): Likewise. | |
2037 | (ppc64_elf_edit_toc): Likewise. | |
2038 | (ppc64_elf_relocate_section): Likewise. | |
2039 | ||
e278ae05 AM |
2040 | 2017-02-14 Alan Modra <amodra@gmail.com> |
2041 | ||
2042 | * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support | |
2043 | --gc-keep-exported, and test versioned field of sym rather than | |
2044 | looking for @ in name. | |
2045 | ||
10ddfe62 PD |
2046 | 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com> |
2047 | ||
2048 | * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to | |
2049 | __global_pointer$. | |
2050 | ||
d11135f5 NC |
2051 | 2017-02-13 Nick Clifton <nickc@redhat.com> |
2052 | ||
2053 | PR binutils/21151 | |
2054 | * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid | |
2055 | unit length field. | |
2056 | ||
cc162427 AW |
2057 | 2017-02-07 Andrew Waterman <andrew@sifive.com> |
2058 | ||
2059 | * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT | |
2060 | entry size if PLT header is written. | |
2061 | ||
3d044c0c SL |
2062 | 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com> |
2063 | ||
2064 | Fix sparc64 dynamic relocation processing to use the dynamic | |
2065 | symbol count. | |
2066 | * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic' | |
2067 | to determine if bfd_get_symcount() or bfd_get_dynamic_symcount() | |
2068 | should be used. | |
2069 | ||
1b7e3d2f NC |
2070 | 2017-02-03 Nick Clifton <nickc@redhat.com> |
2071 | ||
2072 | PR 21096 | |
2073 | * coffcode.h (coff_write_object_contents): Enlarge size of | |
2074 | s_name_buf in order to avoid compile time warning about possible | |
2075 | integer truncation. | |
2076 | * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower | |
2077 | 32-bits of insn value before printing into buffer. | |
2078 | ||
e17b0c35 MR |
2079 | 2017-02-02 Maciej W. Rozycki <macro@imgtec.com> |
2080 | ||
2081 | * elfxx-mips.c (mips_elf_hash_sort_data): Add | |
2082 | `max_local_dynindx'. | |
2083 | (mips_elf_sort_hash_table): Handle it. | |
2084 | (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local | |
2085 | symbols bump up `max_local_dynindx' rather than | |
2086 | `max_non_got_dynindx'. | |
2087 | ||
55f8b9d2 MR |
2088 | 2017-02-02 Maciej W. Rozycki <macro@imgtec.com> |
2089 | ||
2090 | * elfxx-mips.c (mips_elf_hash_sort_data): Convert the | |
2091 | `min_got_dynindx', `max_unref_got_dynindx' and | |
2092 | `max_non_got_dynindx' members to the `bfd_size_type' data type. | |
2093 | (mips_elf_sort_hash_table): Adjust accordingly. | |
2094 | ||
0f8c4b60 MR |
2095 | 2017-02-02 Maciej W. Rozycki <macro@imgtec.com> |
2096 | ||
2097 | * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout | |
2098 | to access the hash table. | |
2099 | ||
17a80fa8 MR |
2100 | 2017-02-02 Maciej W. Rozycki <macro@imgtec.com> |
2101 | ||
2102 | * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on | |
2103 | non-NULL `htab' to the beginning. | |
2104 | ||
8f56d4fd MR |
2105 | 2017-02-02 Maciej W. Rozycki <macro@imgtec.com> |
2106 | ||
2107 | * elflink.c (elf_gc_sweep): Wrap overlong line. | |
2108 | ||
8b10b0b3 MR |
2109 | 2017-01-30 Maciej W. Rozycki <macro@imgtec.com> |
2110 | ||
2111 | * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to... | |
2112 | (_bfd_mips_elf_linker_flags): ... this. Add another parameter. | |
2113 | * elfxx-mips.c (mips_elf_link_hash_table): Add | |
2114 | `ignore_branch_isa' member. | |
2115 | (mips_elf_perform_relocation): Do not treat an ISA mode mismatch | |
2116 | in branch relocation calculation as an error if | |
2117 | `ignore_branch_isa' has been set. | |
2118 | (_bfd_mips_elf_insn32): Rename to... | |
2119 | (_bfd_mips_elf_linker_flags): ... this. Rename the `on' | |
2120 | parameter to `insn32' and add an `ignore_branch_isa' parameter. | |
2121 | Handle the new parameter. | |
2122 | ||
1fbd05e1 HPN |
2123 | 2017-01-27 Hans-Peter Nilsson <hp@axis.com> |
2124 | ||
22d9a0de HPN |
2125 | * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused |
2126 | local variable dynobj. | |
2127 | ||
1fbd05e1 HPN |
2128 | PR ld/20995 |
2129 | * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro. | |
2130 | (elf_cris_adjust_dynamic_symbol): Place variables copied into the | |
2131 | executable from read-only sections into sdynrelro. | |
2132 | (elf_cris_finish_dynamic_symbol): Select sreldynrelro for | |
2133 | dynamic relocs in sdynrelro. | |
2134 | (elf_backend_want_dynrelro): Define. | |
2135 | ||
4a7324e1 SH |
2136 | 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de> |
2137 | ||
2138 | * config.bfd (*-*-rtemsaout*): Mark as removed. | |
2139 | ||
c75b4ebd SH |
2140 | 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de> |
2141 | ||
2142 | * config.bfd (powerpcle-*-rtems*): Do not mark as removed. | |
2143 | (arm-*-rtems*): Move to (arm*-*-eabi*). | |
2144 | (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*). | |
2145 | (m68-*-rtems*): Move to (m68*-*-elf*). | |
2146 | ||
850d84f6 SH |
2147 | 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de> |
2148 | ||
2149 | * config.bfd (*-*-rtemscoff*): Mark as removed. | |
2150 | ||
b531344c MR |
2151 | 2017-01-24 Maciej W. Rozycki <macro@imgtec.com> |
2152 | ||
2153 | PR ld/20828 | |
2154 | * elflink.c (bfd_elf_record_link_assignment): Revert last | |
2155 | change and don't ever clear `forced_local'. Set `mark' | |
2156 | unconditionally. | |
2157 | (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within | |
2158 | file. | |
2159 | (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'... | |
2160 | (bfd_elf_size_dynamic_sections): ... here. | |
2161 | * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local' | |
2162 | and set `mark' instead in `__tls_get_addr_opt' processing. | |
2163 | * elf64-ppc.c (ppc64_elf_tls_setup): Likewise. | |
2164 | ||
f0158f44 AM |
2165 | 2017-01-24 Alan Modra <amodra@gmail.com> |
2166 | ||
2167 | * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases | |
2168 | where dynamic relocs are preferable. Allow ifunc too. | |
2169 | (ensure_undefweak_dynamic): New function. | |
2170 | (allocate_dynrelocs): Use it here. Move plt handling last and | |
2171 | don't make symbols dynamic, simplifying loop. Only make undef | |
2172 | weak symbols with GOT entries dynamic. Correct condition | |
2173 | for GOT relocs. Handle dynamic relocs on ifuncs. Correct | |
2174 | comments. Remove goto. | |
2175 | (ppc_elf_relocate_section): Correct test for using dynamic | |
2176 | symbol on GOT relocs. Rearrange test for emitting GOT relocs | |
2177 | to suit. Set up explicit tls_index entries and implicit GOT | |
2178 | tls_index entries resolvable at link time for | |
2179 | __tls_get_addr_opt. Simplify test to clear mem for prelink. | |
2180 | * elf64-ppc.c (allocate_got): Correct condition for GOT relocs. | |
2181 | (ensure_undefweak_dynamic): New function. | |
2182 | (allocate_dynrelocs): Use it here. Only make undef weak symbols | |
2183 | with GOT entries dynamic. Remove unnecessary test of | |
2184 | WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling. | |
2185 | (ppc64_elf_relocate_section): Correct test for using dynamic | |
2186 | symbol on GOT relocs. Rearrange test for emitting GOT relocs | |
2187 | to suit. Set up explicit tls_index entries and implicit GOT | |
2188 | tls_index entries resolvable at link time for __tls_get_addr_opt. | |
2189 | Simplify expression to clear mem for prelink. | |
2190 | ||
2d0ca824 YN |
2191 | 2017-01-23 Yury Norov <ynorov@caviumnetworks.com> |
2192 | ||
2193 | * elfnn-aarch64.c: Fix relaxations for ILP32 mode. | |
2194 | ||
7f784814 JW |
2195 | 2017-01-20 Jiong Wang <jiong.wang@arm.com> |
2196 | ||
2197 | * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function. | |
2198 | (elf_backend_hash_symbol): Define. | |
2199 | ||
81ff47b3 MR |
2200 | 2017-01-18 Maciej W. Rozycki <macro@imgtec.com> |
2201 | ||
2202 | PR ld/20828 | |
2203 | * elflink.c (bfd_elf_record_link_assignment): Clear any | |
2204 | `forced_local' marking for DSO symbols that are not being | |
2205 | provided. | |
2206 | ||
640d6bfd KLC |
2207 | 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com> |
2208 | ||
2209 | * elfnn-riscv.c (riscv_elf_object_p): New function. | |
2210 | ||
8361ed4d L |
2211 | 2017-01-12 H.J. Lu <hongjiu.lu@intel.com> |
2212 | ||
2213 | PR ld/21038 | |
2214 | * elf64-x86-64.c (elf_x86_64_link_hash_table): Add | |
2215 | plt_bnd_eh_frame. | |
2216 | (elf_x86_64_check_relocs): Create .eh_frame section for the | |
2217 | .plt.bnd section. | |
2218 | (elf_x86_64_size_dynamic_sections): Allocate and initialize | |
2219 | .eh_frame section for the .plt.bnd section. | |
2220 | (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section | |
2221 | for the .plt.bnd section. | |
2222 | ||
2425a30e NC |
2223 | 2017-01-12 Nick Clifton <nickc@redhat.com> |
2224 | ||
2225 | PR binutils/20876 | |
2226 | * opncls.c (find_separate_debug_file): Add include_dirs | |
2227 | parameter. Only include the directory part of the bfd's filename | |
2228 | in search paths if include_dirs is true. Add a couple of extra | |
2229 | locations for looking for debug files. | |
2230 | ( bfd_follow_gnu_debuglink): Update invocation of | |
2231 | find_separate_debug_file. | |
2232 | (bfd_follow_gnu_debugaltlink): Likewise. | |
2233 | (get_build_id): New function: Finds the build-id of the given bfd. | |
2234 | (get_build_id_name): New function: Computes the name of the | |
2235 | separate debug info file for a bfd, based upon its build-id. | |
2236 | (check_build_id_file): New function: Checks to see if a separate | |
2237 | debug info file exists at the given location, and that its | |
2238 | build-id matches that of the original bfd. | |
2239 | (bfd_follow_build_id_debuglink): New function: Finds a separate | |
2240 | debug info file for a given bfd by using the build-id method. | |
2241 | * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id | |
2242 | method of locating a separate debug info file before using the | |
2243 | debuglink method. | |
2244 | * bfd-in2.h: Regenerate. | |
2245 | ||
9e659176 L |
2246 | 2017-01-11 H.J. Lu <hongjiu.lu@intel.com> |
2247 | ||
2248 | PR ld/21038 | |
2249 | * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New. | |
2250 | (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and | |
2251 | elf_x86_64_eh_frame_plt_got. | |
2252 | (elf_x86_64_size_dynamic_sections): Get unwind info from | |
2253 | elf_x86_64_bnd_arch_bed for the BND PLT. | |
2254 | ||
f2e2d2f5 JS |
2255 | 2017-01-11 Jeremy Soller <jackpot51@gmail.com> |
2256 | ||
2257 | * config.bfd: Add entries for i686-redox and x86_64-redox. | |
2258 | ||
52b232b3 L |
2259 | 2017-01-10 H.J. Lu <hongjiu.lu@intel.com> |
2260 | ||
2261 | * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section | |
2262 | to 4 bytes. | |
2263 | * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align | |
2264 | .eh_frame section to 4 bytes for x32. | |
2265 | (elf_x86_64_check_relocs): Likewise. | |
2266 | ||
fff53dae L |
2267 | 2017-01-10 H.J. Lu <hongjiu.lu@intel.com> |
2268 | ||
2269 | PR ld/20830 | |
2270 | * elf32-i386.c (elf_i386_eh_frame_plt_got): New. | |
2271 | (PLT_GOT_FDE_LENGTH): Likewise. | |
2272 | (elf_i386_plt_layout): Add eh_frame_plt_got and | |
2273 | eh_frame_plt_got_size. | |
2274 | (elf_i386_plt): Updated. | |
2275 | (elf_i386_link_hash_table): Add plt_got_eh_frame. | |
2276 | (elf_i386_check_relocs): Create .eh_frame section for .plt.got. | |
2277 | (elf_i386_size_dynamic_sections): Allocate and initialize | |
2278 | .eh_frame section for .plt.got. | |
2279 | (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for | |
2280 | .plt.got. | |
2281 | (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and | |
2282 | eh_frame_plt_got_size. | |
2283 | * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New. | |
2284 | (PLT_GOT_FDE_LENGTH): Likewise. | |
2285 | (elf_x86_64_backend_data): Add eh_frame_plt_got and | |
2286 | eh_frame_plt_got_size. | |
2287 | (elf_x86_64_arch_bed): Updated. | |
2288 | (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and | |
2289 | eh_frame_plt_got_size. | |
2290 | (elf_x86_64_nacl_arch_bed): Likewise. | |
2291 | (elf_x86_64_link_hash_table): Add plt_got_eh_frame. | |
2292 | (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got. | |
2293 | (elf_x86_64_size_dynamic_sections): Allocate and initialize | |
2294 | .eh_frame section for .plt.got. | |
2295 | (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section | |
2296 | for .plt.got. | |
2297 | ||
f129e49f L |
2298 | 2017-01-10 H.J. Lu <hongjiu.lu@intel.com> |
2299 | ||
2300 | * elf32-i386.c (elf_i386_size_dynamic_sections): Set | |
2301 | plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt. | |
2302 | ||
cd6581da NC |
2303 | 2017-01-09 Nick Clifton <nickc@redhat.com> |
2304 | ||
2305 | * dwarf2.c (lookup_address_in_function_table): Return early if | |
2306 | there are no functions in the given comp unit, or if the high | |
2307 | address of the last function in the comp unit is less than the | |
2308 | desired address. | |
2309 | ||
98f02962 NC |
2310 | 2017-01-09 Nick Clifton <nickc@redhat.com> |
2311 | ||
2312 | PR binutils/21013 | |
2313 | * coffgen.c (_bfd_coff_get_external_symbols): Generate an error | |
2314 | message if there are too many symbols to load. | |
2315 | ||
ae4fda66 JC |
2316 | 2017-01-04 James Clarke <jrtc27@jrtc27.com> |
2317 | ||
2318 | * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free | |
2319 | if relocs are cached. | |
2320 | ||
de1010f4 RF |
2321 | 2017-01-03 Rich Felker <bugdal@aerifal.cx> |
2322 | ||
2323 | PR ld/21017 | |
2324 | * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry | |
2325 | for R_MICROBLAZE_GOTOFF_64. | |
2326 | ||
09fe2662 NC |
2327 | 2017-01-03 Nick Clifton <nickc@redhat.com> |
2328 | ||
2329 | * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time | |
2330 | warning about using a possibly uninitialised variable. | |
2331 | ||
595e0a47 AM |
2332 | 2017-01-02 Alan Modra <amodra@gmail.com> |
2333 | ||
2334 | * elf32-hppa.c (ensure_undef_weak_dynamic): New function. | |
2335 | (allocate_plt_static, allocate_dynrelocs): Use it. | |
2336 | ||
7bd9df3b AM |
2337 | 2017-01-02 Alan Modra <amodra@gmail.com> |
2338 | ||
2339 | * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for | |
2340 | .PARISC.unwind section. | |
2341 | ||
5b86074c AM |
2342 | 2017-01-02 Alan Modra <amodra@gmail.com> |
2343 | ||
2344 | PR ld/20989 | |
2345 | * elfxx-sparc.c (gdop_relative_offset_ok): New function. | |
2346 | (_bfd_sparc_elf_relocate_section): Use it to validate GOT | |
2347 | indirect to GOT pointer relative code edit. | |
2348 | ||
2571583a AM |
2349 | 2017-01-02 Alan Modra <amodra@gmail.com> |
2350 | ||
2351 | Update year range in copyright notice of all files. | |
2352 | ||
5c1ad6b5 | 2353 | For older changes see ChangeLog-2016 |
3499769a | 2354 | \f |
5c1ad6b5 | 2355 | Copyright (C) 2017 Free Software Foundation, Inc. |
3499769a AM |
2356 | |
2357 | Copying and distribution of this file, with or without modification, | |
2358 | are permitted in any medium without royalty provided the copyright | |
2359 | notice and this notice are preserved. | |
2360 | ||
2361 | Local Variables: | |
2362 | mode: change-log | |
2363 | left-margin: 8 | |
2364 | fill-column: 74 | |
2365 | version-control: never | |
2366 | End: |