Add support for constructing pc-relative addresses to the plt, by
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
e5b95258
WL
12012-08-27 Walter Lee <walt@tilera.com>
2
3 * reloc.c (Add BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL,
4 BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
5 BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
6 BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
7 BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
8 BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
9 BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL,
10 BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
11 BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL,
12 BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
13 BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
14 BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
15 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
16 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): new relocations.
17 * elfxx-tilegx.c (tilegx_elf_howto_table): Handle new relocations.
18 (tilegx_reloc_map): Ditto.
19 (reloc_to_create_func): Ditto.
20 (tilegx_elf_check_relocs): Ditto.
21 (tilegx_elf_gc_sweep_hook): Ditto.
22 (tilegx_elf_relocate_section): Ditto.
23 * libbfd.h: Regenerate.
24 * bfd-in2.h: Regenerate.
25
bca38921
MGD
262012-08-24 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
27
28 * elf32-arm.c (v8): New array.
29 (tag_cpu_arch_combine): Add support for ARMv8 attributes.
30 (elf32_arm_merge_eabi_attributes): Likewise.
31 (VFP_VERSION_COUNT): New define.
32
06e7acd7
TT
332012-08-20 Tom Tromey <tromey@redhat.com>
34
35 * vms-lib.c (_bfd_vms_lib_get_module): Use bfd_zmalloc for
36 areltdata.
37 * opncls.c (_bfd_delete_bfd): Free arelt_data.
38 * mach-o.c (bfd_mach_o_fat_member_init): Use bfd_zmalloc for
39 areltdata.
40 * ecoff.c (_bfd_ecoff_slurp_armap): Use free for mapdata.
41 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Use bfd_zmalloc for
42 areltdata.
43 (xcoff_write_archive_contents_old): Likewise.
44 (xcoff_write_archive_contents_big): Likewise.
45 * archive64.c (bfd_elf64_archive_slurp_armap): Use free for
46 areltdata.
47 * archive.c (_bfd_generic_read_ar_hdr_mag): Use bfd_zmalloc and
48 free for areltdata.
49 (_bfd_get_elt_at_filepos): Likewise. Clear n_nfd->arelt_data on
50 failure.
51 (do_slurp_bsd_armap): Use bfd_zmalloc and free for areltdata.
52 (do_slurp_coff_armap): Likewise.
53 (_bfd_slurp_extended_name_table): Likewise.
54 (bfd_slurp_bsd_armap_f2): Likewise. Don't leak 'mapdata'.
55
eb80cb87
NC
562012-08-17 Nick Clifton <nickc@redhat.com>
57
58 * po/vi.po: Updated Vietnamese translation.
59
a8685210
AM
602012-08-17 Yuri Chornoivan <yurchor@ukr.net>
61
62 * elf-bfd.h, * elf32-ppc.c, * elf64-ia64-vms.c, * elfnn-ia64.c,
63 * elfxx-mips.c, * vms-alpha.c: Typo fixes.
64
ed668b34
AM
652012-08-17 Alan Modra <amodra@gmail.com>
66
67 PR binutils/14475:
68 * archive.c (bfd_ar_hdr_from_filesystem): Revert last change.
69 Instead malloc areltdata.
70
a3074307
TT
712012-08-16 Tom Tromey <tromey@redhat.com>
72
73 PR binutils/14475:
74 * archive.c (bfd_ar_hdr_from_filesystem): Allocate areltdata on
75 'member' BFD. Don't try to free 'ared'.
76
63a79b61
NC
772012-08-14 Nick Clifton <nickc@redhat.com>
78
79 * po/uk.po: Updated Ukranian translation.
80
af0edeb8
MR
812012-08-13 Maciej W. Rozycki <macro@codesourcery.com>
82
83 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Look up
84 the options section in the output rather than input BFD to
85 decide if to add a DT_MIPS_OPTIONS tag.
86
9edaacb3
MR
872012-08-13 Maciej W. Rozycki <macro@codesourcery.com>
88
89 * config.bfd: Wrap mips*el-*-linux* and mips*-*-linux* into
90 #ifdef BFD64.
91
a06ea964
NC
922012-08-13 Ian Bolton <ian.bolton@arm.com>
93 Laurent Desnogues <laurent.desnogues@arm.com>
94 Jim MacArthur <jim.macarthur@arm.com>
95 Marcus Shawcroft <marcus.shawcroft@arm.com>
96 Nigel Stephens <nigel.stephens@arm.com>
97 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
98 Richard Earnshaw <rearnsha@arm.com>
99 Sofiane Naci <sofiane.naci@arm.com>
100 Tejas Belagod <tejas.belagod@arm.com>
101 Yufeng Zhang <yufeng.zhang@arm.com>
102
103 * Makefile.am: Add AArch64 files.
104 * Makefile.in: Regenerate.
105 * archures.c (bfd_aarch64_arch): New declaration.
106 (bfd_archures_list): Use bfd_archures_list.
107 * bfd-in.h (bfd_elf64_aarch64_init_maps): New declaration.
108 (bfd_aarch64_process_before_allocation): New declaration.
109 (bfd_elf64_aarch64_process_before_allocation): New declaration.
110 (bfd_elf64_aarch64_set_options): New declaration.
111 (bfd_elf64_aarch64_add_glue_sections_to_bfd): New declaration.
112 (BFD_AARCH64_SPECIAL_SYM_TYPE_MAP): New definition.
113 (BFD_AARCH64_SPECIAL_SYM_TYPE_TAG): New definition.
114 (BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER): New definition.
115 (BFD_AARCH64_SPECIAL_SYM_TYPE_ANY): New definition.
116 (bfd_is_aarch64_special_symbol_name): New declaration.
117 (bfd_aarch64_merge_machines): New declaration.
118 (bfd_aarch64_update_notes): New declaration.
119 (int bfd_aarch64_get_mach_from_notes): New declaration.
120 (elf64_aarch64_setup_section_lists): New declaration.
121 (elf64_aarch64_next_input_section): New declaration.
122 (elf64_aarch64_size_stubs): New declaration.
123 (elf64_aarch64_build_stubs): New declaration.
124 * config.bfd: Add AArch64.
125 * configure.in: Add AArch64.
126 * configure: Regenerate.
127 * cpu-aarch64.c: New file.
128 * elf-bfd.h: Add AArch64.
129 * bfd-in2.h: Regenerate.
130 * libbfd.h: Regenerate.
131 * elf64-aarch64.c: New file.
132 * reloc.c: Add AArch64 relocations.
133 * targets.c: Add AArch64.
134 * po/SRC-POTFILES.in: Regenerate.
135
9f1a453e
MR
1362012-08-13 Maciej W. Rozycki <macro@codesourcery.com>
137
138 * elfxx-mips.c (mips_elf_calculate_relocation): Fix the handling
139 of protected symbols.
140
44534af3
AM
1412012-08-10 Alan Modra <amodra@gmail.com>
142
143 PR binutils/14444
144 * elf.c (IS_VALID_GROUP_SECTION_HEADER) Add minsize param.
145 (setup_group): Adjust uses.
146 (bfd_section_from_shdr): Allow SHT_GROUP sections with just a flag
147 word.
148
3c892704
NC
1492012-08-09 Nick Clifton <nickc@redhat.com>
150
151 * po/vi.po: Updated Vietnamese translation.
152
d21911ea
MR
1532012-08-09 Maciej W. Rozycki <macro@codesourcery.com>
154
155 * elfxx-mips.c (LA25_LUI_MICROMIPS_1, LA25_LUI_MICROMIPS_2):
156 Remove macros, folding them into...
157 (LA25_LUI_MICROMIPS): ... this new macro.
158 (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise into...
159 (LA25_J_MICROMIPS): ... this new macro.
160 (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise
161 into...
162 (LA25_ADDIU_MICROMIPS): ... this new macro.
163 (bfd_put_micromips_32, bfd_get_micromips_32): New functions.
164 (mips_elf_create_la25_stub): Use them.
165 (check_br32_dslot, check_br32, check_relocated_bzc): Likewise.
166 (_bfd_mips_elf_relax_section): Likewise.
167
eeb1f9ae
AM
1682012-08-09 Alan Modra <amodra@gmail.com>
169 Tom Tromey <tromey@redhat.com>
170
171 * archive.c (SECTION Archives): Update documentation.
172 (_bfd_delete_archive_data): Remove.
173 (_bfd_add_bfd_to_archive_cache): Set 'parent_cache' and 'key'.
174 (archive_close_worker, _bfd_archive_close_and_cleanup): New
175 functions.
176 * libbfd-in.h (struct areltdata <parent_cache, key>): New fields.
177 (_bfd_delete_archive_data): Don't declare.
178 (_bfd_archive_close_and_cleanup): Declare.
179 (_bfd_generic_close_and_cleanup): Redefine.
180 * libbfd.h: Rebuild.
181 * opncls.c (_bfd_delete_bfd): Don't call _bfd_delete_archive_data.
182 (bfd_close): Don't close nested thin archives here.
183
a988325c
NC
1842012-08-07 Tom Tromey <tromey@redhat.com>
185
186 * archive.c (_bfd_delete_archive_data): New function.
187 * libbfd-in.h (_bfd_delete_archive_data): Declare.
188 * libbfd.h: Rebuild.
189 * opncls.c (_bfd_delete_bfd): Call _bfd_delete_archive_data.
190
5125d2b0
NC
1912012-08-07 Nick Clifton <nickc@redhat.com>
192
193 * po/uk.po: Updated Ukranian translation.
194
eb8476a6
MR
1952012-08-06 Maciej W. Rozycki <macro@codesourcery.com>
196
197 * elflink.c (bfd_elf_record_link_assignment): Remove --defsym
198 symbols special case.
199
a22a8039
MR
2002012-08-05 Maciej W. Rozycki <macro@linux-mips.org>
201
202 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Don't allocate
203 PLT slots for local symbols.
204
1a6c3ca2
MR
2052012-08-03 Maciej W. Rozycki <macro@codesourcery.com>
206
207 * elf64-mips.c (mips16_elf64_howto_table_rela): Correct src_mask
208 field initializers throughout.
209 * elfn32-mips.c (elf_mips16_howto_table_rela): Likewise.
210
3bdf9505
MR
2112012-08-03 Maciej W. Rozycki <macro@codesourcery.com>
212
213 * elfxx-mips.c (mips_elf_perform_relocation): Update the
214 cross-mode jump message.
215
6e6be592
MR
2162012-08-03 Maciej W. Rozycki <macro@codesourcery.com>
217
218 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Update the
219 comment on DT_MIPS_RLD_MAP.
220
7b84f8da
TT
2212012-08-03 Tom Tromey <tromey@redhat.com>
222
223 * opncls.c (_bfd_delete_bfd): Now static.
224 * libbfd-in.h (_bfd_delete_bfd): Don't declare.
225 * libbfd.h: Rebuild.
226
9a92d0ce
SK
2272012-08-02 Sean Keys <skeys@ipdatasys.com>
228
229 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Modified
230 conditional statment to allow suppression of mismatched bank
231 warning.
232
1c37913d
AM
2332012-08-01 Alan Modra <amodra@gmail.com>
234
235 * dwarf2.c (struct dwarf2_debug): Add close_on_cleanup.
236 (_bfd_dwarf2_slurp_debug_info): Set close_on_cleanup if we open
237 gnu_debuglink bfd.
238 (_bfd_dwarf2_cleanup_debug_info): Act on close_on_cleanup.
239
a6dc81d2
NC
2402012-07-30 Nick Clifton <nickc@redhat.com>
241
242 * po/bfd.pot: Updated template.
243 * po/es.po: Updated Spanish translation.
244 * po/fi.po: Updated Finnish translation.
245 * po/fr.po: Updated French translation.
246 * po/ru.po: Updated Russian translation.
247 * po/uk.po: Updated Ukranian translation.
248
c4dd807e
MF
2492012-07-27 Mike Frysinger <vapier@gentoo.org>
250
251 * configure.in (AC_INIT): Call with the args bfd and 2.22.52.
252 (AM_INIT_AUTOMAKE): Remove args.
253 * configure: Regenerate.
254
c92b291c
AK
2552012-07-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
256
257 * cpu-s390.c (bfd_s390_64_arch, bfd_s390_arch): Pick the default
258 arch depending on the target size.
259
ecdf0cbb
TG
2602012-07-27 Tristan Gingold <gingold@adacore.com>
261
262 * configure.in: Bump version to 2.23.51
263 * configure: Regenerate.
264
f725daa8
CC
2652012-07-26 Teresa Johnson <tejohnson@google.com>
266
267 * bfd/dwarf2.c (find_line): Initialize discriminator_ptr
268 if it is non-NULL.
269
05456594
NC
2702012-07-26 Meador Inge <meadori@codesourcery.com>
271 Nick Clifton <nickc@redhat.com>
272
273 PR ld/14397
274 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Report an error
275 if a required section is missing from the linker script.
276
6aa82b64
EW
2772012-07-24 Jan Waclawek <konfera@efton.sk>
278 PR 13899
279 * elf32-avr.c (elf32_avr_relax_delete_bytes): Call
280 _bfd_elf_link_read_relocs with keep_memory as TRUE.
281
9b8d1a36
CC
2822012-07-24 Teresa Johnson <tejohnson@google.com>
283
284 * bfd.c (bfd_find_nearest_line_discriminator): New macro.
285 * coff-rs6000.c: Init _bfd_find_nearest_line_discriminator.
286 * coff64-rs6000.c: Likewise.
287 * dwarf2.c (struct line_info): Add discriminator field.
288 (add_line_info): Fill in new discriminator field.
289 (decode_line_info): Record discriminator information instead
44534af3 290 of ignoring it.
9b8d1a36 291 (lookup_address_in_line_info_table): Return discriminator field if
44534af3 292 requested.
9b8d1a36
CC
293 (comp_unit_find_nearest_line): Add discriminator argument.
294 (find_line): Likewise.
295 (_bfd_dwarf2_find_nearest_line): Likewise.
296 (_bfd_dwarf2_find_line): Likewise.
297 * elf-bfd.h (_bfd_elf_find_nearest_line_discriminator): New.
44534af3
AM
298 (_bfd_elf_find_line_discriminator): Likewise.
299 (_bfd_generic_find_nearest_line_discriminator): Likewise. Defined.
9b8d1a36 300 * elf.c (_bfd_elf_find_nearest_line): Change to a wrapper
44534af3
AM
301 that invokes _bfd_elf_find_nearest_line_discriminator with correct
302 arguments.
9b8d1a36
CC
303 (_bfd_elf_find_nearest_line_discriminator): New.
304 (_bfd_elf_find_line): Change to a wrapper
44534af3
AM
305 that invokes _bfd_elf_find_line_discriminator with correct
306 arguments.
9b8d1a36
CC
307 (_bfd_elf_find_line_discriminator): New.
308 * coffgen.c (coff_find_nearest_line_with_names): Handle
44534af3 309 new discriminator argument.
9b8d1a36
CC
310 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
311 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
312 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
313 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
314 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Add discriminator
44534af3
AM
315 argument.
316 (_bfd_dwarf2_find_line): Likewise.
317 (_bfd_generic_find_nearest_line_discriminator): New.
9b8d1a36
CC
318 * libbfd.c (_bfd_generic_find_nearest_line_discriminator): New.
319 * bfd-in2.h: Regenerated.
320 * libbfd.h: Likewise.
321 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize
44534af3
AM
322 _bfd_find_nearest_line_discriminator with
323 _bfd_generic_find_nearest_line_discriminator.
324 (bfd_target): Add _bfd_find_nearest_line_discriminator.
9b8d1a36 325
082d1122
NC
3262012-07-24 Sean Keys <skeys@ipdatasys.com>
327
44534af3 328 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Added code
082d1122 329 that enables the linker to offset addresses, when linking against
44534af3 330 symbols from the XGATE processor and vice versa.
082d1122 331
d86492f2
NC
3322012-07-23 Nick Clifton <nickc@redhat.com>
333
334 * cisco-core.c (cisco_core_file_failing_command): Make static.
335 (cisco_core_file_failing_signal): Make static.
336
7c960184
L
3372012-07-18 H.J. Lu <hongjiu.lu@intel.com>
338
339 * bfd-in2.h: Regenerated.
340
c06fc9eb
L
3412012-07-18 Nicolàs Alejandro Di Risio <sheeva@tiscali.it>
342
343 PR binutils/14335
344 * section.c: Fix a typo in comments.
345
470b557a
AK
3462012-07-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
347
348 * elf64-s390.c: Include elf-s390-common.c.
349 (R_390_IRELATIVE): New reloc.
350 (elf_s390_reloc_type_lookup): Support R_390_IRELATIVE.
351 (RELA_ENTRY_SIZE): New macro.
352 (elf_s390_link_hash_entry): New fields ifunc_resolver_address and
353 *ifunc_resolver_section.
354 (struct plt_entry): New struct.
355 (struct elf_s390_obj_tdata): New field local_plt.
356 (elf_s390_local_plt): New macro.
357 (struct elf_s390_link_hash_table): New field irelifunc.
358 (ELF64): New macro.
359 (link_hash_newfunc): Initialize new fields.
360 (elf_s390_check_relocs): Handle IFUNC symbols.
361 (elf_s390_adjust_dynamic_symbol): Don't do anything for IFUNC
362 symbols.
363 (allocate_dynrelocs): Call s390_elf_allocate_ifunc_dyn_relocs for
364 IFUNC symbols.
365 (elf_s390_size_dynamic_sections): Handle IFUNC symbols.
366 (elf_s390_relocate_section): Likewise.
367 (elf_s390_finish_dynamic_symbol): Likewise.
368 (elf_s390_finish_dynamic_sections): Handle local IFUNC symbols.
369 (elf_s390_finish_ifunc_symbol): New function.
370 (elf_s390_gc_sweep_hook): Handle local plt entries.
371 (elf_backend_add_symbol_hook): Define.
372 * elf32-s390.c: See elf64-s390.c changes.
373 * elf-s390-common.c: New file.
374 * bfd-in2.h (BFD_RELOC_390_IRELATIVE): New enum field.
375 * libbfd.h (BFD_RELOC_390_IRELATIVE): New entry for
376 BFD_RELOC_390_IRELATIVE.
377 * reloc.c (BFD_RELOC_390_IRELATIVE): Document new relocation.
378
2c3fc389
NC
3792012-07-13 Nick Clifton <nickc@redhat.com>
380
381 * aix386-core.c: Remove use of PTR and PARAMS macros.
382 * archive.c: Likewise.
383 * cache.c: Likewise.
384 * cisco-core.c: Likewise.
385 * coff-alpha.c: Likewise.
386 * coff-apollo.c: Likewise.
387 * coff-aux.c: Likewise.
388 * coff-h8300.c: Likewise.
389 * coff-h8500.c: Likewise.
390 * coff-i386.c: Likewise.
391 * coff-i960.c: Likewise.
392 * coff-ia64.c: Likewise.
393 * coff-m68k.c: Likewise.
394 * coff-m88k.c: Likewise.
395 * coff-mcore.c: Likewise.
396 * coff-mips.c: Likewise.
397 * coff-or32.c: Likewise.
398 * coff-ppc.c: Likewise.
399 * coff-rs6000.c: Likewise.
400 * coff-sh.c: Likewise.
401 * coff-sparc.c: Likewise.
402 * coff-stgo32.c: Likewise.
403 * coff-tic30.c: Likewise.
404 * coff-tic4x.c: Likewise.
405 * coff-tic54x.c: Likewise.
406 * coff-tic80.c: Likewise.
407 * coff-w65.c: Likewise.
408 * cofflink.c: Likewise.
409 * cpu-arc.c: Likewise.
410 * cpu-cris.c: Likewise.
411 * cpu-h8500.c: Likewise.
412 * cpu-i960.c: Likewise.
413 * cpu-msp430.c: Likewise.
414 * cpu-ns32k.c: Likewise.
415 * cpu-powerpc.c: Likewise.
416 * cpu-rs6000.c: Likewise.
417 * cpu-tic4x.c: Likewise.
418 * cpu-w65.c: Likewise.
419 * ecoff.c: Likewise.
420 * ecofflink.c: Likewise.
421 * elf-m10200.c: Likewise.
422 * elf32-bfin.c: Likewise.
423 * elf32-cris.c: Likewise.
424 * elf32-crx.c: Likewise.
425 * elf32-fr30.c: Likewise.
426 * elf32-frv.c: Likewise.
427 * elf32-h8300.c: Likewise.
428 * elf32-i960.c: Likewise.
429 * elf32-m32c.c: Likewise.
430 * elf32-m68hc11.c: Likewise.
431 * elf32-m68hc12.c: Likewise.
432 * elf32-m68hc1x.c: Likewise.
433 * elf32-m68k.c: Likewise.
434 * elf32-mcore.c: Likewise.
435 * elf32-rl78.c: Likewise.
436 * elf32-rx.c: Likewise.
437 * elf32-s390.c: Likewise.
438 * elf32-vax.c: Likewise.
439 * elf64-alpha.c: Likewise.
440 * elf64-mmix.c: Likewise.
441 * elf64-s390.c: Likewise.
442 * elf64-sparc.c: Likewise.
443 * elfnn-ia64.c: Likewise.
444 * elfxx-mips.c: Likewise.
445 * elfxx-sparc.c: Likewise.
446 * hash.c: Likewise.
447 * hp300hpux.c: Likewise.
448 * hppabsd-core.c: Likewise.
449 * hpux-core.c: Likewise.
450 * i386dynix.c: Likewise.
451 * i386linux.c: Likewise.
452 * i386lynx.c: Likewise.
453 * i386mach3.c: Likewise.
454 * i386msdos.c: Likewise.
455 * i386os9k.c: Likewise.
456 * irix-core.c: Likewise.
457 * lynx-core.c: Likewise.
458 * m68klinux.c: Likewise.
459 * mach-o.h: Likewise.
460 * mipsbsd.c: Likewise.
461 * netbsd-core.c: Likewise.
462 * nlm32-i386.c: Likewise.
463 * osf-core.c: Likewise.
464 * pc532-mach.c: Likewise.
465 * pef.c: Likewise.
466 * ppcboot.c: Likewise.
467 * ptrace-core.c: Likewise.
468 * reloc16.c: Likewise.
469 * sco5-core.c: Likewise.
470 * som.h: Likewise.
471 * sparclinux.c: Likewise.
472 * sparclynx.c: Likewise.
473 * ticoff.h: Likewise.
474 * trad-core.c: Likewise.
475 * vms-lib.c: Likewise.
476 * xsym.h: Likewise.
477
14160578
AM
4782012-07-09 Alan Modra <amodra@gmail.com>
479
480 PR ld/14323
481 * elflink.c (elf_sort_symbol): Sort by size too.
482 (elf_link_add_object_symbols <weakdefs>): Simplify binary search.
483 Do not depend on ordering of symbol aliases. Match largest size.
484
1c52a645
L
4852012-07-03 H.J. Lu <hongjiu.lu@intel.com>
486
487 * elf.c (assign_section_numbers): Check if number of sections
488 >= SHN_LORESERVE.
489 * elfcode.h (elf_object_p): Likewise.
490
5f8ebec5
NC
4912012-07-03 Nick Clifton <nickc@redhat.com>
492
493 * archive.c (bsd_write_armap): Catch attempts to create an archive
494 with indicies bigger than 4Gb.
495 (coff_write_armap): Likewise.
496
5a5ed5b0
L
4972012-07-03 H.J. Lu <hongjiu.lu@intel.com>
498
499 PR binutils/14319
500 * elf.c (_bfd_elf_make_section_from_shdr): Don't compress empty
501 debug section.
502
90c984fc
L
5032012-07-03 H.J. Lu <hongjiu.lu@intel.com>
504
505 PR ld/3351
506 * elflink.c (_bfd_elf_update_dynamic_flags): New.
507 (_bfd_elf_merge_symbol): Update both real and indirect symbol
508 dynamic flags.
509 (_bfd_elf_add_default_symbol): Make the real symbol dynamic if
510 the indirect symbol is defined in a shared library.
511 (elf_link_add_object_symbols): Likewise. If the indirect
512 symbol has been forced local, don't make the real symbol
513 dynamic.
514 (elf_link_check_versioned_symbol): Check indirect symbol.
515 (elf_link_output_extsym): Use real symbol definition when
516 reporting indirect symbol error. Check version info for
517 dynamic versioned symbol.
518
3146fac4
AM
5192012-07-03 Alan Modra <amodra@gmail.com>
520
521 PR ld/14207
522 * elf.c (assign_file_positions_for_load_sections): Remove assertions
523 that only PT_LOAD headers include file header and section headers.
524 (assign_file_positions_for_non_load_sections): Similarly don't
525 assert PT_GNU_RELRO header does not include file and section headers.
526 Compare first section vma rather than PT_LOAD p_vaddr against
527 relro_start when looking for PT_LOAD covering PT_GNU_RELRO. Replace
528 abort with assertion.
529
87e0a731
AM
5302012-07-02 Alan Modra <amodra@gmail.com>
531
532 * elf32-m32c.c (m32c_elf_check_relocs): Use bfd_make_section
533 "anyway" variant when creating .plt.
534 (m32c_elf_relax_plt_section): Remove redundant test and unused param.
535 (m32c_elf_relax_section): Test SEC_LINKER_CREATED before calling
536 m32c_elf_relax_plt_section.
537 * elfxx-mips.c (mips_elf_create_got_section): Use make anyway variant
538 when creating .got and .got.plt.
539 (_bfd_mips_elf_final_link): Likewise for .rtproc, and use
540 bfd_get_linker_section.
541 * sunos.c: Similarly throughout.
542
bc823199
AS
5432012-07-01 Andreas Schwab <schwab@linux-m68k.org>
544
545 * elf.c (_bfd_elf_make_section_from_shdr): Fix typo in error
546 message.
547
a040981f
L
5482012-06-29 H.J. Lu <hongjiu.lu@intel.com>
549
550 * elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE
551 on unresolvable relocation.
552
d5abbdf3
L
5532012-06-29 H.J. Lu <hongjiu.lu@intel.com>
554
555 * archive.c (_bfd_compute_and_write_armap): Simplify global
556 symbol handling.
557
a8c887dd
NC
5582012-06-29 Nick Clifton <nickc@redhat.com>
559
560 PR ld/14189
561 * elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount
562 for locally bound symbols.
563
3d4d4302
AM
5642012-06-29 Alan Modra <amodra@gmail.com>
565
566 * section.c (bfd_get_linker_section): New function.
567 * elf32-arm.c: When retrieving SEC_LINKER_CREATED sections, use
568 the above throughout rather than bfd_get_section_by_name. Use
569 bfd_make_section_anyway rather than bfd_make_section when creating
570 them.
571 * elf32-bfin.c: Likewise.
572 * elf32-cr16.c: Likewise.
573 * elf32-cris.c: Likewise.
574 * elf32-frv.c: Likewise.
575 * elf32-hppa.c: Likewise.
576 * elf32-i370.c: Likewise.
577 * elf32-i386.c: Likewise.
578 * elf32-lm32.c: Likewise.
579 * elf32-m32c.c: Likewise.
580 * elf32-m32r.c: Likewise.
581 * elf32-m68k.c: Likewise.
582 * elf32-microblaze.c: Likewise.
583 * elf32-ppc.c: Likewise.
584 * elf32-rl78.c: Likewise.
585 * elf32-s390.c: Likewise.
586 * elf32-score.c: Likewise.
587 * elf32-score7.c: Likewise.
588 * elf32-sh.c: Likewise.
589 * elf32-tic6x.c: Likewise.
590 * elf32-tilepro.c: Likewise.
591 * elf32-vax.c: Likewise.
592 * elf32-xstormy16.c: Likewise.
593 * elf32-xtensa.c: Likewise.
594 * elf64-alpha.c: Likewise.
595 * elf64-hppa.c: Likewise.
596 * elf64-ia64-vms.c: Likewise.
597 * elf64-ppc.c: Likewise.
598 * elf64-s390.c: Likewise.
599 * elf64-sh64.c: Likewise.
600 * elf64-sparc.c: Likewise.
601 * elf64-x86-64.c: Likewise.
602 * elfnn-ia64.c: Likewise.
603 * elfxx-mips.c: Likewise.
604 * elfxx-sparc.c: Likewise.
605 * elfxx-tilegx.c: Likewise.
606 * elflink.c: Likewise.
607 * elf-vxworks.c: Likewise.
608 * elf-m10300.c: Likewise. Also make use of htab plt, got and
609 gotplt shortcuts.
610 * bfd-in2.h: Regenerate.
611 * elf32-lm32.c (lm32_elf_check_relocs): Use the correct bfd when
612 calling create_rofixup_section.
613 * elflink.c (bfd_elf_final_link): Simplify test for .dynstr.
614
66e17d7f
AM
6152012-06-29 Alan Modra <amodra@gmail.com>
616
617 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't create .rela
618 section for bss type sections, except for .rela.bss.
619 * elf-m10300.c (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
620 * elf32-cr16.c (_bfd_cr16_elf_create_dynamic_sections): Likewise.
621 * elf32-lm32.c (lm32_elf_create_dynamic_sections): Likewise.
622 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
623 * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
624
6034aab8
RM
6252012-06-28 Roland McGrath <mcgrathr@google.com>
626
627 * elf32-arm.c (elf32_arm_populate_plt_entry): Use int32_t for
628 displacement calculation in nacl_p case.
629
4c6a93d3
NC
6302012-06-28 Nick Clifton <nickc@redhat.com>
631
632 * po/uk.po: New Ukranian translation.
633 * configure.in (ALL_LINGUAS): Add uk.
634 * configure: Regenerate.
635
a4fd3de5
AM
6362012-06-26 Alan Modra <amodra@gmail.com>
637
638 * elf64-ppc.c (ppc64_elf_next_toc_section): Don't error if input
639 file has multiple .got/.toc sections and all don't fit in
640 current toc group.
641
62655c7b
RM
6422012-06-22 Roland McGrath <mcgrathr@google.com>
643
644 * elf.c (assign_file_positions_for_non_load_sections): Define
645 __ehdr_start symbol if it's referenced and there's a PT_LOAD
646 segment that covers both the file and program headers.
647
b70e7a2f
AS
6482012-06-22 Andreas Schwab <schwab@linux-m68k.org>
649
650 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Don't make
651 _GLOBAL_OFFSET_TABLE_ and _DYNAMIC absolute.
652
27fc25a1
AM
6532012-06-22 Alan Modra <amodra@gmail.com>
654
655 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't emit out-of-line
656 save/restore functions when relocatable. Make "funcs" static.
657
51806b97
HPN
6582012-06-18 Hans-Peter Nilsson <hp@axis.com>
659
660 * elf32-cris.c (cris_elf_plt_sym_val): Rewrite to work in presence
661 of merged .got and .got.plt entries.
662
46691134
AM
6632012-06-18 John Szakmeister <john@szakmeister.net>
664
665 * elf32-arm.c (elf32_arm_final_link_relocate): Correct return value.
666
26a48bb3
HPN
6672012-06-17 Hans-Peter Nilsson <hp@axis.com>
668
669 * elf32-cris.c (cris_elf_relocate_section): <R_CRIS_32_IE>
670 <R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>: Handle references to
671 thread common symbols.
672
5968a7b8
NC
6732012-06-13 Nick Clifton <nickc@redhat.com>
674
675 * elf32-arm.c (bfd_arm_get_mach_from_attributes): New function.
676 (elf32_arm_object_p): If the machine number could not be deduced
677 from the notes, call bfd_arm_get_mach_from_attributes to get the
678 number from the attributes.
679
8981c88a
L
6802012-06-12 H.J. Lu <hongjiu.lu@intel.com>
681
682 PR bfd/14207
683 * elf.c (assign_file_positions_for_non_load_sections): Abort if
684 PT_GNU_RELRO segment doesn't fit in PT_LOAD segment.
685
3832a4d8
AM
6862012-06-12 Alan Modra <amodra@gmail.com>
687
688 PR ld/14207
689 * elf.c (_bfd_elf_map_sections_to_segments): Disregard bss type
690 sections at end of PT_LOAD segment when searching for segment
691 that contains end of relro extent.
692
f3944f72
L
6932012-06-11 H.J. Lu <hongjiu.lu@intel.com>
694
695 * elf.c (assign_file_positions_for_non_load_sections): Reindent.
696
be01b344
L
6972012-06-11 H.J. Lu <hongjiu.lu@intel.com>
698
699 * elf.c (_bfd_elf_map_sections_to_segments): Reindent.
700
ffbc01cc
AM
7012012-06-06 Alan Modra <amodra@gmail.com>
702
703 * elflink.c (elf_link_input_bfd): Provide a file symbol for
704 each input file with local syms, if the input lacks such.
705 (bfd_elf_final_link): Add a file symbol to mark end of locals
706 for which we can associate with input files.
707 (struct elf_final_link_info): Add filesym_count field.
708 (struct elf_outext_info): Add need_second_pass and second_pass.
709 (elf_link_output_extsym): Detect symbols defined in the output
710 file, emit them on second pass over locals.
711
fe78531d
JK
7122012-06-04 Jan Kratochvil <jan.kratochvil@redhat.com>
713
714 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
715 of target_read_memory as bfd_size_type.
716 * bfd-in2.h: Regenerate.
717 * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
718 argument of target_read_memory as bfd_size_type.
719 (_bfd_elf32_bfd_from_remote_memory): Likewise.
720 (_bfd_elf64_bfd_from_remote_memory): Likewise.
721 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
722 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
723
aef36ac1
AM
7242012-06-03 Alan Modra <amodra@gmail.com>
725
726 PR binutils/13897
727 * elf.c (elf_find_function): Cache last function sym info.
728 (_bfd_elf_maybe_function_sym): Return function size, pass in
729 section of interest.
730 * elf-bfd.h (struct elf_backend_data <maybe_function_sym>): Likewise.
731 (_bfd_elf_maybe_function_sym): Likewise.
732 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
733 (opd_entry_value): Add in_code_sec param. Revert caching code.
734 Return -1 if in_code_sec and function found in wrong section.
735 Update all calls.
736
5299c1c4
JK
7372012-06-01 Siddhesh Poyarekar <siddhesh@redhat.com>
738
739 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
740 of target_read_memory as size_t.
741 * bfd-in2.h: Regenerate.
742 * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
743 argument of target_read_memory as size_t.
744 (_bfd_elf32_bfd_from_remote_memory): Likewise.
745 (_bfd_elf64_bfd_from_remote_memory): Likewise.
746 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
747 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
748
ee1e4ede
AM
7492012-06-01 Alan Modra <amodra@gmail.com>
750
751 PR binutils/13897
752 * elf64-ppc.c (opd_entry_value): Rewrite cache code.
753
6f0c7050
TT
7542012-05-29 Tom Tromey <tromey@redhat.com>
755
756 * opncls.c (bfd_fopen): Always close fd on failure.
757 (bfd_fdopenr): Likewise.
758
f5eda473
AM
7592012-05-27 Alan Modra <amodra@gmail.com>
760
761 PR ld/14170
762 * elflink.c (_bfd_elf_merge_symbol): When a symbol defined in
763 a dynamic library finds a new instance with non-default
764 visibility in a regular object, correctly handle symbols
765 already on the undefs list and undo dynamic symbol state when
766 the new symbol is hidden or internal.
767
bbf96e4e
L
7682012-05-25 H.J. Lu <hongjiu.lu@intel.com>
769
770 * elf32-i386.c (elf_i386_create_dynamic_sections): Don't use
771 dynamic_sec_flags to create PLT .eh_frame section.
772 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
773
9a2a56cc
AM
7742012-05-25 Alan Modra <amodra@gmail.com>
775
776 PR ld/13909
777 * elf-eh-frame.c (_bfd_elf_eh_frame_present): New function.
778 (_bfd_elf_maybe_strip_eh_frame_hdr): Use it here.
779 * elf-bfd.h (_bfd_elf_eh_frame_present): Declare.
780 * elflink.c (bfd_elf_size_dynamic_sections): Let the backend
781 size dynamic sections before stripping eh_frame_hdr.
782 (bfd_elf_gc_sections): Handle multiple .eh_frame sections.
783 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Drop glink_eh_frame
784 if no other .eh_frame sections exist.
785 * elf64-ppc.c (ppc64_elf_size_stubs): Likewise.
786 * elf32-i386.c (elf_i386_create_dynamic_sections): Don't size
787 or alloc plt_eh_frame here..
788 (elf_i386_size_dynamic_sections): ..do it here instead. Don't
789 specially keep sgotplt, iplt, tgotplt, sdynbss for symbols.
790 (elf_i386_finish_dynamic_sections): Check plt_eh_frame->contents
791 before writing plt offset.
792 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Don't size
793 or alloc plt_eh_frame here..
794 (elf_x86_64_size_dynamic_sections): ..do it here instead.
795 (elf_x86_64_finish_dynamic_sections): Check plt_eh_frame->contents
796 before writing plt offset.
797
4bbe044a
AM
7982012-05-24 Alan Modra <amodra@gmail.com>
799
800 PR ld/14158
801 * elf64-ppc.c (ppc64_elf_size_stubs): Round up glink_eh_frame
802 size to output section alignment.
803 (ppc64_elf_build_stubs): Likewise, and extend last FDE to cover.
804
89b2bec8
AM
8052012-05-23 Alan Modra <amodra@gmail.com>
806
807 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle
44534af3 808 BFDs with multiple .eh_frame sections.
89b2bec8 809
259b427a
AM
8102012-05-23 Alan Modra <amodra@gmail.com>
811
812 PR ld/13909
813 * elflink.c (bfd_elf_discard_info): Don't ignore dynamic BFDs.
814
e4de50d4
L
8152012-05-22 H.J. Lu <hongjiu.lu@intel.com>
816
817 PR ld/13909
818 * elf32-i386.c (elf_i386_create_dynamic_sections): Revert the
819 last change.
820 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
821
7e01508c
AM
8222012-05-22 Alan Modra <amodra@gmail.com>
823
824 * elflink.c (bfd_elf_discard_info): Look for next .eh_frame if
825 first one is zero size or discarded.
826 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set most of
827 glink_eh_frame contents here..
828 (ppc_elf_finish_dynamic_sections): ..rather than here. Just set
829 offset to .glink.
830
5d4f7eb2
L
8312012-05-22 H.J. Lu <hongjiu.lu@intel.com>
832
833 PR ld/13909
834 * elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT
835 eh_frame section if there is an input .eh_frame section.
836 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
837
2fe0fd06
L
8382012-05-22 H.J. Lu <hongjiu.lu@intel.com>
839
840 PR ld/14105
841 * elf32-i386.c (elf_i386_create_dynamic_sections): Always
842 create PLT eh_frame section with SEC_LINKER_CREATED.
843 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
844
90061c33
AM
8452012-05-22 Alan Modra <amodra@gmail.com>
846
847 * elflink.c (bfd_elf_discard_info): Handle multiple .eh_frame
848 sections attached to a BFD.
849 * section.c (bfd_get_section_by_name): Rewrite description.
850 (bfd_get_next_section_by_name): New function.
851 * bfd-in2.h: Regenerate.
852
8bbeae90
AS
8532012-05-21 Andreas Schwab <schwab@linux-m68k.org>
854
855 * elf32-m68k.c (elf_m68k_grok_prstatus): New function.
856 (elf_m68k_grok_psinfo): New function.
857 (elf_backend_grok_prstatus): Define.
858 (elf_backend_grok_psinfo): Define.
859
a44acb1e
MR
8602012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
861
862 * elf64-mips.c (elf_backend_got_header_size): Correct definition.
863 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF
864 backend's GOT header size instead of hardcoding it.
865
751c1fe7
MR
8662012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
867
868 * elf32-vax.c (elf_vax_relocate_section)
869 <R_VAX_8, R_VAX_16, R_VAX_32>: Don't check if info->shared again.
870
ddd74d3c
MR
8712012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
872
873 * elf32-vax.c (elf_vax_relocate_section)
874 <R_VAX_8, R_VAX_16, R_VAX_32>: Use section flags rather than
875 its name as the check for text sections.
876
b0189df0
MR
8772012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
878
879 * elf64-mips.c (mips_elf64_be_swap_reloc_out): Also make sure
880 the third reloc offset is the same as the first.
881
94caa966
AM
8822012-05-19 Alan Modra <amodra@gmail.com>
883
884 * elf32-ppc.h (has_vle_insns, is_ppc_vle): Delete.
885 (has_tls_reloc, has_tls_get_addr_call): Move back to..
886 * elf32-ppc.c: ..here.
887 (ppc_elf_section_flags, elf_backend_section_flags): Delete.
888 (ppc_elf_modify_segment_map): Use ELF sh_flags to detect VLE sections.
889
220cf809
L
8902012-05-18 H.J. Lu <hongjiu.lu@intel.com>
891
892 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make
893 _DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute.
894 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
895
3a11e31e
RM
8962012-05-18 Roland McGrath <mcgrathr@google.com>
897
898 * archive.c (_bfd_generic_read_ar_hdr_mag): Fix last change so as
899 not to clobber the ar_fmag field stored in ARED->arch_header.
900
2a0bfc8d
PA
9012012-05-18 Pedro Alves <palves@redhat.com>
902
903 * mach-o.h: Don't include sysdep.h.
904
0bee45d9
NC
9052012-05-18 Nick Clifton <nickc@redhat.com>
906
907 PR 14072
908 * bfd-in.h: Check for PACKAGE or PACKAGE_VERSION before
909 complaining about config.h not having been included.
910 * bfd-in2.h: Regenerate.
911
f2c621e4
AS
9122012-05-18 Andreas Schwab <schwab@linux-m68k.org>
913
914 * aclocal.m4: Regenerate.
915 * Makefile.in: Regenerate.
916
df7b86aa
NC
9172012-05-17 Daniel Richard G. <skunk@iskunk.org>
918 Nick Clifton <nickc@redhat.com>
919
920 PR 14072
921 * configure.in: Add check that sysdep.h has been included before
922 any system header files.
923 * configure: Regenerate.
924 * config.in: Regenerate.
925 * aclocal.m4: Regenerate.
926 * bfd-in.h: Generate an error if included before config.h.
927 * sysdep.h: Likewise.
928 * bfd-in2.h: Regenerate.
929 * compress.c: Remove #include "config.h".
930 * plugin.c: Likewise.
931 * elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h.
932 * elf64-hppa.c: Likewise.
933 * som.c: Likewise.
934 * xsymc.c: Likewise.
935
2633a79c
AM
9362012-05-17 Maciej W. Rozycki <macro@linux-mips.org>
937 Alan Modra <amodra@gmail.com>
938
939 * elf.c (ignore_section_sym): Correct comment. Don't return
940 true for absolute section.
941 (elf_map_symbols): Move stray comment. Adjust for above change.
942 Don't discard global section symbols.
943
ab6dce23
AM
9442012-05-17 Alan Modra <amodra@gmail.com>
945
946 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make _DYNAMIC,
947 _GLOBAL_OFFSET_TABLE_ or _PROCEDURE_LINKAGE_TABLE_ absolute.
948 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Don't make _DYNAMIC
949 absolute.
950
e1dad58d
AM
9512012-05-17 Alan Modra <amodra@gmail.com>
952
953 * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call, has_vle_insns,
954 is_ppc_vle): Move to..
955 * elf32-ppc.h: ..here, making is_ppc_vle a macro.
956
a0f49396
NC
9572012-05-16 Sergio Durigan Junior <sergiodj@redhat.com>
958
959 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma,
960 bfd_get_section_lma, bfd_get_section_alignment,
961 bfd_get_section_flags, bfd_get_section_userdata): Rewrite macros
962 in order to use the `bfd' argument.
963 * bfd-in2.h: Regenerate.
964 * elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd'
965 as the first argument for `bfd_get_section_alignment'.
966 * elf32-arm.c (create_ifunc_sections): Likewise, for
967 `bfd_set_section_alignment'.
968 * elf32-m32r.c (m32r_elf_relocate_section): Likewise, for
969 `bfd_get_section_name'.
970 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
971 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
972 (ppc_elf_relocate_section): Likewise.
973 * elf64-mmix.c (mmix_final_link_relocate): Likewise, for
974 `bfd_get_section_vma'.
975 * elf64-ppc.c (create_linkage_sections): Likewise, for
976 `bfd_set_section_alignment'.
977
40551fb8
NC
9782012-05-16 Georg-Johann Lay <avr@gjlay.de>
979
980 PR target/13503
981 * reloc.c: Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO.
982 * bfd-in2.h: Regenerate.
983 * libbfd.h: Regenrate.
984 * elf32-avr.c (elf_avr_howto_table): Rename R_AVR_8_HHI8 to
985 R_AVR_8_HLO8.
986 (avr_reloc_map): Likewise.
987
691bf19c
NC
9882012-05-16 Daniel Richard G. <skunk@iskunk.org>
989
990 PR binutils/13558
991 * bfd/aout-cris.c: Include sysdep.h before bfd.h.
992 * bfd/aout-ns32k.c: Likewise.
993 * bfd/aout-sparcle.c: Likewise.
994 * bfd/aout0.c: Likewise.
995 * bfd/bfd-in2.h: Likewise.
996 * bfd/coff-stgo32.c: Likewise.
997 * bfd/cpu-lm32.c: Likewise.
998 * bfd/cpu-microblaze.c: Likewise.
999 * bfd/cpu-score.c: Likewise.
1000 * bfd/cpu-tilegx.c: Likewise.
1001 * bfd/cpu-tilepro.c: Likewise.
1002 * bfd/elf32-lm32.c: Likewise.
1003 * bfd/elf32-microblaze.c: Likewise.
1004 * bfd/elf32-score7.c: Likewise.
1005 * bfd/elf32-tilepro.c: Likewise.
1006 * bfd/elfxx-tilegx.c: Likewise.
1007 * bfd/mach-o.h: Likewise.
1008 * bfd/nlm32-ppc.c: Likewise.
1009 * bfd/ns32knetbsd.c: Likewise.
1010 * bfd/pef.h: Likewise.
1011 * bfd/plugin.c: Likewise.
1012 * bfd/stab-syms.c: Likewise.
1013 * bfd/sunos.c: Likewise.
1014 * bfd/syms.c: Likewise.
1015 * bfd/xsym.h: Likewise.
1016
8b127cbc
AM
10172012-05-16 Alan Modra <amodra@gmail.com>
1018
1019 * elflink.c: Rename flaginfo to flinfo throughout, except..
1020 (bfd_elf_lookup_section_flags): ..here, rename finfo to flaginfo.
1021 Formatting, style. Simplify flag match.
1022
a2a50954
AM
10232012-05-16 Alan Modra <amodra@gmail.com>
1024
1025 * dwarf2.c: Formatting.
1026 (arange_add): Pass in unit rather than bfd. Update callers.
1027 Ignore empty ranges. Don't ask for cleared memory.
1028 (parse_comp_unit): Only set unit->base_address if processing
1029 DW_TAG_compile_unit.
1030 (find_debug_info): Optimise section lookup.
1031 (place_sections): Use bfd_alloc for stash->adjusted_sections.
1032 (find_line): Match previously parsed comp unit addresses as we
1033 do for newly parsed comp units.
1034
df35687a
AM
10352012-05-16 Alan Modra <amodra@gmail.com>
1036
1037 * archive.c (_bfd_generic_read_ar_hdr_mag): Ensure sscanf
1038 stops at end of ar_size field.
1039
eee3b786
AM
10402012-05-16 Alan Modra <amodra@gmail.com>
1041
44534af3
AM
1042 PR ld/13962
1043 PR ld/7023
eee3b786
AM
1044 * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is
1045 out of range. As a special case, fix sh_info for zero sh_size.
1046 Do the same for .symtab.
1047
6927f982
NC
10482012-05-15 James Murray <jsm@jsm-net.demon.co.uk>
1049 Stephane Carrez <stcarrez@nerim.fr>
1050
1051 * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg.
1052 * config.bfd: Likewise.
1053 * cpu-m9s12x.c: New.
1054 * cpu-m9s12xg.c: New.
1055 * elf32-m68hc12.c: Add S12X and XGATE co-processor support.
1056 Add option to offset S12 addresses into XGATE memory space.
1057 Fix carry bug in IMM16 (IMM8 low/high) relocate.
1058 * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg.
1059 (ALL_MACHINES_CFILES): Likewise.
1060 * reloc.c: Add S12X relocs.
1061 * Makefile.in: Regenerate.
1062 * bfd-in2.h: Regenerate.
1063 * libbfd.h: Regenerate.
1064
b9c361e0
JL
10652012-05-14 James Lemke <jwlemke@codesourcery.com>
1066 Catherine Moore <clm@codesourcery.com>
1067
1068 * bfd.c (bfd_lookup_section_flags): Add section parm.
1069 * ecoff.c (bfd_debug_section): Remove flag_info initializer.
1070 * elf-bfd.h (bfd_elf_section_data): Move in section_flag_info.
1071 (bfd_elf_lookup_section_flags): Add section parm.
1072 * elf32-ppc.c (is_ppc_vle): New function.
1073 (ppc_elf_modify_segment_map): New function.
1074 (elf_backend_modify_segment_map): Define.
1075 (has_vle_insns): New define.
1076 * elf32-ppc.h (ppc_elf_modify_segment_map): Declare.
1077 * elflink.c (bfd_elf_lookup_section_flags): Add return value & parm.
1078 Move in logic to omit / include a section.
1079 * libbfd-in.h (bfd_link_info): Add section parm.
1080 (bfd_generic_lookup_section_flags): Likewise.
1081 * reloc.c (bfd_generic_lookup_section_flags): Likewise.
1082 * section.c (bfd_section): Move out section_flag_info.
1083 (BFD_FAKE_SECTION): Remove flag_info initializer.
1084 * targets.c (_bfd_lookup_section_flags): Add section parm.
1085
10862012-05-14 Catherine Moore <clm@codesourcery.com>
1087
1088 * archures.c (bfd_mach_ppc_vle): New.
1089 * bfd-in2.h: Regenerated.
1090 * cpu-powerpc.c (bfd_powerpc_archs): New entry for vle.
1091 * elf32-ppc.c (split16_format_type): New enumeration.
1092 (ppc_elf_vle_split16): New function.
1093 (HOWTO): Add entries for R_PPC_VLE relocations.
1094 (ppc_elf_reloc_type_lookup): Handle PPC_VLE relocations.
1095 (ppc_elf_section_flags): New function.
1096 (ppc_elf_lookup_section_flags): New function.
1097 (ppc_elf_section_processing): New function.
1098 (ppc_elf_check_relocs): Handle PPC_VLE relocations.
1099 (ppc_elf_relocation_section): Likewise.
1100 (elf_backend_lookup_section_flags_hook): Define.
1101 (elf_backend_section_flags): Define.
1102 (elf_backend_section_processing): Define.
6927f982 1103 * elf32-ppc.h (ppc_elf_section_processing): Declare.
b9c361e0
JL
1104 * libbfd.h: Regenerated.
1105 * reloc.c (BFD_RELOC_PPC_VLE_REL8, BFD_RELOC_PPC_VLE_REL15,
1106 BFD_RELOC_PPC_VLE_REL24, BFD_RELOC_PPC_VLE_LO16A,
1107 BFD_RELOC_PPC_VLE_LO16D, BFD_RELOC_PPC_VLE_HI16A,
1108 BFD_RELOC_PPC_VLE_HI16D, BFD_RELOC_PPC_VLE_HA16A,
1109 BFD_RELOC_PPC_VLE_HA16D, BFD_RELOC_PPC_VLE_SDA21,
1110 BFD_RELOC_PPC_VLE_SDA21_LO, BFD_RELOC_PPC_VLE_SDAREL_LO16A,
1111 BFD_RELOC_PPC_VLE_SDAREL_LO16D, BFD_RELOC_PPC_VLE_SDAREL_HI16A,
1112 BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A,
1113 BFD_RELOC_PPC_VLE_SDAREL_HA16D): New bfd relocations.
1114
8b127cbc 11152012-05-11 Georg-Johann Lay <avr@gjlay.de>
99700d6f
NC
1116
1117 PR target/13503
1118 * reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
1119 BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
1120 * bfd-in2.h: Regenerate.
1121 * libbfd.h: Regenrate.
1122 * elf32-avr.c (elf_avr_howto_table): Add entries for
1123 R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
1124 (avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
1125 R_AVR_8_HHI8.
1126
268a8d3a
L
11272012-05-10 H.J. Lu <hongjiu.lu@intel.com>
1128
1129 * elf64-x86-64.c (elf_x86_64_relocate_section): Use int in x32
1130 addend overflow check.
1131
74b1e045
DD
11322012-05-10 DJ Delorie <dj@redhat.com>
1133
1134 * elf32-rx.c (rx_elf_object_p): Ignore empty segments.
1135
6f2c9068
L
11362012-05-10 H.J. Lu <hongjiu.lu@intel.com>
1137
1138 * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed
1139 hex number in x32 addend overflow check.
1140
1da80baa
L
11412012-05-10 H.J. Lu <hongjiu.lu@intel.com>
1142
1143 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Handle
1144 R_X86_64_RELATIVE64.
1145
8cf0d2dd
L
11462012-05-09 H.J. Lu <hongjiu.lu@intel.com>
1147
1148 * elf64-x86-64.c (elf_x86_64_relocate_section): Check addend
1149 overflow for R_X86_64_RELATIVE64.
1150
2d16d28e
DK
11512012-05-08 Ben Cheng <bccheng@google.com>
1152
8b127cbc 1153 * elf.c: Preserve the original p_align and p_flags if they are
2d16d28e
DK
1154 valid.
1155
2de5d135
AM
11562012-05-07 Alan Modra <amodra@gmail.com>
1157
1158 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Update
1159 RELOC_AGAINST_DISCARDED_SECTION invocation.
1160
a134cc9b
HPN
11612012-05-07 Hans-Peter Nilsson <hp@axis.com>
1162
1163 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Declare and use
1164 local variable i_ instead of assuming and using a variable i.
1165
545fd46b
MR
11662012-05-07 Maciej W. Rozycki <macro@linux-mips.org>
1167
1168 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compound
1169 relocations.
1170 * elfxx-mips.c (mips_reloc_against_discarded_section): New
1171 function.
1172 (_bfd_mips_elf_relocate_section): Call it, in place of
1173 RELOC_AGAINST_DISCARDED_SECTION.
1174 * elf-m10200.c (mn10200_elf_relocate_section): Update arguments
1175 to RELOC_AGAINST_DISCARDED_SECTION.
1176 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1177 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
1178 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1179 * elf32-bfin.c (bfin_relocate_section): Likewise.
1180 (bfinfdpic_relocate_section): Likewise.
1181 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
1182 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
1183 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1184 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
1185 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
1186 * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
1187 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1188 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1189 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1190 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1191 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1192 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1193 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1194 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1195 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1196 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1197 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
1198 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1199 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1200 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1201 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1202 * elf32-mep.c (mep_elf_relocate_section): Likewise.
1203 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
1204 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
1205 * elf32-mt.c (mt_elf_relocate_section): Likewise.
1206 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1207 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1208 * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
1209 * elf32-rx.c (rx_elf_relocate_section): Likewise.
1210 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1211 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1212 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1213 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1214 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1215 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1216 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1217 * elf32-v850.c (v850_elf_relocate_section): Likewise.
1218 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1219 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
1220 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1221 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1222 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
1223 (elf64_alpha_relocate_section): Likewise.
1224 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1225 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
1226 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1227 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1228 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1229 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1230 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1231 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1232 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1233
62ab84ec
AM
12342012-05-05 Alan Modra <amodra@gmail.com>
1235
1236 PR ld/14052
1237 PR ld/13621
1238 * linker.c (_bfd_nearby_section): Revert 2012-02-13 change.
1239
45dfa85a
AM
12402012-05-05 Alan Modra <amodra@gmail.com>
1241
1242 * aout-arm.c: Replace all uses of bfd_abs_section, bfd_com_section,
1243 bfd_und_section and bfd_ind_section with their _ptr variants, or
1244 use corresponding bfd_is_* macros.
1245 * aout-ns32k.c: Likewise.
1246 * aout-tic30.c: Likewise.
1247 * coff-arm.c: Likewise.
1248 * coff-tic54x.c: Likewise.
1249 * cpu-ns32k.c: Likewise.
1250 * elf-attrs.c: Likewise.
1251 * elfcode.h: Likewise.
1252 * peicode.h: Likewise.
1253 * reloc.c: Likewise.
1254 * riscix.c: Likewise.
1255 * versados.c: Likewise.
1256 * section.c: Likewise.
1257 (bfd_abs_section, bfd_ind_section, bfd_com_section,
1258 bfd_ind_section): Delete.
1259 (std_section): New array replacing above.
1260 (bfd_abs_section_ptr, bfd_ind_section_ptr, bfd_com_section_ptr,
1261 bfd_ind_section_ptr, STD_SECTION): Update.
1262 (BFD_FAKE_SECTION, GLOBAL_SYM_INIT): Remove unnecessary casts.
36ab465d 1263 * bfd-in2.h: Regenerate.
45dfa85a 1264
f6c1a2d5
NC
12652012-05-03 Sean Keys <skeys@ipdatasys.com>
1266
1267 * cpu-xgate.c: New file. Added XGATE support.
1268 * archures.c (bfd_architecture): Add XGATE architecture.
1269 (bfd_archures_list): Add reference to XGATE architecture info.
1270 * elf-bfd.h (prep_headers): Handle bfd_arch_xgate.
1271 * reloc.c: Add various XGATE relocation enums.
1272 * targets.c (bfd_elf32_xgate_vec): Declare and add to target vector
1273 list.
1274 * Makefile.am: Add support for XGATE elf.
1275 * configure.in: Ditto.
1276 * config.bfd: Ditto.
1277 * Makefile.in: Regenerate.
1278 * configure: Ditto.
1279 * bfd-in2.h: Ditto.
1280 * libbfd.h: Ditto.
1281 Added files for XGATE relocations.
1282 * elf32-xgate.c: Created minimal relocation file.
1283 * elf32-xgate.h: Created minimal header file for elf32-xgate.
1284
fec16237
TG
12852012-05-03 Tristan Gingold <gingold@adacore.com>
1286
1287 * dwarf2.c (decode_line_info): Ignore
1288 DW_LNE_HP_source_file_correlation.
1289
57402f1e
NC
12902012-05-01 Nick Clifton <nickc@redhat.com>
1291
1292 PR binutils/13121
1293 * aoutx.h: Rename 'finfo' to 'flaginfo' to avoid conflicts with
1294 AIX system headers.
1295 * coff-ppc.c: Likewise.
1296 * cofflink.c: Likewise.
1297 * elf32-arm.c: Likewise.
1298 * elf64-sparc.c: Likewise.
1299 * elflink.c: Likewise.
1300 * pdp11.c: Likewise.
1301 * rescoff.c: Likewise.
1302
c49ead2f
MW
13032012-04-26 Mark Wielaard <mjw@redhat.com>
1304
1305 * dwarf2.c (scan_unit_for_symbols): Account for DW_AT_high_pc
1306 possibly being relative to DW_AT_low_pc.
1307 (parse_comp_unit): Likewise.
1308
cab0ad83
AS
13092012-04-26 Andreas Schwab <schwab@linux-m68k.org>
1310
1311 * elf32-m68k.c (elf_m68k_check_relocs): Mark non-GOT references
1312 also when generating PIE.
1313 (elf_m68k_discard_copies): Mark undefined weak symbols referenced
1314 by relocations as dynamic.
1315
2b56b3f3
HPN
13162012-04-26 Hans-Peter Nilsson <hp@axis.com>
1317
1318 Provide a way for programs to recognize BFD_ASSERT calls.
1319 * bfd.c (bfd_assert_handler_type): New API type.
1320 (bfd_set_assert_handler, bfd_get_assert_handler): New API functions.
1321 (_bfd_assert_handler): New variable.
1322 (_bfd_default_assert_handler): New function.
1323 (bfd_assert): Call _bfd_assert_handler, not _bfd_error_handler.
1324 * libbfd-in.h (_bfd_assert_handler): Declare.
1325 * libbfd.h, bfd-in2.h: Regenerate.
1326
27586251
HPN
13272012-04-24 Hans-Peter Nilsson <hp@axis.com>
1328
1329 PR ld/13990
1330 * elf32-arm.c (elf32_arm_gc_sweep_hook): Handle a forced-local
1331 symbol, where PLT refcount is set to -1.
1332
dbaa2011
AM
13332012-04-24 Alan Modra <amodra@gmail.com>
1334
1335 PR ld/13991
8b127cbc 1336 * elf-bfd.h (_bfd_elf_link_just_syms): Define as
dbaa2011 1337 _bfd_generic_link_just_syms.
8b127cbc
AM
1338 * elflink.c (_bfd_elf_link_just_syms): Delete.
1339 * linker.c (_bfd_generic_link_just_syms): Set sec_info_type.
dbaa2011 1340
8b127cbc
AM
1341 * bfd-in.h (discarded_section): Renamed from elf_discarded_section.
1342 * section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS,
dbaa2011
AM
1343 SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME,
1344 SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE.
8b127cbc
AM
1345 * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
1346 * elf.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
1347 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c,
1348 * elf32-crx.c, * elf32-d10v.c, * elf32-epiphany.c,
1349 * elf32-fr30.c, * elf32-frv.c, * elf32-h8300.c,
1350 * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c,
1351 * elf32-i860.c, * elf32-ip2k.c, * elf32-iq2000.c,
1352 * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c,
1353 * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
1354 * elf32-mep.c, * elf32-moxie.c, * elf32-msp430.c,
1355 * elf32-mt.c, * elf32-openrisc.c, * elf32-ppc.c,
1356 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c,
1357 * elf32-score.c, * elf32-score7.c, * elf32-sh.c,
1358 * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c,
1359 * elf32-v850.c, * elf32-vax.c, * elf32-xc16x.c,
1360 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
1361 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
1362 * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c,
1363 * elf64-x86-64.c, * elflink.c, * elfnn-ia64.c,
1364 * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c,
1365 * reloc.c: Update all references.
1366 * bfd-in2.h: Regenerate.
dbaa2011 1367
87049b0d
AK
13682012-04-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1369
1370 * elf32-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
1371 * elf64-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
1372
85e02784
TS
13732012-04-19 Thomas Schwinge <thomas@codesourcery.com>
1374
1375 * elf32-sh.c (elf_sh_link_hash_entry): Specify an enum identifier for
1376 got_type.
1377 (allocate_dynrelocs, sh_elf_relocate_section, sh_elf_check_relocs): Use
1378 it.
1379
87458ed2
KK
13802012-04-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1381
1382 * elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic
1383 relocations when LE conversion happens on the IE tls symbol.
1384
ea2d813e
RM
13852012-04-17 Roland McGrath <mcgrathr@google.com>
1386
1387 * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding
1388 so that 32-byte boundary is a proper instruction boundary.
1389
da03bf4d
TG
13902012-04-17 Tristan Gingold <gingold@adacore.com>
1391
1392 * vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to
1393 member of an object archive.<
1394
d2226024
TG
13952012-04-17 Tristan Gingold <gingold@adacore.com>
1396
1397 * vms-lib.c (MAX_EKEYLEN): Define.
1398 (MAX_KEYLEN): Fix value.
1399 (vms_write_index): Add comments and fix indentation.
1400 Adjust comparaison. Add assertions. Free kbn_blk.
1401 (_bfd_vms_lib_write_archive_contents): Use MAX_EKEYLEN.
1402 Compense MAX_KEYLEN adjustment.
1403
cb4437b8
MR
14042012-04-16 Maciej W. Rozycki <macro@linux-mips.org>
1405
1406 * elfxx-mips.c (mips16_stub_symndx): Handle n64 compound relocs.
1407 (_bfd_mips_elf_check_relocs): Update accordingly.
1408
aed64b35
L
14092012-04-13 Alan Modra <amodra@gmail.com>
1410
1411 PR ld/13947
1412 * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for
1413 reloc sections.
1414
2615994e
DM
14152012-04-12 David S. Miller <davem@davemloft.net>
1416
1417 * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32,
1418 BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs.
1419 * libbfd.h: Regenerate.
1420 * bfd-in2.h: Likewise.
1421 * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function.
1422 (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34,
1423 R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10.
1424 (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs.
1425 (_bfd_sparc_elf_check_relocs): Likewise.
1426 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1427 (_bfd_sparc_elf_relocate_section): Likewise.
1428
b38cadfb
NC
14292012-04-12 Roland McGrath <mcgrathr@google.com>
1430
1431 * elf32-arm.c (elf32_arm_nacl_plt0_entry, elf32_arm_nacl_plt_entry):
1432 New variables.
1433 (struct elf32_arm_link_hash_table): New member `nacl_p'.
1434 (elf32_arm_link_hash_table_create): Initialize it.
1435 (elf32_arm_nacl_link_hash_table_create): New function.
1436 (arm_movw_immediate, arm_movt_immediate): New functions.
1437 (elf32_arm_populate_plt_entry): Test HTAB->nacl_p.
1438 (elf32_arm_finish_dynamic_sections): Likewise.
1439 (elf32_arm_output_plt_map_1): Likewise.
1440 (bfd_elf32_littlearm_nacl_vec, bfd_elf32_bigarm_nacl_vec):
1441 New backend vector stanza.
1442 (elf32_arm_nacl_modify_segment_map): New function.
1443 * config.bfd: Handle arm-*-nacl*, armeb-*-nacl*.
1444 * targets.c: Support bfd_elf32_{big,little}_nacl_vec.
1445 * configure.in: Likewise.
1446 (bfd_elf32_bigarm_nacl_vec): Add elf-nacl.lo here.
1447 (bfd_elf32_littlearm_nacl_vec): Likewise.
1448 (bfd_elf32_bigarm_vec, bfd_elf32_littlearm_vec): Likewise.
1449 (bfd_elf32_bigarm_symbian_vec): Likewise.
1450 (bfd_elf32_littlearm_symbian_vec): Likewise.
1451 (bfd_elf32_bigarm_vxworks_vec): Likewise.
1452 (bfd_elf32_littlearm_vxworks_vec): Likewise.
1453 * configure: Regenerated.
1454
202e2356
NC
14552012-04-12 Tristan Gingold <gingold@adacore.com>
1456
1457 * elflink.c (elf_link_output_extsym): Add a guard.
1458 (bfd_elf_final_link): Remove assertion.
1459 (bfd_elf_final_link): Add a guard.
1460 * elfnn-ia64.c (INCLUDE_IA64_VMS): Removed.
1461 (elfNN_vms_section_from_shdr, elfNN_vms_object_p)
1462 (elfNN_vms_post_process_headers, elfNN_vms_section_processing)
1463 (elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup):
1464 Remove.
1465 (elfNN-ia64-vms target): Move to ...
1466 * elf64-ia64-vms.c: New file.
1467 * configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo
1468 * Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo.
1469 (BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c.
1470 * configure: Regenerate.
1471 * Makefile.in: Regenerate.
1472
4841cf0c
NC
14732012-04-11 Nick Clifton <nickc@redhat.com>
1474
1475 PR binutils/13897
1476 * elf64-ppc.c (opd_entry_value): When dealing with sections
1477 without relocs, keep the last section loaded in order to avoid
1478 unnecessary reloads.
1479
d324f6d6
RM
14802012-04-09 Roland McGrath <mcgrathr@google.com>
1481
1482 * elf.c (_bfd_elf_map_sections_to_segments): Set INFO->user_phdrs.
1483 * elf-nacl.c (nacl_modify_segment_map): Do nothing if INFO->user_phdrs.
1484 (nacl_modify_program_headers): Likewise.
1485
5a68afcf
RM
14862012-04-03 Roland McGrath <mcgrathr@google.com>
1487
1488 * elf-nacl.c: New file.
1489 * elf-nacl.h: New file.
1490 * elf32-i386.c (elf_backend_modify_segment_map): Define for
1491 bfd_elf32_i386_nacl_vec.
1492 (elf_backend_modify_program_headers): Likewise.
1493 * elf64-x86-64.c (elf_backend_modify_segment_map): Define for
1494 bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec.
1495 (elf_backend_modify_program_headers): Likewise.
1496 * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here.
1497 (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here.
1498 * Makefile.in: Regenerated.
1499 * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here.
1500 (bfd_elf32_x86_64_nacl_vec): Likewise.
1501 (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise.
1502 (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise.
1503 (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise.
1504 (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise.
1505 (bfd_elf32_i386_nacl_vec): Likewise.
1506 (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise.
1507 (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise.
1508 * configure: Regenerated.
1509
3a4ae681
AS
15102012-03-31 Andreas Schwab <schwab@linux-m68k.org>
1511
1512 * elf32-m68k.c (elf_m68k_relocate_section): Allow
1513 R_68K_TLS_LE{8,16,32} for PIE.
1514
a7e28bbe
AK
15152012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1516
1517 * elf64-s390.c: Fix several comments regarding PLT entry
1518 description.
1519 * elf32-s390.c: Likewise.
1520
f41345a7
AK
15212012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1522
1523 * elf64-s390.c: Use the section pointer shortcuts in
1524 elf_link_hash_table and remove them from the target specific
1525 variant.
1526 * elf32-s390.c: Likewise.
1527
9aa17453
AK
15282012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1529
1530 * elf64-s390.c (elf_s390x_plt_entry, elf_s390x_first_plt_entry):
1531 New definitions.
1532 (PLT_PIC_ENTRY_WORD*, PLT_PIC12_ENTRY_WORD*): Remove.
1533 (elf_s390_finish_dynamic_symbol): Use memcpy instead of bfd_put_32.
1534 (elf_s390_finish_dynamic_sections): Likewise.
1535 * elf32-s390.c (elf_s390_plt_entry, elf_s390_plt_pic_entry)
1536 (elf_s390_plt_pic12_entry, elf_s390_plt_pic16_entry)
1537 (elf_s390_plt_first_entry, elf_s390_plt_pic_first_entry): New definitions.
1538 (PLT_PIC16_ENTRY_WORD*, PLT_ENTRY_WORD*)
1539 (PLT_PIC_FIRST_ENTRY_WORD*, PLT_FIRST_ENTRY_WORD*): Remove.
1540
00d8c7a9
AK
15412012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1542
1543 * elf32-s390.c (struct elf_s390_dyn_relocs): Remove.
1544 Rename all occurrences in the file to elf_dyn_relocs.
1545 * elf64-s390.c: Likewise.
1546
a66eed7a
AM
15472012-03-30 Alan Modra <amodra@gmail.com>
1548
1549 * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic
1550 libraries.
1551
f67f98b5
AM
15522012-03-29 Alan Modra <amodra@gmail.com>
1553
1554 * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete.
1555 * bfd-in2.h: Regenerate.
1556
e8d2ba53
AM
15572012-03-23 Alan Modra <amodra@gmail.com>
1558
1559 * elf.c (assign_file_positions_for_non_load_sections): Don't warn
1560 on empty alloc sections.
1561
051d833a
AM
15622012-03-23 Alan Modra <amodra@gmail.com>
1563
1564 * linker.c (_bfd_nearby_section): New function, split out from..
1565 (fix_syms): ..here.
1566 * bfd-in.h (_bfd_nearby_section): Declare.
1567 * bfd-in2.h: Regenerate.
1568 * elflink.c (elf_link_input_bfd): Don't use text_index_section or
1569 data_index_section with ld -q or ld -r output relocs against
1570 stripped output sections. Instead use _bfd_nearby_section.
1571
62599110
AM
15722012-03-23 Alan Modra <amodra@gmail.com>
1573
1574 PR binutils/13894
1575 * elf64-ppc.c (opd_entry_value): Read full symbol table when
1576 sym hashes unavailable.
1577
b781d74f
JM
15782012-03-21 Eliot Dresselhaus <eliot@sonic.net>
1579
1580 * elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE
1581 for non-C6X objects.
1582
17d5dae2
KT
15832012-03-20 Kai Tietz <ktietz@redhat.com>
1584
1585 PR ld/12742
1586 * configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h.
1587 * plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined.
1588 Add windows.h header include if HAVE_WINDOWS_H is defined.
1589 (dlerror): New static function if windows variant is used instead
1590 of dlfcn.h.
1591 (dlclose): Likewise.
1592 (dlopen): Likewise.
1593 (dlsym): Likewise.
1594 * configure: Regenerated.
1595 * config.in: Regenerated.
1596
bdb892b9
L
15972012-03-20 H.J. Lu <hongjiu.lu@intel.com>
1598
1599 PR ld/13880
1600 * elf32-i386.c (elf_i386_relocate_section): Don't issue an error
1601 for R_386_GOTOFF relocation against protected function if
1602 SYMBOLIC_BIND is true.
1603
1604 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an
1605 error for R_X86_64_GOTOFF64 relocation against protected function
1606 when building executable or SYMBOLIC_BIND is true.
1607
8059fb19
RM
16082012-03-16 Roland McGrath <mcgrathr@google.com>
1609
1610 * config.bfd: Handle x86_64-*-nacl*.
1611 * elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza.
1612 (bfd_elf32_x86_64_nacl_vec): Likewise.
1613 * targets.c: Support them.
1614 * configure.in: Likewise.
1615 * configure: Regenerated.
1616
ac56ee8f
MGD
16172012-03-16 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1618
1619 * elf32-arm.c (elf32_arm_attributes_accept_div): New function.
1620 (elf32_arm_attributes_forbid_div): Likewise.
1621 (elf32_arm_merge_eabi_attributes): Correct handling of
1622 Tag_DIV_use.
1623
eed180f8
RM
16242012-03-15 Roland McGrath <mcgrathr@google.com>
1625
a4456d24
RM
1626 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use
1627 elf_x86_64_backend_data parameters for plt_eh_frame.
1628
eed180f8
RM
1629 * elf64-x86-64.c (struct elf_x86_64_backend_data): New type.
1630 (get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros.
1631 (elf_x86_64_arch_bed): New variable.
1632 (elf_backend_arch_data): New macro.
1633 (elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE.
1634 (elf_x86_64_allocate_dynrelocs): Likewise.
1635 (elf_x86_64_relocate_section): Likewise.
1636 (elf_x86_64_plt_sym_val): Likewise.
1637 (elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data
1638 parameters for PLT details.
1639 (elf_x86_64_finish_dynamic_sections): Likewise.
1640
caa0075c
RM
16412012-03-14 Roland McGrath <mcgrathr@google.com>
1642
1643 * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up
1644 to the full size, padding out with nop instructions.
1645
1d7e9d18
AM
16462012-03-12 Alan Modra <amodra@gmail.com>
1647
1648 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't warn
1649 on zero size dynbss symbol.
1650 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
1651 * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
1652 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
1653 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1654 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
1655 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
1656 * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
1657 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
1658 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
1659 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1660 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1661 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
1662 * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
1663 * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise.
1664 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
1665 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1666 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1667 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
1668 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1669 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
1670 * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise.
1671
aea77599
AM
16722012-03-10 Edmar Wienskoski <edmar@freescale.com>
1673
1674 * archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
1675 * bfd-in2.h: Regenerate.
1676 * cpu-powerpc.c (bfd_powerpc_archs): Add entries for
1677 bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
1678
56b8aada
L
16792012-03-09 H.J. Lu <hongjiu.lu@intel.com>
1680
1681 PR ld/13817
8b127cbc 1682 * elf32-i386.c (elf_i386_relocate_section): Restore
56b8aada
L
1683 R_386_IRELATIVE.
1684
8b127cbc 1685 * elf64-x86-64.c (elf_x86_64_relocate_section): Restore
56b8aada
L
1686 R_X86_64_IRELATIVE.
1687
460f1cdc
TG
16882012-03-08 Tristan Gingold <gingold@adacore.com>
1689
1690 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum
1691 keylen according to archive kind. Set nextvbn and nextrfa lhd
1692 fields. Add comments.
1693
0a22ae8e
NC
16942012-03-07 Nick Clifton <nickc@redhat.com>
1695
1696 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type
1697 field.
1698 (elf32_mn10300_link_hash_table): Add tls_ldm_got entry;
1699 (elf_mn10300_tdata): Define.
1700 (elf_mn10300_local_got_tls_type): Define.
1701 (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD,
1702 R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
1703 R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
1704 R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs.
1705 (mn10300_reloc_map): Likewise.
1706 (elf_mn10300_tls_transition): New function.
1707 (dtpoff, tpoff, mn10300_do_tls_transition): New functions.
1708 (mn10300_elf_check_relocs): Add TLS support.
1709 (mn10300_elf_final_link_relocate): Likewise.
1710 (mn10300_elf_relocate_section): Likewise.
1711 (mn10300_elf_relax_section): Likewise.
1712 (elf32_mn10300_link_hash_newfunc): Initialise new field.
1713 (_bfd_mn10300_copy_indirect_symbol): New function.
1714 (elf32_mn10300_link_hash_table_create): Initialise new fields.
1715 (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support.
1716 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1717 (_bfd_mn10300_elf_reloc_type_class): Allocate an
1718 elf_mn10300_obj_tdata structure.
1719 (elf_backend_copy_indirect_symbol): Define.
1720 * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD,
1721 BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE,
1722 BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD,
1723 BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations.
1724 (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to
1725 alongside other MN10300 relocations.
1726 * bfd-in2.h: Regenerate.
1727 * libbfd.h: Regenerate.
1728
3ce231f8
JJ
17292012-03-06 Jakub Jelinek <jakub@redhat.com>
1730
1731 * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE
1732 set relocate to TRUE.
1733
0bef263a
RO
17342012-03-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1735
1736 PR ld/12152
1737 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore
1738 overflows for R_SPARC_UA32 in .stab sections.
1739
84abc003
AM
17402012-03-01 Alan Modra <amodra@gmail.com>
1741
1742 * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning.
1743
3d301fdc
AM
17442012-02-27 Alan Modra <amodra@gmail.com>
1745
1746 * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd
1747 before calling elf specific function.
1748 (sh_elf_osec_readonly_p): Test for error return from above.
1749
cb83c803
AM
17502012-02-27 Alan Modra <amodra@gmail.com>
1751
1752 * elf32-spu.c (build_stub): Fix malloc under-allocation.
1753
6f7be959
WL
17542012-02-25 Walter Lee <walt@tilera.com>
1755 * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL,
1756 BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
1757 BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
1758 BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
1759 BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
1760 BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
1761 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
1762 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
1763 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
1764 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
1765 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
1766 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
1767 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
1768 BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
1769 BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
1770 BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
1771 BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
1772 BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
1773 BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
1774 BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
1775 BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
1776 BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
1777 BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD,
1778 BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
1779 BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
1780 BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD.
1781 Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT,
1782 BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT,
1783 BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT,
1784 BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT,
1785 BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT,
1786 BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT,
1787 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT,
1788 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT,
1789 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD,
1790 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD,
1791 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD,
1792 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD,
1793 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD,
1794 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD,
1795 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD,
1796 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD,
1797 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE,
1798 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE,
1799 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE,
1800 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE,
1801 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE,
1802 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE,
1803 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE,
1804 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE.
1805 * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro
1806 relocations.
1807 (tilepro_reloc_map): Ditto.
1808 (tilepro_info_to_howto_rela): Ditto.
1809 (reloc_to_create_func): Ditto.
1810 (tilepro_tls_translate_to_le): New.
1811 (tilepro_tls_translate_to_ie): New.
1812 (tilepro_elf_tls_transition): New.
1813 (tilepro_elf_check_relocs): Handle new tls relocations.
1814 (tilepro_elf_gc_sweep_hook): Ditto.
1815 (allocate_dynrelocs): Ditto.
1816 (tilepro_elf_relocate_section): Ditto.
1817 (tilepro_replace_insn): New.
1818 (insn_mask_X1): New.
1819 (insn_mask_X0_no_dest_no_srca): New
1820 (insn_mask_X1_no_dest_no_srca): New
1821 (insn_mask_Y0_no_dest_no_srca): New
1822 (insn_mask_Y1_no_dest_no_srca): New
1823 (srca_mask_X0): New
1824 (srca_mask_X1): New
1825 (insn_tls_le_move_X1): New
1826 (insn_tls_le_move_zero_X0X1): New
1827 (insn_tls_ie_lw_X1): New
1828 (insn_tls_ie_add_X0X1): New
1829 (insn_tls_ie_add_Y0Y1): New
1830 (insn_tls_gd_add_X0X1): New
1831 (insn_tls_gd_add_Y0Y1): New
1832 * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx
1833 relocations.
1834 (tilegx_reloc_map): Ditto.
1835 (tilegx_info_to_howto_rela): Ditto.
1836 (reloc_to_create_func): Ditto.
1837 (tilegx_elf_link_hash_table): New field disable_le_transition.
1838 (tilegx_tls_translate_to_le): New.
1839 (tilegx_tls_translate_to_ie): New.
1840 (tilegx_elf_tls_transition): New.
1841 (tilegx_elf_check_relocs): Handle new tls relocations.
1842 (tilegx_elf_gc_sweep_hook): Ditto.
1843 (allocate_dynrelocs): Ditto.
1844 (tilegx_elf_relocate_section): Ditto.
1845 (tilegx_copy_bits): New.
1846 (tilegx_replace_insn): New.
1847 (insn_mask_X1): New.
1848 (insn_mask_X0_no_dest_no_srca): New.
1849 (insn_mask_X1_no_dest_no_srca): New.
1850 (insn_mask_Y0_no_dest_no_srca): New.
1851 (insn_mask_Y1_no_dest_no_srca): New.
1852 (insn_mask_X0_no_operand): New.
1853 (insn_mask_X1_no_operand): New.
1854 (insn_mask_Y0_no_operand): New.
1855 (insn_mask_Y1_no_operand): New.
1856 (insn_tls_ie_ld_X1): New.
1857 (insn_tls_ie_ld4s_X1): New.
1858 (insn_tls_ie_add_X0X1): New.
1859 (insn_tls_ie_add_Y0Y1): New.
1860 (insn_tls_ie_addx_X0X1): New.
1861 (insn_tls_ie_addx_Y0Y1): New.
1862 (insn_tls_gd_add_X0X1): New.
1863 (insn_tls_gd_add_Y0Y1): New.
1864 (insn_move_X0X1): New.
1865 (insn_move_Y0Y1): New.
1866 (insn_add_X0X1): New.
1867 (insn_add_Y0Y1): New.
1868 (insn_addx_X0X1): New.
1869 (insn_addx_Y0Y1): New.
1870 * libbfd.h: Regenerate.
1871 * bfd-in2.h: Regenerate.
1872
82590249
WL
18732012-02-25 Walter Lee <walt@tilera.com>
1874
fb6cedde
WL
1875 * config.bfd (tilegx-*-*): rename little endian vector; add big
1876 endian vector.
1877 (tilegxbe-*-*): New case.
1878 * configure.in (bfd_elf32_tilegx_vec): Rename...
1879 (bfd_elf32_tilegx_le_vec): ... to this.
1880 (bfd_elf32_tilegx_be_vec): New vector.
1881 (bfd_elf64_tilegx_vec): Rename...
1882 (bfd_elf64_tilegx_le_vec): ... to this.
1883 (bfd_elf64_tilegx_be_vec): New vector.
1884 * configure: Regenerate.
1885 * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename.
1886 (TARGET_LITTLE_NAME): Ditto.
1887 (TARGET_BIG_SYM): Define.
1888 (TARGET_BIG_NAME): Define.
1889 * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename.
1890 (TARGET_LITTLE_NAME): Ditto.
1891 (TARGET_BIG_SYM): Define.
1892 (TARGET_BIG_NAME): Define.
1893 * targets.c (bfd_elf32_tilegx_vec): Rename...
1894 (bfd_elf32_tilegx_le_vec): ... to this.
1895 (bfd_elf32_tilegx_be_vec): Declare.
1896 (bfd_elf64_tilegx_vec): Rename...
1897 (bfd_elf64_tilegx_le_vec): ... to this.
1898 (bfd_elf64_tilegx_be_vec): Declare.
1899 (_bfd_target_vector): Add / rename above vectors.
82590249
WL
1900 * arctures.c (bfd_architecture): Define bfd_mach_tilegx32.
1901 * bfd-in2.h: Regenerate.
1902 * cpu-tilegx.c (bfd_tilegx32_arch): define.
fb6cedde 1903 (bfd_tilegx_arch): link to bfd_tilegx32_arch.
82590249 1904
4115917d
NC
19052012-02-24 Nick Clifton <nickc@redhat.com>
1906
1907 PR ld/13730
1908 * reloc.c (bfd_generic_get_relocated_section_contents): Issue an
1909 error message instead of aborting, when an outofrange reloc is
1910 encountered.
1911
19765f52
IS
19122012-02-23 Iain Sandoe <idsandoe@googlemail.com>
1913
1914 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New.
1915 (bfd_mach_o_canonicalize_one_reloc): Swap non-scattered reloc
1916 bit-fields when target and host differ in endian-ness. When
1917 PAIRs are non-scattered find the 'symbol' from the preceding
1918 reloc. Add FIXME re. reloc symbols on section boundaries.
1919 (bfd_mach_o_swap_out_non_scattered_reloc): New.
1920 (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc.
1921
6639d37a
IS
19222012-02-17 Iain Sandoe <idsandoe@googlemail.com>
1923
1924 * mach-o-i386.c (i386_howto_table): Add support for 16 bit
1925 sect-diffs.
1926 (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs.
1927 (bfd_mach_o_i386_swap_reloc_out): Likewise.
1928
e1e81ed3
IS
19292012-02-17 Tristan Gingold <gingold@adacore.com>
1930
1931 * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF):
1932 * libbfd.h: Regenerated.
1933 * bfd-in2.h: Likewise.
1934 * mach-o-i386.c (i386_howto_table): Include local sectdiff.
1935 (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff.
1936 (bfd_mach_o_i386_swap_reloc_out): Likewise.
1937
d0ddfe27
AK
19382012-02-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1939
1940 * elf32-s390.c (elf_s390_relocate_section): Support basr in the
1941 GD->LE and LD->LE optimizations.
1942
eb8c5f3f
AM
19432012-02-16 Alan Modra <amodra@gmail.com>
1944
1945 PR binutils/13355
1946 * elf32-rx.c (elf32_rx_relax_section): Correct width check.
1947
e1741a1e
RH
19482012-02-13 Richard Henderson <rth@redhat.com>
1949
1950 PR ld/13621
1951 * linker.c (fix_syms): Force symbols outside any section into
1952 bfd_abs_section_ptr.
1953
5efbbc43
AM
19542012-02-13 Alan Modra <amodra@gmail.com>
1955
1956 * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function.
1957 * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare.
1958 * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define.
1959 * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define.
1960
3e3c397d
JK
19612012-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
1962 Nick Clifton <nickc@redhat.com>
1963
1964 * oasys.c (oasys_write_header): Fix compilation warning on zero-sized
1965 memset.
1966
09903f4b
IS
19672012-02-10 Iain Sandoe <idsandoe@googlemail.com>
1968
1969 * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section
1970 vma additions in their logical, rather than physical order.
1971
632039e0
IS
19722012-02-10 Iain Sandoe <idsandoe@googlemail.com>
1973
1974 * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section
1975 parameters.
1976 * mach-o-x86-64.c (text_section_names_xlat): New.
1977 (mach_o_x86_64_segsec_names_xlat): New.
1978 (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat.
1979 * mach-o-i386.c (text_section_names_xlat): Correct section parameters.
1980
565a6476
TG
19812012-02-10 Tristan Gingold <gingold@adacore.com>
1982
1983 * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator
1984 to avoid infinite loop. Add comments.
1985
923f257f
L
19862012-02-09 H.J. Lu <hongjiu.lu@intel.com>
1987
1988 PR ld/13675
1989 * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte
1990 nop instructions.
1991 (bfd_arch_i386_short_nop_fill): New.
1992 (bfd_arch_i386_long_nop_fill): Likewise.
1993 Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info
1994 initializers. Use bfd_arch_i386_long_nop_fill on 64bit
1995 bfd_arch_info initializers.
1996
1997 * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ...
1998 (bfd_arch_i386_short_nop_fill): This.
1999 Update bfd_arch_info initializers.
2000 * cpu-l1om.c: Likewise.
2001
4e6b54a6
AM
20022012-02-08 Alan Modra <amodra@gmail.com>
2003
2004 * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too.
2005 (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear
2006 the correct h->u.weakdef.
2007
ff9e0f5b
AM
20082012-02-07 Alan Modra <amodra@gmail.com>
2009
2010 * elf.c (elf_find_function): Don't use internal_elf_sym.
2011 (_bfd_elf_maybe_function_sym): Likewise. Replace elf_symbol_type
2012 parameter with asymbol.
2013 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
2014 * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype.
2015 (struct elf_backend_data <maybe_function_sym>): Likewise.
2016
526f25b2
EW
20172012-02-02 Vidya Praveen (vidya.praveen@atmel.com)
2018
2019 PR bfd/13410
8b127cbc 2020 * elf32-avr.c (elf32_avr_relax_section): Correct the
526f25b2
EW
2021 condition that qualifies the candidates for relaxation.
2022
7c4f9963
TG
20232012-02-02 Tristan Gingold <gingold@adacore.com>
2024
2025 * bfdio.c (real_fopen): Remove unused vms_modes variable.
2026
facf03f2
TG
20272012-02-02 Tristan Gingold <gingold@adacore.com>
2028
2029 * mach-o.c (bfd_mach_o_read_header): Silent uninitialized
2030 variable warning.
2031
cd99171c
TG
20322012-02-02 Tristan Gingold <gingold@adacore.com>
2033
2034 * archive.c (bfd_slurp_armap): Fix thinko in cast.
2035
b7761f11
L
20362012-01-31 H.J. Lu <hongjiu.lu@intel.com>
2037
2038 PR ld/13616
2039 * archures.c (bfd_arch_info): Add fill.
2040 (bfd_default_arch_struct): Add bfd_arch_default_fill.
2041 (bfd_arch_default_fill): New.
2042
2043 * configure.in: Set bfd version to 2.22.52.
2044 * configure: Regenerated.
2045
2046 * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info
2047 initializer.
2048 * cpu-arc.c: Likewise.
2049 * cpu-arm.c: Likewise.
2050 * cpu-avr.c: Likewise.
2051 * cpu-bfin.c: Likewise.
2052 * cpu-cr16.c: Likewise.
2053 * cpu-cr16c.c: Likewise.
2054 * cpu-cris.c: Likewise.
2055 * cpu-crx.c: Likewise.
2056 * cpu-d10v.c: Likewise.
2057 * cpu-d30v.c: Likewise.
2058 * cpu-dlx.c: Likewise.
2059 * cpu-epiphany.c: Likewise.
2060 * cpu-fr30.c: Likewise.
2061 * cpu-frv.c: Likewise.
2062 * cpu-h8300.c: Likewise.
2063 * cpu-h8500.c: Likewise.
2064 * cpu-hppa.c: Likewise.
2065 * cpu-i370.c: Likewise.
2066 * cpu-i860.c: Likewise.
2067 * cpu-i960.c: Likewise.
2068 * cpu-ia64.c: Likewise.
2069 * cpu-ip2k.c: Likewise.
2070 * cpu-iq2000.c: Likewise.
2071 * cpu-lm32.c: Likewise.
2072 * cpu-m10200.c: Likewise.
2073 * cpu-m10300.c: Likewise.
2074 * cpu-m32c.c: Likewise.
2075 * cpu-m32r.c: Likewise.
2076 * cpu-m68hc11.c: Likewise.
2077 * cpu-m68hc12.c: Likewise.
2078 * cpu-m68k.c: Likewise.
2079 * cpu-m88k.c: Likewise.
2080 * cpu-mcore.c: Likewise.
2081 * cpu-mep.c: Likewise.
2082 * cpu-microblaze.c: Likewise.
2083 * cpu-mips.c: Likewise.
2084 * cpu-mmix.c: Likewise.
2085 * cpu-moxie.c: Likewise.
2086 * cpu-msp430.c: Likewise.
2087 * cpu-mt.c: Likewise.
2088 * cpu-ns32k.c: Likewise.
2089 * cpu-openrisc.c: Likewise.
2090 * cpu-or32.c: Likewise.
2091 * cpu-pdp11.c: Likewise.
2092 * cpu-pj.c: Likewise.
2093 * cpu-plugin.c: Likewise.
2094 * cpu-powerpc.c: Likewise.
2095 * cpu-rl78.c: Likewise.
2096 * cpu-rs6000.c: Likewise.
2097 * cpu-rx.c: Likewise.
2098 * cpu-s390.c: Likewise.
2099 * cpu-score.c: Likewise.
2100 * cpu-sh.c: Likewise.
2101 * cpu-sparc.c: Likewise.
2102 * cpu-spu.c: Likewise.
2103 * cpu-tic30.c: Likewise.
2104 * cpu-tic4x.c: Likewise.
2105 * cpu-tic54x.c: Likewise.
2106 * cpu-tic6x.c: Likewise.
2107 * cpu-tic80.c: Likewise.
2108 * cpu-tilegx.c: Likewise.
2109 * cpu-tilepro.c: Likewise.
2110 * cpu-v850.c: Likewise.
2111 * cpu-vax.c: Likewise.
2112 * cpu-w65.c: Likewise.
2113 * cpu-we32k.c: Likewise.
2114 * cpu-xc16x.c: Likewise.
2115 * cpu-xstormy16.c: Likewise.
2116 * cpu-xtensa.c: Likewise.
2117 * cpu-z80.c: Likewise.
2118 * cpu-z8k.c: Likewise.
2119
2120 * cpu-i386.c: Include "libiberty.h".
ff9e0f5b 2121 (bfd_arch_i386_fill): New.
b7761f11
L
2122 Add bfd_arch_i386_fill to bfd_arch_info initializer.
2123
2124 * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer.
2125 * cpu-l1om.c: Likewise.
2126
ff9e0f5b 2127 * linker.c (default_data_link_order): Call abfd->arch_info->fill
b7761f11
L
2128 if fill size is 0.
2129
2130 * bfd-in2.h: Regenerated.
2131
0d048da3
ME
21322012-01-27 Michael Eager <eager@eagercon.com>
2133
8b127cbc 2134 * elf32-microblaze.c (create_got_section):
0d048da3
ME
2135 Reuse existing .rela.got section.
2136
9f296da3
AM
21372012-01-23 Alan Modra <amodra@gmail.com>
2138
2139 * elf-bfd.h: Formatting.
2140 (struct elf_backend_data): Add "maybe_function_sym".
2141 (_bfd_elf_maybe_function_sym): Declare.
2142 * elfxx-target.h (elf_backend_maybe_function_sym): Define.
2143 (elfNN_bed): Init new field.
2144 * elf.c (elf_find_function): Use maybe_function_sym.
2145 (_bfd_elf_maybe_function_sym): New function.
2146 * elf64-ppc.c (elf_backend_maybe_function_sym): Define.
2147 (ppc64_elf_maybe_function_sym): New function.
2148
f1bb16f8
NC
21492012-01-20 Francois Gouget <fgouget@codeweavers.com>
2150
2151 PR binutils/13534
2152 * archive.c (_bfd_ar_sizepad): New function. Correctly install and
2153 pad the size field in an archive header.
2154 (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan
2155 function for the archive size field.
2156 (bfd_generic_openr_next_archived_file): Likewise.
2157 (do_slurp_coff_armap): Likewise.
2158 (_bfd_write_archive_contents): Likewise.
2159 (_bfd_bsd44_write_ar_hdr): Use the new function.
2160 (bfd_ar_hdr_from_filesystem): Likewise.
2161 (_bfd_write_archive_contents): Likewise.
2162 (bsd_write_armap): Likewise.
2163 (coff_write_armap): Likewise.
2164 * archive64.c (bfd_elf64_archive_write_armap): Likewise.
2165 * bfdio.c (bfd_bread): Use correct type for archive element
2166 sizes.
2167 * ar.c (open_inarch): Likewise.
2168 (extract_file): Likewise.
2169 * libbfd-in.h (struct areltdata): Use correct types for
2170 parsed_size and extra_size fields.
2171 Prototype _bfd_ar_sizepad function.
2172 * libbfd.h: Regenerate.
2173
1f20dca5
UW
21742012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2175
2176 * elf.c (elfcore_write_prpsinfo): Provide unconditionally.
2177 Return NULL if core file generation is unsupported.
2178 (elfcore_write_prstatus): Likewise.
2179 * elf32-arm.c (elf32_arm_nabi_write_core_note): New function.
2180 (elf_backend_write_core_note): Define.
2181
100fc767
TG
21822012-01-19 Tristan Gingold <gingold@adacore.com>
2183
2184 * pef.c: Add a comment.
2185 * xsym.c: Likewise.
2186
75cd47ed
AM
21872012-01-17 Alan Modra <amodra@gmail.com>
2188
2189 * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
2190 trailing garbage in the note.
2191 * elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
2192
8a5dcf53
AM
21932012-01-16 Daniel Green <venix1@gmail.com>
2194
2195 PR ld/13491
2196 * coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test
2197 h->root.type not h->type.
2198 * coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.
2199
bb76d940
IS
22002012-01-13 Iain Sandoe <idsandoe@googlemail.com>
2201
8a5dcf53
AM
2202 * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
2203 indirect symbols.
687be931
IS
2204
22052012-01-13 Iain Sandoe <idsandoe@googlemail.com>
2206
2207 * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file
bb76d940
IS
2208 position from here... to (bfd_mach_o_build_seg_command): Here.
2209
50d10658
IS
22102012-01-12 Iain Sandoe <idsandoe@googlemail.com>
2211
2212 * mach-o.c (bfd_mach_o_count_indirect_symbols): New.
2213 (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
2214 * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
2215 file. (bfd_mach_o_section): Add indirect_syms field.
2216
e5081f2f
IS
22172012-01-11 Iain Sandoe <idsandoe@googlemail.com>
2218
2219 * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of
2220 vmsize from filesize. Don't compute offsets or file sizes for
2221 zerofill sections.
2222
bbd56171
IS
22232012-01-11 Iain Sandoe <idsandoe@googlemail.com>
2224
2225 * mach-o.c (bfd_mach_o_build_commands): Make the building of each
2226 command type independent.
2227
794e51c0
AM
22282012-01-11 Alan Modra <amodra@gmail.com>
2229
2230 * elf64-ppc.c: Define more insns used in plt call stubs.
2231 (ppc64_elf_brtaken_reloc): Assume isa version 2 or above.
2232 (ppc64_elf_relocate_section): Likewise.
2233 (enum ppc_stub_type): Add ppc_stub_plt_call_r2save.
2234 (struct ppc_link_hash_table): Increase size of stub_count array.
2235 Add plt_stub_align and plt_thread_safe.
2236 (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define.
2237 (plt_stub_size, plt_stub_pad): New functions.
2238 (build_plt_stub): Emit barriers for power7 thread safety. Don't
2239 emit needless save of r2.
2240 (build_tls_get_addr_stub): Adjust params.
2241 (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning
2242 plt stubs. Adjust build_*plt_stub calls.
2243 (ppc_size_one_stub): Similarly.
2244 (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align
2245 params. Choose default for plt_thread_safe based on existence of
2246 calls to thread creation functions. Modify plt_call to
2247 plt_call_r2save when no tocsave reloc found. Align tail of stub
2248 sections.
2249 (ppc64_elf_build_stubs): Align tail of stub sections. Adjust
2250 output of stub statistics.
2251 (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save.
2252 * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
2253
df4f9443
L
22542012-01-10 H.J. Lu <hongjiu.lu@intel.com>
2255
2256 PR ld/13581
2257 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P
2258 check on R_X86_64_PCXX.
2259
2a65a88e
TG
22602012-01-10 Tristan Gingold <gingold@adacore.com>
2261
2262 * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false
2263 warning.
2264
660722b0
TG
22652012-01-10 Tristan Gingold <gingold@adacore.com>
2266
2267 * bfdio.c (bfd_tell): Handle nested archives.
2268 (bfd_seek): Ditto.
2269 * cache.c (bfd_cache_lookup_worker): Ditto.
2270 * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with
2271 nested archives.
2272 (bfd_generic_openr_next_archived_file): Likewise.
2273
b22161d6
IS
22742012-01-09 Iain Sandoe <idsandoe@googlemail.com>
2275
2276 * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement.
2277 (bfd_mach_o_write_symtab): Remove handling for indirect syms.
2278 (bfd_mach_o_primary_symbol_sort_key): Likewise.
2279 (bfd_mach_o_cf_symbols): Likewise.
2280 (bfd_mach_o_sort_symbol_table): Remove.
2281 (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling
2282 for indirect and dysymtab counts. Do the symbol sorting here.
2283 (bfd_mach_o_build_dysymtab_command): Count the symbol types here.
2284 Make the indirect symbols a TODO.
2285 (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols.
2286 (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with
2287 a non-zero value.
2288 (bfd_mach_o_read_symtab_symbol): Record the symbol index.
2289 (bfd_mach_o_read_symtab_symbol): Adjust recording of global status.
2290 * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries.
2291 (IS_MACHO_INDIRECT): Remove.
2292 (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New.
2293
28a1b4f8
NC
22942012-01-06 Nick Clifton <nickc@redhat.com>
2295
2296 PR binutils/13121
2297 * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to
2298 'flaginfo' to avoid conflicts with AIX system headers.
2299
36f0a48f
TG
23002012-01-06 Tristan Gingold <gingold@adacore.com>
2301
2302 * bfdio.c (bfd_bread): Use arelt_size macro.
2303
76d4c1cb
TG
23042012-01-06 Tristan Gingold <gingold@adacore.com>
2305
2306 * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.
2307
a1c7aafb
NC
23082012-01-05 Nick Clifton <nickc@redhat.com>
2309
2310 PR ld/12161
2311 * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if
2312 necessary.
2313
e85c6a70
JK
23142012-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2315
2316 Fix zero registers core files when built by gcc-4.7.
2317 * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and
2318 size. Call elfcore_write_note for the local variables. Remove the
2319 final elfcore_write_note call. Add NOTREACHED comments.
2320
15bbba8d
TG
23212012-01-04 Tristan Gingold <gingold@adacore.com>
2322
2323 * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function.
2324 (bfd_mach_o_generic_stat_arch_elt): Adjust.
2325
a4e241ca
TG
23262012-01-04 Tristan Gingold <gingold@adacore.com>
2327
2328 * mach-o.c (bfd_mach_o_fat_member_init): New function.
2329 (bfd_mach_o_openr_next_archived_file): Reindent.
2330 Adjust to call bfd_mach_o_fat_member_init.
2331 (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init.
2332
71141310
TG
23332012-01-04 Tristan Gingold <gingold@adacore.com>
2334
2335 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle
2336 BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1,
2337 BFD_RELOC_MACH_O_X86_64_PCREL32_2,
2338 BFD_RELOC_MACH_O_X86_64_PCREL32_4,
2339 BFD_RELOC_MACH_O_X86_64_BRANCH32,
2340 BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32,
2341 BFD_RELOC_MACH_O_X86_64_GOT.
2342
9f4a5bd1
TG
23432012-01-04 Tristan Gingold <gingold@adacore.com>
2344
2345 * mach-o.h (bfd_mach_o_fvmlib_command): New structure.
2346 (bfd_mach_o_load_command): Add fvmlib field.
2347
2348 * mach-o.c (bfd_mach_o_read_fvmlib): New function.
2349 (bfd_mach_o_read_command): Handle fvmlib.
2350
0b2de107
TG
23512012-01-04 Tristan Gingold <gingold@adacore.com>
2352
2353 * mach-o.c (bfd_mach_o_convert_architecture): Reindent.
2354 Decode msubtype for ARM.
2355
aeefa1c9
TG
23562012-01-04 Tristan Gingold <gingold@adacore.com>
2357
2358 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments.
2359
fc55a902
TG
23602012-01-04 Tristan Gingold <gingold@adacore.com>
2361
2362 * mach-o.h: Reindent header.
2363 (bfd_mach_o_encryption_info_command): New structure.
2364 (bfd_mach_o_load_command): Add encryption_info field.
2365
2366 * mach-o.c (bfd_mach_o_read_encryption_info): New function.
2367 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
2368 (bfd_mach_o_read_command): Adjust error message.
2369
2ca7691a
TG
23702012-01-04 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
2371
2372 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part
2373 which reads DWARF2 and stores in stash from find_line.
2374 (find_line) Call _bfd_dwarf2_slurp_debug_info.
2375 * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration.
2376 * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate.
2377 * mach-o.c (dsym_subdir): The name of subdir where debug
2378 information may be stored.
2379 (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose
2380 type is UUID.
2381 (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is
2382 corresponding to the executable.
2383 (bfd_mach_o_find_dsym): New. Find a debug information BFD in the
2384 specified binary file.
2385 (bfd_mach_o_follow_dsym): New. Find a debug information BFD for
2386 the original BFD.
2387 (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O
2388 executables, dylibs, and bundles.
2389 (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file.
2390 * mach-o.h (dsym_bfd): The BFD of the dSYM file.
2391
68588f95
IS
23922012-01-03 Iain Sandoe <idsandoe@googlemail.com>
2393
2394 * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index
2395 for stabd symbols.
2396 (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs.
2397 (bfd_mach_o_cf_symbols): Likewise.
2398
f2b324f1
IS
23992012-01-03 Iain Sandoe <idsandoe@googlemail.com>
2400
2401 * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo.
2402
7f307238
IS
24032012-01-03 Iain Sandoe <idsandoe@googlemail.com>
2404
2405 * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
2406 as the value of an indirect symbol. Keep the string table index in
2407 non-indirect syms for reference.
2408 (bfd_mach_o_write_dysymtab): New.
2409 (bfd_mach_o_primary_symbol_sort_key): New.
2410 (bfd_mach_o_cf_symbols): New.
2411 (bfd_mach_o_sort_symbol_table): New.
2412 (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols.
2413 If we are emitting a dysymtab, process indirect symbols and count the
2414 number of each other kind.
2415 (bfd_mach_o_mangle_sections): New.
2416 (bfd_mach_o_write_contents): Split out some pre-requisite code into
2417 the command builder. Write dysymtab if the command is present.
2418 (bfd_mach_o_count_sections_for_seg): New.
2419 (bfd_mach_o_build_seg_command): New.
2420 (bfd_mach_o_build_dysymtab_command): New.
2421 (bfd_mach_o_build_commands): Reorganize to support the fact that some
2422 commands are optional and should not be emitted if there are no
2423 sections or symbols.
2424 (bfd_mach_o_set_section_contents): Amend comment.
23e1d329 2425 * mach-o.h: Amend and add to comments.
7f307238
IS
2426 (mach_o_data_struct): Add fields for dysymtab symbols counts and a
2427 pointer to the indirects, when present.
2428 (bfd_mach_o_should_emit_dysymtab): New macro.
2429 (IS_MACHO_INDIRECT): Likewise.
2430
23e1d329 2431For older changes see ChangeLog-2011
56882138
AM
2432\f
2433Local Variables:
2434mode: change-log
2435left-margin: 8
2436fill-column: 74
2437version-control: never
2438End:
This page took 0.893271 seconds and 4 git commands to generate.