PR binutils/11983
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
1be5090b
NC
12014-01-02 Nick Clifton <nickc@redhat.com>
2
3 PR binutils/11983
4 * archive.c (_bfd_get_elt_at_filepos): Store a copy of the
5 filename in the bfd's filename field.
6 * elfcode.h (bfd_from_remote_memory): Likewise.
7 * ieee.c (ieee_object_p): Likewise.
8 * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
9 * oasys.c (oasys_openr_next_archived_file): Likewise.
10 * vms-lib.c (_bfd_vms_lib_get_module): Likewise.
11 * opncls.c (bfd_fopen): Likewise.
12 (bfd_openstreamr): Likewise.
13 (bfd_openr_iovec): Likewise.
14 (bfd_openw): Likewise.
15 (bfd_create): Likewise.
16 (_bfd_delete_bfd): Free filename.
17
1f93a6d6
IT
182013-12-30 Ilya Tocar <ilya.tocar@intel.com>
19
20 * peXXigen.c (rsrc_process_section): Use ptrdiff_t as the type for
21 pointer arithmetic.
22
99d190fa
AM
232013-12-20 Alan Modra <amodra@gmail.com>
24
25 * elf-eh-frame.c (cie_eq): Return false when initial_insn_length
26 is too large.
27 (cie_compute_hash): Don't exceed bounds of initial_instructions.
28 (_bfd_elf_parse_eh_frame): Always set initial_insn_length, and
29 save as much of insns to initial_instructions[] as will fit.
30
9ef5d938
L
312013-12-19 H.J. Lu <hongjiu.lu@intel.com>
32
33 PR binutils/16317
34 * elf.c (assign_section_numbers): Set the SHF_INFO_LINK bit for
35 SHT_REL/SHT_RELA sections when setting the sh_info field.
36
9373215c
PM
372013-12-19 Pierre Muller <muller@sourceware.org>
38
3f10b67a
PM
39 * peXXigen.c (rsrc_cmp): Fix unused variable warning.
40
412013-12-19 Pierre Muller <muller@sourceware.org>
42
43 * peXXigen.c (u16_mbtouc): Avoid unused function warning by excluding
44 if __CYGWIN__ or __MINGW32__ macro is defined.
9373215c
PM
45 (rsrc_cmp): Fix Windows host version and version without wchar header.
46 [__CYGWIN__, __MINGW32__]: Introduce rsrccmp macro.
47 Fix coding standard issues.
48
f6ec89e7
AS
492013-12-19 Andreas Schwab <schwab@suse.de>
50
51 * elf32-m68k.c (elf_m68k_add_symbol_hook): New function.
52 (elf_backend_add_symbol_hook): Define.
53
b9e95fa2
NC
542013-12-18 Nick Clifton <nickc@redhat.com>
55
56 * peXXigen.c (rsrc_print_section): Use ptrdiff_t as the type for
57 pointer arithmetic.
58
7394f108
L
592013-12-17 H.J. Lu <hongjiu.lu@intel.com>
60
61 * elf32-arm.c (elf32_arm_post_process_headers): Call
62 _bfd_elf_post_process_headers.
63
0af03126
L
642013-12-17 H.J. Lu <hongjiu.lu@intel.com>
65
66 * elf32-spu.c (spu_elf_post_process_headers): Call
67 _bfd_elf_post_process_headers.
68 * elfxx-mips.c (_bfd_mips_post_process_headers): Likewise.
69
78245035
L
702013-12-17 H.J. Lu <hongjiu.lu@intel.com>
71
72 * elf-bfd.h (_bfd_elf_set_osabi): Renamed to ...
73 (_bfd_elf_post_process_headers): This.
74 * elf.c (_bfd_elf_compute_section_file_positions): Always
75 call elf_backend_post_process_headers.
76 (_bfd_elf_set_osabi): Renamed to ...
77 (_bfd_elf_post_process_headers): This.
78 * elf32-hppa.c (elf_backend_post_process_headers): Removed.
79 * elf32-i370.c (elf_backend_post_process_headers): Likewise.
80 * elf32-msp430.c (elf_backend_post_process_headers): Likewise.
81 * elf32-ppc.c (elf_backend_post_process_headers): Likewise.
82 * elf32-sparc.c (elf_backend_post_process_headers): Likewise.
83 * elf64-hppa.c (elf_backend_post_process_headers): Likewise.
84 * elf64-ppc.c (elf_backend_post_process_headers): Likewise.
85 * elf64-sparc.c (elf_backend_post_process_headers): Likewise.
86 * elf64-x86-64.c (elf_backend_post_process_headers): Likewise.
87 * (elf_backend_post_process_headers): Likewise.
88 * (elf_backend_post_process_headers): Likewise.
89 * elf32-i386.c (elf_backend_post_process_headers): Don't
90 define as _bfd_elf_set_osabi.
91 (elf_i386_fbsd_post_process_headers): Updated.
92 * elf32-mips.c (elf_fbsd_post_process_headers): Removed.
93 (elf_backend_post_process_headers): Likewise.
94 * elf32-tic6x.c (elf32_tic6x_set_osabi): Removed.
95 (elf_backend_post_process_headers): Likewise.
96 * elf64-mips.c (elf_fbsd_post_process_headers): Removed.
97 (elf_backend_post_process_headers): Likewise.
98 * elfn32-mips.c (elf_fbsd_post_process_headers): Removed.
99 (elf_backend_post_process_headers): Likewise.
100 * elfnn-aarch64.c (elfNN_aarch64_post_process_headers): Updated.
101 * elfxx-target.h (elf_backend_post_process_headers): Default
102 to _bfd_elf_post_process_headers.
103
e2349352
L
1042013-12-17 H.J. Lu <hongjiu.lu@intel.com>
105
106 PR binutils/16318
107 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Call
108 _bfd_elf_copy_private_bfd_data.
109 * elf32-bfin.c (bfin_elf_copy_private_bfd_data): Removed.
110 (elf32_bfinfdpic_copy_private_bfd_data): Likewise.
111 (bfd_elf32_bfd_copy_private_bfd_data): Don't define.
112 * elf32-frv.c (frv_elf_copy_private_bfd_data): Removed.
113 (elf32_frvfdpic_copy_private_bfd_data): Likewise.
114 (bfd_elf32_bfd_copy_private_bfd_data): Don't define.
115 * elf32-iq2000.c (iq2000_elf_copy_private_bfd_data): Removed.
116 (bfd_elf32_bfd_copy_private_bfd_data): Don't define.
117 * elf32-lm32.c (lm32_elf_copy_private_bfd_data): Removed.
118 (lm32_elf_fdpic_copy_private_bfd_data): Call
119 _bfd_elf_copy_private_bfd_data.
120 * elf32-mep.c (mep_elf_copy_private_bfd_data): Removed.
121 (bfd_elf32_bfd_copy_private_bfd_data): Don't define.
122 * elf32-msp430.c (elf32_msp430_copy_private_bfd_data): Removed.
123 (bfd_elf32_bfd_copy_private_bfd_data): Don't define.
124 * elf32-mt.c (mt_elf_copy_private_bfd_data): Removed.
125 (bfd_elf32_bfd_copy_private_bfd_data): Don't define.
126 * elf32-sh.c (sh_elf_set_private_flags): Removed.
127 (sh_elf_copy_private_data): Call _bfd_elf_copy_private_bfd_data
128 and sh_elf_set_mach_from_flags.
129 * elfnn-aarch64.c (elfNN_aarch64_copy_private_bfd_data): Removed.
130 (bfd_elfNN_bfd_copy_private_bfd_data): Don't define.
131
337e86d7
L
1322013-12-17 H.J. Lu <hongjiu.lu@intel.com>
133
134 * peXXigen.c (rsrc_process_section): Rename index to indx.
135
5879bb8f
NC
1362013-12-17 Nick Clifton <nickc@redhat.com>
137
138 * peXXigen.c: Include wchar.h if available.
139 Include safe-ctype.h.
140 (HighBitSet, SetHighBit, WithoutHighBit): New macros.
141 (pe_print_resource_entries): Rename to
142 rsrc_print_resource_entries. Handle names that are not RVAs.
143 (pe_print_resource_directory): Rename to
144 rsrc_print_resource_directory.
145 (pe_print_rsrc): Rename to rsrc_print_section. Corrupt
146 computation of RVA bias.
147 (rsrc_count_entries): New function.
148 (rsrc_count_directory): New function.
149 (rsrc_parse_entry): New function.
150 (rsrc_parse_entries): New function.
151 (rsrc_parse_directory): New function.
152 (rsrc_write_string): New function.
153 (rsrc_compute_rva): New function.
154 (rsrc_write_leaf): New function.
155 (rsrc_write_entry): New function.
156 (rsrc_write_directory): New function.
157 (u16_mbtouc): New function.
158 (rsrc_cmp): New function.
159 (rsrc_print_name): New function.
160 (rsrc_resource_name): New function.
161 (rsrc_merge_string_entries): New function.
162 (rsrc_sort_entries): New function.
163 (rsrc_attach_chain): New function.
164 (rsrc_merge): New function.
165 (rsrc_process_section): New function - merges the contents of a
166 .rsrc section.
167 (_bfd_XXi_final_link_postscript): Call rsrc_process_section.
b9e95fa2
NC
168 (rsrc_print_section): Fix mingw64 size issue.
169
5879bb8f
NC
170 * configure.in (AC_CHECK_HEADERS): Add wchar.h
171 * config.in: Regenerate.
172 * configure: Regenerate.
173
1a1fb627
AS
1742013-12-16 Andreas Schwab <schwab@suse.de>
175
176 * elf64-ppc.c (ppc64_elf_relocate_section): Add newline to error
177 message.
178
57fa7b8c
AM
1792013-12-14 Alan Modra <amodra@gmail.com>
180
181 * elflink.c (_bfd_elf_merge_symbol): If merging a new weak
182 symbol that will be skipped, we don't have a new definition.
183
35c08157
KLC
1842013-12-13 Kuan-Lin Chen <kuanlinchentw@gmail.com>
185 Wei-Cheng Wang <cole945@gmail.com>
186
187 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add nds32
188 files.
189 * Makefile.in: Regenerate.
190 * archures.c (bfd_nds32_arch): Add nds32 target.
191 * bfd-in2.h: Regenerate.
192 * config.bfd (nds32*le-*-linux): Add bfd_elf32_nds32lelin_vec
193 and bfd_elf32_nds32belin_vec.
194 (nds32*be-*-linux*): Likewise.
195 (nds32*le-*-*): Add bfd_elf32_nds32le_vec and bfd_elf32_nds32be_vec.
196 (nds32*be-*-*): Likewise.
197 * configure.in (bfd_elf32_nds32be_vec): Add elf32-nds32.lo.
198 (bfd_elf32_nds32le_vec): Likewise.
199 (bfd_elf32_nds32belin_vec): Likewise.
200 (bfd_elf32_nds32lelin_vec): Likewise.
201 * configure: Regenerate.
202 * cpu-nds32.c: New file for nds32.
203 * elf-bfd.h: Add NDS32_ELF_DATA.
204 * elf32-nds32.c: New file for nds32.
205 * elf32-nds32.h: New file for nds32.
206 * libbfd.h: Regenerate.
207 * reloc.c: Add relocations for nds32.
208 * targets.c (bfd_elf32_nds32be_vec): New declaration for nds32.
209 (bfd_elf32_nds32le_vec): Likewise.
210 (bfd_elf32_nds32belin_vec): Likewise.
211 (bfd_elf32_nds32lelin_vec): Likewise.
212
57b828ef
L
2132013-12-12 H.J. Lu <hongjiu.lu@intel.com>
214
215 PR binutils/16318
216 * elf.c (_bfd_elf_copy_private_bfd_data): Remove BFD_ASSERT.
217 Set e_flags only if elf_flags_init is FALSE. Copy EI_OSABI
218 field.
219
84b66498
L
2202013-12-12 H.J. Lu <hongjiu.lu@intel.com>
221
222 * elf32-sh.c (bfd_elf32_bfd_set_private_bfd_flags): Removed.
223
58e7ebac
L
2242013-12-12 H.J. Lu <hongjiu.lu@intel.com>
225
226 * elf.c (assign_file_positions_except_relocs): Set e_type in ELF
227 header to ET_EXEC for -pie -Ttext-segment=.
228
68c88cd4
AM
2292013-12-08 Alan Modra <amodra@gmail.com>
230
bc58135a 231 * elflink.c (_bfd_elf_add_default_symbol): Set dynamic_def
68c88cd4
AM
232 and ref_dynamic_nonweak when chaining together indirect
233 symbols.
234
2b597f54
TG
2352013-12-06 Tristan Gingold <gingold@adacore.com>
236
237 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add argument rf.
238 Display epilog opcode.
239 (pex64_dump_xdata): Add argument rf; make addr a local variable.
240 Adjust call to pex64_xdata_print_uwd_codes.
241 (pex64_bfd_print_pdata): Display code range, adjust call to
242
b30a5d18
TG
2432013-12-05 Tristan Gingold <gingold@adacore.com>
244
245 * mach-o.c (bfd_mach_o_mkobject_init): Use bfd_zalloc.
246
11a6da56
NC
2472013-12-03 Nick Clifton <nickc@redhat.com>
248
249 * peXXigen.c (pe_print_resource_entries): New function: Displays
250 an entry in a .rsrc section.
251 (pe_print_resource_directory): New function: Displays a directory
252 in a .rsrc section.
253 (pe_print_rsrc): New function: Displays the contents of .rsrc
254 section.
255 (_bfd_XX_print_private_bfd_data_common): Call pe_print_rsrc.
256
00f412ee
AM
2572013-12-03 Alan Modra <amodra@gmail.com>
258
259 * elf64-ppc.c (ppc_build_one_stub <ppc_stub_plt_branch_r2off>):
260 Don't omit saving of r2 for ELFv2. Don't addi 2,2,0.
261 (ppc_size_one_stub <ppc_stub_plt_branch_r2off>): Adjust to suit.
262
2c3f079f
AM
2632013-12-03 Alan Modra <amodra@gmail.com>
264
265 * elf64-ppc.c (ppc64_elf_link_just_syms): Remove .got check.
266 Handle ELFv2.
267
49206388
WN
2682013-11-26 Will Newton <will.newton@linaro.org>
269
270 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
271 Handle STT_GNU_IFUNC symbols correctly in static links.
272
b1ee0cc4
WN
2732013-11-26 Will Newton <will.newton@linaro.org>
274
275 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Ensure
276 PLT_INDEX is calculated using correct header size.
277
0cb112f7
CF
2782013-11-22 Cory Fields <cory@coryfields.com>
279
280 * libcoff-in.h: Add insert_timestamp flag to the pe_data struct.
281 * libcoff.h: Regenerate.
282 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Only use a real
283 timestamp if --insert-timestamp was used.
284
33aa641a
RM
2852013-11-19 Roland McGrath <mcgrathr@google.com>
286
287 * elf-nacl.c (nacl_modify_segment_map): Calculate SIZEOF_HEADERS
288 when not doing linking (i.e. INFO is a null pointer).
289
0c723101
L
2902013-11-19 H.J. Lu <hongjiu.lu@intel.com>
291
292 * elf64-x86-64.c (elf_x86_64_section_from_shdr): Re-indent.
293
c3320543
L
2942013-11-17 H.J. Lu <hongjiu.lu@intel.com>
295
296 * elf64-x86-64.c (x86_64_elf_howto_table): Add R_X86_64_PC32_BND
297 and R_X86_64_PLT32_BND.
298 (R_X86_64_standard): Replace R_X86_64_RELATIVE64 with
299 R_X86_64_PLT32_BND.
300 (IS_X86_64_PCREL_TYPE): Add R_X86_64_PLT32_BND.
301 (x86_64_reloc_map): Add BFD_RELOC_X86_64_PC32_BND and
302 BFD_RELOC_X86_64_PLT32_BND.
303 (elf_x86_64_check_relocs): Handle R_X86_64_PC32_BND and
304 R_X86_64_PLT32_BND.
305 (elf_x86_64_gc_sweep_hook): Likewise.
306 (elf_x86_64_relocate_section): Likewise.
307 * reloc.c (bfd_reloc_code_real): Add BFD_RELOC_X86_64_PC32_BND
308 and BFD_RELOC_X86_64_PLT32_BND.
309 * bfd-in2.h: Regenerated.
310 * libbfd.h: Likewise.
311
bb81b736
L
3122013-11-15 H.J. Lu <hongjiu.lu@intel.com>
313
314 * elf32-i386.c (elf_i386_allocate_dynrelocs): Make room for
315 PLT0 directly.
316 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
317
57460bcf
NC
3182013-11-14 Nick Clifton <nickc@redhat.com>
319
320 PR ld/16017
321 * elf32-arm.c (elf32_arm_populate_plt_entry): Return a boolean
322 value, TRUE for success, FALSE for failure.
323 Fail if attempting to create a PLT entry for a thumb only target.
324 (elf32_arm_final_link_relocate): Check result of calling
325 elf32_arm_populate_plt_entry.
326 (elf32_arm_finish_dynamic_symbol): Likewise.
327
31fc8a0b
NC
3282013-11-14 Guy Martin <gmsoft@tuxicoman.be>
329
330 PR ld/16082
331 * elf32-hppa.c (elf32_hppa_hide_symbol): Remove old version
332 information when forcing a symbol to be local.
333
da0781dc
YZ
3342013-11-13 Yufeng Zhang <yufeng.zhang@arm.com>
335
336 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Use
337 R_AARCH64_TLS_DTPMOD64 instead of R_AARCH64_TLS_DTPMOD;
338 likewise for R_AARCH64_TLS_DTPREL and R_AARCH64_TLS_TPREL.
339
3b570dee
YZ
3402013-11-12 Matthew Leach <Matthew.Leach@arm.comm>
341
342 * elfxx-aarch64.c (_bfd_aarch64_elf_grok_prstatus): Fix hard-coded
343 size of struct elf_prstatus.
344
14b5f73f
AM
3452013-11-11 Alan Modra <amodra@gmail.com>
346
347 * elf64-ppc.c (allocate_dynrelocs): Revert 2013-11-04 change.
348
afe397ea
AM
3492013-11-11 Ulrich Weigand <uweigand@de.ibm.com>
350
351 * elf64-ppc.c (ppc64_elf_edit_toc): Use SYMBOL_REFERENCES_LOCAL
352 here, not SYMBOL_CALLS_LOCAL.
353 (ppc64_elf_relocate_section): Likewise.
354 (size_global_entry_stubs): Set undefined symbols on their global
355 entry stubs here..
356 (build_global_entry_stubs): ..rather than here.
357 (ppc64_elf_build_stubs): Don't reset glink->size before calling
358 build_global_entry_stubs.
359
64b384e1
RM
3602013-11-07 Roland McGrath <mcgrathr@google.com>
361
362 * archures.c (bfd_mach_i386_nacl): Fix definition so it doesn't
363 collide with bfd_mach_l1om.
364 * bfd-in2.h: Regenerate.
365
366 * elf32-i386.c (elf32_i386_nacl_elf_object_p): New function.
367 (elf_backend_object_p): Use that in elf32-i386-nacl definition.
368 * elf64-x86-64.c (elf64_x86_64_nacl_elf_object_p): New function.
369 (elf_backend_object_p): Use that in elf64-x86-64-nacl definition.
370 (elf32_x86_64_nacl_elf_object_p): New function.
371 (elf_backend_object_p): Use that in elf32-x86-64-nacl definition.
372
2bc56d66
DD
3732013-11-05 DJ Delorie <dj@redhat.com>
374
375 * elf32-rl78.c (elf32_rl78_relax_delete_bytes): Make sure relocs
376 are loaded before trying to use them.
377
62d887d4
L
3782013-11-05 H.J. Lu <hongjiu.lu@intel.com>
379 Bernhard Rosenkränzer <bernhard.rosenkranzer@linaro.org>
380
381 PR ld/4409
382 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add an argument for
383 error ignored.
384 * elf-m10200.c (mn10200_elf_relocate_section): Updated.
385 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
386 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
387 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
388 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
389 (bfin_relocate_section): Likewise.
390 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
391 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
392 * elf32-cris.c (cris_elf_relocate_section): Likewise.
393 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
394 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
395 * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
396 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
397 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
398 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
399 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
400 * elf32-i386.c (elf_i386_relocate_section): Likewise.
401 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
402 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
403 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
404 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
405 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
406 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
407 * elf32-metag.c (elf_metag_relocate_section): Likewise.
408 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
409 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
410 * elf32-mep.c (mep_elf_relocate_section): Likewise.
411 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
412 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
413 * elf32-mt.c (mt_elf_relocate_section): Likewise.
414 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
415 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
416 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
417 * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
418 * elf32-rx.c (rx_elf_relocate_section): Likewise.
419 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
420 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
421 * elf32-s390.c (elf_s390_relocate_section): Likewise.
422 * elf32-v850.c (v850_elf_relocate_section): Likewise.
423 * elf32-vax.c (elf_vax_relocate_section): Likewise.
424 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
425 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
426 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
427 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
428 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
429 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
430 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
431 * elf64-s390.c (elf_s390_relocate_section): Likewise.
432 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
433 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
434 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
435 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
436
437 * elfnn-ia64.c (elfNN_ia64_relocate_section): Skip if error
438 from RELOC_FOR_GLOBAL_SYMBOL in executable is ignored.
439
dba6fa9b
AM
4402013-11-05 Alan Modra <amodra@gmail.com>
441
442 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Make .TOC. defined and
443 hidden.
444 (ppc64_elf_set_toc): Adjust.
445
33e44f2e
AM
4462013-11-05 Alan Modra <amodra@gmail.com>
447
448 * elf64-ppc.c (struct ppc_link_hash_table): Remove got, plt, relplt,
449 iplt, reliplt. Update all references to use elf.sgot, elf.splt,
450 elf.srelplt, elf.iplt and elf.irelplt.
451
25153ba0
SL
4522013-11-03 Sandra Loosemore <sandra@codesourcery.com>
453
25153ba0
SL
454 * elf32-niso2.c (nios2_elf32_do_hi16_relocate): Remove incorrect
455 ATTRIBUTE_UNUSED from parameter.
456 (nios2_elf_do_lo16_relocate): Likewise.
457 (nios2_elf32_do_hiadj16_relocate): Likewise.
458 (nios2_elf32_do_pcrel_lo16_relocate): Likewise.
459 (nios2_elf32_do_pcrel_hiadj16_relocate): Likewise.
460 (nios2_elf32_do_pcrel16_relocate): Likewise.
461 (nios2_elf32_do_call26_relocate): Likewise.
462 (nios2_elf32_do_gprel_relocate): Likewise.
463 (nios2_elf32_do_ujmp_relocate): Likewise.
464 (nios2_elf32_do_cjmp_relocate): Likewise.
465 (nios2_elf32_do_callr_relocate): Likewise.
466 (nios2_elf32_gc_mark_hook): Likewise.
467
52a82034
AM
4682013-11-04 Alan Modra <amodra@gmail.com>
469
470 * elf64-ppc.c (ppc64_elf_relocate_section): Edit global entry
471 prologue to non-PIC in non-PIC executables.
472
a345bc8d
AM
4732013-11-04 Alan Modra <amodra@gmail.com>
474
475 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Copy
476 pointer_equality_needed flag.
477 (ppc64_elf_check_relocs): For ELFv2 arrange to emit plt
478 entries for references to functions in shared libraries on
479 non-call relocs.
480 (readonly_dynrelocs): Split into function of the same name and..
481 (maybe_set_textrel): ..this new function. Update call.
482 (ppc64_elf_adjust_dynamic_symbol): Don't emit dynrelocs for
483 ELFv2 in most cases if we have a plt entry. Use new
484 readonly_relocs.
485 (allocate_dynrelocs): For ELFv2, don't allocate dynreloc space
486 for ifunc in static executables.
487 (size_global_entry_stubs): New function.
488 (ppc64_elf_size_dynamic_sections): Call size_global_entry_stubs.
489 Save end of glink branch table.
490 (ppc64_elf_hash_symbol): New function.
491 (build_global_entry_stubs): New function.
492 (ppc64_elf_build_stubs): Call build_global_entry_stubs. Adjust
493 glink sizing.
494 (ppc64_elf_relocate_section): Tidy plt16/32/64 reloc code.
495 (ppc64_elf_finish_dynamic_symbol): For ELFv2, adjust symbols
496 defined on plt code.
497
cacce40b
AM
4982013-11-02 Alan Modra <amodra@gmail.com>
499
500 * opncls.c (_bfd_new_bfd): Don't init vars already zeroed.
501
8b974ba3
AM
5022013-11-02 Alan Modra <amodra@gmail.com>
503
504 * elf64-ppc.c (ppc64_elf_next_input_section): Always set toc_off
505 to value for object file.
506
86e0565d
RM
5072013-11-01 Roland McGrath <mcgrathr@google.com>
508
509 * elf-nacl.c (segment_eligible_for_headers): Drop requirement that
510 some section have SEC_HAS_CONTENTS set. It's not set for
511 .note.gnu.build-id, and a segment of only read-only SHT_NOBITS
512 sections is implausible and not really supportable anyway.
513
e8910a83
AM
5142013-10-30 Alan Modra <amodra@gmail.com>
515
516 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Use new DT_PPC_OPT
517 tag to specify tls optimisation.
518 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
519 (ppc64_elf_finish_dynamic_sections): Specify whether multiple
520 toc pointers are used via DT_PPC64_OPT.
521
a078d95a
AM
5222013-10-30 Alan Modra <amodra@gmail.com>
523
524 * elf64-ppc.c (STK_LR, STK_TOC, STK_LINKER): Define.
525 (savegpr0_tail, restgpr0_tail, savefpr0_tail, restfpr0_tail)
526 build_plt_stub, build_tls_get_addr_stub, ppc_build_one_stub,
527 ppc64_elf_relocate_section): Use new defines.
528
b9e5796b
AM
5292013-10-30 Alan Modra <amodra@gmail.com>
530
531 * elf64-ppc.c (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE): Add htab
532 parameter and adjust for ELFv2. Update all uses.
533 (PLT_CALL_STUB_SIZE): Delete.
534 (ppc64_elf_get_synthetic_symtab): Support new glink layout.
535 (allocate_dynrelocs): Likewise.
536 (plt_stub_size, build_plt_stub): Adjust for ELFv2.
537 (get_r2off): Return 0 for ELFv2 -R.
538 (ppc_build_one_stub, ppc_size_one_stub): Adjust for ELFv2.
539 (ppc64_elf_size_stubs): Likewise.
540 (ppc64_elf_build_stubs): Add new ELFv2 glink.
541
6911b7dc
AM
5422013-10-30 Alan Modra <amodra@gmail.com>
543 Ulrich Weigand <uweigand@de.ibm.com>
544
545 * elf64-ppc.c (struct ppc_stub_hash_entry): Add "other".
546 (stub_hash_newfunc): Init new ppc_stub_hash_entry field, and one
547 we forgot, "plt_ent".
548 (ppc64_elf_add_symbol_hook): Check ELFv1 objects don't have
549 st_other bits only valid in ELFv2.
550 (ppc64_elf_merge_symbol_attribute): New function.
551 (ppc_type_of_stub): Add local_off param to test branch range.
552 (ppc_build_one_stub): Adjust destinations for ELFv2 locals.
553 (ppc_size_one_stub, toc_adjusting_stub_needed): Similarly.
554 (ppc64_elf_size_stubs): Pass local_off to ppc_type_of_stub.
555 Set "other" field.
556 (ppc64_elf_relocate_section): Adjust destination for ELFv2 local
557 calls.
558
ee67d69a
AM
5592013-10-30 Alan Modra <amodra@gmail.com>
560
561 * elf64-ppc.c (abiversion, set_abiversion): New functions.
562 (ppc64_elf_get_synthetic_symtab): Handle ELFv2 objects without .opd.
563 (struct ppc_link_hash_table): Add opd_abi.
564 (ppc64_elf_check_relocs): Check no .opd with ELFv2.
565 (ppc64_elf_merge_private_bfd_data): New function.
566 (ppc64_elf_print_private_bfd_data): New function.
567 (ppc64_elf_tls_setup): Set htab->opd_abi.
568 (ppc64_elf_size_dynamic_sections): Don't emit OPD related dynamic
569 tags for ELFv2.
570 (ppc_build_one_stub): Use R_PPC64_IRELATIVE for ELFv2 ifunc.
571 (ppc64_elf_finish_dynamic_symbol): Likewise
572
71a39c98
AM
5732013-10-30 Alan Modra <amodra@gmail.com>
574
575 * elf64-ppc.c (build_plt_stub): Switch stubs to use r11 as base
576 reg and r12 as destination.
577 (ppc_build_one_stub): Likewise.
578 (ppc64_elf_build_stubs): Likewise for glink.
579
f9c6b907
AM
5802013-10-30 Alan Modra <amodra@gmail.com>
581
582 * reloc.c (BFD_RELOC_PPC64_ADDR16_HIGH, BFD_RELOC_PPC64_ADDR16_HIGHA,
583 BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA,
584 BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA): New.
585 * elf64-ppc.c (ppc64_elf_howto_raw): Add entries for new relocs.
586 Make all _HA and _HI relocs report signed overflow.
587 (ppc64_elf_reloc_type_lookup): Handle new relocs.
588 (must_be_dyn_reloc, ppc64_elf_check_relocs): Likewise.
589 (dec_dynrel_count, ppc64_elf_relocate_section): Likewise.
590 (ppc64_elf_relocate_section): Don't apply 0x8000 adjust to
591 R_PPC64_TPREL16_HIGHER, R_PPC64_TPREL16_HIGHEST,
592 R_PPC64_DTPREL16_HIGHER, and R_PPC64_DTPREL16_HIGHEST.
593 * libbfd.h: Regenerate.
594 * bfd-in2.h: Regenerate.
595
70cc877f
RM
5962013-10-29 Roland McGrath <mcgrathr@google.com>
597
598 * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Correct 9-byte nop
599 sequence to match what the assembler generates.
600
34a79995
JB
6012013-10-29 Jan Beulich <jbeulich@suse.com>
602
603 * elflink.c (struct elf_outext_info): Add field file_sym_done.
604 (bfd_elf_final_link): Initialize new field. Move fake STT_FILE
605 symbol emission from here ...
606 (elf_link_output_extsym): ... to here.
607
240d6706
NC
6082013-10-24 Nick Clifton <nickc@redhat.com>
609
610 PR binutils/15994
611 * dwarf2.c (lookup_address_in_line_info_table): Change return type
612 to be the range of addresses covered by the table.
613 (comp_unit_find_nearest_line): Likewise.
614 (find_line): Search all CUs. Select the one that matches and
615 covers the smallest address range.
616
6dd38d79
HPN
6172013-10-18 Hans-Peter Nilsson <hp@axis.com>
618
619 * elf32-cris.c (cris_elf_check_relocs): Don't assume
620 a registered dynobj means that a .got has been created.
621
fb8a5684
AM
6222013-10-17 Alan Modra <amodra@gmail.com>
623
624 PR 16056
625 * elf.c (copy_elf_program_header): Only consider SEC_ALLOC sections
626 when finding lowest_section.
627
b60bf9be
CF
6282013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
629
630 * elfxx-mips.c (mips_elf_obj_tdata): Add abi_msa_bfd.
631 (mips_elf_merge_obj_attributes): Set abi_msa_bfd to the first object
632 file that has a Tag_GNU_MIPS_ABI_MSA attribute.
633 Merge Tag_GNU_MIPS_ABI_MSA attributes.
634
b2e951ec
NC
6352013-10-14 Nick Clifton <nickc@redhat.com>
636
637 * gen-aout.c (main): Fix formatting. Close file.
638
c5d6fa44
RS
6392013-10-13 Richard Sandiford <rdsandiford@googlemail.com>
640
641 * elfxx-mips.c (mips_use_local_got_p): New function.
642 (mips_elf_count_got_symbols, mips_elf_calculate_relocation): Use it.
643 (_bfd_mips_elf_check_relocs): Set pointer_equality_needed for
644 GOT and absolute references.
645
0e4894b9
RM
6462013-10-09 Roland McGrath <mcgrathr@google.com>
647
9a757e4d
RM
648 * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Cast switch
649 expression to int to silence over-eager compiler warnings.
650
1c1479bf
RM
651 * xcofflink.c (_bfd_xcoff_bfd_final_link): Don't touch EREL in
652 loop that doesn't use (or initialize) it.
653
0e4894b9
RM
654 * elfxx-tilegx.c (tilegx32_plt_tail_entry, tilegx32_plt_tail_entry):
655 Move second const qualifier so it applies to the pointer.
656
b707aa49
NC
6572013-10-09 Nick Clifton <nickc@redhat.com>
658
659 PR binutils/16022
660 * elf32-rx.c (rx_dump_symtab): Add missing break statements.
661
6e114b15
TT
6622013-10-09 Tom Tromey <tromey@redhat.com>
663
664 * opncls.c (get_alt_debug_link_info_shim): Update type of 'len'.
665
6d490cdb
NC
6662013-10-09 Nick Clifton <nickc@redhat.com>
667
668 PR ld/16021
669 * elf32-rl78.c (rl78_dump_symtab): Delete.
670 (rl78_get_reloc): Delete.
671
acd13123
TT
6722013-10-09 Tom Tromey <tromey@redhat.com>
673
674 * bfd-in2.h: Rebuild.
675 * opncls.c (bfd_get_alt_debug_link_info): Change type of
676 buildid_len to bfd_size_type.
677
86879d88
SDJ
6782013-10-09 Sergio Durigan Junior <sergiodj@redhat.com>
679
680 PR binutils/15993
681 * elf32-m32c.c (dump_symtab): Add missing "break;" statement on each
682 "case". Reindent "switch" statements.
683
dc294be5
TT
6842013-10-08 Tom Tromey <tromey@redhat.com>
685
686 * bfd-in2.h: Rebuild.
687 * opncls.c (bfd_get_alt_debug_link_info): Add buildid_len
688 parameter. Change type of buildid_out. Update.
689 (get_alt_debug_link_info_shim): New function.
690 (bfd_follow_gnu_debuglink): Use it.
691
5bb7df2e
AS
6922013-10-08 Andreas Schwab <schwab@suse.de>
693
694 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Add DT_DEBUG also
695 for PIE executables.
696
e0eebf97
JBG
6972013-10-04 Jan-Benedict Glaw <jbglaw@lug-owl.de>
698
699 * configure: Regenerate.
700
1419bbe5
WN
7012013-10-03 Will Newton <will.newton@linaro.org>
702
703 * configure: Regenerate.
704 * configure.in: Build elf-ifunc.o for AArch64.
705 * elfnn-aarch64.c: Include objalloc.h.
706 (elfNN_aarch64_local_htab_hash): New function.
707 (elfNN_aarch64_local_htab_eq): New function.
708 (elfNN_aarch64_get_local_sym_hash): New function.
709 (elfNN_aarch64_link_hash_table_create): Initialize local STT_GNU_IFUNC
710 symbol hash.
711 (elfNN_aarch64_hash_table_free): Free local STT_GNU_IFUNC symbol hash.
712 (elfNN_aarch64_final_link_relocate): Add sym argument. Add support
713 for handling STT_GNU_IFUNC symbols.
714 (elfNN_aarch64_gc_sweep_hook): Add support for garbage collecting
715 references to STT_GNU_IFUNC symbols.
716 (elfNN_aarch64_adjust_dynamic_symbol): Add support for handling
717 STT_GNU_IFUNC symbols.
718 (elfNN_aarch64_check_relocs): Add support for handling STT_GNU_IFUNC
719 symbols. Ensure we don't increase plt.refcount from -1 to 0.
720 (elfNN_aarch64_post_process_headers): Call _bfd_elf_set_osabi.
721 (elfNN_aarch64_is_function_type): Remove function.
722 (elfNN_aarch64_allocate_dynrelocs): Handle STT_GNU_IFUNC symbols.
723 (elfNN_aarch64_allocate_ifunc_dynrelocs): New function.
724 (elfNN_aarch64_allocate_local_dynrelocs): New function.
725 (elfNN_aarch64_allocate_local_ifunc_dynrelocs): New function.
726 (elfNN_aarch64_size_dynamic_sections): Call
727 elfNN_aarch64_allocate_local_dynrelocs.
728 (elfNN_aarch64_create_small_pltn_entry): Add info argument.
729 Add support for creating .iplt entries for STT_GNU_IFUNC symbols.
730 (elfNN_aarch64_finish_dynamic_symbol): Add support for handling
731 STT_GNU_IFUNC symbols and .iplt.
732 (elfNN_aarch64_finish_local_dynamic_symbol): New function.
733 (elfNN_aarch64_finish_dynamic_sections): Call
734 elfNN_aarch64_finish_local_dynamic_symbol.
735
cbb2b07e
NC
7362013-09-30 Nick Clifton <nickc@redhat.com>
737
738 * cpu-msp430.c: Use printable names that match the values
739 displayed by readelf.
740
4e8516b2
AP
7412013-08-25 Andrew Pinski <apinski@cavium.com>
742
743 * elfnn-aarch64.c (TCB_SIZE): Base on the ARCH_SIZE rather than a
744 fixed size of 16.
745
2f9efdfc
RS
7462013-09-24 Gregory Fong <gregory.0xf0@gmail.com>
747
748 * elfxx-mips.c (mips_elf_create_got_section): Hide
749 _GLOBAL_OFFSET_TABLE_.
750
91ea67ca
AM
7512013-09-24 Alan Modra <amodra@gmail.com>
752
753 * elf32-mips.c (ELF_OSABI): Undef for vxworks.
754
8a865bcb
AM
7552013-09-24 Alan Modra <amodra@gmail.com>
756
757 * syms.c (_bfd_stab_section_find_nearest_line): Ignore partial
758 stabs at end of .stab. Tidy variable usage. Don't drop the need
759 for a NULL function name stab if If N_FUN stab is ignored.
760 Ensure index entry count loop matches write loop.
761
cc9afea3
AM
7622013-09-20 Alan Modra <amodra@gmail.com>
763
764 * configure: Regenerate.
765
bc080e94
TG
7662013-09-18 Tristan Gingold <gingold@adacore.com>
767
768 * configure.in: Bump version to 2.24.51
769 * configure: Regenerate.
770
5baf5e34
SE
7712013-09-17 Doug Gilmore <Doug.Gilmore@imgtec.com>
772
773 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): Handle
774 EF_MIPS_FP64.
775
29bff3ea
DA
7762013-08-31 John David Anglin <dave.anglin@bell.net>
777
778 * elf64-hppa.c (elf_hppa_final_link_relocate): Add missing '%' to
779 format string.
780
5c98a14e
JJ
7812013-08-29 Jakub Jelinek <jakub@redhat.com>
782
783 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Allow
784 64-bit -mcmodel=large -fpic TLS GD and LD sequences.
785 (elf_x86_64_relocate_section): Handle -mcmodel=large -fpic
786 TLS GD and LD sequences in GD->LE, GD->IE and LD->LE transitions.
787
e5034e59
AM
7882013-08-27 Alan Modra <amodra@gmail.com>
789
790 * elf-bfd.h (struct elf_backend_data): Remove as_needed_cleanup.
791 Add notice_as_needed.
792 * elf64-ppc.c (elf_backend_as_needed_cleanup): Don't define.
793 (elf_backend_notice_as_needed): Define.
794 (ppc64_elf_as_needed_cleanup): Rename and adjust..
795 (ppc64_elf_notice_as_needed): ..to this.
796 * elflink.c (_bfd_elf_notice_as_needed): New function, extracted..
797 (elf_link_add_object_symbols): ..from here.
798 * elfxx-target.h (elf_backend_as_needed_cleanup): Don't define.
799 (elf_backend_notice_as_needed): Define..
800 (elfNN_bed): ..and use here.
801
1098fd41
RM
8022013-08-26 Roland McGrath <mcgrathr@google.com>
803
804 * archures.c (bfd_mach_i386_nacl, bfd_mach_i386_i386_nacl): New macros.
805 (bfd_mach_x86_64_nacl, bfd_mach_x64_32_nacl): New macros.
806 * cpu-i386.c (bfd_arch_i386_onebyte_nop_fill): New function.
807 (bfd_i386_nacl_arch): New variable.
808 (bfd_x86_64_nacl_arch, bfd_x64_32_nacl_arch): New variables.
809 (bfd_x64_32_arch_intel_syntax): Link them into the list.
810 * bfd-in2.h: Regenerate.
811
887badb3
RM
8122013-08-26 Roland McGrath <mcgrathr@google.com>
813
814 * elf-nacl.c (nacl_modify_segment_map): Fix logic reordering the
815 elf_segment_map list. If an executable segment is page-aligned
816 but does not end with a full page, then append a fake section into
817 the segment map entry that pads out the page.
818 (nacl_final_write_processing): New function. Write the code fill
819 laid out in nacl_modify_segment_map.
820 * elf-nacl.h: Declare it.
821 * elf32-arm.c (elf32_arm_nacl_final_write_processing): New function.
822 (elf_backend_final_write_processing): Define it for NaCl backend.
823 * elf32-i386.c (elf_backend_final_write_processing): Likewise.
824 * elf64-x86-64.c (elf_backend_final_write_processing): Likewise.
825
826 * elf-nacl.c (segment_eligible_for_headers): Rename MAXPAGESIZE
827 parameter to MINPAGESIZE.
828 (nacl_modify_segment_map): Use minpagesize instead of maxpagesize.
829
830 * elf32-arm.c (ELF_MINPAGESIZE, ELF_COMMONPAGESIZE): #undef for NaCl.
831
387f8054
MR
8322013-08-24 Maciej W. Rozycki <macro@linux-mips.org>
833
834 * elf32-tilepro.c (tilepro_elf_finish_dynamic_sections): Don't
835 set GOT's entry size if there is no ELF section data.
836 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
837 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections):
838 Likewise.
839
f8222080
L
8402013-08-23 H.J. Lu <hongjiu.lu@intel.com>
841
842 * elf64-x86-64.c (get_elf_x86_64_arch_data): New.
843 (get_elf_x86_64_backend_data): Use it.
844 (elf_x86_64_size_dynamic_sections): Likewise.
845
9aff4b7a
NC
8462013-08-23 Yuri Chornoivan <yurchor@ukr.net>
847
848 PR binutils/15834
849 * bfdio.c: Fix typos.
850 * elf32-spu.c: Likewise.
851 * elfnn-aarch64.c: Likewise.
852
2eea2440
TG
8532013-08-21 Tristan Gingold <gingold@adacore.com>
854
855 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Also count
856 .ovrflo sections.
857 * coffcode.h (coff_compute_section_file_positions): Force
858 match between file offset and vma offset.
859
934bce08
AM
8602013-08-21 Alan Modra <amodra@gmail.com>
861
862 * elflink.c (_bfd_elf_merge_symbol): Set *poldbfd, *poldweak,
863 and *poldalignment before exiting when !relocs_compatible.
864
00b7642b
AM
8652013-08-21 Alan Modra <amodra@gmail.com>
866
867 * elflink.c (_bfd_elf_define_linkage_sym): Don't set STV_INTERNAL
868 symbols to STV_HIDDEN.
869
62c34db3
NC
8702013-08-14 John Tytgat <john@bass-software.com>
871
872 PR ld/15787
873 * elf32-arm.c (elf32_arm_final_link_relocate): Use origin of output
874 segment containing the relocating symbol instead of assuming 0 for
875 sb group relocations.
876
4046d87a
NC
8772013-08-09 Nick Clifton <nickc@redhat.com>
878
879 * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if G10
880 flag bits do not match.
881 (rl78_elf_print_private_bfd_data): Describe G10 flag.
882
13896403
RS
8832013-08-05 John Tytgat <john@bass-software.com>
884
885 * po/BLD-POTFILES.in: Regenerate.
886 * po/SRC-POTFILES.in: Likewise.
887
31a91d61
NC
8882013-07-31 John Tytgat <john@bass-software.com>
889
890 PR ld/15787
891 * elf32-arm.c (elf32_arm_final_link_relocate): Base SB on the
892 output section VMA.
893
a505d7ac
MR
8942013-07-28 Maciej W. Rozycki <macro@linux-mips.org>
895
896 * elf64-hppa.c (elf64_hppa_finish_dynamic_sections)
897 <DT_HP_LOAD_MAP>: Return unsuccessfully if there's no `.data'
898 section.
899
0608afa7
AP
9002013-07-27 Andrew Pinski <apinski@cavium.com>
901
902 * elfnn-aarch64.c (elfNN_aarch64_check_relocs):
903 Use the correct alignment for
904 _bfd_elf_make_dynamic_reloc_section for ILP32.
905
54757ed1
AP
9062013-07-27 Andrew Pinski <apinski@cavium.com>
907
908 * elfnn-aarch64.c (elfNN_aarch64_howto_from_bfd_reloc): Handle
909 BFD_RELOC_AARCH64_NONE explicitly.
910
f6518c48
MR
9112013-07-27 Maciej W. Rozycki <macro@linux-mips.org>
912
913 * elf32-vax.c (elf_vax_finish_dynamic_sections): Don't set GOT's
914 entry size if there is no ELF section data.
915
125b5bac
MR
9162013-07-27 Maciej W. Rozycki <macro@linux-mips.org>
917
918 * elf32-vax.c (elf_vax_check_relocs) <R_VAX_GOT32, R_VAX_PLT32>:
919 Don't check symbol visibility here. Remove a check already
920 asserted for.
921 (elf_vax_instantiate_got_entries): Use SYMBOL_REFERENCES_LOCAL
922 instead of individual checks.
923 (elf_vax_relocate_section) <R_VAX_GOT32, R_VAX_PLT32>: Only
924 check the offset to decide if produce a GOT or PLT entry.
925 Remove redundant assertions. Remove code to produce GOT entries
926 for local symbols. Remove a duplicate comment and add a comment
927 on GOT relocations.
928 (elf_vax_finish_dynamic_symbol): Remove code to produce RELATIVE
929 dynamic relocs.
930
49d01bf6
MR
9312013-07-27 Maciej W. Rozycki <macro@linux-mips.org>
932
933 * elf32-vax.c (elf_vax_always_size_sections): Correct a comment
934 typo.
935
fac3d241
MR
9362013-07-27 Maciej W. Rozycki <macro@linux-mips.org>
937
938 * elf32-vax.c (elf_vax_discard_got_entries): New function.
939 (elf_vax_always_size_sections): Likewise.
940 (elf_vax_size_dynamic_sections): Remove code moved to
941 elf_vax_always_size_sections. Make comment on
942 elf_vax_instantiate_got_entries match reality.
943 (elf_vax_instantiate_got_entries): Assert that rather than check
944 if dynobj is null. Don't check for dynamic_sections_created.
945 Make function description match reality.
946 (elf_backend_always_size_sections): New macro.
947
729eabd5
AM
9482013-07-25 Alan Modra <amodra@gmail.com>
949
950 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Replace opd_relocs
951 with a union.
952 (opd_entry_value): Cache .opd section contents.
953 (ppc64_elf_relocate_section): Adjust.
954
db6a5d5f
AM
9552013-07-25 Alan Modra <amodra@gmail.com>
956
957 PR ld/15762
958 PR ld/12761
959 * elflink.c (elf_link_add_object_symbols): Correct test in
960 last patch. Remove unnecessary code.
961
7fa9fcb6
TG
9622013-07-24 Tristan Gingold <gingold@adacore.com>
963
964 * coff-rs6000.c (xcoff_howto_table): Fix masks and pc_relative for
965 R_RBR. Add numbers in comments.
966 (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_PPC_B16.
967 * coff64-rs6000.c: Likewise.
968
436e1eba
AM
9692013-07-20 Alan Modra <amodra@gmail.com>
970
971 PR ld/15762
972 PR ld/12761
973 * elflink.c (elf_link_add_object_symbols): Don't clobber
974 .gnu.warning.symbol sections when shared.
975
ee181c72
NC
9762013-07-19 Nick Clifton <nickc@redhat.com>
977
978 * elf32-rx.c (rx_elf_relocate_section): Fix typo: move
979 saw_subtract from R_RX_OPdiv to R_RX_OPneg.
980
df301bfc
NC
9812013-07-18 Travis Snoozy <quandary@remstate.com>
982
983 PR ld/15721
984 * elf32-msp430.c (R_MSP430_10_PCREL): Use 10-bit source and
985 destination masks.
986 * R_MSP430_2X_PCREL: Likewise.
987 * R_MSP430X_10_PCREL: Likewise.
988 * R_MSP430X_2X_PCREL: Likewise.
989
39f21624
NC
9902013-07-18 Terry Guo <terry.guo@arm.com>
991
00b7642b 992 * elf32-arm.c (arm_type_of_stub): Don't use ST_BRANCH_TO_ARM for
39f21624 993 thumb only targets.
00b7642b 994 (elf32_arm_final_link_relocate): Likewise.
39f21624 995
671a6cbe
NC
9962013-07-18 Bill Neubauer <wcn@google.com>
997
998 * mach-o.c (mach_o_section_name_xlat dw): Add entry for
999 .debug_gdb_scripts
1000
7a89b94e
NC
10012013-07-18 Roland McGrath <mcgrathr@google.com>
1002
1003 * elf32-arm.c (elf32_arm_stub_long_branch_arm_nacl): New variable.
1004 (elf32_arm_stub_long_branch_arm_nacl_pic): New variable.
1005 (arm_build_one_stub): Increase MAXRELOCS to 3.
1006 (arm_type_of_stub): Use them if GLOBALS->nacl_p.
1007 (struct elf32_arm_link_hash_table): Give add_stub_section member's
1008 pointee type a third argument.
1009 (elf32_arm_create_or_find_stub_sec): Update caller.
1010 (elf32_arm_size_stubs): Update argument type.
1011 * bfd-in.h (elf32_arm_size_stubs): Update decl.
1012 * bfd-in2.h: Regenerate.
1013 * libbfd.h: Regenerate.
1014
d929bc19
MR
10152013-07-15 Maciej W. Rozycki <macro@codesourcery.com>
1016
1017 * elfxx-mips.c (mips_elf_merge_obj_attributes): Replace hardcoded
1018 magic numbers with enum values.
1019
7e11d300
RM
10202013-07-12 Roland McGrath <mcgrathr@google.com>
1021
1022 * reloc.c: Add BFD_RELOC_390_PC12DBL, BFD_RELOC_390_PLT12DBL,
1023 BFD_RELOC_390_PC24DBL, BFD_RELOC_390_PLT24DBL (should have
1024 been added here with 2013-07-05 elf32-s390.c change).
1025 * bfd-in2.h: Regenerate (no-op).
1026 * libbfd.h: Regenerate (no-op).
1027
ba92f887
MR
10282013-07-12 Maciej W. Rozycki <macro@codesourcery.com>
1029
1030 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Handle
1031 EF_MIPS_NAN2008.
1032 (_bfd_mips_elf_print_private_bfd_data): Likewise.
1033
53452371
TG
10342013-07-09 Tristan Gingold <gingold@adacore.com>
1035
1036 * vms-alpha.c (struct vms_private_data_struct): Remove
1037 flag_hash_long_names and flag_show_after_trunc.
1038 (hash_string): Remove.
1039 (_bfd_vms_length_hash_symbol): Remove.
1040 (alpha_vms_write_exec): Remove call to _bfd_vms_length_hash_symbol.
1041 (_bfd_vms_write_egsd): Likewise. Rewrite condition.
1042 (_bfd_vms_write_ehdr): Remove code that set removed flags.
1043 (_bfd_vms_write_etir): Remove call to _bfd_vms_length_hash_symbol.
1044 (vms_bfd_is_local_label_name): Remove trace call.
1045
787548c8
TG
10462013-07-09 Tristan Gingold <gingold@adacore.com>
1047
1048 * hosts/alphavms.h: Include config.h and ansidecl.h, remove useless
1049 macros.
1050 * configure.com: Adjust to match changes in configure.
1051 * makefile.vms (OBJS): Update list.
1052
2d63fb6c
TG
10532013-07-05 Tristan Gingold <gingold@adacore.com>
1054
1055 * coffcode.h (coff_write_object_contents): Use ".ovrflo" name for
1056 overflow sections.
1057
fb798c50
AK
10582013-07-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1059
1060 * elf32-s390.c: Add new relocation definitions R_390_PC12DBL,
1061 R_390_PLT12DBL, R_390_PC24DBL, and R_390_PLT24DBL.
1062 (elf_s390_reloc_type_lookup, elf_s390_check_relocs)
1063 (elf_s390_gc_sweep_hook, elf_s390_relocate_section): Support new
1064 relocations.
1065 * elf64-s390.c: See elf32-s390.c
1066 * bfd-in2.h: Add new relocs to enum bfd_reloc_code_real.
1067 * libbfd.h: Add new reloc strings.
1068
7bcccb57
MS
10692013-07-03 Marcus Shawcroft <marcus.shawcroft@arm.com>
1070
1071 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reorder case
1072 values.
1073 (elfNN_aarch64_relocate_section): Likewise.
1074 (elfNN_aarch64_gc_sweep_hook): Likewise.
1075 (elfNN_aarch64_check_relocs): Likewise.
1076
5295321c
AM
10772013-07-03 Alan Modra <amodra@gmail.com>
1078
1079 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't hide .TOC.
1080 when relocatable. Don't change root.type or type here.
1081 (ppc64_elf_set_toc): Set type of .TOC. to STT_OBJECT.
1082
ba8ca3e7
AM
10832013-07-03 Alan Modra <amodra@gmail.com>
1084
1085 * elf64-ppc.c (struct ppc_stub_hash_entry): Delete "addend".
1086 (ppc64_elf_size_stubs): Don't set "addend".
1087 (ppc64_elf_relocate_section): Don't allow calls via
1088 toc-adjusting stubs without a following nop even in an
1089 executable, except for self-calls and both libc_start_main
1090 and .libc_start_main.
1091
c66bb0ee
AM
10922013-07-03 Alan Modra <amodra@gmail.com>
1093
1094 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Hide ".TOC.".
1095
d5be367d
TG
10962013-07-02 Tristan Gingold <gingold@adacore.com>
1097
1098 * coff-rs6000.c (xcoff_find_nearest_line_discriminator): Add missing
1099 line.
1100
9a1ada6c
TG
11012013-07-02 Tristan Gingold <gingold@adacore.com>
1102
b1a49096
TG
1103 * vms-alpha.c (_bfd_generic_find_nearest_line_discriminator): Define.
1104 (_bfd_vms_find_nearest_line_discriminator): New function.
1105
11062013-07-02 Tristan Gingold <gingold@adacore.com>
c66bb0ee 1107
9a1ada6c
TG
1108 * coff-rs6000.c (xcoff_create_csect_from_smclas): Handle more smclas.
1109
a685c4e6
TG
11102013-07-02 Tristan Gingold <gingold@adacore.com>
1111
1112 * coff-rs6000.c (xcoff_find_nearest_line_discriminator): New function.
1113 (rs6000coff_vec): Reference it.
1114
cc0efaa8
MS
11152013-07-02 Marcus Shawcroft <marcus.shawcroft@arm.com>
1116
1117 * elfnn-aarch64.c (aarch64_elf_create_got_section): New.
1118 (elfNN_aarch64_check_relocs): Use aarch64_elf_create_got_section.
1119 (elfNN_aarch64_create_dynamic_sections): Do not define
1120 _GLOBAL_OFFSET_TABLE_; call aarch64_elf_create_got_section.
1121
f40da81b
AM
11222013-07-02 Alan Modra <amodra@gmail.com>
1123
1124 * elf64-ppc.c (ppc64_elf_relocate_section): Set "relocation" for
1125 .TOC. after relocatable check.
1126
1c865ab2
AM
11272013-07-01 Alan Modra <amodra@gmail.com>
1128
1129 * elf64-ppc.h (ppc64_elf_toc): Delete.
1130 (ppc64_elf_set_toc): Declare.
1131 * elf64-ppc.c (ppc64_elf_toc_reloc): Replace call to ppc64_elf_toc
1132 with call the ppc64_elf_set_toc.
1133 (ppc64_elf_toc_ha_reloc, ppc64_elf_toc64_reloc): Likewise.
1134 (ppc64_elf_start_multitoc_partition): Likewise.
1135 (struct ppc_link_hash_table): Delete dot_toc_dot. Replace all uses
1136 with elf.hgot.
1137 (ppc64_elf_process_dot_syms): Don't make a fake function descriptor
1138 for ".TOC.".
1139 (ppc64_elf_check_relocs): Mark sections with a reference to .TOC.
1140 as needing a toc pointer.
1141 (ppc64_elf_size_stubs): Don't set dot_toc_dot here.
1142 (ppc64_elf_set_toc): Rename from ppc64_elf_toc. Add info param.
1143 Set elf.hgot value.
1144
a69ed7f7
L
11452013-06-28 H.J. Lu <hongjiu.lu@intel.com>
1146
1147 PR ld/15685
1148 * elf64-x86-64.c (elf_x86_64_relocate_section): Handle
1149 R_X86_64_DTPOFF64.
1150
c3b6407f
NC
11512013-06-28 Nick Clifton <nickc@redhat.com>
1152
1153 PR ld/15302
1154 * elf32-arm.c (allocate_dynrelocs_for_symbol): Revert previous patch.
1155
8db339a6
MS
11562013-06-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
1157
1158 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Reserve one slot
1159 in sgot.
1160 (elfNN_aarch64_finish_dynamic_sections): Place the &_DYNAMIC reference
1161 in sgot[0] rather than sgotplt[0].
1162
2d426575
YZ
11632013-06-26 Yufeng Zhang <yufeng.zhang@arm.com>
1164
1165 * Makefile.am (elf32-aarch64.c): Add a #line cpp directive at the
1166 beginning of the generated file.
1167 (elf64-aarch64.c): Likewise.
1168 * Makefile.in: Re-generated.
1169
caed7120
YZ
11702013-06-26 Yufeng Zhang <yufeng.zhang@arm.com>
1171
1172 * Makefile.am (BFD64_BACKENDS): Add elfxx-aarch64.c.
1173 (BFD64_BACKENDS_CFILES): Add elfxx-aarch64.lo.
1174 * Makefile.in: Re-generated.
1175 * configure.in (bfd_elf64_bigaarch64_vec): Add elfxx-aarch64.lo.
1176 (bfd_elf64_littleaarch64_vec): Likewise.
1177 (bfd_elf32_bigaarch64_vec): Likewise.
1178 (bfd_elf32_littleaarch64_vec): Likewise.
1179 * configure: Re-generated.
1180 * elfxx-aarch64.c: New file; split from elf64-aarch64.c.
1181 * elfxx-aarch64.h: New file.
1182 * elfnn-aarch64.c: Include "elfxx-aarch64.h"; move the following
1183 stuff to elfxx-aarch64.c.
1184 (bfd_elf_aarch64_put_addend): Removed.
1185 (PG_OFFSET, PG): Likewise.
1186 (elfNN_aarch64_small_plt0_entry): Support ELF32.
1187 (elfNN_aarch64_tlsdesc_small_plt_entry): Likewise.
1188 (elf64_aarch64_grok_prstatus): Removed.
1189 (elf_backend_grok_prstatus): Removed.
1190 (insn32): Likewise.
1191 (aarch64_unsigned_overflow): Likewise.
1192 (aarch64_signed_overflow): Likewise.
1193 (aarch64_resolve_relocation): Likewise.
1194 (MASK): Likewise.
1195 (decode_branch_ofs_26): Likewise.
1196 (decode_cond_branch_ofs_19): Likewise.
1197 (decode_ld_lit_ofs_19): Likewise.
1198 (decode_tst_branch_ofs_14): Likewise.
1199 (decode_movw_imm): Likewise.
1200 (decode_adr_imm): Likewise.
1201 (decode_add_imm): Likewise.
1202 (reencode_branch_ofs_26): Likewise.
1203 (reencode_cond_branch_ofs_19): Likewise.
1204 (reencode_ld_lit_ofs_19): Likewise.
1205 (reencode_tst_branch_ofs_14): Likewise.
1206 (reencode_movw_imm): Likewise.
1207 (reencode_adr_imm): Likewise.
1208 (reencode_ldst_pos_imm): Likewise.
1209 (reencode_add_imm): Likewise.
1210 (reencode_movzn_to_movz): Likewise.
1211 (reencode_movzn_to_movn): Likewise.
1212 (aarch64_relocate): Update to call the new function names in
1213 elfxx-aarch64.c.
1214 (aarch64_calculate_got_entry_vma): Likewise.
1215 (elfNN_aarch64_final_link_relocate): Likewise.
1216 (elf64_aarch64_update_plt_entry): Likewise; change the type of the
1217 parameter 'r_type' to bfd_reloc_code_real_type; rename to ...
1218 (elf_aarch64_update_plt_entry): ... this.
1219 (elfNN_aarch64_create_small_pltn_entry): Update.
1220 (elfNN_aarch64_init_small_plt0_entry): Remove plt_got_base; add
1221 bfd_vma plt_got_2nd_ent; update to call elf_aarch64_update_plt_entry.
1222 (elfNN_aarch64_finish_dynamic_sections): Add plt_entry; update to
1223 call elf_aarch64_update_plt_entry.
1224
a6bb11b2
YZ
12252013-06-26 Yufeng Zhang <yufeng.zhang@arm.com>
1226
1227 * bfd-in2.h: Re-generated.
1228 * elfnn-aarch64.c (HOWTO64, HOWTO32): New define.
1229 (IS_AARCH64_TLS_RELOC): Change to be based on the
1230 bfd reloc enumerators.
1231 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1232 (PG, PG_OFFSET): Cast literal to bfd_vma.
1233 (elf64_aarch64_howto_table): Removed.
1234 (elf64_aarch64_howto_dynrelocs): Removed.
1235 (elf64_aarch64_tls_howto_table): Removed.
1236 (elf64_aarch64_tlsdesc_howto_table): Removed.
1237 (elfNN_aarch64_howto_table): New table to host all howto entires..
1238 (R_AARCH64_*): Replaced by AARCH64_R (*) and AARCH64_R_STR (*).
1239 (elfNN_aarch64_bfd_reloc_from_howto): New function.
1240 (elfNN_aarch64_bfd_reloc_from_type): Ditto.
1241 (struct elf_aarch64_reloc_map): New.
1242 (elf_aarch64_reloc_map): New table.
1243 (elfNN_aarch64_howto_from_bfd_reloc): New function.
1244 (elfNN_aarch64_howto_from_type): Update to look up the new table
1245 elfNN_aarch64_howto_table.
1246 (struct elf64_aarch64_reloc_map): Remove.
1247 (elf64_aarch64_reloc_map): Remove.
1248 (elfNN_aarch64_reloc_type_lookup): Change to call
1249 elfNN_aarch64_howto_from_bfd_reloc.
1250 (elfNN_aarch64_reloc_name_lookup): Change to look up the new table
1251 elfNN_aarch64_howto_table.
1252 (aarch64_resolve_relocation): Refactor to switch on the bfd
1253 reloc enumerators.
1254 (bfd_elf_aarch64_put_addend): Likewise.
1255 (elfNN_aarch64_final_link_relocate): Likewise.
1256 (aarch64_tls_transition_without_check): Likewise.
1257 (aarch64_reloc_got_type): Likewise.
1258 (aarch64_can_relax_tls): Likewise.
1259 (aarch64_tls_transition): Likewise.
1260 (elfNN_aarch64_tls_relax): Likewise.
1261 (elfNN_aarch64_final_link_relocate): Likewise.
1262 (elfNN_aarch64_relocate_section): Likewise.
1263 (elfNN_aarch64_gc_sweep_hook): Likewise.
1264 (elfNN_aarch64_check_relocs): Likewise.
1265 (aarch64_tls_transition): Change to return a bfd reloc enumerator.
1266 * libbfd.h: Re-generated.
1267 * reloc.c: Re-order the AArch64 bfd reloc enumerators.
1268 (BFD_RELOC_AARCH64_RELOC_START)
1269 (BFD_RELOC_AARCH64_RELOC_END)
1270 (BFD_RELOC_AARCH64_LD_GOT_LO12_NC)
1271 (BFD_RELOC_AARCH64_LD32_GOT_LO12_NC)
1272 (BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC)
1273 (BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC)
1274 (BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC)
1275 (BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC)
1276 (BFD_RELOC_AARCH64_IRELATIVE): New relocs.
1277
cec5225b
YZ
12782013-06-26 Yufeng Zhang <yufeng.zhang@arm.com>
1279
1280 * Makefile.am (BFD64_BACKENDS): Add elf32-aarch64.lo.
1281 (BUILD_CFILES): Add elf32-aarch64.c.
1282 (elf32-aarch64.c): New rule for generating from elfnn-aarch64.c.
1283 * Makefile.in: Re-generated.
1284 * archures.c (bfd_mach_aarch64_ilp32): New define.
1285 * bfd-in.h (bfd_elf32_aarch64_init_maps): New declaration.
1286 (bfd_elf32_aarch64_set_options): Ditto.
1287 (elf32_aarch64_setup_section_lists): Ditto.
1288 (elf32_aarch64_next_input_section): Ditto.
1289 (elf32_aarch64_size_stubs): Ditto.
1290 (elf32_aarch64_build_stubs): Ditto.
1291 * bfd-in2.h: Re-generated.
1292 * config.bfd (aarch64-*-elf): Add bfd_elf32_littleaarch64_vec
1293 and bfd_elf32_bigaarch64_vec.
1294 (aarch64-*-linux*): Likewise.
1295 (aarch64_be-*-elf): Likewise.
1296 (aarch64_be-*-linux*): Likewise.
1297 * configure.in (bfd_elf32_bigaarch64_vec)
1298 (bfd_elf32_littleaarch64_vec): New.
1299 * configure: Re-generated.
1300 * cpu-aarch64.c (compatible): Don't allow mixing ilp32 objects with
1301 lp64 ones.
1302 (bfd_aarch64_arch_ilp32): New.
1303 (bfd_aarch64_arch): Link to bfd_aarch64_arch_ilp32.
1304 * elfnn-aarch64.c (ARCH_SIZE): New define.
1305 (AARCH64_R, AARCH64_R_STR, LOG_FILE_ALIGN): New defines.
1306 (GOT_ENTRY_SIZE): Re-define as (ARCH_SIZE / 8).
1307 (elf64_aarch64_*): Rename to elfNN_aarch64_*.
1308 (ELF64_R_*): Rename to ELFNN_R_*.
1309 Plus other paramaterization.
1310 * targets.c (bfd_elf32_bigaarch64_vec, bfd_elf32_littleaarch64_vec):
1311 New declarations.
1312 (_bfd_target_vector): Add bfd_elf32_bigaarch64_vec and
1313 bfd_elf32_littleaarch64_vec.
1314
81197114
YZ
13152013-06-26 Yufeng Zhang <yufeng.zhang@arm.com>
1316
1317 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-aarch64.c.
1318 (BUILD_CFILES): Add elf64-aarch64.c.
1319 (elf64-aarch64.c): New rule for generating from elfnn-aarch64.c.
1320 * Makefile.in: Re-generated.
1321 * elf64-aarch64.c: Rename to ...
1322 * elfnn-aarch64.c: ... this.
1323
833794fc
MR
13242013-06-25 Maciej W. Rozycki <macro@codesourcery.com>
1325 Paul Brook <paul@codesourcery.com>
1326
1327 * elfxx-mips.h (_bfd_mips_elf_insn32): New prototype.
1328 * elfxx-mips.c (mips_elf_link_hash_table): Add insn32 member.
1329 (STUB_MOVE32_MICROMIPS, STUB_JALR32_MICROMIPS): New macros.
1330 (MICROMIPS_INSN32_FUNCTION_STUB_NORMAL_SIZE): Likewise.
1331 (MICROMIPS_INSN32_FUNCTION_STUB_BIG_SIZE): Likewise.
1332 (micromips_insn32_o32_exec_plt0_entry): New variable.
1333 (micromips_insn32_o32_exec_plt_entry): Likewise.
1334 (_bfd_mips_elf_adjust_dynamic_symbol): Handle insn32 mode.
1335 (mips_elf_estimate_stub_size): Likewise.
1336 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1337 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1338 (mips_finish_exec_plt): Likewise.
1339 (_bfd_mips_elf_relax_section): Likewise.
1340 (_bfd_mips_elf_insn32): New function.
1341 (_bfd_mips_elf_get_synthetic_symtab): Handle insn32 PLT.
1342
1bbce132
MR
13432013-06-24 Maciej W. Rozycki <macro@codesourcery.com>
1344
1345 * elfxx-mips.h (_bfd_mips_elf_get_synthetic_symtab): New
1346 prototype.
1347 * elf32-mips.c (elf_backend_plt_sym_val): Remove macro.
1348 (bfd_elf32_get_synthetic_symtab): New macro.
1349 * elfxx-mips.c (plt_entry): New structure.
1350 (mips_elf_link_hash_entry): Add use_plt_entry member.
1351 (mips_elf_link_hash_table): Rename plt_entry_size member to
1352 plt_mips_entry_size. Add plt_comp_entry_size, plt_mips_offset,
1353 plt_comp_offset, plt_got_index entries and plt_header_is_comp
1354 members.
1355 (STUB_LW_MICROMIPS, STUB_MOVE_MICROMIPS): New macros.
1356 (STUB_LUI_MICROMIPS, STUB_JALR_MICROMIPS): Likewise.
1357 (STUB_ORI_MICROMIPS, STUB_LI16U_MICROMIPS): Likewise.
1358 (STUB_LI16S_MICROMIPS): Likewise.
1359 (MICROMIPS_FUNCTION_STUB_NORMAL_SIZE): Likewise.
1360 (MICROMIPS_FUNCTION_STUB_BIG_SIZE): Likewise.
1361 (micromips_o32_exec_plt0_entry): New variable.
1362 (mips16_o32_exec_plt_entry): Likewise.
1363 (micromips_o32_exec_plt_entry): Likewise.
1364 (mips_elf_link_hash_newfunc): Initialize use_plt_entry.
1365 (mips_elf_output_extsym): Update to use gotplt_union's plist
1366 member rather than offset.
1367 (mips_elf_gotplt_index): Likewise. Remove the VxWorks
1368 restriction. Use MIPS_ELF_GOT_SIZE to calculate GOT address.
1369 (mips_elf_count_got_symbols): Update to use gotplt_union's plist
1370 member rather than offset.
1371 (mips_elf_calculate_relocation): Handle MIPS16/microMIPS PLT
1372 entries.
1373 (_bfd_mips_elf_create_dynamic_sections): Don't set PLT sizes
1374 here.
1375 (mips_elf_make_plt_record): New function.
1376 (_bfd_mips_elf_check_relocs): Update comment. Record occurences
1377 of JAL relocations that might need a PLT entry.
1378 (_bfd_mips_elf_adjust_dynamic_symbol): Update to use
1379 gotplt_union's plist member rather than offset. Set individual
1380 PLT entry sizes here. Handle MIPS16/microMIPS PLT entries.
1381 Don't set the symbol's value in the symbol table for PLT
1382 references here. Don't set the PLT or PLT GOT section sizes
1383 here.
1384 (mips_elf_estimate_stub_size): Handle microMIPS stubs.
1385 (mips_elf_allocate_lazy_stub): Likewise.
1386 (mips_elf_lay_out_lazy_stubs): Likewise. Define a _MIPS_STUBS_
1387 magic symbol.
1388 (mips_elf_set_plt_sym_value): New function.
1389 (_bfd_mips_elf_size_dynamic_sections): Set PLT header size and
1390 PLT and PLT GOT section sizes here. Set the symbol values in
1391 the symbol table for PLT references here. Handle microMIPS
1392 annotation of the _PROCEDURE_LINKAGE_TABLE_ magic symbol.
1393 (_bfd_mips_elf_finish_dynamic_symbol): Update to use
1394 gotplt_union's plist member rather than offset. Handle
1395 MIPS16/microMIPS PLT entries. Handle microMIPS stubs.
1396 (_bfd_mips_vxworks_finish_dynamic_symbol): Update to use
1397 gotplt_union's plist member rather than offset. Use
1398 MIPS_ELF_GOT_SIZE to calculate GOT address.
1399 (mips_finish_exec_plt): Handle microMIPS PLT. Return status.
1400 (_bfd_mips_elf_finish_dynamic_sections): Handle result from
1401 mips_finish_exec_plt.
1402 (_bfd_mips_elf_link_hash_table_create): Update to use
1403 gotplt_union's plist member rather than offset.
1404 (_bfd_mips_elf_get_synthetic_symtab): New function.
1405
cd6d434c
NC
14062013-06-24 Wawa <caojinyu@msn.com>
1407
1408 PR 15657
1409 * hash.c (_bfd_stringtab_add): Copy the string if COPY is true.
1410
42429eac
RS
14112013-06-23 Richard Sandiford <rdsandiford@googlemail.com>
1412
1413 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Move MIPS ELF
1414 files to...
1415 (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): ...here.
1416 * Makefile.in: Regenerate.
1417 * config.bfd: Enclose all MIPS ELF targets in #ifdef BFD64.
1418 Set want64 to true for them at the end.
1419 * targets.c (_bfd_target_vector): Protect MIPS ELF targets with
1420 #ifdef BFD64.
1421
12d83431
SL
14222013-06-22 Sandra Loosemore <sandra@codesourcery.com>
1423
1424 * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Don't
1425 set sh_entsize for PLT section.
1426
b9eead84
YZ
14272013-06-20 Yufeng Zhang <yufeng.zhang@arm.com>
1428
1429 * bfd-in.h (bfd_elf64_aarch64_set_options): Add 'extern'.
1430 * bfd-in2.h: Re-generated.
1431 * elf64-aarch64.c (RELOC_SECTION): Removed.
1432 (SWAP_RELOC_IN, SWAP_RELOC_OUT): Ditto.
1433 (AARCH64_ELF_OS_ABI_VERSION): Ditto.
1434 (elf64_aarch64_link_hash_traverse): Ditto.
1435 (elf64_aarch64_size_stubs): Change 'Aarch64' to 'AArch64' in the
1436 comment.
1437
8847944f
WN
14382013-06-19 Will Newton <will.newton@linaro.org>
1439
1440 * configure: Regenerated.
1441 * configure.in: Remove aarch64 dependency on elf-ifunc.c.
1442 * elf64-aarch64.c: Remove objalloc.h include.
1443 (elf64_aarch64_howto_dynrelocs): Remove R_AARCH64_IRELATIVE howto.
1444 (struct elf64_aarch64_link_hash_table): Remove ifunc related
1445 members. (elf_aarch64_local_htab_hash): Remove function.
1446 (elf_aarch64_local_htab_eq): Remove function.
1447 (elf_aarch64_get_local_sym_hash): Remove function.
1448 (elf64_aarch64_link_hash_table_create): Remove local hash
1449 table initialization.
1450 (elf64_aarch64_final_link_relocate): Remove sym argument and
1451 handling of ifunc symbols.
1452 (elf64_aarch64_relocate_section): Don't pass sym argument to
1453 elf64_aarch64_final_link_relocate.
1454 (elf64_aarch64_gc_sweep_hook): Remove handling of ifunc symbols.
1455 (elf64_aarch64_adjust_dynamic_symbol): Likewise.
1456 (elf64_aarch64_check_relocs): Likewise.
1457 (elf64_aarch64_post_process_headers): Remove call to
1458 _bfd_elf_set_osabi.
1459 (elf64_aarch64_is_function_type): New function.
1460 (elf64_aarch64_allocate_dynrelocs): Remove handling of ifunc
1461 symbols. (elf_aarch64_allocate_local_dynrelocs): Remove function.
1462 (elf64_aarch64_size_dynamic_sections): Remove call to
1463 elf_aarch64_allocate_local_dynrelocs.
1464 (elf64_aarch64_create_small_pltn_entry): Remove info argument.
1465 Remove creation of R_AARCH64_IRELATIVE dynamic relocs.
1466 (elf64_aarch64_finish_dynamic_symbol): Remove handling of ifunc
1467 symbols. (elf_aarch64_finish_local_dynamic_symbol): Remove
1468 function. (elf64_aarch64_finish_dynamic_sections): Remove call to
1469 elf_aarch64_finish_local_dynamic_symbol.
1470 (elf64_aarch64_add_symbol_hook): Remove function.
1471
2532064a
YZ
14722013-06-14 Yufeng Zhang <yufeng.zhang@arm.com>
1473
1474 * elf64-aarch64.c (elf64_aarch64_final_link_relocate): Call
1475 aarch64_resolve_relocation and bfd_elf_aarch64_put_addend to
1476 handle the relocations of R_AARCH64_JUMP26, R_AARCH64_CALL26,
1477 R_AARCH64_LD64_GOT_LO12_NC, R_AARCH64_ADR_GOT_PAGE and
1478 R_AARCH64_GOT_LD_PREL19.
1479
2f47f5fc
NC
14802013-06-13 Terry Guo <terry.guo@arm.com>
1481
1482 PR ld/15302
1483 * elf32-arm.c (allocate_dynrelocs_for_symbol): Transform
1484 ST_BRANCH_TO_ARM into ST_BRANCH_TO_THUMB if the target only
1485 supports thumb instructions.
1486
34064ff3
DD
14872013-06-11 DJ Delorie <dj@redhat.com>
1488
1489 * elf32-rl78.c (rl78_elf_relocate_section): Fix OPsub math.
1490
3368874f
WN
14912013-06-11 Will Newton <will.newton@linaro.org>
1492
1493 * elf64-aarch64.c (elf_aarch64_get_local_sym_hash): Use
1494 ELF64_R_SYM instead of ELF32_R_SYM.
1495
47fc0f1f
NC
14962013-06-11 Nick Clifton <nickc@redhat.com>
1497
1498 * elf32-rl78.c (rl78_elf_finish_dynamic_sections): Onlly run
1499 checks if the dynamic sections have been created and relaxation
1500 has not been performed.
1501
692e2b8b
WN
15022013-06-07 Will Newton <will.newton@linaro.org>
1503
1504 * configure: Regenerate.
1505 * configure.in: Build elf-ifunc.o for AArch64.
1506 * elf64-aarch64.c: Include objalloc.h.
1507 (elf64_aarch64_howto_dynrelocs): Add R_AARCH64_IRELATIVE howto.
1508 (struct elf64_aarch64_link_hash_table): Add members for handling
1509 R_AARCH64_IRELATIVE relocations.
1510 (elf_aarch64_local_htab_hash): New function.
1511 (elf_aarch64_local_htab_eq): New function.
1512 (elf_aarch64_get_local_sym_hash): New function.
1513 (elf64_aarch64_link_hash_table_create): Initialize local STT_GNU_IFUNC
1514 symbol hash.
1515 (elf64_aarch64_hash_table_free): Free local STT_GNU_IFUNC symbol hash.
1516 (elf64_aarch64_final_link_relocate): Add sym argument. Add support
1517 for handling STT_GNU_IFUNC symbols.
1518 (elf64_aarch64_gc_sweep_hook): Add support for garbage collecting
1519 references to STT_GNU_IFUNC symbols.
1520 (elf64_aarch64_adjust_dynamic_symbol): Add support for handling
1521 STT_GNU_IFUNC symbols.
1522 (elf64_aarch64_check_relocs): Add support for handling STT_GNU_IFUNC
1523 symbols. Ensure we don't increase plt.refcount from -1 to 0.
1524 (elf64_aarch64_post_process_headers): Call _bfd_elf_set_osabi.
1525 (elf64_aarch64_is_function_type): Remove function.
1526 (elf64_aarch64_allocate_dynrelocs): Call
1527 _bfd_elf_allocate_ifunc_dyn_relocs for STT_GNU_IFUNC symbols.
1528 (elf_aarch64_allocate_local_dynrelocs): New function.
1529 (elf64_aarch64_size_dynamic_sections): Call
1530 elf_aarch64_allocate_local_dynrelocs. Initialize next_irelative_index.
1531 (elf64_aarch64_create_small_pltn_entry): Add info argument.
1532 Add support for creating .iplt entries for STT_GNU_IFUNC symbols.
1533 (elf64_aarch64_finish_dynamic_symbol): Add support for handling
1534 STT_GNU_IFUNC symbols and .iplt.
1535 (elf_aarch64_finish_local_dynamic_symbol): New function.
1536 (elf64_aarch64_finish_dynamic_sections): Call
1537 elf_aarch64_finish_local_dynamic_symbol.
1538 (elf64_aarch64_add_symbol_hook): New function.
1539
fa549f3b
AM
15402013-06-03 Alan Modra <amodra@gmail.com>
1541
1542 * syms.c (_bfd_stab_section_find_nearest_line): Add last_str
1543 var. Use it with last_stab.
1544
067ec077
CM
15452013-05-30 Paul Brook <paul@codesourcery.com>
1546
1547 * bfd-in2.h: Regenerate.
1548 * elf32-mips.c (elf_mips_eh_howto): New.
1549 (bfd_elf32_bfd_reloc_type_lookup ): Support BFD_RELOC_MIPS_EH.
1550 (bfd_elf32_bfd_reloc_name_lookup): Likewise.
1551 (mips_elf32_rtype_to_howto): Support R_MIPS_EH.
1552 * elf64-mips.c (elf_mips_eh_howto): New.
1553 (bfd_elf64_bfd_reloc_type_lookup): Support BFD_RELOC_MIPS_EH.
1554 (bfd_elf64_bfd_reloc_name_lookup): Likewise.
1555 (mips_elf64_rtype_to_howto): Support R_MIPS_EH.
1556 * libbfd.h: Regenerate.
1557 * reloc.c (BFD_RELOC_MIPS_EH): New.
1558
95e34fb4
NC
15592013-05-29 Nick Clifton <nickc@redhat.com>
1560
1561 * dwarf2.c (struct dwarf2_debug): Add fields for handling
1562 alternate debug info source.
1563 (dwarf_debug_sections): Add entries for alternate .debug_str and
1564 .debug_info sections.
1565 (dwarf_debug_section_enum): Likewise.
1566 (read_alt_indirect_string): New function. Handles a
1567 DW_FORM_GNU_strp_alt attribute.
1568 (read_alt_indirect_ref): New function. Handles a
1569 DW_FORM_GNU_ref_alt attribute.
1570 (read_attribute_value): Process DW_FORM_GNU_ref_alt and
1571 DW_FORM_GNU_strp_alt.
1572 (find_abstract_instance_name): Handle DW_FORM_GNU_ref_alt
1573 attributes.
1574 (_bfd_dwarf2_cleanup_debug_info): Free alternate debug info
1575 sources.
1576 * opncls.c (GNU_DEBUGALTLINK): Define.
1577 (bfd_get_alt_debug_link_info): New function.
1578 (separate_alt_debug_file_exists): New function.
1579 (find_separate_debug_file): Add parameters for fetch and check
1580 functions.
1581 (bfd_follow_gnu_debugaltlink): New function.
1582 * bfd-in2.h: Regenerate.
1583
418009c2
YZ
15842013-05-28 Yufeng Zhang <yufeng.zhang@arm.com>
1585
1586 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE): Rename to ...
1587 (BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21): ... this.
1588 (BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19): Rename to ...
1589 (BFD_RELOC_AARCH64_TLSDESC_LD_PREL19): ... this.
1590 * bfd-in2.h: Regenerate.
1591 * libbfd.h: Regenerate.
1592 * elf64-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Update to use
1593 the correct names.
1594 (elf64_aarch64_tlsdesc_howto_table): Likewise.
1595 (elf64_aarch64_reloc_map): Likewise.
1596 (aarch64_resolve_relocation): Likewise.
1597 (bfd_elf_aarch64_put_addend): Likewise.
1598 (aarch64_tls_transition_without_check): Likewise.
1599 (aarch64_reloc_got_type): Likewise.
1600 (elf64_aarch64_final_link_relocate): Likewise.
1601 (elf64_aarch64_tls_relax): Likewise.
1602 (elf64_aarch64_relocate_section): Likewise.
1603 (elf64_aarch64_gc_sweep_hook): Likewise.
1604 (elf64_aarch64_check_relocs): Likewise.
1605
9d782e8d
MW
16062013-05-26 Mark Wielaard <mjw@redhat.com>
1607
1608 * cache.c (BFD_CACHE_MAX_OPEN): Remove define.
1609 (max_open_files): New static int initialized to zero.
1610 (bfd_cache_max_open): New static function to set and return
1611 max_open_files.
1612 (bfd_cache_init): Use bfd_cache_max_open.
1613 (bfd_open_file): Likewise.
1614 * configure.in (AC_CHECK_HEADERS): Add sys/resource.h.
1615 (AC_CHECK_FUNCS): Add getrlimit.
1616 * configure: Regenerated.
1617 * config.in: Likewise.
1618 * sysdep.h: Check and include sys/resource.h for getrlimit.
1619
03ae2d5e
AM
16202013-05-23 Alan Modra <amodra@gmail.com>
1621
1622 * format.c (bfd_check_format_matches): Don't match a target in
1623 targ_selvecs if some other target is a better match. If
1624 targets implement match priority, fall back to the first of
1625 the best matches.
1626
ad3d9127
AM
16272013-05-22 Eric Herman <eric@freesa.org>
1628
1629 PR binutils/15462
1630 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Warning fix.
1631
5b3905f1
AM
16322013-05-22 Ralf Dreesen <gamma@dreesen.net>
1633
1634 PR binutils/15474
1635 * srec.c (srec_set_section_contents): Properly convert size
1636 and offset to address when octets_per_byte is not unity.
1637
8be65dd3
MR
16382013-05-20 Maciej W. Rozycki <macro@linux-mips.org>
1639
1640 * elf32-vax.c (elf_vax_instantiate_got_entries): Only set the
1641 refcount member of the gotplt_union when resetting the reference
1642 count. Adjust comment.
1643
593f8f29
WN
16442013-05-20 Will Newton <will.newton@linaro.org>
1645
1646 * elf64-aarch64.c (elf64_aarch64_link_hash_entry): Remove
1647 relocs_copied member.
1648 (elf64_aarch64_link_hash_newfunc): Remove initialization of
1649 relocs_copied member.
1650 (elf64_aarch64_copy_indirect_symbol): Remove code to copy
1651 relocs_copied member.
1652
a0f0eb1e
MR
16532013-05-19 Maciej W. Rozycki <macro@linux-mips.org>
1654
1655 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Convert K&R
1656 function definition.
1657
af65e588
CC
16582013-05-16 Cary Coutant <ccoutant@google.com>
1659
1660 * ecoff.c (ecoff_link_check_archive_element): Add initializers for
1661 external_ext_size and esize.
1662
9f6e76f4
TG
16632013-05-16 Tristan Gingold <gingold@adacore.com>
1664
1665 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_16.
1666 * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
1667
c495064d
AS
16682013-05-15 Andreas Schwab <schwab@suse.de>
1669
1670 * elf64-aarch64.c (elf_backend_default_execstack): Define to 0.
1671
110a61d3
JB
16722013-05-10 Joel Brobecker <brobecker@adacore.com>
1673
1674 * coffcode.h (styp_to_sec_flags) [RS6000COFF_C]: Add handling
1675 of STYP_EXCEPT, STYP_LOADER and STYP_TYPCHK sections.
1676
ceae87f3
JB
16772013-05-09 Joel Brobecker <brobecker@adacore.com>
1678
1679 * bfd.c (_bfd_default_error_handler): Replace use of putc
1680 by fputc. Add comment explaining why.
1681
012b2306
AM
16822013-05-09 Alan Modra <amodra@gmail.com>
1683
1684 * elflink.c (elf_link_add_object_symbols): Don't omit reading
1685 of symbols when hashes already exist.
1686
7b70956d
WN
16872013-05-07 Will Newton <will.newton@linaro.org>
1688
1689 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Add a
1690 plt_header_size argument for ports where it differs from
1691 plt_entry_size.
1692 * elf-bfd.h: Likewise.
1693 * elf32-i386.c: Pass plt_header_size to
1694 _bfd_elf_allocate_ifunc_dyn_relocs.
1695 * elf64-x86-64.c: Likewise.
1696
1ee9e8b3
WN
16972013-05-07 Will Newton <will.newton@linaro.org>
1698
012b2306 1699 * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Remove unused
1ee9e8b3
WN
1700 function.
1701 * elf-bfd.h: Likewise.
1702
b47468a6
CM
17032013-05-06 Paul Brook <paul@codesourcery.com>
1704
012b2306
AM
1705 * elf64-mips.c (elf_mips_gnu_pcrel32): New.
1706 (bfd_elf64_bfd_reloc_type_lookup, bfd_elf64_bfd_reloc_name_lookup,
1707 mips_elf64_rtype_to_howto): Handle R_MIPS_PC32.
1708 * elfn32-mips.c (elf_mips_gnu_pcrel32): New.
1709 (bfd_elfn32_bfd_reloc_type_lookup, bfd_elfn32_bfd_reloc_name_lookup,
1710 mips_elfn32_rtype_to_howto): Handle R_MIPS_PC32.
b47468a6 1711
128205bb
AM
17122013-05-06 Alan Modra <amodra@gmail.com>
1713
1714 * elf64-ppc.c (opd_entry_value): Handle case where symbol
1715 hashes are not available.
1716
f45794cb
AM
17172013-05-06 Alan Modra <amodra@gmail.com>
1718
1719 * elflink.c (elf_link_add_object_symbols): Don't save symbol
1720 hashes around loading as-needed library. Zero them on allocation,
1721 and restore to initial all-zero state if library not needed.
1722 Arrange to reuse hashes if we load library again later.
1723
d150b1a2
RS
17242013-05-04 Richard Sandiford <rdsandiford@googlemail.com>
1725
1726 * elf32-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto):
1727 Use _bfd_mips_elf_generic_reloc instead of bfd_elf_generic_reloc.
1728 * elfn32-mips.c: Likewise.
1729 * elf64-mips.c: Likewise.
1730
13761a11
NC
17312013-05-02 Nick Clifton <nickc@redhat.com>
1732
1733 * archures.c: Add some more MSP430 machine numbers.
1734 * config.bfd (msp430): Define targ_selvecs.
1735 * configure.in: Add bfd_elf32_msp430_ti_vec.
1736 * cpu-msp430.c: Add some more MSP430 machine numbers.
1737 * elf32-msp430.c Add support for MSP430X relocations.
1738 Add support for TI compiler generated relocations.
1739 Add support for sym_diff relocations.
1740 Add support for relaxing out of range short branches into long
1741 branches.
1742 Add support for MSP430 attribute section.
1743 * reloc.c: Add MSP430X relocations.
1744 * targets.c: Add bfd_elf32_msp430_ti_vec.
1745 * bfd-in2.h: Regenerate.
1746 * configure: Regenerate.
1747 * libbfd.h: Regenerate.
1748
df26367c
MR
17492013-05-01 Maciej W. Rozycki <macro@codesourcery.com>
1750
1751 * config.bfd: Replace alpha*-*-linuxecoff* pattern with
1752 alpha*-*-linux*ecoff*.
1753
ed54588d
NC
17542013-04-30 Olaf Flebbe <o.flebbe@science-computing.de>
1755
1756 PR binutils/15417
1757 * elflink.c (elf_link_add_object_symbols): Initialise 'idx' to
1758 zero.
1759
b8297068
AM
17602013-04-30 Alan Modra <amodra@gmail.com>
1761
1762 * elflink.c (bfd_elf_record_link_assignment): Dont make
1763 STV_INTERNAL symbols STV_HIDDEN.
1764
b40bf0a2
NC
17652013-04-29 Nick Clifton <nickc@redhat.com>
1766
1767 * elflink.c (_bfd_elf_gc_mark_extra_sections): Remove mark from
1768 fragmented .debug_line sections associated with unmarked code
1769 sections.
1770
aba8c3de
WN
17712013-04-29 Will Newton <will.newton@linaro.org>
1772
1773 * elf32-arm.c (elf32_arm_populate_plt_entry): Call
1774 elf32_arm_add_dynreloc when emitting R_ARM_IRELATIVE relocs.
1775
7fcfd62d
NC
17762013-04-29 Will Newton <will.newton@linaro.org>
1777
1778 * elf64-aarch64.c (elf64_aarch64_check_relocs): Move relocation
1779 error check up and add error message.
1780
ed5acf27
WN
17812013-04-26 Will Newton <will.newton@linaro.org>
1782
1783 * elf64-aarch64.c (elf64_aarch64_check_relocs): Remove dead code.
1784
49926cd0
AM
17852013-04-25 Alan Modra <amodra@gmail.com>
1786
1787 * config.bfd: Add powerpc64le-linux.
1788
05567e3d
L
17892013-04-24 H.J. Lu <hongjiu.lu@intel.com>
1790
1791 * config.bfd (targ_selvecs): Add bfd_elf32_x86_64_vec for
1792 x86_64-*-elf*.
1793
99059e56
RM
17942013-04-24 Roland McGrath <mcgrathr@google.com>
1795
1796 * elf32-arm.c (elf32_arm_allocate_plt_entry): If HTAB->nacl_p,
1797 allocate space for PLT header even if IS_IPLT_ENTRY.
1798 (arm_nacl_put_plt0): New function, broken out of ...
1799 (elf32_arm_finish_dynamic_sections): ... here. Call it.
1800 If HTAB->nacl_p, set up the PLT header in .iplt too.
1801 (elf32_arm_output_arch_local_syms): If HTAB->nacl_p, write
1802 a mapping symbol for the start of .iplt too.
1803
544008aa
NC
18042013-04-19 Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
1805
7b5d8d96
NC
1806 * ecoff.c (_bfd_ecoff_sizeof_headers): Cast the return value of
1807 BFD_ALIGN to int.
1808 * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Remove unused
1809 variables.
1810 * elf32-v850.c (v850_elf_relax_section): Redefine the type of 'i'
1811 to bfd_vma.
1812 * vms-alpha.c (evax_bfd_print_etir): Initialize sec_len.
544008aa 1813
86f7d49b
AM
18142013-04-22 Alan Modra <amodra@gmail.com>
1815
1816 PR ld/15382
1817 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Don't multiply
1818 sh_size or reloc_count adjustment by count.
1819
bfeb4a28
AM
18202013-04-22 Alan Modra <amodra@gmail.com>
1821
1822 * elf64-ppc.c (ppc64_elf_check_relocs): Don't call
1823 create_linkage_sections here..
1824 (ppc64_elf_init_stub_bfd): ..do so here. Return status.
1825 (create_linkage_sections): Move earlier in file.
1826 (ppc64_elf_setup_section_lists): Remove now useless htab->brlt test.
1827 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Update proto.
1828
2d0a6933
NC
18292013-04-19 Nick Clifton <nickc@redhat.com>
1830
1831 PR binutils/15356
1832 * compress.c (decompress_contents): Always call inflateEnd, even
1833 when another inflation operation fails.
1834
a9ea330b
L
18352013-04-17 H.J. Lu <hongjiu.lu@intel.com>
1836
1837 * elf-ifunc.c: Update copyright year.
1838
a253d456
NC
18392013-04-17 Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
1840
1841 * coffcode.h: Added a cast to void when a bfd_set_section_*()
1842 macro's return value is ignored.
1843 * elf32-hppa.c: Likewise.
1844 * elf32-tic6x.c: Likewise.
1845 * mach-o.c: Likewise.
1846 * mmo.c: Likewise.
1847 * opncls.c: Likewise.
1848 * peicode.h: Likewise.
1849 * elf32-m32r.c: Check return value of bfd_set_section_*().
1850 * elfnn-ia64.c: Likewise.
1851 * elfxx-mips.c: Likewise.
1852 * vms-alpha.c: Likewise.
1853
1622ff3b
L
18542013-04-15 H.J. Lu <hongjiu.lu@intel.com>
1855
1856 PR ld/15371
1857 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Check
1858 regular reference without non-GOT reference when building
1859 shared library.
1860
a22cd6f6
AM
18612013-04-15 Alan Modra <amodra@gmail.com>
1862
1863 * archive.c (_bfd_archive_close_and_cleanup): Clear parent
1864 cache slot for archives.
1865
ed905580
HPN
18662013-04-14 Hans-Peter Nilsson <hp@bitrange.com>
1867
1868 * mmo.c (mmo_write_chunk): Break out abfd->tdata.mmo_data to new
1869 local variable mmop.
1870
8d6a12ee
NC
18712013-04-09 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1872
1873 PR ld/12494
33e44f2e 1874 * elf32-avr.c: Consider all sections to determine if linker
8d6a12ee
NC
1875 relaxation can safely delete a ret after a call/jmp
1876
79bb5c23
NC
18772013-04-09 Mingjie Xing <mingjie.xing@gmail.com>
1878
1879 * bfd.c (typedef bfd, Error reporting, Miscellaneous): Add
1880 INODEs.
1881
36192a8d
TT
18822013-04-08 Tom Tromey <tromey@redhat.com>
1883
1884 * som.c (bfd_section_from_som_symbol): No longer static.
1885 * som.h (bfd_section_from_som_symbol): Declare.
1886
198f1157
AM
18872013-04-06 Alan Modra <amodra@gmail.com>
1888
1889 * elf32-ppc.c (ppc_elf_check_relocs): Use SYMBOLIC_BIND.
1890 * elf64-ppc.c (ppc64_elf_check_relocs, dec_dynrel_count): Likewise.
1891
c69ba956
NC
18922013-04-05 Nick Clifton <nickc@redhat.com>
1893
1894 * elflink.c (elf_link_add_object_symbols): Revert accidental commit.
1895
ff5ac77b
AM
18962013-04-04 Alan Modra <amodra@gmail.com>
1897
1898 * bfd.c (bfd_error_type, bfd_errmsgs): Add bfd_error_missing_dso.
1899 * bfd-in2.h: Regenerate.
1900 * elflink.c (elf_link_add_object_symbols): Use new error.
1901
41702d50
NC
19022013-04-03 Nick Clifton <nickc@redhat.com>
1903
1904 * elf32-v850.c (v850_elf_is_target_special_symbol): New function.
1905 (bfd_elf32_bfd_is_target_special_symbol): Define.
1906
cb8af559
NC
19072013-04-03 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
1908
a22cd6f6
AM
1909 * elf64-aarch64.c (elf64_aarch64_gc_sweep_hook): Use
1910 elf64_aarch64_locals to get local GOT reference counts.
cb8af559 1911
1122dc88
DD
19122013-04-02 DJ Delorie <dj@redhat.com>
1913
1914 * elf32-rl78.c (GET_RELOC): Assert that there are relocs to get.
1915 (rl78_elf_relax_section): Only fetch the next reloc if there is
1916 one expected.
1917
81fbe831
AM
19182013-03-30 Alan Modra <amodra@gmail.com>
1919
1920 PR ld/15323
1921 * elf-m10300.c (mn10300_elf_check_relocs): Set non_ir_ref for
1922 global symbols referenced by relocs.
1923 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1924 * elf32-bfin.c (bfin_check_relocs): Likewise.
1925 * elf32-cr16.c (cr16_elf_check_relocs): Likewise.
1926 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1927 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1928 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1929 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1930 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1931 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1932 * elf32-i370.c (i370_elf_check_relocs): Likewise.
1933 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1934 * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
1935 * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
1936 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1937 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1938 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1939 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1940 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1941 * elf32-microblaze.c (microblaze_elf_check_relocs): Likewise.
1942 * elf32-moxie.c (moxie_elf_check_relocs): Likewise.
1943 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
1944 * elf32-mt.c (mt_elf_check_relocs): Likewise.
1945 * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
1946 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
1947 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1948 * elf32-rl78.c (rl78_elf_check_relocs): Likewise.
1949 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1950 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1951 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1952 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1953 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1954 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1955 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1956 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1957 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1958 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1959 * elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise.
1960 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1961 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1962 * elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise.
1963 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1964 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1965 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1966 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1967 * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
1968 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1969 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1970 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. Don't
1971 test indirect/warning links for NULL.
1972
61315175
L
19732013-03-29 H.J. Lu <hongjiu.lu@intel.com>
1974
1975 PR ld/15323
1976 * elf32-i386.c (elf_i386_check_relocs): Set non_ir_ref if a
81fbe831 1977 symbol is referenced by a non-shared object.
61315175
L
1978 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1979
a6f713fc
KK
19802013-03-28 Joe Seymour <jseymour@codesourcery.com>
1981
1982 * elf32-sh.c (sh_elf_relocate_section): Suppress warnings for
1983 R_SH_REL32 relocations against undefined weak symbols.
1984
19e08130
AM
19852013-03-28 Alan Modra <amodra@gmail.com>
1986
1987 * elf64-ppc.c (struct ppc_dyn_relocs): New.
1988 (ppc64_elf_check_relocs): Separate dynrel counts for local syms
1989 into ifunc and non-ifunc.
1990 (dec_dynrel_count): Pass in sym rather than sym_sec. Handle
1991 separate ifunc/non-ifunc dynrel counts.
1992 (allocate_got): Always use reliplt for ifunc.
1993 (allocate_dynrelocs): Likewise.
1994 (ppc64_elf_size_dynamic_sections): Likewise.
1995 (ppc64_elf_layout_multitoc): Likewise.
1996 (ppc64_elf_relocate_section): Likewise.
1997
f95f8542
AM
19982013-03-28 Alan Modra <amodra@gmail.com>
1999
2000 * elf32-ppc.c (struct ppc_dyn_relocs): New.
2001 (ppc_elf_check_relocs): Separate dynrel counts for local syms
2002 into ifunc and non-ifunc.
2003 (allocate_dynrelocs): Always put ifunc relocs into reliplt.
2004 (ppc_elf_size_dynamic_sections): Likewise.
2005 (ppc_elf_relocate_section): Likewise.
2006
7e612e98
AM
20072013-03-28 Alan Modra <amodra@gmail.com>
2008
2009 * elf-bfd.h (enum elf_reloc_type_class): Add reloc_class_ifunc.
2010 (struct elf_backend_data <elf_backed_reloc_type_class>): Add
2011 bfd_link_info* and asection* params.
2012 (_bfd_elf_reloc_type_class): Likewise.
2013 * elf.c (_bfd_elf_reloc_type_class): Likewise.
2014 * elflink.c (elf_link_sort_cmp2): Sort first on reloc class.
2015 (elf_link_sort_relocs): Update elf_backed_reloc_type_class call.
2016 * elf32-ppc.c (ppc_elf_reloc_type_class): Return reloc_class_ifunc
2017 for any reliplt reloc. Don't return reloc_class_plt for
2018 R_PPC_REL24 and R_PPC_ADDR24.
2019 * elf64-ppc.c (allocate_got): Formatting.
2020 (ppc64_elf_reloc_type_class): Return reloc_class_ifunc for any
2021 reliplt reloc.
2022 * elf-m10300.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cr16.c,
2023 * elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c,
2024 * elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
2025 * elf32-s390.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilepro.c,
2026 * elf32-vax.c, * elf32-xtensa.c, * elf64-aarch64.c, * elf64-alpha.c,
2027 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-s390.c, * elf64-sparc.c,
2028 * elf64-x86-64.c, * elfnn-ia64.c, * elfxx-tilegx.c, * elfxx-tilegx.h:
2029 Add extra params to the various reloc_type_class functions.
2030
0bed072f
AM
20312013-03-27 Alan Modra <amodra@gmail.com>
2032
2033 * elf32-ppc.c (ppc_elf_check_relocs): Set PLT_IFUNC in local got
2034 masks for all local ifunc syms.
2035 (allocate_dynrelocs): Don't use htab->relgot for ifunc.
2036 (ppc_elf_size_dynamic_sections): Likewise.
2037 (ppc_elf_relocate_section): Likewise.
2038
6f820c85
WN
20392013-03-27 Will Newton <will.newton@linaro.org>
2040
2041 * elf32-arm.c (elf32_arm_final_link_relocate): Avoid emitting a
2042 dynamic reloc for symbols with dynindx == -1.
2043 (allocate_dynrelocs_for_symbol): Avoid allocating space for a
2044 dynamic reloc for symbols with dynindx == -1.
2045
31943882
WN
20462013-03-27 Will Newton <will.newton@linaro.org>
2047
2048 * elf32-arm.c (elf32_arm_final_link_relocate): Avoid emitting a
2049 dynamic reloc for non-default visibility undefined weaks.
2050 (allocate_dynrelocs_for_symbol): Avoid allocating space for a
2051 dynamic reloc for non-default visibility undefined weaks.
2052
ffd65175
AM
20532013-03-26 Alan Modra <amodra@gmail.com>
2054
2055 * elflink.c (_bfd_elf_add_default_symbol): Preserve section
2056 over _bfd_elf_merge_symbol calls.
2057
3a81e825
AM
20582013-03-26 Alan Modra <amodra@gmail.com>
2059
2060 * elflink.c (elf_link_add_object_symbols): Add assertion for
2061 common override alignment check code. Formatting.
2062
4f3fedcf
AM
20632013-03-25 Alan Modra <amodra@gmail.com>
2064
2065 * elflink.c (_bfd_elf_merge_symbol): Set old_alignment for
2066 usual common symbols as well as for dynamic. Add poldbfd param.
2067 Save old bfd. Adjust callers.
2068 (_bfd_elf_add_default_symbol): Add poldbfd param. Pass "section"
2069 and "value" by value, not pointer. Adjust caller.
2070 (elf_link_add_object_symbols): Combine undef_bfd and old_bfd vars.
2071 Delete code to set same. Use old_bfd and old_alignment from
2072 _bfd_elf_merge_symbol instead. Add default symbol before
2073 alignment and size checks. Wrap overlong lines.
2074
e3c9d234
AM
20752013-03-25 Alan Modra <amodra@gmail.com>
2076
2077 * elflink.c (_bfd_elf_add_default_symbol): Delete "override" param.
2078 (elf_link_add_object_symbols): Don't call _bfd_elf_add_default_symbol
2079 when override is true.
2080
6c9b78e6
AM
20812013-03-25 Alan Modra <amodra@gmail.com>
2082
2083 * elflink.c (_bfd_elf_merge_symbol): Use local var holding value
2084 of *sym_hash.
2085
191c0c42
AM
20862013-03-25 Alan Modra <amodra@gmail.com>
2087
2088 * elflink.c (_bfd_elf_merge_symbol): Don't discard TLS symbols here.
2089 Wrap long lines.
2090 (elf_link_add_object_symbols): Discard TLS symbols for --just-syms
2091 early in symbol loop.
2092
5d13b3b3
AM
20932013-03-25 Alan Modra <amodra@gmail.com>
2094
2095 * elf-bfd.h (struct elf_backend_data <merge_symbol>): Update proto.
2096 (_bfd_elf_init_reloc_shdr): Delete.
2097 * elf.c (_bfd_elf_init_reloc_shdr): Make static.
2098 * elf64-x86-64.c (elf_x86_64_merge_symbol): Trim parameters to
2099 just what is needed.
2100 * elflink.c (_bfd_elf_merge_symbol): Update bed->merge_symbol call.
2101
8a56bd02
AM
21022013-03-23 Alan Modra <amodra@gmail.com>
2103
2104 * elf-bfd.h (_bfd_elf_merge_symbol): Delete declaration.
2105 * elflink.c (_bfd_elf_merge_symbol): Make static.
2106 * elf32-sh-symbian.c (sh_symbian_relocate_section): Don't call
2107 _bfd_elf_merge_symbol, call _bfd_generic_link_add_one_symbol.
2108
96f29d96
AM
21092013-03-23 Alan Modra <amodra@gmail.com>
2110
2111 PR ld/15270
2112 * elflink.c (elf_link_add_object_symbols): Don't set def_regular
2113 or ref_regular for BFD_PLUGIN owned syms, or have them affect
2114 def_dynamic/ref_dynamic.
2115 (_bfd_elf_fix_symbol_flags): Don't set def_regular for BFD_PLUGIN
2116 owned syms.
2117
209be8d2
DM
21182013-03-22 David S. Miller <davem@davemloft.net>
2119
2120 * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Set type of
2121 hwcaps attribute.
2122
5c0df484
NC
21232013-03-22 Achille Fouilleul <achille.fouilleul+binutils@gadz.org>
2124
2125 PR ld/14902
2126 * elf32-h8300.c (elf32_h8_relax_delete_bytes): Fix off by one
2127 errors adjusting relocs and symbols.
2128
81f5558e
NC
21292013-03-21 Michael Schewe <michael.schewe@gmx.net>
2130
2131 * elf32-h8300 (h8_relax_section): Add new relaxation of mov
2132 @(disp:32,ERx) to mov @(disp:16,ERx).
2133 (R_H8_DISP32A16): New reloc.
2134 Comments added and corrected.
2135 * reloc.c (BFD_RELOC_H8_DISP32A16): New reloc.
2136 * bfd-in2.h: Regenerate.
2137 * libbfd.h: Regenerate.
2138
ce63b7b3
KT
21392013-03-21 Kai Tietz <ktietz@redhat.com>
2140
2141 * coffgen.c (coff_real_object_p): Make global.
2142 * peicode.h (coff_real_object_p): Add prototype.
2143 (FILHDR): Defined for COFF_IMAGE_WITH_PE as
2144 external_PEI_IMAGE_hdr structure.
2145 (coff_swap_filehdr_in): Handle variable header-size.
2146 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Just handle amount
2147 of directory-entiries as specified in pe-header.
2148
088ca6c1
NC
21492013-03-21 Nick Clifton <nickc@redhat.com>
2150
2151 PR sim/15286
2152 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Identify XScale,
2153 iWMMXt and iWMMXt2 processors from attributes.
2154
8877b5e5
AM
21552013-03-20 Alan Modra <amodra@gmail.com>
2156
2157 * elflink.c (_bfd_elf_make_dynamic_reloc_section): Override
2158 sh_type according to is_rela.
2159
ffa9430d
AM
21602013-03-18 Alan Modra <amodra@gmail.com>
2161
2162 PR ld/12549
2163 * elflink.c (elf_link_add_object_symbols): Exclude weak refs when
2164 considering whether an --as-needed library is needed.
2165
cc0ea93c
TT
21662013-03-14 Tom Tromey <tromey@redhat.com>
2167
2168 * opncls.c (bfd_get_debug_link_info): Rename from
2169 get_debug_link_info. Export. Update comment.
2170 (find_separate_debug_file): Update.
2171 * bfd-in2.h: Rebuild.
2172
59c108f7
NC
21732013-03-08 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
2174
a22cd6f6 2175 * elf64-aarch64.c (elf_backend_can_gc_sections): Enable gc-section
59c108f7 2176 support.
a22cd6f6 2177 (elf64_aarch64_gc_sweep_hook): Handle GOT, TLS and PLT related
59c108f7
NC
2178 relocs.
2179
abb3f6cc
NC
21802013-03-08 Andreas Arnez <arnez@linux.vnet.ibm.com>
2181
2182 * elf-bfd.h (elfcore_write_s390_tdb): Add prototype.
2183 * elf.c (elfcore_write_s390_tdb): New function.
2184 (elfcore_write_register_note): Call it.
2185 (elfcore_grok_s390_tdb): New function.
2186 (elfcore_grok_note): Call it.
2187
af924177
MR
21882013-03-08 Maciej W. Rozycki <macro@codesourcery.com>
2189
2190 * elfxx-mips.c (mips_elf_allocate_lazy_stub): Correct data type.
2191
48385e38
CV
21922013-03-05 Corinna Vinschen <vinschen@redhat.com>
2193
2194 * config.bfd: Add x86_64-*-cygwin to list of supported targets.
2195
f75e0e33
AM
21962013-03-04 Alan Modra <amodra@gmail.com>
2197
2198 * elf32-ppc.c (ppc_elf_relocate_section <R_PPC_PLTREL24>): Adjust
2199 non-zero addends when relocatable, rather than addends >= 32768.
2200 Always zero "addend" before applying relocation.
2201
17e3916e
NC
22022013-03-04 Nick Clifton <nickc@redhat.com>
2203
2204 * archive64.c (bfd_elf64_archive_write_armap): Fix calculation of
2205 file pointer offsets for thin archives.
2206
3064e1ff
JB
22072013-02-28 Nathan Sidwell <nathan@codesourcery.com>
2208
2209 * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't call
2210 elf32_arm_allocate_dynrelocs for source reloc for non-dynamic link.
2211
4107ae22
DD
22122013-02-27 DJ Delorie <dj@redhat.com>
2213
2214 * reloc.c (BFD_RELOC_RL78_CODE): Add.
2215 * libbfd.h: Regenerate.
2216 * bfd-in2.h: Regenerate.
2217 * elf32-rl78.c (rl78_elf_relocate_section): Handle weak code
2218 references in compuated relocs.
2219
730fbaf8
AG
22202013-02-26 Anthony Green <green@moxielogic.com>
2221
2222 * config.bfd: Extend moxie-rtems target triplet name support.
2223
35399224
L
22242013-02-21 H.J. Lu <hongjiu.lu@intel.com>
2225
2226 PR ld/15167
2227 * elf64-ia64-vms.c (elf64_vms_link_add_object_symbols): Set
2228 unique_global only for definition.
2229 * elflink.c (_bfd_elf_merge_symbol): Don't set unique_global
2230 here.
2231 (elf_link_add_object_symbols): Set unique_global only
2232 for definition.
2233
c0355132
AM
22342013-02-21 Alan Modra <amodra@gmail.com>
2235
2236 * elf-bfd.h (struct elf_build_id): Extracted from..
2237 (struct elf_build_id_info): ..here. Delete.
2238 (struct output_elf_obj_tdata): New, extracted from..
2239 (struct elf_obj_tdata): ..here. Reorganize for better packing.
2240 Add "o" field.
2241 (elf_program_header_size): Reference tdata->o.
2242 (elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker,
2243 elf_stack_flags, elf_shstrtab, elf_strtab_sec, elf_shstrtab_sec,
2244 elf_section_syms, elf_num_section_syms, elf_flags_init): Likewise.
2245 * elf.c (bfd_elf_allocate_object): Allocate output_elf_obj_tdata
2246 when opening bfd in any mode that might write.
2247 (_bfd_elf_write_object_contents): Use build_id field in
2248 output_elf_obj_tdata.
2249 (_bfd_elf_close_and_cleanup): Tweak elf_shstrtab test.
2250 (elfobj_grok_gnu_build_id): Adjust for elf_tdata changes.
2251
228e534f
AM
22522013-02-21 Alan Modra <amodra@gmail.com>
2253
2254 * elf-bfd.h (struct core_elf_obj_tdata): New.
2255 (struct elf_obj_tdata): Delete core_signal, core_pid, core_lwpid,
2256 core_program, and core_command. Add "core".
2257 * elf.c (bfd_elf_mkcorefile): Allocate "core" struct.
2258 Update all refs to tdata core fields.
2259 * elf32-am33lin.c, * elf32-arm.c, * elf32-cris.c, * elf32-frv.c,
2260 * elf32-hppa.c, * elf32-i386.c, * elf32-m68k.c, * elf32-mips.c,
2261 * elf32-nios2.c, * elf32-ppc.c, * elf32-s390.c, * elf32-score.c,
2262 * elf32-score7.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilegx.c,
2263 * elf32-tilepro.c, * elf32-xtensa.c, * elf64-aarch64.c,
2264 * elf64-hppa.c, * elf64-mips.c, * elf64-ppc.c, * elf64-tilegx.c,
2265 * elf64-x86-64.c, * elfcore.h, * elfn32-mips.c: Update all refs
2266 to tdata core fields.
2267
12bd6957
AM
22682013-02-21 Alan Modra <amodra@gmail.com>
2269
2270 * elf-bfd.h (struct elf_obj_tdata): Rename segment_map to seg_map.
2271 Delete num_locals and num_globals.
2272 (elf_num_locals, elf_num_globals): Don't define.
2273 (elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker,
2274 elf_stack_flags, elf_strtab_sec, elf_shstrtab_sec): Define.
2275 * bfd.c, * elf-eh-frame.c, * elf-nacl.c, * elf-vxworks.c, * elf.c,
2276 * elf32-arm.c, * elf32-lm32.c, * elf32-ppc.c, * elf32-rx.c,
2277 * elf32-spu.c, * elf64-hppa.c, * elfcode.h, * elflink.c,
2278 * elfnn-ia64.c, * elfxx-mips.c: Use newly defined elf_obj_tdata
2279 accessor macros.
2280 * elf.c (elf_map_symbols): Add pnum_locals param. Return
2281 number of locals syms via new param.
2282 (swap_out_syms): Adjust to suit elf_map_symbols change.
2283
cbf8d970
MR
22842013-02-19 Maciej W. Rozycki <macro@codesourcery.com>
2285
2286 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Also clear
2287 STO_MICROMIPS annotation.
2288
30e8ee25
AM
22892013-02-19 Alan Modra <amodra@gmail.com>
2290
2291 * configure.in: Bump version to 2.23.52.
2292 * elf-bfd.h (struct elf_build_id_info): New.
2293 (struct elf_obj_tdata): Delete after_write_object_contents,
2294 after_write_object_contents_info and build_id_size. Make build_id
2295 a pointer to struct elf_build_id_info.
2296 * elf.c (_bfd_elf_write_object_contents): Style. Update
2297 after_write_ibject_contents invocation.
2298 (elfobj_grok_gnu_build_id): Update for new build_id struct. Don't
2299 allow zero size notes.
2300 * configure: Regenerate.
2301
5b175e56
MR
23022013-02-18 Maciej W. Rozycki <macro@codesourcery.com>
2303
2304 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
2305 R_MICROMIPS_SCN_DISP and R_MICROMIPS_JALR.
2306 (micromips_elf64_howto_table_rela): Likewise.
2307 (micromips_reloc_map): Add BFD_RELOC_MICROMIPS_JALR.
2308 * elfn32-mips.c (elf_micromips_howto_table_rel): Add
2309 R_MICROMIPS_SCN_DISP and R_MICROMIPS_JALR.
2310 (elf_micromips_howto_table_rela): Likewise.
2311 (micromips_reloc_map): Add BFD_RELOC_MICROMIPS_JALR.
2312
e8faf7d1
MR
23132013-02-18 Paul Brook <paul@codesourcery.com>
2314
2315 * elfxx-mips.c (MICROMIPS_P): New macro.
2316 (_bfd_mips_elf_symbol_processing): Use it.
2317
c164a95d
MR
23182013-02-18 Maciej W. Rozycki <macro@codesourcery.com>
2319
2320 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Clarify
2321 comment on _PROCEDURE_LINKAGE_TABLE_ creation.
2322
d45f8bda
AM
23232013-02-18 Alan Modra <amodra@gmail.com>
2324
2325 PR ld/12549
2326 * elf-bfd.h (_bfd_elf_strtab_clear_refs): Delete.
2327 (_bfd_elf_strtab_clear_all_refs): Declare.
2328 (_bfd_elf_strtab_resize): Declare.
2329 * elf-strtab.c (_bfd_elf_strtab_clear_refs): Delete.
2330 (_bfd_elf_strtab_clear_all_refs): New function.
2331 (_bfd_elf_strtab_resize): Likewise.
2332 * elflink.c (elf_link_add_object_symbols): Use _bfd_elf_strtab_resize.
2333
698600e4
AM
23342013-02-18 Alan Modra <amodra@gmail.com>
2335
2336 * elf-bfd.h (struct elf_obj_tdata): Move find_line_info, local_stubs,
2337 local_call_stubs, elf_data_symbol, elf_text_symbol, elf_data_section,
2338 and elf_text_section to..
2339 * elfxx-mips.c (struct mips_elf_obj_tdata): ..here. Update all refs.
2340 * elf64-alpha.c (struct mips_elf_find_line): Rename to..
2341 (struct alpha_elf_find_line): ..this.
2342 (struct alpha_elf_obj_tdata): Add find_line_info, update refs.
2343
3d5bef4c
L
23442013-02-16 H.J. Lu <hongjiu.lu@intel.com>
2345
2346 PR ld/15146
2347 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
2348 for references from the dummy bfd.
2349
313ed4a9
L
23502013-02-16 H.J. Lu <hongjiu.lu@intel.com>
2351
2352 PR ld/15149
2353 * elflink.c (elf_link_add_object_symbols): Also track weak
2354 references.
2355
989fbeff
L
23562013-02-15 H.J. Lu <hongjiu.lu@intel.com>
2357
2358 PR binutils/15151
2359 * archive.c (_bfd_find_nested_archive): Don't allow a nested
2360 archive pointing to itself.
2361 (_bfd_get_elt_at_filepos): Revert the last 2 changes.
2362
a043396b
NC
23632013-02-15 Nick Clifton <nickc@redhat.com>
2364
2365 PR binutils/15140
2366 * archive.c (_bfd_get_elt_at_filepos): Prevent an infinite loop
2367 accessing a corrupt nested archive.
2368
13db6b44
RS
23692013-02-13 Richard Sandiford <rdsandiford@googlemail.com>
2370
2371 * elfxx-mips.c (mips_got_page_ref): New structure.
2372 (mips_got_page_entry): Use a section rather than a (bfd, symndx)
2373 pair to represent the anchor point.
2374 (mips_got_info): Add a got_page_refs field.
2375 (mips_elf_link_hash_table): Add a sym_cache field.
2376 (mips_got_page_ref_hash, mips_got_page_ref_eq): New functions.
2377 (mips_got_page_entry_hash, mips_got_page_entry_eq): Update for
2378 new anchor representation.
2379 (mips_elf_create_got_info): Create got_page_refs rather than
2380 got_page_entries.
2381 (mips_elf_record_got_page_ref): New function.
2382 (mips_elf_pages_for_range): Move further down file.
2383 (mips_elf_record_got_page_entry): Likewise. Take a got as argument.
2384 Use a section rather than a (bfd, symndx) pair to represent the
2385 anchor point.
2386 (mips_elf_resolve_got_page_ref): New function.
2387 (mips_elf_resolve_final_got_entries): Use it to populate
2388 got_page_entries.
2389 (_bfd_mips_elf_check_relocs): Call mips_elf_record_got_page_ref
2390 rather than mips_elf_record_got_page_entry. Only nullify h
2391 afterwards.
2392 (mips_elf_lay_out_got): Call mips_elf_resolve_final_got_entries
2393 earlier.
2394
57093f5e
RS
23952013-02-12 Richard Sandiford <rdsandiford@googlemail.com>
2396
2397 * elfxx-mips.c (mips_elf_lay_out_got): Count VxWorks GOT relocs
2398 in g->relocs.
2399
9c3f90c4
AM
24002013-02-12 Alan Modra <amodra@gmail.com>
2401
2402 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Provide
2403 suitable definition when using generic linker hash table.
2404
476366af
RS
24052013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2406
2407 * elfxx-mips.c (mips_elf_count_got_entries): Delete.
2408 (mips_elf_check_recreate_got, mips_elf_recreate_got): Take a
2409 mips_elf_traverse_got_arg. Count GOT entries.
2410 (mips_elf_resolve_final_got_entries): Take the bfd_link_info
2411 as argument. Update after above changes.
2412 (mips_elf_merge_got, mips_elf_lay_out_got): Don't call
2413 mips_elf_count_got_entries. Update the calls to
2414 mips_elf_resolve_final_got_entries.
2415
9ab066b4
RS
24162013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2417
2418 * elfxx-mips.c (mips_got_tls_type): New enum.
2419 (mips_got_entry): Add tls_initialized.
2420 (mips_elf_got_entry_hash, mips_elf_got_entry_eq, mips_tls_got_relocs)
2421 (mips_elf_count_got_entry, mips_elf_initialize_tls_index): Remove
2422 GOT_TLS_TYPE masks.
2423 (mips_elf_reloc_tls_type, mips_tls_got_entries)
2424 (mips_elf_record_global_got_symbol, mips_elf_initialize_tls_index)
2425 (_bfd_mips_elf_finish_dynamic_symbol): Use GOT_TLS_NONE rather
2426 than GOT_NORMAL.
2427 (mips_elf_initialize_tls_slots): Replace got_offset and tls_type_p
2428 arguments with a GOT entry. Remove GOT_TLS_TYPE masks. Use
2429 tls_initialized rather than GOT_TLS_DONE.
2430 (mips_tls_got_index): Delete.
2431 (mips_elf_local_got_index, mips_elf_global_got_index): Use
2432 mips_elf_initialize_tls_slots rather than mips_tls_got_index.
2433 (mips_elf_record_got_entry): Initialize tls_initialized.
2434
6c42ddb9
RS
24352013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2436
2437 * elfxx-mips.c (mips_got_entry): Remove tls_ldm_offset.
2438 (mips_elf_link_hash_entry): Remove tls_ie_type, tls_gd_type,
2439 tls_ie_got_offset and tls_gd_got_offset.
2440 (mips_elf_link_hash_newfunc): Remove initialization.
2441 (mips_elf_create_got_info): Likewise.
2442 (mips_elf_count_local_got_entries, mips_elf_count_global_tls_entries)
2443 (mips_tls_single_got_index): Delete.
2444 (mips_elf_local_got_index): Always use the GOT entry to track
2445 GOT indices.
2446 (mips_elf_global_got_index): Likewise.
2447 (mips_elf_create_local_got_entry): Assert that TLS entries have
2448 already been allocated.
2449 (mips_elf_record_global_got_symbol): Don't initialize
2450 tls_ie_type or tls_gd_type.
2451 (mips_elf_count_got_symbols): Only count reloc-only GOT entries here.
2452 (mips_elf_initialize_tls_index): Allocate a GOT index for every TLS
2453 entry.
2454 (mips_elf_lay_out_got): Use mips_elf_count_got_entries to count
2455 the GOT entries.
2456 (_bfd_mips_elf_finish_dynamic_symbol): Assert that TLS GOT offsets
2457 have been allocated.
2458 (_bfd_mips_elf_copy_indirect_symbol): Remove handling of
2459 tls_ie_type and tls_gd_type.
2460
ebc53538
RS
24612013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2462
2463 * elfxx-mips.c (mips_elf_create_local_got_entry): Tidy. Avoid
2464 aliasing violation. Check for htab allocation failures.
2465
13fbec83
RS
24662013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2467
2468 * elfxx-mips.c (mips_elf_primary_global_got_index): New function,
2469 split out from...
2470 (mips_elf_global_got_index): ...here. Reorder arguments so that
2471 the output bfd and info come first.
2472 (mips_elf_calculate_relocation): Update the call to
2473 mips_elf_global_got_index accordingly.
2474 (_bfd_mips_elf_finish_dynamic_symbol): Use
2475 mips_elf_primary_global_got_index rather than
2476 mips_elf_global_got_index.
2477 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2478
3dff0dd1
RS
24792013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2480
2481 * elfxx-mips.c (mips_got_entry): Update comments.
2482 (mips_elf_multi_got_entry_eq): Rename to...
2483 (mips_elf_got_entry_eq): ...this, deleting the old definition.
2484 (mips_elf_create_got_info): Remove master_got_p argument.
2485 Always use mips_elf_got_entry_eq.
2486 (mips_elf_bfd_got, mips_elf_multi_got, mips_elf_create_got_section):
2487 Update calls accordingly.
2488
d7206569
RS
24892013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2490
2491 * elfxx-mips.c (mips_got_info): Remove bfd2got.
2492 (mips_elf_bfd2got_hash): Delete.
2493 (mips_elf_got_per_bfd_arg): Remove bfd2got.
2494 (mips_elf_replace_bfd_got, mips_elf_count_got_entries): New functions.
2495 (mips_elf_global_got_index, mips_elf_create_local_got_entry): Use
2496 g->next to test for the multigot case. Use mips_elf_bfd_got rather
2497 than mips_elf_got_for_ibfd.
2498 (mips_elf_bfd2got_entry_hash, mips_elf_bfd2got_entry_eq)
2499 (mips_elf_got_for_ibfd, mips_elf_get_got_for_bfd): Delete.
2500 (mips_elf_make_got_per_bfd): Replace with...
2501 (mips_elf_add_got_entry): ...this new function.
2502 (mips_elf_make_got_pages_per_bfd): Replace with...
2503 (mips_elf_add_got_page_entry): ...this new function.
2504 (mips_elf_merge_got_with): Replace bfd2got argument with separate
2505 bfd and GOT arguments. Use mips_elf_add_got_entry and
2506 mips_elf_add_got_page_entry instead of mips_elf_make_got_per_bfd
2507 and mips_elf_make_got_pages_per_bfd. Use mips_elf_replace_bfd_got
2508 to set the BFD's GOT and free the old table.
2509 (mips_elf_merge_got): Replace bfd2got argument with separate
2510 bfd and GOT arguments. Apply mips_elf_resolve_final_got_entries.
2511 Use mips_elf_count_got_entries to count the number of entries in
2512 each GOT. Update the calls to mips_elf_merge_got_with.
2513 (mips_elf_adjust_gp): Use g->next to test for the multigot case.
2514 Use mips_elf_bfd_got rather than mips_elf_got_for_ibfd.
2515 (mips_elf_multi_got): Don't create the bfd2got hash table.
2516 Replace hash table traversal with a walk over the input bfds,
2517 updating the call to mips_elf_merge_got. Use mips_elf_replace_bfd_got
2518 to set the output bfd's GOT.
2519 (mips_elf_lay_out_got): Rename "sub" to "ibfd". Record that all
2520 bfds use the master GOT in the single-GOT case.
2521 (_bfd_mips_elf_finish_dynamic_sections): Use mips_elf_bfd_got
2522 rather than mips_elf_got_for_ibfd.
2523
ee227692
RS
25242013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2525
2526 * elfxx-mips.c (mips_elf_obj_tdata): Add a got field.
2527 (mips_elf_bfd_got, mips_elf_record_got_entry): New functions.
2528 (mips_elf_record_global_got_symbol): Update the hash entry before
2529 adding the mips_got_entry. Use mips_elf_record_got_entry to do
2530 the latter.
2531 (mips_elf_record_local_got_symbol): Use mips_elf_record_got_entry.
2532 (mips_elf_record_got_page_entry): Record the entry in both the
2533 master and bfd GOTs.
2534
72e7511a
RS
25352013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2536
2537 * elfxx-mips.c (mips_elf_recreate_got): Don't change the entry;
2538 create another one if necessary.
2539 (mips_elf_set_gotidx): New function.
2540 (mips_elf_set_global_gotidx): Use it.
2541 (mips_elf_initialize_tls_index): Likewise. Take a
2542 mips_elf_traverse_got_arg as argument.
2543 (mips_elf_lay_out_got): Update use of mips_elf_initialize_tls_index.
2544 (mips_elf_multi_got): Likewise. Cope with error returns from
2545 mips_elf_set_global_gotidx.
2546
ab361d49
RS
25472013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2548
2549 * elfxx-mips.c (mips_got_info): Add relocs field.
2550 (mips_elf_set_global_got_offset_arg, mips_elf_count_tls_arg): Replace
2551 with...
2552 (mips_elf_traverse_got_arg): ...this new structure.
2553 (mips_elf_count_local_tls_relocs): Delete.
2554 (mips_elf_count_global_tls_relocs): Likewise.
2555 (mips_elf_count_got_entry): New function.
2556 (mips_elf_count_local_got_entries): Likewise.
2557 (mips_elf_count_global_tls_entries): Take a mips_elf_traverse_got_arg
2558 rather than a mips_elf_count_tls_arg. Count both relocs and entries.
2559 (mips_elf_record_local_got_symbol): Don't count got entries here.
2560 (mips_elf_make_got_per_bfd): Use mips_elf_count_got_entry.
2561 (mips_elf_set_global_got_offset): Split into...
2562 (mips_elf_set_global_got_area, mips_elf_set_global_gotidx): ...these
2563 new functions. Take a mips_elf_traverse_got_arg rather than a
2564 mips_elf_set_global_got_offset_arg. Don't count TLS relocs here.
2565 Use g->relocs to record the number of relocs needed for global GOT
2566 entries.
2567 (mips_elf_multi_got): Use mips_elf_traverse_got_arg rather than
2568 mips_elf_set_global_got_offset_arg. Use the relocs field to count
2569 relocations. Update for above function split.
2570 (mips_elf_lay_out_got): Use mips_elf_count_local_got_entries
2571 to count both the number of GOT entries and the number of TLS
2572 relocs required by local entries. Likewise
2573 mips_elf_count_global_tls_entries and global entries.
2574 Remove uses of mips_elf_count_local_tls_relocs and
2575 mips_elf_count_global_tls_relocs.
2576
e641e783
RS
25772013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2578
2579 * elfxx-mips.c (mips_got_entry): Update comment above tls_type entry
2580 to say that each structure represents only one type of TLS reference.
2581 (GOT_TLS_TYPE): New define.
2582 (mips_elf_link_hash_entry): Temporarily split tls_type and
2583 tls_got_offset into two variables each.
2584 (mips_elf_link_hash_newfunc): Update accordingly.
2585 (mips_elf_got_entry_eq, mips_elf_got_entry_hash)
2586 (mips_elf_multi_got_entry_eq): Require the tls_type to be the same.
2587 (mips_elf_reloc_tls_type, mips_tls_got_entries): New functions.
2588 (mips_tls_got_relocs): Use a switch statement.
2589 (mips_elf_count_global_tls_entries): Handle the new hash entry fields.
2590 (mips_elf_initialize_tls_slots): Use a switch statement. Avoid
2591 local "offset" variable.
2592 (mips_tls_got_index): Remove r_type argument and assert. Remove
2593 code that handled entries with two TLS types; always use the
2594 original got_index instead.
2595 (mips_tls_single_got_index): New function.
2596 (mips_elf_local_got_index): Use entry->tls_type to check for
2597 TLS entries. Use mips_tls_single_got_index. Update call to
2598 mips_tls_got_index.
2599 (mips_elf_global_got_index): Use mips_elf_reloc_tls_type.
2600 Use p->tls_type to check for TLS entries. Update call to
2601 mips_tls_got_index. Use mips_tls_single_got_index.
2602 (mips_elf_create_local_got_entry): Use mips_elf_reloc_tls_type.
2603 Use entry.tls_type to check for TLS entries.
2604 (mips_elf_record_global_got_symbol): Replace tls_flag argument
2605 with r_type argument. Use mips_elf_reloc_tls_type.
2606 Set up the new hash entry fields.
2607 (mips_elf_record_local_got_symbol): Replace tls_flag argument
2608 with r_type argument. Use mips_elf_reloc_tls_type and
2609 mips_tls_got_entries. Remove code that handled entries
2610 with multiple TLS types.
2611 (mips_elf_make_got_per_bfd): Use mips_tls_got_entries.
2612 (mips_elf_initialize_tls_index): Handle new hash entry fields.
2613 Use equality rather than masks when checking for specific TLS types.
2614 Use mips_tls_got_entries. Remove code that handled entries
2615 with multiple TLS types.
2616 (mips_elf_calculate_relocation): Use TLS_RELOC_P instead of
2617 testing the hash table entry.
2618 (_bfd_mips_elf_check_relocs): Update calls to
2619 mips_elf_record_global_got_symbol and mips_elf_record_local_got_symbol.
2620 (_bfd_mips_elf_finish_dynamic_symbol): Don't check h->type.
2621 (_bfd_mips_elf_copy_indirect_symbol): Handle new hash entry fields.
2622
d9bf376d
RS
26232013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2624
2625 * elfxx-mips.c (mips_elf_multi_got_entry_hash): Rename to...
2626 (mips_elf_got_entry_hash): ...this, deleting the old version.
2627 (mips_elf_create_got_info): Use mips_elf_got_entry_hash for
2628 both types of GOT.
2629
5334aa52
RS
26302013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2631
2632 * elfxx-mips.c (mips_elf_create_got_info): New function.
2633 (mips_elf_get_got_for_bfd, mips_elf_multi_got): Use it.
2634 (mips_elf_create_got_section): Likewise.
2635
946c668d
RS
26362013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2637
2638 * elfxx-mips.c (mips_elf_record_local_got_symbol): Always set
2639 gotidx to -1.
2640
59b08994
RS
26412013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2642
2643 * elfxx-mips.c (mips_elf_multi_got): Simplify size calculation.
2644
d222d210
RS
26452013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2646
2647 * elfxx-mips.c (mips_got_info): Move global_gotsym to...
2648 (mips_elf_link_hash_table): ...here. Update rest of file accordingly.
2649
1fd20d70
RS
26502013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2651
2652 * elfxx-mips.c (mips_elf_count_global_tls_entries)
2653 (mips_elf_count_global_tls_relocs): Don't count indirect or
2654 warning symbols.
2655 (mips_elf_multi_got, mips_elf_lay_out_got): Assert that the right
2656 number of TLS entries were allocated.
2657
7d94b319
RS
26582013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2659
2660 * elfxx-mips.c (mips_elf_sort_hash_table_f): Remove asserts.
2661
17214937
RS
26622013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2663
2664 * elfxx-mips.c (mips_elf_merge_got_with): Only use arg->global_count
2665 if there are TLS relocations.
2666
9efeb38d
RS
26672013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
2668
2669 * elfxx-mips.c (mips_elf_recreate_got): Remove free.
2670 (mips_elf_resolve_final_got_entries): Remove bogus comment.
2671
9c3f90c4
AM
26722013-02-11 Alan Modra <amodra@gmail.com>
2673
2674 * elfcode.h (elf_checksum_contents): Free contents.
2675 * elf-bfd.h (_bfd_elf_link_hash_table_free): Declare.
2676 * elflink.c (_bfd_elf_link_hash_table_free): New function.
2677 (elf_final_link_free): New function, extracted from..
2678 (bfd_elf_final_link): ..here. Always call
2679 _bfd_elf_write_section_eh_frame_hdr.
2680 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Default to
2681 _bfd_elf_link_hash_table_free.
2682 * libbfd-in.h (_bfd_merge_sections_free): Declare.
2683 * libbfd.h: Regenerate.
2684 * merge.c (_bfd_merge_sections_free): New function.
2685 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): Free
2686 hdr_info->array.
2687 * elf-m10300.c (elf32_mn10300_link_hash_table_free): Call
2688 _bfd_elf_link_hash_table_free.
2689 * elf32-arm.c (elf32_arm_link_hash_table_free): Likewise.
2690 * elf32-avr.c (elf32_avr_link_hash_table_free): Likewise.
2691 * elf32-hppa.c (elf32_hppa_link_hash_table_free): Likewise.
2692 * elf32-i386.c (elf_i386_link_hash_table_free): Likewise.
2693 * elf32-m68hc1x.c (m68hc11_elf_hash_table_free): Likewise.
2694 * elf32-m68k.c (elf_m68k_link_hash_table_free): Likewise.
2695 * elf32-metag.c (elf_metag_link_hash_table_free): Likewise.
2696 * elf32-xgate.c (xgate_elf_bfd_link_hash_table_free): Likewise.
2697 * elf64-aarch64.c (elf64_aarch64_link_hash_table_free): Likewise.
2698 * elf64-ia64-vms.c (elf64_ia64_hash_table_free): Likewise.
2699 * elf64-ppc.c (ppc64_elf_link_hash_table_free): Likewise.
2700 * elf64-x86-64.c (elf_x86_64_link_hash_table_free): Likewise.
2701 * elfnn-ia64.c (elfNN_ia64_hash_table_free): Likewise.
2702 * elf32-cr16.c (elf32_cr16_link_hash_table_free): Delete.
2703 (bfd_elf32_bfd_link_hash_table_free): Don't define.
2704 * elf32-tic6x.c (elf32_tic6x_link_hash_table_free): Delete.
2705 (bfd_elf32_bfd_link_hash_table_free): Dont' define.
2706
7bf52ea2
AM
27072013-02-10 Alan Modra <amodra@gmail.com>
2708
2709 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_zmalloc.
2710 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
2711 * m68klinux.c (linux_link_hash_table_create): Likewise.
2712 * sparclinux.c (linux_link_hash_table_create): Likewise.
2713 * sunos.c (sunos_link_hash_table_create): Likewise.
2714 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
2715 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
2716 * elf32-arm.c (elf32_arm_link_hash_table_create): Likewise.
2717 * elf32-avr.c (elf32_avr_link_hash_table_create): Likewise.
2718 * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
2719 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
2720 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
2721 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
2722 * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
2723 * elf32-m32r.c (m32r_elf_link_hash_table_create): Likewise.
2724 * elf32-m68hc1x.c (m68hc11_elf_hash_table_create): Likewise.
2725 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
2726 * elf32-metag.c (elf_metag_link_hash_table_create): Likewise.
2727 * elf32-nios2.c (nios2_elf32_link_hash_table_create): Likewise.
2728 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
2729 * elf32-score.c (elf32_score_link_hash_table_create): Likewise.
2730 * elf32-spu.c (spu_elf_link_hash_table_create): Likewise.
2731 * elf32-tic6x.c (elf32_tic6x_link_hash_table_create): Likewise.
2732 * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
2733 * elf32-xgate.c (xgate_elf_bfd_link_hash_table_create): Likewise.
2734 * elf32-xtensa.c (elf_xtensa_link_hash_table_create): Likewise.
2735 * elf64-aarch64.c (elf64_aarch64_link_hash_table_create): Likewise.
2736 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
2737 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
2738 * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Likewise.
2739 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
2740 * elflink.c (_bfd_elf_link_hash_table_create): Likewise.
2741 (_bfd_elf_link_hash_table_init): Assume zero fill table on entry.
2742
22cdc249
AM
27432013-02-10 Alan Modra <amodra@gmail.com>
2744
2745 * i386linux.c (linux_link_hash_table_create): Allocate table
2746 with bfd_zmalloc, not bfd_alloc.
2747 * pdp11.c (link_hash_table_create): Allocate table with
2748 bfd_malloc, not bfd_alloc.
2749 * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create): Allocate table
2750 with bfd_zmalloc, not bfd_zalloc.
2751 (bfin_link_hash_table_create): Likewise.
2752 * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
2753 * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
2754
0e5de31a
AM
27552013-02-10 Alan Modra <amodra@gmail.com>
2756
2757 PR ld/15113
2758 * elf32-sh.c (sh_elf_link_hash_table_create): Use bfd_zmalloc.
2759
ad1fc92a
NC
27602013-02-08 Markos Chandras <markos.chandras@imgtec.com>
2761
2762 * elf32-metag.c: Use bfd_get_linker_section to get SEC_LINKER_CREATED
2763 sections.
34c67f14
NC
2764 (elf_metag_adjust_dynamic_symbol): Don't error on zero size dynbss
2765 symbol.
ad1fc92a 2766
170a8295
YZ
27672013-02-08 Yufeng Zhang <yufeng.zhang@arm.com>
2768
2769 * elf64-aarch64.c (elf64_aarch64_grok_prstatus): Change 'size' from
2770 288 to 272.
2771
619a703e
AM
27722013-02-08 Alan Modra <amodra@gmail.com>
2773
2774 PR binutils/15106
2775 * elf-bfd.h (struct elf_obj_tdata): Add elf_find_function_cache.
2776 * elf.c (elf_find_function): Revert last change. Use new
2777 tdata field rather than static vars for cache.
2778
02acbe22
L
27792013-02-07 H.J. Lu <hongjiu.lu@intel.com>
2780
2781 PR ld/15107
2782 * elflink.c (elf_link_output_extsym): Set STB_GNU_UNIQUE only if
2783 symbol is defined in regular object.
2784
1965d5f2
AM
27852013-02-07 Roberto Agostino Vitillo <ra.vitillo@gmail.com>
2786
2787 PR binutils/15106
2788 * elf.c (elf_find_function): Don't cache if symbols change.
2789
dafbc74d
AM
27902013-02-07 Alan Modra <amodra@gmail.com>
2791
2792 PR binutils/14873
2793 * elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to
2794 copy attributes from or to non-ELF.
2795
20e52bd2
L
27962013-02-06 H.J. Lu <hongjiu.lu@intel.com>
2797
2798 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't clear pc_count
2799 for non-zero TLS symbol.
2800 (elf_i386_relocate_section): Don't resolve size relocation against
2801 non-zero TLS symbol.
2802 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Don't clear
2803 pc_count for non-zero TLS symbol.
2804 (elf_x86_64_relocate_section): Don't resolve size relocation
2805 against non-zero TLS symbol.
2806
36591ba1 28072013-02-06 Sandra Loosemore <sandra@codesourcery.com>
20e52bd2 2808 Andrew Jenner <andrew@codesourcery.com>
36591ba1
SL
2809
2810 Based on patches from Altera Corporation.
2811
2812 * Makefile.am (ALL_MACHINES): Add cpu-nios2.lo.
2813 (ALL_MACHINES_CFILES): Add cpu-nios2.c.
2814 (BFD_BACKENDS): Add elf32-nios2.lo.
2815 (BFD32_BACKENDS_CFILES): Add elf32-nios2.c.
2816 * Makefile.in: Regenerated.
2817 * configure.in: Add entries for bfd_elf32_bignios2_vec and
2818 bfd_elf32_littlenios2_vec.
2819 * configure: Regenerated.
2820 * config.bfd: Add cases for nios2.
2821 * archures.c (enum bfd_architecture): Add bfd_arch_nios2.
2822 (bfd_mach_nios2): Define.
2823 (bfd_nios2_arch): Declare.
2824 (bfd_archures_list): Add bfd_nios2_arch.
2825 * targets.c (bfd_elf32_bignios2_vec): Declare.
2826 (bfd_elf32_littlenios2_vec): Declare.
2827 (_bfd_target_vector): Add entries for bfd_elf32_bignios2_vec and
2828 bfd_elf32_littlenios2_vec.
2829 * elf-bfd.h (enum elf_target_id): Add NIOS2_ELF_DATA.
2830 * reloc.c (enum bfd_reloc_code_real): Add Nios II relocations.
2831 * bfd-in2.h: Regenerated.
2832 * libbfd.h: Regenerated.
2833 * cpu-nios2.c: New file.
2834 * elf32-nios2.c: New file.
2835
ca6b5f82
AM
28362013-02-06 Alan Modra <amodra@gmail.com>
2837
2838 * elf32-arm.c (elf32_arm_final_link_relocate): Only test for
2839 stubs in stub_bfd.
2840
37ba9f93
AM
28412013-02-06 Alan Modra <amodra@gmail.com>
2842
2843 * Makefile.am (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
2844 * Makefile.in: Regenerate.
2845
70a38d42
SDJ
28462013-02-04 Sergio Durigan Junior <sergiodj@redhat.com>
2847 Pedro Alves <palves@redhat.com>
2848
2849 * Makefile.in (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
2850 * elf-bfd.h (elf_internal_linux_prpsinfo): New structure
2851 declaration.
2852 (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64)
2853 (elfcore_write_ppc32_linux_prpsinfo32): New declarations.
2854 * elf-linux-psinfo.h: New file.
2855 * elf.c: Include elf-linux-psinfo.h.
2856 (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64):
2857 New functions.
2858 * elf32-ppc.c: Include `elf-linux-psinfo.h'.
2859 (elf_external_ppc_linux_prpsinfo32): New structure declaration.
2860 (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): New macro.
2861 (elfcore_write_ppc_linux_prpsinfo32): New function.
2862
5ee43bc4
TG
28632013-02-04 Tristan Gingold <gingold@adacore.com>
2864
2865 * mach-o.c (bfd_mach_o_scan_start_address): Do not fail if no
2866 start address.
2867
0cadb185
AM
28682013-02-04 Alan Modra <amodra@gmail.com>
2869
2870 * Makefile.am (BFD64_BACKENDS): Remove elf-nacl.lo.
2871 (BFD64_BACKENDS_CFILES): Remove elf-nacl.c.
2872 * Makefile.in: Regenerate.
2873 * po/SRC-POTFILES.in: Regenerate.
2874
5d42dfb5
AM
28752013-02-04 Alan Modra <amodra@gmail.com>
2876
2877 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Delete.
2878 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Delete.
2879
c57da1a7
AM
28802013-02-01 Alan Modra <amodra@gmail.com>
2881
2882 * elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol
2883 clears def_regular.
2884
c0fd7846
TG
28852013-01-31 Tristan Gingold <gingold@adacore.com>
2886
2887 * mach-o.c (bfd_mach_o_scan): Call bfd_mach_o_flatten_sections
2888 earlier. Fix status checking of bfd_mach_o_scan_start_address.
2889 (bfd_mach_o_scan_start_address): Handle LC_MAIN.
2890
b45b6908
AM
28912013-01-31 Alan Modra <amodra@gmail.com>
2892 David S. Miller <davem@davemloft.net>
2893
2894 PR ld/15056
2895 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Handle implicit
2896 references to __tls_get_addr.
2897 * elf32-tilpro.c (tilepro_elf_gc_mark_hook): Likewise. Correct
2898 vtinherit and vtentry reloc handling too.
2899 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): As for tilepro.
2900
bcaa2f82
AM
29012013-01-31 Alan Modra <amodra@gmail.com>
2902
2903 * elf64-ppc.c (ppc_stub_name): Trim off trailing "+0".
2904
22aa0c7e
AM
29052013-01-31 Alan Modra <amodra@gmail.com>
2906
2907 * elf64-ppc.c (build_plt_stub): Correct plt stub branch to glink.
2908
bc30df16
AM
29092013-01-28 Alan Modra <amodra@gmail.com>
2910
2911 * elf64-ppc.c: Use %T to print symbols names and remove redundant
2912 "relocation" in error messages throughout file.
2913 (ppc64_elf_relocate_section): Remove sibling call error message,
2914 replace with "call lacks nop". Specially report errors for
2915 branches to function entry points via OPD lookup and branches
2916 to stubs. Remove NULL symbol handling now done by %T.
2917
89d7b8aa
AM
29182013-01-28 Alan Modra <amodra@gmail.com>
2919
2920 * archive.c (bfd_generic_archive_p): Return target and keep
2921 ardata on partial matches.
2922 * format.c (bfd_check_format_matches): Adjust for above
2923 change. Remove bfd_error_file_ambiguously_recognized dead
2924 code.
2925
c9ba0c87
AM
29262013-01-26 Alan Modra <amodra@gmail.com>
2927
2928 * bfd.c (struct bfd_preserve, bfd_preserve_save, bfd_preserve_restore,
2929 bfd_preserve_finish): Move to..
2930 * format.c: ..here, splitting out..
2931 (bfd_reinit): ..this. New function.
2932 (bfd_check_format_matches): Use bfd_preserve_save/restore to
2933 keep bfd state for a match.
2934 * elfcode.h (elf_object_p): Don't use bfd_preserve_save/restore.
2935 * elfcore.h (elf_core_file_p): Likewise.
2936 * mach-o.c (bfd_mach_o_header_p): Likewise.
2937 * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
2938 * xsym.c (bfd_sym_object_p): Likewise.
2939 * mmo.c (mmo_scan): Clear abfd->symcount.
2940 * opncls.c (_bfd_new_bfd): Use a smaller section hash table.
2941 * section.c (bfd_section_list_clear): Clear section_htab.count.
2942 * bfd-in2.h: Regenerate.
2943
d79dcc73
NC
29442013-01-25 Michael Schewe <michael.schewe@gmx.net>
2945
2946 * elf32-h8300.c (elf32_h8_relax_section): When checking for a
2947 second reloc, make sure that the reloc potentially exists first.
2948
78c8d46c
NC
29492013-01-24 Nick Clifton <nickc@redhat.com>
2950
2951 * archures.c: Add bfd_mach_v850e3v5.
2952 * bfd-in2.h: Regenerate.
2953 * cpu-v850.c: Add entries for v850e2v5 and v850e3v5.
2954 * cpu-v850_rh850.c: Likewise.
2955 * elf32-v850.c: Add support for v850e3v5 architecture.
2956
1a18f0ae
NC
29572013-01-23 Markos Chandras <markos.chandras@imgtec.com>
2958
2959 * elf32-metag.c: Error on HIADDR16/LOADDR16 in shared link.
2960
f65a9e53
AM
29612013-01-23 Leif Ekblad <leif@rdos.net>
2962
2963 * config.bfd (x86_64-*-rdos*): Remove targ_selvecs.
2964
3bea1fcb
L
29652013-01-18 H.J. Lu <hongjiu.lu@intel.com>
2966
2967 * elf32-i386.c (elf_i386_allocate_dynrelocs): Clear pc_count for
2968 non-zero TLS symbol.
2969 (elf_i386_relocate_section): Resolve size relocation against
2970 non-zero TLS symbol.
2971 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Clear pc_count
2972 for non-zero TLS symbol.
2973 (elf_x86_64_relocate_section): Resolve size relocation against
2974 non-zero TLS symbol.
2975
b1b00fcc
MF
29762013-01-18 Mike Frysinger <vapier@gentoo.org>
2977
2978 * elflink.c (bfd_elf_size_dynamic_sections): Only add DT_RPATH
2979 when new_dtags is false. Only add DT_RUNPATH when new_dtags is
2980 true.
2981
06a6a421
L
29822013-01-17 H.J. Lu <hongjiu.lu@intel.com>
2983
2984 * elf32-i386.c (elf_i386_check_relocs): Count size relocation as
2985 PC-relative relocation.
2986 * elf64-x86-64.c (elf_x86_64_check_relocs): Count size relocation
2987 as PC-relative relocation.
2988
6a3e1bae
L
29892013-01-16 H.J. Lu <hongjiu.lu@intel.com>
2990
2991 * elf32-i386.c (elf_i386_check_relocs): Update R_386_SIZE32
2992 check.
2993 (elf_i386_relocate_section): Don't check TLS for R_386_SIZE32.
2994
2995 * elf64-x86-64.c (elf_x86_64_check_relocs): Update R_X86_64_SIZE32
2996 and R_X86_64_SIZE64 check.
2997 (elf_x86_64_relocate_section): Don't check TLS for R_X86_64_SIZE32
2998 nor R_X86_64_SIZE64.
2999
1788fc08
L
30002013-01-16 H.J. Lu <hongjiu.lu@intel.com>
3001
3002 * bfd-in2.h: Regenerated.
3003 * libbfd.h: Likewise.
3004
3005 * elf32-i386.c (elf_howto_table): Fill R_386_SIZE32 entry.
3006 (elf_i386_reloc_type_lookup): Support BFD_RELOC_SIZE32.
3007 (elf_i386_check_relocs): Handle R_386_SIZE32.
3008 (elf_i386_gc_sweep_hook): Likewise.
3009 (elf_i386_relocate_section): Likewise.
3010
3011 * elf64-x86-64.c (x86_64_elf_howto_table): Fill R_X86_64_SIZE32
3012 and R_X86_64_SIZE64 entries.
3013 (x86_64_reloc_map): Add BFD_RELOC_SIZE32 and BFD_RELOC_SIZE64,
3014 (elf_x86_64_rtype_to_howto): Handle R_X86_64_SIZE32 for x32.
3015 (elf_x86_64_reloc_name_lookup): Likewise.
3016 (elf_x86_64_check_relocs): Handle R_X86_64_SIZE32 and
3017 R_X86_64_SIZE64.
3018 (elf_x86_64_gc_sweep_hook): Likewise.
3019 (elf_x86_64_relocate_section): Likewise.
3020
3021 * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SIZE32 and
3022 BFD_RELOC_SIZE64.
3023
1e536451
L
30242013-01-15 H.J. Lu <hongjiu.lu@intel.com>
3025
3026 * elf64-x86-64.c (R_X86_64_standard): Replace R_X86_64_IRELATIVE
3027 with R_X86_64_RELATIVE64.
3028
77bf820f
NC
30292013-01-15 Nick Clifton <nickc@redhat.com>
3030
3031 * elf32-msp430.c: Fix spelling typo.
3032
e2458743
AM
30332013-01-15 Alan Modra <amodra@gmail.com>
3034
3035 * elf64-ppc.c (ppc64_elf_size_stubs): Default shared libs to
3036 plt-thread-safe.
3037
405bf443
AM
30382013-01-14 Alan Modra <amodra@gmail.com>
3039
3040 PR binutils/14813
3041 * bfdio.c (struct bfd_iovec <bclose>): Revert 2012-11-06.
3042 (memory_bclose): Likewise. Return 0 on success.
3043 * cache.c (cache_bclose): Likewise.
3044 * opncls.c (opncls_bclose, bfd_close): Likewise.
3045 * vms-lib.c (vms_lib_bclose): Likewise.
3046 * libbfd.h: Regenerate.
3047
ee659f1f
AM
30482013-01-13 Alan Modra <amodra@gmail.com>
3049
3050 * elf-bfd.h (struct elf_link_hash_entry): Delete dynamic_weak.
3051 Add ref_dynamic_nonweak.
3052 * elflink.c (_bfd_elf_mark_dynamic_def_weak): Delete.
3053 (_bfd_elf_merge_symbol): Don't call above function. Move
3054 setting of ref_dynamic_nonweak and dynamic_def earlier. Don't
3055 clear dynamic_def.
3056 (elf_link_add_object_symbols): Delete redundant "override" test.
3057 Don't set dynamic_def here.
3058 (elf_link_output_extsym): Update.
3059
68c4a57e
L
30602013-01-12 H.J. Lu <hongjiu.lu@intel.com>
3061
3062 * elf32-i386.c (elf_i386_check_relocs): Set bfd errror for
3063 normal and TLS symbol access.
3064 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
3065
02be4619
AM
30662013-01-12 Alan Modra <amodra@gmail.com>
3067
3068 * elf-bfd.h (_bfd_elf_strtab_refcount): Declare.
3069 * elf-strtab.c (_bfd_elf_strtab_refcount): New function.
3070 * elflink.c (elf_add_dt_needed_tag): Use _bfd_elf_strtab_refcount.
3071
a4542f1b
AM
30722013-01-12 Alan Modra <amodra@gmail.com>
3073
3074 PR ld/12549
3075 * elf-bfd.h (_bfd_elf_strtab_clear_refs): Declare.
3076 (_bfd_elf_strtab_clear_all_refs): Define.
3077 * elf-strtab.c (_bfd_elf_strtab_clear_refs): New function.
3078 (_bfd_elf_strtab_clear_all_refs): Delete.
3079 * elflink.c (elf_link_add_object_symbols): Clear out added
3080 strtab refs. Correct handling of warning common symbols.
3081
68ffbac6
L
30822013-01-10 H.J. Lu <hongjiu.lu@intel.com>
3083
3084 * aout0.c: Remove trailing white spaces.
3085 * archive.c: Likewise.
3086 * archures.c: Likewise.
3087 * bfd-in.h: Likewise.
3088 * bfd-in2.h: Likewise.
3089 * coff-alpha.c: Likewise.
3090 * coff-i860.c: Likewise.
3091 * coff-mips.c: Likewise.
3092 * coff-ppc.c: Likewise.
3093 * coff-tic80.c: Likewise.
3094 * coff-x86_64.c: Likewise.
3095 * coff-z80.c: Likewise.
3096 * coffcode.h: Likewise.
3097 * coffgen.c: Likewise.
3098 * cofflink.c: Likewise.
3099 * compress.c: Likewise.
3100 * corefile.c: Likewise.
3101 * cpu-arm.c: Likewise.
3102 * cpu-avr.c: Likewise.
3103 * cpu-bfin.c: Likewise.
3104 * cpu-cr16.c: Likewise.
3105 * cpu-cr16c.c: Likewise.
3106 * cpu-crx.c: Likewise.
3107 * cpu-h8300.c: Likewise.
3108 * cpu-i386.c: Likewise.
3109 * cpu-lm32.c: Likewise.
3110 * cpu-m68k.c: Likewise.
3111 * cpu-moxie.c: Likewise.
3112 * cpu-msp430.c: Likewise.
3113 * cpu-sh.c: Likewise.
3114 * cpu-xc16x.c: Likewise.
3115 * dwarf2.c: Likewise.
3116 * ecofflink.c: Likewise.
3117 * ecoffswap.h: Likewise.
3118 * elf-ifunc.c: Likewise.
3119 * elf-m10300.c: Likewise.
3120 * elf-vxworks.c: Likewise.
3121 * elf32-avr.c: Likewise.
3122 * elf32-avr.h: Likewise.
3123 * elf32-cr16.c: Likewise.
3124 * elf32-cr16c.c: Likewise.
3125 * elf32-cris.c: Likewise.
3126 * elf32-crx.c: Likewise.
3127 * elf32-frv.c: Likewise.
3128 * elf32-hppa.c: Likewise.
3129 * elf32-i860.c: Likewise.
3130 * elf32-ip2k.c: Likewise.
3131 * elf32-iq2000.c: Likewise.
3132 * elf32-m32c.c: Likewise.
3133 * elf32-m68hc1x.c: Likewise.
3134 * elf32-msp430.c: Likewise.
3135 * elf32-mt.c: Likewise.
3136 * elf32-ppc.c: Likewise.
3137 * elf32-rl78.c: Likewise.
3138 * elf32-s390.c: Likewise.
3139 * elf32-score.h: Likewise.
3140 * elf32-sh-symbian.c: Likewise.
3141 * elf32-sh.c: Likewise.
3142 * elf32-spu.c: Likewise.
3143 * elf32-tic6x.c: Likewise.
3144 * elf32-v850.c: Likewise.
3145 * elf32-xc16x.c: Likewise.
3146 * elf32-xtensa.c: Likewise.
3147 * elf64-alpha.c: Likewise.
3148 * elf64-hppa.c: Likewise.
3149 * elf64-ppc.c: Likewise.
3150 * elf64-s390.c: Likewise.
3151 * elfcore.h: Likewise.
3152 * elflink.c: Likewise.
3153 * elfxx-mips.c: Likewise.
3154 * elfxx-sparc.c: Likewise.
3155 * elfxx-tilegx.c: Likewise.
3156 * ieee.c: Likewise.
3157 * libcoff.h: Likewise.
3158 * libpei.h: Likewise.
3159 * libxcoff.h: Likewise.
3160 * linker.c: Likewise.
3161 * mach-o-i386.c: Likewise.
3162 * mach-o-target.c: Likewise.
3163 * mach-o.c: Likewise.
3164 * mach-o.h: Likewise.
3165 * mmo.c: Likewise.
3166 * opncls.c: Likewise.
3167 * pdp11.c: Likewise.
3168 * pe-x86_64.c: Likewise.
3169 * peXXigen.c: Likewise.
3170 * pef-traceback.h: Likewise.
3171 * pei-x86_64.c: Likewise.
3172 * peicode.h: Likewise.
3173 * plugin.c: Likewise.
3174 * reloc.c: Likewise.
3175 * riscix.c: Likewise.
3176 * section.c: Likewise.
3177 * som.c: Likewise.
3178 * syms.c: Likewise.
3179 * tekhex.c: Likewise.
3180 * ticoff.h: Likewise.
3181 * vaxbsd.c: Likewise.
3182 * xcofflink.c: Likewise.
3183 * xtensa-isa.c: Likewise.
3184
a3c62988
NC
31852013-01-10 Will Newton <will.newton@imgtec.com>
3186
3187 * Makefile.am: Add Meta.
3188 * Makefile.in: Regenerate.
3189 * archures.c (bfd_mach_metag): New.
3190 * bfd-in2.h: Regenerate.
3191 * config.bfd: Add Meta.
3192 * configure: Regenerate.
3193 * configure.in: Add Meta.
3194 * cpu-metag.c: New file.
3195 * elf-bfd.h: Add Meta.
3196 * elf32-metag.c: New file.
3197 * elf32-metag.h: New file.
3198 * libbfd.h: Regenerate.
3199 * reloc.c: Add Meta relocations.
3200 * targets.c: Add Meta.
3201
652451f8
YZ
32022013-01-08 Yufeng Zhang <yufeng.zhang@arm.com>
3203
3204 * elf-bfd.h (elfcore_write_aarch_tls): Add prototype.
3205 (elfcore_write_aarch_hw_break): Likewise.
3206 (elfcore_write_aarch_hw_watch): Likewise.
3207 * elf.c (elfcore_grok_aarch_tls): New function.
3208 (elfcore_grok_aarch_hw_break): Likewise.
3209 (elfcore_grok_aarch_hw_watch): Likewise.
3210 (elfcore_grok_note): Call the new functions to handle the
3211 corresponding notes.
3212 (elfcore_write_aarch_tls): New function.
3213 (elfcore_write_aarch_hw_break): Likewise.
3214 (elfcore_write_aarch_hw_watch): Likewise.
3215 (elfcore_write_register_note): Call the new functions to handle the
3216 corresponding pseudo sections.
3217
45a466b5
TT
32182013-01-07 Tom Tromey <tromey@redhat.com>
3219
3220 * section.c (_bfd_std_section): Rename from std_section.
f75e0e33
AM
3221 (bfd_com_section_ptr, bfd_und_section_ptr, bfd_abs_section_ptr)
3222 (STD_SECTION): Update.
45a466b5
TT
3223 * bfd-in2.h: Rebuild.
3224
e407c74b
NC
32252013-01-04 Juergen Urban <JuergenUrban@gmx.de>
3226
3227 * archures.c (bfd_mach_mips5900): Define.
3228 * bfd-in2.h: Regenerate.
3229 * config.bfd: Add mips64-ps2-elf and mips-ps2-elf targets.
3230 * cpu-mips.c: Add support for MIPS r5900.
3231 * elfxx-mips.c: Add support for MIPS r5900 (extension of r4000).
3232
9b239e0e
NC
32332013-01-03 Nickolai Zeldovich <nickolai@csail.mit.edu>
3234 Nick Clifton <nickc@redhat.com>
3235
3236 * elflink.c (get_value): Prevent the use of an undefined shift
3237 operation. Add sanity checks.
3238
bab4becb 32392013-01-02 Kaushik Phatak <kaushik.phatak@kpitcummins.com>
884f2a8d 3240
bab4becb 3241 * config.bfd (cr16*-*-uclinux*): New target support.
884f2a8d 3242
9911c0fc 3243
bab4becb 3244For older changes see ChangeLog-2012
56882138 3245\f
bab4becb 3246Copyright (C) 2013 Free Software Foundation, Inc.
752937aa
NC
3247
3248Copying and distribution of this file, with or without modification,
3249are permitted in any medium without royalty provided the copyright
3250notice and this notice are preserved.
3251
56882138
AM
3252Local Variables:
3253mode: change-log
3254left-margin: 8
3255fill-column: 74
3256version-control: never
3257End:
This page took 1.082692 seconds and 4 git commands to generate.