* compress.c: Reinstate 2012-10-19 change.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2012-10-20 Alan Modra <amodra@gmail.com>
2
3 * compress.c: Reinstate 2012-10-19 change.
4 (bfd_get_full_section_contents): Don't free unless we alloc.
5 Use proper decompress size. Delete some vars, rename others.
6
7 2012-10-19 Tom Tromey <tromey@redhat.com>
8
9 * compress.c: Revert previous patch.
10
11 2012-10-19 Tom Tromey <tromey@redhat.com>
12
13 * compress.c (bfd_get_full_section_contents): Don't cache
14 decompressed contents.
15
16 2012-10-18 Kai Tietz <ktietz@redhat.com>
17
18 PR binutils/14067
19 * coff-i386.c (bfd_target): Add section flag SEC_EXCLUDE.
20 Allow BFD_COMPRESS and BFD_DECOMPRESS flags.
21 * coff-x86_64.c: Likewise.
22 * coffcode.h (DOT_ZDEBUG): New define.
23 (sec_to_styp_flags): Check for .zdebug.
24 (styp_to_sec_flags): Likewise.
25 * coffgen.c (make_a_section): Handle .debug_* section
26 compression/decompression flags.
27 * cofflink.c (mark_relocs): Ignore relocations
28 for a section, which isn't marked as used.
29 (_bfd_coff_link_input_bfd): Add support of compressed
30 debug sections.
31 * compress.c (decompress_contents): Loop as long
32 as there is input available and there is room for
33 output.
34 * bfd/pe-arm.c: Add .zdebug_ partial match entry.
35 * pe-i386.c: Likewise.
36 * pe-x86_64.c: Likewise.
37 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't clear all
38 data-directories as this might destroy content.
39
40 * coff-i386.c (_bfd_generic_find_nearest_line_discriminator):
41 define as coff_find_nearest_line_discriminator.
42 * libcoff-in.h (coff_find_nearest_line_discriminator): New
43 * libcoff.h: Regenerated.
44 * coff-x86_64.c: Likewise.
45 * coffgen.c (coff_find_nearest_line_discriminator): New function.
46 prototype.
47
48 2012-10-16 Joel Brobecker <brobecker@adacore.com>
49
50 * coff64-rs6000.c (rs6000coff64_vec): Set _close_and_cleanup
51 field to _bfd_archive_close_and_cleanup.
52 (aix5coff64_vec): Likewise.
53
54 2012-10-16 Joel Brobecker <brobecker@adacore.com>
55
56 * coff-rs6000.c (rs6000coff_vec): Set _close_and_cleanup
57 field to _bfd_archive_close_and_cleanup.
58 (pmac_xcoff_vec): Likewise.
59
60 2012-10-16 Sofiane Naci <sofiane.naci@arm.com>
61
62 * elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value for
63 R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, R_AARCH64_TLSLE_MOVW_TPREL_G2,
64 R_AARCH64_TLSLE_MOVW_TPREL_G1, R_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
65 R_AARCH64_TLSLE_ADD_TPREL_HI12.
66 (elf64_aarch64_tlsdesc_howto_table): Fix shift value for
67 R_AARCH64_TLSDESC_LD64_PREL19 and R_AARCH64_TLSDESC_OFF_G1.
68 (elf64_aarch64_final_link_relocate): Add signed_addend when resolving
69 AARCH64_TLSLE_*_TPREL_* relocations.
70
71 2012-10-16 Alan Modra <amodra@gmail.com>
72
73 * elf32-xtensa.c (free_section_cache): Renamed from
74 clear_section_cache. Don't zero cache.
75 (section_cache_section): Remove ineffectual zero of cache.
76 Call init_section_cache instead.
77
78 2012-10-15 Doug Evans <dje@google.com>
79
80 * elf.c (special_sections_d): Add comment.
81
82 2012-10-13 H.J. Lu <hongjiu.lu@intel.com>
83
84 * Makefile.am (LIBDL): Replace -ldl with @lt_cv_dlopen_libs@.
85 * configure.in (lt_cv_dlopen_libs): AC_SUBST.
86 * Makefile.in: Regenerated.
87 * configure: Likewise.
88
89 2012-10-08 Alan Modra <amodra@gmail.com>
90
91 PR binutils/14662
92 * elf.c (_bfd_elf_make_section_from_shdr): Treat .gdb_index as
93 SEC_DEBUGGING.
94
95 2012-09-20 Walter Lee <walt@tilera.com>
96
97 * elf32-tilepro.c (tilepro_elf_relocate_section): Adjust got
98 relocations with value of hgot.
99 * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
100
101 2012-09-19 Steve Ellcey <sellcey@mips.com>
102
103 * config.bfd: Add mips*-mti-elf* target.
104
105 2012-09-18 H.J. Lu <hongjiu.lu@intel.com>
106
107 PR ld/14591
108 * elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return
109 if the old symbol is weak.
110
111 * elf32-sh-symbian.c (sh_symbian_relocate_section): Update
112 _bfd_elf_merge_symbol call.
113
114 * elflink.c (_bfd_elf_merge_symbol): Add an argument to return
115 if the old symbol is weak.
116 (_bfd_elf_add_default_symbol): Update _bfd_elf_merge_symbol
117 call.
118 (elf_link_add_object_symbols): Don't update symbol type from a
119 weak definition. Update symbol type from a common symbol when
120 overriding a weak symbol.
121
122 2012-09-17 H.J. Lu <hongjiu.lu@intel.com>
123
124 * elf32-i386.c (elf_i386_convert_mov_to_lea): Ignore discarded
125 section.
126 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
127
128 2012-09-17 H.J. Lu <hongjiu.lu@intel.com>
129
130 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Replace return
131 FALSE with abort.
132 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
133
134 2012-09-17 Walter Lee <walt@tilera.com>
135
136 * elf32-tilepro.c (tilepro_elf_relocate_section): Remove unused
137 got_base variable.
138 * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
139
140 2012-09-17 Walter Lee <walt@tilera.com>
141
142 * elf32-tilepro.c (tilepro_elf_relocate_section): Fix computation
143 of got relocations for when .got.plt section is merged with .got.
144 * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
145
146 2012-09-14 David Edelsohn <dje.gcc@gmail.com>
147
148 * configure: Regenerate.
149
150 2012-09-13 Anthony Green <green@moxielogic.com>
151
152 * targets.c (bfd_elf32_bigmoxie_vec, bfd_elf32_littlemoxie_vec):
153 Define.
154 (bfd_elf32_moxie_vec): Remove.
155 * config.bfd, configure.in: Add bi-endian support for moxie.
156 * configure: Rebuilt.
157 * elf32-moxie.c (TARGET_LITTLE_NAME, TARGET_LITTLE_SYM): Define.
158 (TARGET_BIG_NAME, TARGET_BIG_SYM): Update for bi-endian support.
159
160 2012-09-12 Doug Kwan <dougkwan@google.com>
161
162 * elf64-ppc.c (ppc64_elf_relocate_section): Use pre-adjusted
163 relocation for stub lookup.
164
165 2012-09-12 Chris Schlumberger-Socha <chris.schlumberger-socha@arm.com>
166
167 * bfd-in2.h: Regenerated.
168 * elf64-aarch64.c
169 (elf64_aarch64_howto_table): Add R_AARCH64_GOT_LD_PREL19 reloc to HOWTO.
170 (elf64_aarch64_reloc_map): Add reloc entry.
171 (aarch64_resolve_relocation): Likewise.
172 (bfd_elf_aarch64_put_addend): Likewise.
173 (aarch64_reloc_got_type): Likewise.
174 (elf64_aarch64_final_link_relocate): Likewise.
175 (lf64_aarch64_check_relocs): Likewise.
176 (elf64_aarch64_check_relocs): New case for R_AARCH64_ADR_PREL_LO21
177 reloc.
178 * libbfd.h: Regenerated.
179 * reloc.c (R_AARCH64_GOT_LD_PREL19): New reloc.
180
181 2012-09-10 Matthias Klose <doko@ubuntu.com>
182
183 * config.in: Disable sanity check for kfreebsd.
184
185 2012-09-10 H.J. Lu <hongjiu.lu@intel.com>
186
187 * configure: Regenerated.
188
189 2012-09-04 Sergey A. Guriev <sergey.a.guriev@intel.com>
190
191 * cpu-ia64-opc.c (ins_cnt6a): New function.
192 (ext_cnt6a): Ditto.
193 (ins_strd5b): Ditto.
194 (ext_strd5b): Ditto.
195 (elf64_ia64_operands): Add new operand types.
196
197 2012-09-04 H.J. Lu <hongjiu.lu@intel.com>
198
199 PR binutils/14493
200 * elf.c (ignore_section_sym): Also ignore section symbols without
201 a BFD section.
202
203 2012-09-03 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
204
205 * elf32-s390.c (elf_s390_relocate_section): Handle PLTOFF for
206 local and global ifunc symbols.
207 * elf64-s390.c (elf_s390_relocate_section): Likewise.
208
209 2012-09-02 H.J. Lu <hongjiu.lu@intel.com>
210
211 * elf-bfd.h (elf_link_hash_table): Add hdynamic for the
212 _DYNAMIC symbol.
213
214 * elflink.c (_bfd_elf_link_create_dynamic_sections): Set
215 hdynamic.
216
217 * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Check
218 hdynamic instead of "_DYNAMIC".
219 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
220 * elf32-cr16.c (elf32_arm_finish_dynamic_symbol): Likewise.
221 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
222 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
223 * elf32-i386.c (elf_i386_convert_mov_to_lea): Likewise.
224 * elf32-lm32.c (lm32_elf_finish_dynamic_symbol): Likewise.
225 * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
226 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
227 * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
228 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
229 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
230 * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
231 * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
232 * elf64-aarch64.c elf64_aarch64_finish_dynamic_symbol(): Likewise.
233 * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
234 * elf64-ia64-vms.c (elf64_ia64_finish_dynamic_symbol): Likewise.
235 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
236 * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
237 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
238 * elfnn-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
239 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
240 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
241 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
242
243 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Check
244 hdynamic, hgot, hplt instead of _DYNAMIC, _GLOBAL_OFFSET_TABLE_,
245 _PROCEDURE_LINKAGE_TABLE_.
246 * elf32-score.c (s3_bfd_score_elf_finish_dynamic_symbol): Likewise.
247 * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_symbol): Likewise.
248
249 2012-08-31 H.J. Lu <hongjiu.lu@intel.com>
250
251 * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't optimize
252 _DYNAMIC.
253 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
254
255 2012-08-31 H.J. Lu <hongjiu.lu@intel.com>
256
257 * elf32-i386.c (elf_i386_convert_mov_to_lea): New.
258 (elf_i386_size_dynamic_sections): Use it on input sections.
259 (elf_i386_relocate_section): Don't convert
260 "mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
261 for local symbols here.
262
263 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): New.
264 (elf_x86_64_size_dynamic_sections): Use it on input sections.
265 (elf_x86_64_relocate_section): Don't convert
266 "mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg"
267 for local symbols here.
268
269 2012-08-30 H.J. Lu <hongjiu.lu@intel.com>
270
271 * elf32-i386.c (elf_i386_relocate_section): Convert
272 "mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
273 for local symbols.
274
275 * elf64-x86-64.c (elf_x86_64_relocate_section): Convert
276 "mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg"
277 for local symbols.
278
279 2012-08-31 Alan Modra <amodra@gmail.com>
280
281 PR ld/14464
282 * elf64-ppc.c (ppc64_elf_relocate_section): Map symbols defined
283 by a linker script in .opd to corresponding input .opd section.
284
285 2012-08-28 Maciej W. Rozycki <macro@codesourcery.com>
286
287 * elf32-ppc.c (ppc_elf_relocate_section): Assert that dynindx is
288 not minus one.
289 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
290
291 2012-08-28 Maciej W. Rozycki <macro@codesourcery.com>
292
293 * elflink.c (_bfd_elf_merge_symbol): Also override the version
294 a dynamic symbol defaulted to if preempted with a hidden or
295 internal definition.
296
297 2012-08-28 Walter Lee <walt@tilera.com>
298
299 * elf32-tilepro.c (allocate_dynrelocs): Use PLT_ENTRY_SIZE as size
300 of header.
301 (tilepro_plt_entry_build): Account for new header size.
302 (tilepro_elf_finish_dynamic_sections): Ditto.
303 (tilepro_elf_plt_sym_val): Ditto.
304 * elfxx-tilegx.c (allocate_dynrelocs): Use PLT_ENTRY_SIZE as size
305 of header + tail.
306 (tilegx_elf_finish_dynamic_sections): Account for new padding.
307
308 2012-08-27 Walter Lee <walt@tilera.com>
309
310 * reloc.c (Add BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL,
311 BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
312 BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
313 BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
314 BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
315 BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
316 BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL,
317 BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
318 BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL,
319 BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
320 BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
321 BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
322 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
323 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): new relocations.
324 * elfxx-tilegx.c (tilegx_elf_howto_table): Handle new relocations.
325 (tilegx_reloc_map): Ditto.
326 (reloc_to_create_func): Ditto.
327 (tilegx_elf_check_relocs): Ditto.
328 (tilegx_elf_gc_sweep_hook): Ditto.
329 (tilegx_elf_relocate_section): Ditto.
330 * libbfd.h: Regenerate.
331 * bfd-in2.h: Regenerate.
332
333 2012-08-24 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
334
335 * elf32-arm.c (v8): New array.
336 (tag_cpu_arch_combine): Add support for ARMv8 attributes.
337 (elf32_arm_merge_eabi_attributes): Likewise.
338 (VFP_VERSION_COUNT): New define.
339
340 2012-08-20 Tom Tromey <tromey@redhat.com>
341
342 * vms-lib.c (_bfd_vms_lib_get_module): Use bfd_zmalloc for
343 areltdata.
344 * opncls.c (_bfd_delete_bfd): Free arelt_data.
345 * mach-o.c (bfd_mach_o_fat_member_init): Use bfd_zmalloc for
346 areltdata.
347 * ecoff.c (_bfd_ecoff_slurp_armap): Use free for mapdata.
348 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Use bfd_zmalloc for
349 areltdata.
350 (xcoff_write_archive_contents_old): Likewise.
351 (xcoff_write_archive_contents_big): Likewise.
352 * archive64.c (bfd_elf64_archive_slurp_armap): Use free for
353 areltdata.
354 * archive.c (_bfd_generic_read_ar_hdr_mag): Use bfd_zmalloc and
355 free for areltdata.
356 (_bfd_get_elt_at_filepos): Likewise. Clear n_nfd->arelt_data on
357 failure.
358 (do_slurp_bsd_armap): Use bfd_zmalloc and free for areltdata.
359 (do_slurp_coff_armap): Likewise.
360 (_bfd_slurp_extended_name_table): Likewise.
361 (bfd_slurp_bsd_armap_f2): Likewise. Don't leak 'mapdata'.
362
363 2012-08-17 Nick Clifton <nickc@redhat.com>
364
365 * po/vi.po: Updated Vietnamese translation.
366
367 2012-08-17 Yuri Chornoivan <yurchor@ukr.net>
368
369 * elf-bfd.h, * elf32-ppc.c, * elf64-ia64-vms.c, * elfnn-ia64.c,
370 * elfxx-mips.c, * vms-alpha.c: Typo fixes.
371
372 2012-08-17 Alan Modra <amodra@gmail.com>
373
374 PR binutils/14475:
375 * archive.c (bfd_ar_hdr_from_filesystem): Revert last change.
376 Instead malloc areltdata.
377
378 2012-08-16 Tom Tromey <tromey@redhat.com>
379
380 PR binutils/14475:
381 * archive.c (bfd_ar_hdr_from_filesystem): Allocate areltdata on
382 'member' BFD. Don't try to free 'ared'.
383
384 2012-08-14 Nick Clifton <nickc@redhat.com>
385
386 * po/uk.po: Updated Ukranian translation.
387
388 2012-08-13 Maciej W. Rozycki <macro@codesourcery.com>
389
390 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Look up
391 the options section in the output rather than input BFD to
392 decide if to add a DT_MIPS_OPTIONS tag.
393
394 2012-08-13 Maciej W. Rozycki <macro@codesourcery.com>
395
396 * config.bfd: Wrap mips*el-*-linux* and mips*-*-linux* into
397 #ifdef BFD64.
398
399 2012-08-13 Ian Bolton <ian.bolton@arm.com>
400 Laurent Desnogues <laurent.desnogues@arm.com>
401 Jim MacArthur <jim.macarthur@arm.com>
402 Marcus Shawcroft <marcus.shawcroft@arm.com>
403 Nigel Stephens <nigel.stephens@arm.com>
404 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
405 Richard Earnshaw <rearnsha@arm.com>
406 Sofiane Naci <sofiane.naci@arm.com>
407 Tejas Belagod <tejas.belagod@arm.com>
408 Yufeng Zhang <yufeng.zhang@arm.com>
409
410 * Makefile.am: Add AArch64 files.
411 * Makefile.in: Regenerate.
412 * archures.c (bfd_aarch64_arch): New declaration.
413 (bfd_archures_list): Use bfd_archures_list.
414 * bfd-in.h (bfd_elf64_aarch64_init_maps): New declaration.
415 (bfd_aarch64_process_before_allocation): New declaration.
416 (bfd_elf64_aarch64_process_before_allocation): New declaration.
417 (bfd_elf64_aarch64_set_options): New declaration.
418 (bfd_elf64_aarch64_add_glue_sections_to_bfd): New declaration.
419 (BFD_AARCH64_SPECIAL_SYM_TYPE_MAP): New definition.
420 (BFD_AARCH64_SPECIAL_SYM_TYPE_TAG): New definition.
421 (BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER): New definition.
422 (BFD_AARCH64_SPECIAL_SYM_TYPE_ANY): New definition.
423 (bfd_is_aarch64_special_symbol_name): New declaration.
424 (bfd_aarch64_merge_machines): New declaration.
425 (bfd_aarch64_update_notes): New declaration.
426 (int bfd_aarch64_get_mach_from_notes): New declaration.
427 (elf64_aarch64_setup_section_lists): New declaration.
428 (elf64_aarch64_next_input_section): New declaration.
429 (elf64_aarch64_size_stubs): New declaration.
430 (elf64_aarch64_build_stubs): New declaration.
431 * config.bfd: Add AArch64.
432 * configure.in: Add AArch64.
433 * configure: Regenerate.
434 * cpu-aarch64.c: New file.
435 * elf-bfd.h: Add AArch64.
436 * bfd-in2.h: Regenerate.
437 * libbfd.h: Regenerate.
438 * elf64-aarch64.c: New file.
439 * reloc.c: Add AArch64 relocations.
440 * targets.c: Add AArch64.
441 * po/SRC-POTFILES.in: Regenerate.
442
443 2012-08-13 Maciej W. Rozycki <macro@codesourcery.com>
444
445 * elfxx-mips.c (mips_elf_calculate_relocation): Fix the handling
446 of protected symbols.
447
448 2012-08-10 Alan Modra <amodra@gmail.com>
449
450 PR binutils/14444
451 * elf.c (IS_VALID_GROUP_SECTION_HEADER) Add minsize param.
452 (setup_group): Adjust uses.
453 (bfd_section_from_shdr): Allow SHT_GROUP sections with just a flag
454 word.
455
456 2012-08-09 Nick Clifton <nickc@redhat.com>
457
458 * po/vi.po: Updated Vietnamese translation.
459
460 2012-08-09 Maciej W. Rozycki <macro@codesourcery.com>
461
462 * elfxx-mips.c (LA25_LUI_MICROMIPS_1, LA25_LUI_MICROMIPS_2):
463 Remove macros, folding them into...
464 (LA25_LUI_MICROMIPS): ... this new macro.
465 (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise into...
466 (LA25_J_MICROMIPS): ... this new macro.
467 (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise
468 into...
469 (LA25_ADDIU_MICROMIPS): ... this new macro.
470 (bfd_put_micromips_32, bfd_get_micromips_32): New functions.
471 (mips_elf_create_la25_stub): Use them.
472 (check_br32_dslot, check_br32, check_relocated_bzc): Likewise.
473 (_bfd_mips_elf_relax_section): Likewise.
474
475 2012-08-09 Alan Modra <amodra@gmail.com>
476 Tom Tromey <tromey@redhat.com>
477
478 * archive.c (SECTION Archives): Update documentation.
479 (_bfd_delete_archive_data): Remove.
480 (_bfd_add_bfd_to_archive_cache): Set 'parent_cache' and 'key'.
481 (archive_close_worker, _bfd_archive_close_and_cleanup): New
482 functions.
483 * libbfd-in.h (struct areltdata <parent_cache, key>): New fields.
484 (_bfd_delete_archive_data): Don't declare.
485 (_bfd_archive_close_and_cleanup): Declare.
486 (_bfd_generic_close_and_cleanup): Redefine.
487 * libbfd.h: Rebuild.
488 * opncls.c (_bfd_delete_bfd): Don't call _bfd_delete_archive_data.
489 (bfd_close): Don't close nested thin archives here.
490
491 2012-08-07 Tom Tromey <tromey@redhat.com>
492
493 * archive.c (_bfd_delete_archive_data): New function.
494 * libbfd-in.h (_bfd_delete_archive_data): Declare.
495 * libbfd.h: Rebuild.
496 * opncls.c (_bfd_delete_bfd): Call _bfd_delete_archive_data.
497
498 2012-08-07 Nick Clifton <nickc@redhat.com>
499
500 * po/uk.po: Updated Ukranian translation.
501
502 2012-08-06 Maciej W. Rozycki <macro@codesourcery.com>
503
504 * elflink.c (bfd_elf_record_link_assignment): Remove --defsym
505 symbols special case.
506
507 2012-08-05 Maciej W. Rozycki <macro@linux-mips.org>
508
509 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Don't allocate
510 PLT slots for local symbols.
511
512 2012-08-03 Maciej W. Rozycki <macro@codesourcery.com>
513
514 * elf64-mips.c (mips16_elf64_howto_table_rela): Correct src_mask
515 field initializers throughout.
516 * elfn32-mips.c (elf_mips16_howto_table_rela): Likewise.
517
518 2012-08-03 Maciej W. Rozycki <macro@codesourcery.com>
519
520 * elfxx-mips.c (mips_elf_perform_relocation): Update the
521 cross-mode jump message.
522
523 2012-08-03 Maciej W. Rozycki <macro@codesourcery.com>
524
525 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Update the
526 comment on DT_MIPS_RLD_MAP.
527
528 2012-08-03 Tom Tromey <tromey@redhat.com>
529
530 * opncls.c (_bfd_delete_bfd): Now static.
531 * libbfd-in.h (_bfd_delete_bfd): Don't declare.
532 * libbfd.h: Rebuild.
533
534 2012-08-02 Sean Keys <skeys@ipdatasys.com>
535
536 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Modified
537 conditional statment to allow suppression of mismatched bank
538 warning.
539
540 2012-08-01 Alan Modra <amodra@gmail.com>
541
542 * dwarf2.c (struct dwarf2_debug): Add close_on_cleanup.
543 (_bfd_dwarf2_slurp_debug_info): Set close_on_cleanup if we open
544 gnu_debuglink bfd.
545 (_bfd_dwarf2_cleanup_debug_info): Act on close_on_cleanup.
546
547 2012-07-30 Nick Clifton <nickc@redhat.com>
548
549 * po/bfd.pot: Updated template.
550 * po/es.po: Updated Spanish translation.
551 * po/fi.po: Updated Finnish translation.
552 * po/fr.po: Updated French translation.
553 * po/ru.po: Updated Russian translation.
554 * po/uk.po: Updated Ukranian translation.
555
556 2012-07-27 Mike Frysinger <vapier@gentoo.org>
557
558 * configure.in (AC_INIT): Call with the args bfd and 2.22.52.
559 (AM_INIT_AUTOMAKE): Remove args.
560 * configure: Regenerate.
561
562 2012-07-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
563
564 * cpu-s390.c (bfd_s390_64_arch, bfd_s390_arch): Pick the default
565 arch depending on the target size.
566
567 2012-07-27 Tristan Gingold <gingold@adacore.com>
568
569 * configure.in: Bump version to 2.23.51
570 * configure: Regenerate.
571
572 2012-07-26 Teresa Johnson <tejohnson@google.com>
573
574 * bfd/dwarf2.c (find_line): Initialize discriminator_ptr
575 if it is non-NULL.
576
577 2012-07-26 Meador Inge <meadori@codesourcery.com>
578 Nick Clifton <nickc@redhat.com>
579
580 PR ld/14397
581 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Report an error
582 if a required section is missing from the linker script.
583
584 2012-07-24 Jan Waclawek <konfera@efton.sk>
585 PR 13899
586 * elf32-avr.c (elf32_avr_relax_delete_bytes): Call
587 _bfd_elf_link_read_relocs with keep_memory as TRUE.
588
589 2012-07-24 Teresa Johnson <tejohnson@google.com>
590
591 * bfd.c (bfd_find_nearest_line_discriminator): New macro.
592 * coff-rs6000.c: Init _bfd_find_nearest_line_discriminator.
593 * coff64-rs6000.c: Likewise.
594 * dwarf2.c (struct line_info): Add discriminator field.
595 (add_line_info): Fill in new discriminator field.
596 (decode_line_info): Record discriminator information instead
597 of ignoring it.
598 (lookup_address_in_line_info_table): Return discriminator field if
599 requested.
600 (comp_unit_find_nearest_line): Add discriminator argument.
601 (find_line): Likewise.
602 (_bfd_dwarf2_find_nearest_line): Likewise.
603 (_bfd_dwarf2_find_line): Likewise.
604 * elf-bfd.h (_bfd_elf_find_nearest_line_discriminator): New.
605 (_bfd_elf_find_line_discriminator): Likewise.
606 (_bfd_generic_find_nearest_line_discriminator): Likewise. Defined.
607 * elf.c (_bfd_elf_find_nearest_line): Change to a wrapper
608 that invokes _bfd_elf_find_nearest_line_discriminator with correct
609 arguments.
610 (_bfd_elf_find_nearest_line_discriminator): New.
611 (_bfd_elf_find_line): Change to a wrapper
612 that invokes _bfd_elf_find_line_discriminator with correct
613 arguments.
614 (_bfd_elf_find_line_discriminator): New.
615 * coffgen.c (coff_find_nearest_line_with_names): Handle
616 new discriminator argument.
617 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
618 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
619 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
620 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
621 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Add discriminator
622 argument.
623 (_bfd_dwarf2_find_line): Likewise.
624 (_bfd_generic_find_nearest_line_discriminator): New.
625 * libbfd.c (_bfd_generic_find_nearest_line_discriminator): New.
626 * bfd-in2.h: Regenerated.
627 * libbfd.h: Likewise.
628 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize
629 _bfd_find_nearest_line_discriminator with
630 _bfd_generic_find_nearest_line_discriminator.
631 (bfd_target): Add _bfd_find_nearest_line_discriminator.
632
633 2012-07-24 Sean Keys <skeys@ipdatasys.com>
634
635 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Added code
636 that enables the linker to offset addresses, when linking against
637 symbols from the XGATE processor and vice versa.
638
639 2012-07-23 Nick Clifton <nickc@redhat.com>
640
641 * cisco-core.c (cisco_core_file_failing_command): Make static.
642 (cisco_core_file_failing_signal): Make static.
643
644 2012-07-18 H.J. Lu <hongjiu.lu@intel.com>
645
646 * bfd-in2.h: Regenerated.
647
648 2012-07-18 Nicolàs Alejandro Di Risio <sheeva@tiscali.it>
649
650 PR binutils/14335
651 * section.c: Fix a typo in comments.
652
653 2012-07-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
654
655 * elf64-s390.c: Include elf-s390-common.c.
656 (R_390_IRELATIVE): New reloc.
657 (elf_s390_reloc_type_lookup): Support R_390_IRELATIVE.
658 (RELA_ENTRY_SIZE): New macro.
659 (elf_s390_link_hash_entry): New fields ifunc_resolver_address and
660 *ifunc_resolver_section.
661 (struct plt_entry): New struct.
662 (struct elf_s390_obj_tdata): New field local_plt.
663 (elf_s390_local_plt): New macro.
664 (struct elf_s390_link_hash_table): New field irelifunc.
665 (ELF64): New macro.
666 (link_hash_newfunc): Initialize new fields.
667 (elf_s390_check_relocs): Handle IFUNC symbols.
668 (elf_s390_adjust_dynamic_symbol): Don't do anything for IFUNC
669 symbols.
670 (allocate_dynrelocs): Call s390_elf_allocate_ifunc_dyn_relocs for
671 IFUNC symbols.
672 (elf_s390_size_dynamic_sections): Handle IFUNC symbols.
673 (elf_s390_relocate_section): Likewise.
674 (elf_s390_finish_dynamic_symbol): Likewise.
675 (elf_s390_finish_dynamic_sections): Handle local IFUNC symbols.
676 (elf_s390_finish_ifunc_symbol): New function.
677 (elf_s390_gc_sweep_hook): Handle local plt entries.
678 (elf_backend_add_symbol_hook): Define.
679 * elf32-s390.c: See elf64-s390.c changes.
680 * elf-s390-common.c: New file.
681 * bfd-in2.h (BFD_RELOC_390_IRELATIVE): New enum field.
682 * libbfd.h (BFD_RELOC_390_IRELATIVE): New entry for
683 BFD_RELOC_390_IRELATIVE.
684 * reloc.c (BFD_RELOC_390_IRELATIVE): Document new relocation.
685
686 2012-07-13 Nick Clifton <nickc@redhat.com>
687
688 * aix386-core.c: Remove use of PTR and PARAMS macros.
689 * archive.c: Likewise.
690 * cache.c: Likewise.
691 * cisco-core.c: Likewise.
692 * coff-alpha.c: Likewise.
693 * coff-apollo.c: Likewise.
694 * coff-aux.c: Likewise.
695 * coff-h8300.c: Likewise.
696 * coff-h8500.c: Likewise.
697 * coff-i386.c: Likewise.
698 * coff-i960.c: Likewise.
699 * coff-ia64.c: Likewise.
700 * coff-m68k.c: Likewise.
701 * coff-m88k.c: Likewise.
702 * coff-mcore.c: Likewise.
703 * coff-mips.c: Likewise.
704 * coff-or32.c: Likewise.
705 * coff-ppc.c: Likewise.
706 * coff-rs6000.c: Likewise.
707 * coff-sh.c: Likewise.
708 * coff-sparc.c: Likewise.
709 * coff-stgo32.c: Likewise.
710 * coff-tic30.c: Likewise.
711 * coff-tic4x.c: Likewise.
712 * coff-tic54x.c: Likewise.
713 * coff-tic80.c: Likewise.
714 * coff-w65.c: Likewise.
715 * cofflink.c: Likewise.
716 * cpu-arc.c: Likewise.
717 * cpu-cris.c: Likewise.
718 * cpu-h8500.c: Likewise.
719 * cpu-i960.c: Likewise.
720 * cpu-msp430.c: Likewise.
721 * cpu-ns32k.c: Likewise.
722 * cpu-powerpc.c: Likewise.
723 * cpu-rs6000.c: Likewise.
724 * cpu-tic4x.c: Likewise.
725 * cpu-w65.c: Likewise.
726 * ecoff.c: Likewise.
727 * ecofflink.c: Likewise.
728 * elf-m10200.c: Likewise.
729 * elf32-bfin.c: Likewise.
730 * elf32-cris.c: Likewise.
731 * elf32-crx.c: Likewise.
732 * elf32-fr30.c: Likewise.
733 * elf32-frv.c: Likewise.
734 * elf32-h8300.c: Likewise.
735 * elf32-i960.c: Likewise.
736 * elf32-m32c.c: Likewise.
737 * elf32-m68hc11.c: Likewise.
738 * elf32-m68hc12.c: Likewise.
739 * elf32-m68hc1x.c: Likewise.
740 * elf32-m68k.c: Likewise.
741 * elf32-mcore.c: Likewise.
742 * elf32-rl78.c: Likewise.
743 * elf32-rx.c: Likewise.
744 * elf32-s390.c: Likewise.
745 * elf32-vax.c: Likewise.
746 * elf64-alpha.c: Likewise.
747 * elf64-mmix.c: Likewise.
748 * elf64-s390.c: Likewise.
749 * elf64-sparc.c: Likewise.
750 * elfnn-ia64.c: Likewise.
751 * elfxx-mips.c: Likewise.
752 * elfxx-sparc.c: Likewise.
753 * hash.c: Likewise.
754 * hp300hpux.c: Likewise.
755 * hppabsd-core.c: Likewise.
756 * hpux-core.c: Likewise.
757 * i386dynix.c: Likewise.
758 * i386linux.c: Likewise.
759 * i386lynx.c: Likewise.
760 * i386mach3.c: Likewise.
761 * i386msdos.c: Likewise.
762 * i386os9k.c: Likewise.
763 * irix-core.c: Likewise.
764 * lynx-core.c: Likewise.
765 * m68klinux.c: Likewise.
766 * mach-o.h: Likewise.
767 * mipsbsd.c: Likewise.
768 * netbsd-core.c: Likewise.
769 * nlm32-i386.c: Likewise.
770 * osf-core.c: Likewise.
771 * pc532-mach.c: Likewise.
772 * pef.c: Likewise.
773 * ppcboot.c: Likewise.
774 * ptrace-core.c: Likewise.
775 * reloc16.c: Likewise.
776 * sco5-core.c: Likewise.
777 * som.h: Likewise.
778 * sparclinux.c: Likewise.
779 * sparclynx.c: Likewise.
780 * ticoff.h: Likewise.
781 * trad-core.c: Likewise.
782 * vms-lib.c: Likewise.
783 * xsym.h: Likewise.
784
785 2012-07-09 Alan Modra <amodra@gmail.com>
786
787 PR ld/14323
788 * elflink.c (elf_sort_symbol): Sort by size too.
789 (elf_link_add_object_symbols <weakdefs>): Simplify binary search.
790 Do not depend on ordering of symbol aliases. Match largest size.
791
792 2012-07-03 H.J. Lu <hongjiu.lu@intel.com>
793
794 * elf.c (assign_section_numbers): Check if number of sections
795 >= SHN_LORESERVE.
796 * elfcode.h (elf_object_p): Likewise.
797
798 2012-07-03 Nick Clifton <nickc@redhat.com>
799
800 * archive.c (bsd_write_armap): Catch attempts to create an archive
801 with indicies bigger than 4Gb.
802 (coff_write_armap): Likewise.
803
804 2012-07-03 H.J. Lu <hongjiu.lu@intel.com>
805
806 PR binutils/14319
807 * elf.c (_bfd_elf_make_section_from_shdr): Don't compress empty
808 debug section.
809
810 2012-07-03 H.J. Lu <hongjiu.lu@intel.com>
811
812 PR ld/3351
813 * elflink.c (_bfd_elf_update_dynamic_flags): New.
814 (_bfd_elf_merge_symbol): Update both real and indirect symbol
815 dynamic flags.
816 (_bfd_elf_add_default_symbol): Make the real symbol dynamic if
817 the indirect symbol is defined in a shared library.
818 (elf_link_add_object_symbols): Likewise. If the indirect
819 symbol has been forced local, don't make the real symbol
820 dynamic.
821 (elf_link_check_versioned_symbol): Check indirect symbol.
822 (elf_link_output_extsym): Use real symbol definition when
823 reporting indirect symbol error. Check version info for
824 dynamic versioned symbol.
825
826 2012-07-03 Alan Modra <amodra@gmail.com>
827
828 PR ld/14207
829 * elf.c (assign_file_positions_for_load_sections): Remove assertions
830 that only PT_LOAD headers include file header and section headers.
831 (assign_file_positions_for_non_load_sections): Similarly don't
832 assert PT_GNU_RELRO header does not include file and section headers.
833 Compare first section vma rather than PT_LOAD p_vaddr against
834 relro_start when looking for PT_LOAD covering PT_GNU_RELRO. Replace
835 abort with assertion.
836
837 2012-07-02 Alan Modra <amodra@gmail.com>
838
839 * elf32-m32c.c (m32c_elf_check_relocs): Use bfd_make_section
840 "anyway" variant when creating .plt.
841 (m32c_elf_relax_plt_section): Remove redundant test and unused param.
842 (m32c_elf_relax_section): Test SEC_LINKER_CREATED before calling
843 m32c_elf_relax_plt_section.
844 * elfxx-mips.c (mips_elf_create_got_section): Use make anyway variant
845 when creating .got and .got.plt.
846 (_bfd_mips_elf_final_link): Likewise for .rtproc, and use
847 bfd_get_linker_section.
848 * sunos.c: Similarly throughout.
849
850 2012-07-01 Andreas Schwab <schwab@linux-m68k.org>
851
852 * elf.c (_bfd_elf_make_section_from_shdr): Fix typo in error
853 message.
854
855 2012-06-29 H.J. Lu <hongjiu.lu@intel.com>
856
857 * elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE
858 on unresolvable relocation.
859
860 2012-06-29 H.J. Lu <hongjiu.lu@intel.com>
861
862 * archive.c (_bfd_compute_and_write_armap): Simplify global
863 symbol handling.
864
865 2012-06-29 Nick Clifton <nickc@redhat.com>
866
867 PR ld/14189
868 * elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount
869 for locally bound symbols.
870
871 2012-06-29 Alan Modra <amodra@gmail.com>
872
873 * section.c (bfd_get_linker_section): New function.
874 * elf32-arm.c: When retrieving SEC_LINKER_CREATED sections, use
875 the above throughout rather than bfd_get_section_by_name. Use
876 bfd_make_section_anyway rather than bfd_make_section when creating
877 them.
878 * elf32-bfin.c: Likewise.
879 * elf32-cr16.c: Likewise.
880 * elf32-cris.c: Likewise.
881 * elf32-frv.c: Likewise.
882 * elf32-hppa.c: Likewise.
883 * elf32-i370.c: Likewise.
884 * elf32-i386.c: Likewise.
885 * elf32-lm32.c: Likewise.
886 * elf32-m32c.c: Likewise.
887 * elf32-m32r.c: Likewise.
888 * elf32-m68k.c: Likewise.
889 * elf32-microblaze.c: Likewise.
890 * elf32-ppc.c: Likewise.
891 * elf32-rl78.c: Likewise.
892 * elf32-s390.c: Likewise.
893 * elf32-score.c: Likewise.
894 * elf32-score7.c: Likewise.
895 * elf32-sh.c: Likewise.
896 * elf32-tic6x.c: Likewise.
897 * elf32-tilepro.c: Likewise.
898 * elf32-vax.c: Likewise.
899 * elf32-xstormy16.c: Likewise.
900 * elf32-xtensa.c: Likewise.
901 * elf64-alpha.c: Likewise.
902 * elf64-hppa.c: Likewise.
903 * elf64-ia64-vms.c: Likewise.
904 * elf64-ppc.c: Likewise.
905 * elf64-s390.c: Likewise.
906 * elf64-sh64.c: Likewise.
907 * elf64-sparc.c: Likewise.
908 * elf64-x86-64.c: Likewise.
909 * elfnn-ia64.c: Likewise.
910 * elfxx-mips.c: Likewise.
911 * elfxx-sparc.c: Likewise.
912 * elfxx-tilegx.c: Likewise.
913 * elflink.c: Likewise.
914 * elf-vxworks.c: Likewise.
915 * elf-m10300.c: Likewise. Also make use of htab plt, got and
916 gotplt shortcuts.
917 * bfd-in2.h: Regenerate.
918 * elf32-lm32.c (lm32_elf_check_relocs): Use the correct bfd when
919 calling create_rofixup_section.
920 * elflink.c (bfd_elf_final_link): Simplify test for .dynstr.
921
922 2012-06-29 Alan Modra <amodra@gmail.com>
923
924 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't create .rela
925 section for bss type sections, except for .rela.bss.
926 * elf-m10300.c (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
927 * elf32-cr16.c (_bfd_cr16_elf_create_dynamic_sections): Likewise.
928 * elf32-lm32.c (lm32_elf_create_dynamic_sections): Likewise.
929 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
930 * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
931
932 2012-06-28 Roland McGrath <mcgrathr@google.com>
933
934 * elf32-arm.c (elf32_arm_populate_plt_entry): Use int32_t for
935 displacement calculation in nacl_p case.
936
937 2012-06-28 Nick Clifton <nickc@redhat.com>
938
939 * po/uk.po: New Ukranian translation.
940 * configure.in (ALL_LINGUAS): Add uk.
941 * configure: Regenerate.
942
943 2012-06-26 Alan Modra <amodra@gmail.com>
944
945 * elf64-ppc.c (ppc64_elf_next_toc_section): Don't error if input
946 file has multiple .got/.toc sections and all don't fit in
947 current toc group.
948
949 2012-06-22 Roland McGrath <mcgrathr@google.com>
950
951 * elf.c (assign_file_positions_for_non_load_sections): Define
952 __ehdr_start symbol if it's referenced and there's a PT_LOAD
953 segment that covers both the file and program headers.
954
955 2012-06-22 Andreas Schwab <schwab@linux-m68k.org>
956
957 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Don't make
958 _GLOBAL_OFFSET_TABLE_ and _DYNAMIC absolute.
959
960 2012-06-22 Alan Modra <amodra@gmail.com>
961
962 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't emit out-of-line
963 save/restore functions when relocatable. Make "funcs" static.
964
965 2012-06-18 Hans-Peter Nilsson <hp@axis.com>
966
967 * elf32-cris.c (cris_elf_plt_sym_val): Rewrite to work in presence
968 of merged .got and .got.plt entries.
969
970 2012-06-18 John Szakmeister <john@szakmeister.net>
971
972 * elf32-arm.c (elf32_arm_final_link_relocate): Correct return value.
973
974 2012-06-17 Hans-Peter Nilsson <hp@axis.com>
975
976 * elf32-cris.c (cris_elf_relocate_section): <R_CRIS_32_IE>
977 <R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>: Handle references to
978 thread common symbols.
979
980 2012-06-13 Nick Clifton <nickc@redhat.com>
981
982 * elf32-arm.c (bfd_arm_get_mach_from_attributes): New function.
983 (elf32_arm_object_p): If the machine number could not be deduced
984 from the notes, call bfd_arm_get_mach_from_attributes to get the
985 number from the attributes.
986
987 2012-06-12 H.J. Lu <hongjiu.lu@intel.com>
988
989 PR bfd/14207
990 * elf.c (assign_file_positions_for_non_load_sections): Abort if
991 PT_GNU_RELRO segment doesn't fit in PT_LOAD segment.
992
993 2012-06-12 Alan Modra <amodra@gmail.com>
994
995 PR ld/14207
996 * elf.c (_bfd_elf_map_sections_to_segments): Disregard bss type
997 sections at end of PT_LOAD segment when searching for segment
998 that contains end of relro extent.
999
1000 2012-06-11 H.J. Lu <hongjiu.lu@intel.com>
1001
1002 * elf.c (assign_file_positions_for_non_load_sections): Reindent.
1003
1004 2012-06-11 H.J. Lu <hongjiu.lu@intel.com>
1005
1006 * elf.c (_bfd_elf_map_sections_to_segments): Reindent.
1007
1008 2012-06-06 Alan Modra <amodra@gmail.com>
1009
1010 * elflink.c (elf_link_input_bfd): Provide a file symbol for
1011 each input file with local syms, if the input lacks such.
1012 (bfd_elf_final_link): Add a file symbol to mark end of locals
1013 for which we can associate with input files.
1014 (struct elf_final_link_info): Add filesym_count field.
1015 (struct elf_outext_info): Add need_second_pass and second_pass.
1016 (elf_link_output_extsym): Detect symbols defined in the output
1017 file, emit them on second pass over locals.
1018
1019 2012-06-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1020
1021 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
1022 of target_read_memory as bfd_size_type.
1023 * bfd-in2.h: Regenerate.
1024 * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
1025 argument of target_read_memory as bfd_size_type.
1026 (_bfd_elf32_bfd_from_remote_memory): Likewise.
1027 (_bfd_elf64_bfd_from_remote_memory): Likewise.
1028 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
1029 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
1030
1031 2012-06-03 Alan Modra <amodra@gmail.com>
1032
1033 PR binutils/13897
1034 * elf.c (elf_find_function): Cache last function sym info.
1035 (_bfd_elf_maybe_function_sym): Return function size, pass in
1036 section of interest.
1037 * elf-bfd.h (struct elf_backend_data <maybe_function_sym>): Likewise.
1038 (_bfd_elf_maybe_function_sym): Likewise.
1039 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
1040 (opd_entry_value): Add in_code_sec param. Revert caching code.
1041 Return -1 if in_code_sec and function found in wrong section.
1042 Update all calls.
1043
1044 2012-06-01 Siddhesh Poyarekar <siddhesh@redhat.com>
1045
1046 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
1047 of target_read_memory as size_t.
1048 * bfd-in2.h: Regenerate.
1049 * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
1050 argument of target_read_memory as size_t.
1051 (_bfd_elf32_bfd_from_remote_memory): Likewise.
1052 (_bfd_elf64_bfd_from_remote_memory): Likewise.
1053 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
1054 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
1055
1056 2012-06-01 Alan Modra <amodra@gmail.com>
1057
1058 PR binutils/13897
1059 * elf64-ppc.c (opd_entry_value): Rewrite cache code.
1060
1061 2012-05-29 Tom Tromey <tromey@redhat.com>
1062
1063 * opncls.c (bfd_fopen): Always close fd on failure.
1064 (bfd_fdopenr): Likewise.
1065
1066 2012-05-27 Alan Modra <amodra@gmail.com>
1067
1068 PR ld/14170
1069 * elflink.c (_bfd_elf_merge_symbol): When a symbol defined in
1070 a dynamic library finds a new instance with non-default
1071 visibility in a regular object, correctly handle symbols
1072 already on the undefs list and undo dynamic symbol state when
1073 the new symbol is hidden or internal.
1074
1075 2012-05-25 H.J. Lu <hongjiu.lu@intel.com>
1076
1077 * elf32-i386.c (elf_i386_create_dynamic_sections): Don't use
1078 dynamic_sec_flags to create PLT .eh_frame section.
1079 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1080
1081 2012-05-25 Alan Modra <amodra@gmail.com>
1082
1083 PR ld/13909
1084 * elf-eh-frame.c (_bfd_elf_eh_frame_present): New function.
1085 (_bfd_elf_maybe_strip_eh_frame_hdr): Use it here.
1086 * elf-bfd.h (_bfd_elf_eh_frame_present): Declare.
1087 * elflink.c (bfd_elf_size_dynamic_sections): Let the backend
1088 size dynamic sections before stripping eh_frame_hdr.
1089 (bfd_elf_gc_sections): Handle multiple .eh_frame sections.
1090 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Drop glink_eh_frame
1091 if no other .eh_frame sections exist.
1092 * elf64-ppc.c (ppc64_elf_size_stubs): Likewise.
1093 * elf32-i386.c (elf_i386_create_dynamic_sections): Don't size
1094 or alloc plt_eh_frame here..
1095 (elf_i386_size_dynamic_sections): ..do it here instead. Don't
1096 specially keep sgotplt, iplt, tgotplt, sdynbss for symbols.
1097 (elf_i386_finish_dynamic_sections): Check plt_eh_frame->contents
1098 before writing plt offset.
1099 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Don't size
1100 or alloc plt_eh_frame here..
1101 (elf_x86_64_size_dynamic_sections): ..do it here instead.
1102 (elf_x86_64_finish_dynamic_sections): Check plt_eh_frame->contents
1103 before writing plt offset.
1104
1105 2012-05-24 Alan Modra <amodra@gmail.com>
1106
1107 PR ld/14158
1108 * elf64-ppc.c (ppc64_elf_size_stubs): Round up glink_eh_frame
1109 size to output section alignment.
1110 (ppc64_elf_build_stubs): Likewise, and extend last FDE to cover.
1111
1112 2012-05-23 Alan Modra <amodra@gmail.com>
1113
1114 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle
1115 BFDs with multiple .eh_frame sections.
1116
1117 2012-05-23 Alan Modra <amodra@gmail.com>
1118
1119 PR ld/13909
1120 * elflink.c (bfd_elf_discard_info): Don't ignore dynamic BFDs.
1121
1122 2012-05-22 H.J. Lu <hongjiu.lu@intel.com>
1123
1124 PR ld/13909
1125 * elf32-i386.c (elf_i386_create_dynamic_sections): Revert the
1126 last change.
1127 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1128
1129 2012-05-22 Alan Modra <amodra@gmail.com>
1130
1131 * elflink.c (bfd_elf_discard_info): Look for next .eh_frame if
1132 first one is zero size or discarded.
1133 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set most of
1134 glink_eh_frame contents here..
1135 (ppc_elf_finish_dynamic_sections): ..rather than here. Just set
1136 offset to .glink.
1137
1138 2012-05-22 H.J. Lu <hongjiu.lu@intel.com>
1139
1140 PR ld/13909
1141 * elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT
1142 eh_frame section if there is an input .eh_frame section.
1143 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1144
1145 2012-05-22 H.J. Lu <hongjiu.lu@intel.com>
1146
1147 PR ld/14105
1148 * elf32-i386.c (elf_i386_create_dynamic_sections): Always
1149 create PLT eh_frame section with SEC_LINKER_CREATED.
1150 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1151
1152 2012-05-22 Alan Modra <amodra@gmail.com>
1153
1154 * elflink.c (bfd_elf_discard_info): Handle multiple .eh_frame
1155 sections attached to a BFD.
1156 * section.c (bfd_get_section_by_name): Rewrite description.
1157 (bfd_get_next_section_by_name): New function.
1158 * bfd-in2.h: Regenerate.
1159
1160 2012-05-21 Andreas Schwab <schwab@linux-m68k.org>
1161
1162 * elf32-m68k.c (elf_m68k_grok_prstatus): New function.
1163 (elf_m68k_grok_psinfo): New function.
1164 (elf_backend_grok_prstatus): Define.
1165 (elf_backend_grok_psinfo): Define.
1166
1167 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
1168
1169 * elf64-mips.c (elf_backend_got_header_size): Correct definition.
1170 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF
1171 backend's GOT header size instead of hardcoding it.
1172
1173 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
1174
1175 * elf32-vax.c (elf_vax_relocate_section)
1176 <R_VAX_8, R_VAX_16, R_VAX_32>: Don't check if info->shared again.
1177
1178 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
1179
1180 * elf32-vax.c (elf_vax_relocate_section)
1181 <R_VAX_8, R_VAX_16, R_VAX_32>: Use section flags rather than
1182 its name as the check for text sections.
1183
1184 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
1185
1186 * elf64-mips.c (mips_elf64_be_swap_reloc_out): Also make sure
1187 the third reloc offset is the same as the first.
1188
1189 2012-05-19 Alan Modra <amodra@gmail.com>
1190
1191 * elf32-ppc.h (has_vle_insns, is_ppc_vle): Delete.
1192 (has_tls_reloc, has_tls_get_addr_call): Move back to..
1193 * elf32-ppc.c: ..here.
1194 (ppc_elf_section_flags, elf_backend_section_flags): Delete.
1195 (ppc_elf_modify_segment_map): Use ELF sh_flags to detect VLE sections.
1196
1197 2012-05-18 H.J. Lu <hongjiu.lu@intel.com>
1198
1199 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make
1200 _DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute.
1201 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1202
1203 2012-05-18 Roland McGrath <mcgrathr@google.com>
1204
1205 * archive.c (_bfd_generic_read_ar_hdr_mag): Fix last change so as
1206 not to clobber the ar_fmag field stored in ARED->arch_header.
1207
1208 2012-05-18 Pedro Alves <palves@redhat.com>
1209
1210 * mach-o.h: Don't include sysdep.h.
1211
1212 2012-05-18 Nick Clifton <nickc@redhat.com>
1213
1214 PR 14072
1215 * bfd-in.h: Check for PACKAGE or PACKAGE_VERSION before
1216 complaining about config.h not having been included.
1217 * bfd-in2.h: Regenerate.
1218
1219 2012-05-18 Andreas Schwab <schwab@linux-m68k.org>
1220
1221 * aclocal.m4: Regenerate.
1222 * Makefile.in: Regenerate.
1223
1224 2012-05-17 Daniel Richard G. <skunk@iskunk.org>
1225 Nick Clifton <nickc@redhat.com>
1226
1227 PR 14072
1228 * configure.in: Add check that sysdep.h has been included before
1229 any system header files.
1230 * configure: Regenerate.
1231 * config.in: Regenerate.
1232 * aclocal.m4: Regenerate.
1233 * bfd-in.h: Generate an error if included before config.h.
1234 * sysdep.h: Likewise.
1235 * bfd-in2.h: Regenerate.
1236 * compress.c: Remove #include "config.h".
1237 * plugin.c: Likewise.
1238 * elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h.
1239 * elf64-hppa.c: Likewise.
1240 * som.c: Likewise.
1241 * xsymc.c: Likewise.
1242
1243 2012-05-17 Maciej W. Rozycki <macro@linux-mips.org>
1244 Alan Modra <amodra@gmail.com>
1245
1246 * elf.c (ignore_section_sym): Correct comment. Don't return
1247 true for absolute section.
1248 (elf_map_symbols): Move stray comment. Adjust for above change.
1249 Don't discard global section symbols.
1250
1251 2012-05-17 Alan Modra <amodra@gmail.com>
1252
1253 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make _DYNAMIC,
1254 _GLOBAL_OFFSET_TABLE_ or _PROCEDURE_LINKAGE_TABLE_ absolute.
1255 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Don't make _DYNAMIC
1256 absolute.
1257
1258 2012-05-17 Alan Modra <amodra@gmail.com>
1259
1260 * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call, has_vle_insns,
1261 is_ppc_vle): Move to..
1262 * elf32-ppc.h: ..here, making is_ppc_vle a macro.
1263
1264 2012-05-16 Sergio Durigan Junior <sergiodj@redhat.com>
1265
1266 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma,
1267 bfd_get_section_lma, bfd_get_section_alignment,
1268 bfd_get_section_flags, bfd_get_section_userdata): Rewrite macros
1269 in order to use the `bfd' argument.
1270 * bfd-in2.h: Regenerate.
1271 * elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd'
1272 as the first argument for `bfd_get_section_alignment'.
1273 * elf32-arm.c (create_ifunc_sections): Likewise, for
1274 `bfd_set_section_alignment'.
1275 * elf32-m32r.c (m32r_elf_relocate_section): Likewise, for
1276 `bfd_get_section_name'.
1277 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
1278 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1279 (ppc_elf_relocate_section): Likewise.
1280 * elf64-mmix.c (mmix_final_link_relocate): Likewise, for
1281 `bfd_get_section_vma'.
1282 * elf64-ppc.c (create_linkage_sections): Likewise, for
1283 `bfd_set_section_alignment'.
1284
1285 2012-05-16 Georg-Johann Lay <avr@gjlay.de>
1286
1287 PR target/13503
1288 * reloc.c: Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO.
1289 * bfd-in2.h: Regenerate.
1290 * libbfd.h: Regenrate.
1291 * elf32-avr.c (elf_avr_howto_table): Rename R_AVR_8_HHI8 to
1292 R_AVR_8_HLO8.
1293 (avr_reloc_map): Likewise.
1294
1295 2012-05-16 Daniel Richard G. <skunk@iskunk.org>
1296
1297 PR binutils/13558
1298 * bfd/aout-cris.c: Include sysdep.h before bfd.h.
1299 * bfd/aout-ns32k.c: Likewise.
1300 * bfd/aout-sparcle.c: Likewise.
1301 * bfd/aout0.c: Likewise.
1302 * bfd/bfd-in2.h: Likewise.
1303 * bfd/coff-stgo32.c: Likewise.
1304 * bfd/cpu-lm32.c: Likewise.
1305 * bfd/cpu-microblaze.c: Likewise.
1306 * bfd/cpu-score.c: Likewise.
1307 * bfd/cpu-tilegx.c: Likewise.
1308 * bfd/cpu-tilepro.c: Likewise.
1309 * bfd/elf32-lm32.c: Likewise.
1310 * bfd/elf32-microblaze.c: Likewise.
1311 * bfd/elf32-score7.c: Likewise.
1312 * bfd/elf32-tilepro.c: Likewise.
1313 * bfd/elfxx-tilegx.c: Likewise.
1314 * bfd/mach-o.h: Likewise.
1315 * bfd/nlm32-ppc.c: Likewise.
1316 * bfd/ns32knetbsd.c: Likewise.
1317 * bfd/pef.h: Likewise.
1318 * bfd/plugin.c: Likewise.
1319 * bfd/stab-syms.c: Likewise.
1320 * bfd/sunos.c: Likewise.
1321 * bfd/syms.c: Likewise.
1322 * bfd/xsym.h: Likewise.
1323
1324 2012-05-16 Alan Modra <amodra@gmail.com>
1325
1326 * elflink.c: Rename flaginfo to flinfo throughout, except..
1327 (bfd_elf_lookup_section_flags): ..here, rename finfo to flaginfo.
1328 Formatting, style. Simplify flag match.
1329
1330 2012-05-16 Alan Modra <amodra@gmail.com>
1331
1332 * dwarf2.c: Formatting.
1333 (arange_add): Pass in unit rather than bfd. Update callers.
1334 Ignore empty ranges. Don't ask for cleared memory.
1335 (parse_comp_unit): Only set unit->base_address if processing
1336 DW_TAG_compile_unit.
1337 (find_debug_info): Optimise section lookup.
1338 (place_sections): Use bfd_alloc for stash->adjusted_sections.
1339 (find_line): Match previously parsed comp unit addresses as we
1340 do for newly parsed comp units.
1341
1342 2012-05-16 Alan Modra <amodra@gmail.com>
1343
1344 * archive.c (_bfd_generic_read_ar_hdr_mag): Ensure sscanf
1345 stops at end of ar_size field.
1346
1347 2012-05-16 Alan Modra <amodra@gmail.com>
1348
1349 PR ld/13962
1350 PR ld/7023
1351 * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is
1352 out of range. As a special case, fix sh_info for zero sh_size.
1353 Do the same for .symtab.
1354
1355 2012-05-15 James Murray <jsm@jsm-net.demon.co.uk>
1356 Stephane Carrez <stcarrez@nerim.fr>
1357
1358 * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg.
1359 * config.bfd: Likewise.
1360 * cpu-m9s12x.c: New.
1361 * cpu-m9s12xg.c: New.
1362 * elf32-m68hc12.c: Add S12X and XGATE co-processor support.
1363 Add option to offset S12 addresses into XGATE memory space.
1364 Fix carry bug in IMM16 (IMM8 low/high) relocate.
1365 * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg.
1366 (ALL_MACHINES_CFILES): Likewise.
1367 * reloc.c: Add S12X relocs.
1368 * Makefile.in: Regenerate.
1369 * bfd-in2.h: Regenerate.
1370 * libbfd.h: Regenerate.
1371
1372 2012-05-14 James Lemke <jwlemke@codesourcery.com>
1373 Catherine Moore <clm@codesourcery.com>
1374
1375 * bfd.c (bfd_lookup_section_flags): Add section parm.
1376 * ecoff.c (bfd_debug_section): Remove flag_info initializer.
1377 * elf-bfd.h (bfd_elf_section_data): Move in section_flag_info.
1378 (bfd_elf_lookup_section_flags): Add section parm.
1379 * elf32-ppc.c (is_ppc_vle): New function.
1380 (ppc_elf_modify_segment_map): New function.
1381 (elf_backend_modify_segment_map): Define.
1382 (has_vle_insns): New define.
1383 * elf32-ppc.h (ppc_elf_modify_segment_map): Declare.
1384 * elflink.c (bfd_elf_lookup_section_flags): Add return value & parm.
1385 Move in logic to omit / include a section.
1386 * libbfd-in.h (bfd_link_info): Add section parm.
1387 (bfd_generic_lookup_section_flags): Likewise.
1388 * reloc.c (bfd_generic_lookup_section_flags): Likewise.
1389 * section.c (bfd_section): Move out section_flag_info.
1390 (BFD_FAKE_SECTION): Remove flag_info initializer.
1391 * targets.c (_bfd_lookup_section_flags): Add section parm.
1392
1393 2012-05-14 Catherine Moore <clm@codesourcery.com>
1394
1395 * archures.c (bfd_mach_ppc_vle): New.
1396 * bfd-in2.h: Regenerated.
1397 * cpu-powerpc.c (bfd_powerpc_archs): New entry for vle.
1398 * elf32-ppc.c (split16_format_type): New enumeration.
1399 (ppc_elf_vle_split16): New function.
1400 (HOWTO): Add entries for R_PPC_VLE relocations.
1401 (ppc_elf_reloc_type_lookup): Handle PPC_VLE relocations.
1402 (ppc_elf_section_flags): New function.
1403 (ppc_elf_lookup_section_flags): New function.
1404 (ppc_elf_section_processing): New function.
1405 (ppc_elf_check_relocs): Handle PPC_VLE relocations.
1406 (ppc_elf_relocation_section): Likewise.
1407 (elf_backend_lookup_section_flags_hook): Define.
1408 (elf_backend_section_flags): Define.
1409 (elf_backend_section_processing): Define.
1410 * elf32-ppc.h (ppc_elf_section_processing): Declare.
1411 * libbfd.h: Regenerated.
1412 * reloc.c (BFD_RELOC_PPC_VLE_REL8, BFD_RELOC_PPC_VLE_REL15,
1413 BFD_RELOC_PPC_VLE_REL24, BFD_RELOC_PPC_VLE_LO16A,
1414 BFD_RELOC_PPC_VLE_LO16D, BFD_RELOC_PPC_VLE_HI16A,
1415 BFD_RELOC_PPC_VLE_HI16D, BFD_RELOC_PPC_VLE_HA16A,
1416 BFD_RELOC_PPC_VLE_HA16D, BFD_RELOC_PPC_VLE_SDA21,
1417 BFD_RELOC_PPC_VLE_SDA21_LO, BFD_RELOC_PPC_VLE_SDAREL_LO16A,
1418 BFD_RELOC_PPC_VLE_SDAREL_LO16D, BFD_RELOC_PPC_VLE_SDAREL_HI16A,
1419 BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A,
1420 BFD_RELOC_PPC_VLE_SDAREL_HA16D): New bfd relocations.
1421
1422 2012-05-11 Georg-Johann Lay <avr@gjlay.de>
1423
1424 PR target/13503
1425 * reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
1426 BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
1427 * bfd-in2.h: Regenerate.
1428 * libbfd.h: Regenrate.
1429 * elf32-avr.c (elf_avr_howto_table): Add entries for
1430 R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
1431 (avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
1432 R_AVR_8_HHI8.
1433
1434 2012-05-10 H.J. Lu <hongjiu.lu@intel.com>
1435
1436 * elf64-x86-64.c (elf_x86_64_relocate_section): Use int in x32
1437 addend overflow check.
1438
1439 2012-05-10 DJ Delorie <dj@redhat.com>
1440
1441 * elf32-rx.c (rx_elf_object_p): Ignore empty segments.
1442
1443 2012-05-10 H.J. Lu <hongjiu.lu@intel.com>
1444
1445 * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed
1446 hex number in x32 addend overflow check.
1447
1448 2012-05-10 H.J. Lu <hongjiu.lu@intel.com>
1449
1450 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Handle
1451 R_X86_64_RELATIVE64.
1452
1453 2012-05-09 H.J. Lu <hongjiu.lu@intel.com>
1454
1455 * elf64-x86-64.c (elf_x86_64_relocate_section): Check addend
1456 overflow for R_X86_64_RELATIVE64.
1457
1458 2012-05-08 Ben Cheng <bccheng@google.com>
1459
1460 * elf.c: Preserve the original p_align and p_flags if they are
1461 valid.
1462
1463 2012-05-07 Alan Modra <amodra@gmail.com>
1464
1465 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Update
1466 RELOC_AGAINST_DISCARDED_SECTION invocation.
1467
1468 2012-05-07 Hans-Peter Nilsson <hp@axis.com>
1469
1470 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Declare and use
1471 local variable i_ instead of assuming and using a variable i.
1472
1473 2012-05-07 Maciej W. Rozycki <macro@linux-mips.org>
1474
1475 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compound
1476 relocations.
1477 * elfxx-mips.c (mips_reloc_against_discarded_section): New
1478 function.
1479 (_bfd_mips_elf_relocate_section): Call it, in place of
1480 RELOC_AGAINST_DISCARDED_SECTION.
1481 * elf-m10200.c (mn10200_elf_relocate_section): Update arguments
1482 to RELOC_AGAINST_DISCARDED_SECTION.
1483 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1484 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
1485 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1486 * elf32-bfin.c (bfin_relocate_section): Likewise.
1487 (bfinfdpic_relocate_section): Likewise.
1488 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
1489 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
1490 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1491 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
1492 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
1493 * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
1494 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1495 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1496 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1497 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1498 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1499 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1500 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1501 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1502 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1503 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1504 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
1505 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1506 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1507 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1508 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1509 * elf32-mep.c (mep_elf_relocate_section): Likewise.
1510 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
1511 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
1512 * elf32-mt.c (mt_elf_relocate_section): Likewise.
1513 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1514 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1515 * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
1516 * elf32-rx.c (rx_elf_relocate_section): Likewise.
1517 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1518 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1519 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1520 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1521 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1522 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1523 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1524 * elf32-v850.c (v850_elf_relocate_section): Likewise.
1525 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1526 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
1527 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1528 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1529 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
1530 (elf64_alpha_relocate_section): Likewise.
1531 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1532 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
1533 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1534 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1535 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1536 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1537 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1538 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1539 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1540
1541 2012-05-05 Alan Modra <amodra@gmail.com>
1542
1543 PR ld/14052
1544 PR ld/13621
1545 * linker.c (_bfd_nearby_section): Revert 2012-02-13 change.
1546
1547 2012-05-05 Alan Modra <amodra@gmail.com>
1548
1549 * aout-arm.c: Replace all uses of bfd_abs_section, bfd_com_section,
1550 bfd_und_section and bfd_ind_section with their _ptr variants, or
1551 use corresponding bfd_is_* macros.
1552 * aout-ns32k.c: Likewise.
1553 * aout-tic30.c: Likewise.
1554 * coff-arm.c: Likewise.
1555 * coff-tic54x.c: Likewise.
1556 * cpu-ns32k.c: Likewise.
1557 * elf-attrs.c: Likewise.
1558 * elfcode.h: Likewise.
1559 * peicode.h: Likewise.
1560 * reloc.c: Likewise.
1561 * riscix.c: Likewise.
1562 * versados.c: Likewise.
1563 * section.c: Likewise.
1564 (bfd_abs_section, bfd_ind_section, bfd_com_section,
1565 bfd_ind_section): Delete.
1566 (std_section): New array replacing above.
1567 (bfd_abs_section_ptr, bfd_ind_section_ptr, bfd_com_section_ptr,
1568 bfd_ind_section_ptr, STD_SECTION): Update.
1569 (BFD_FAKE_SECTION, GLOBAL_SYM_INIT): Remove unnecessary casts.
1570 * bfd-in2.h: Regenerate.
1571
1572 2012-05-03 Sean Keys <skeys@ipdatasys.com>
1573
1574 * cpu-xgate.c: New file. Added XGATE support.
1575 * archures.c (bfd_architecture): Add XGATE architecture.
1576 (bfd_archures_list): Add reference to XGATE architecture info.
1577 * elf-bfd.h (prep_headers): Handle bfd_arch_xgate.
1578 * reloc.c: Add various XGATE relocation enums.
1579 * targets.c (bfd_elf32_xgate_vec): Declare and add to target vector
1580 list.
1581 * Makefile.am: Add support for XGATE elf.
1582 * configure.in: Ditto.
1583 * config.bfd: Ditto.
1584 * Makefile.in: Regenerate.
1585 * configure: Ditto.
1586 * bfd-in2.h: Ditto.
1587 * libbfd.h: Ditto.
1588 Added files for XGATE relocations.
1589 * elf32-xgate.c: Created minimal relocation file.
1590 * elf32-xgate.h: Created minimal header file for elf32-xgate.
1591
1592 2012-05-03 Tristan Gingold <gingold@adacore.com>
1593
1594 * dwarf2.c (decode_line_info): Ignore
1595 DW_LNE_HP_source_file_correlation.
1596
1597 2012-05-01 Nick Clifton <nickc@redhat.com>
1598
1599 PR binutils/13121
1600 * aoutx.h: Rename 'finfo' to 'flaginfo' to avoid conflicts with
1601 AIX system headers.
1602 * coff-ppc.c: Likewise.
1603 * cofflink.c: Likewise.
1604 * elf32-arm.c: Likewise.
1605 * elf64-sparc.c: Likewise.
1606 * elflink.c: Likewise.
1607 * pdp11.c: Likewise.
1608 * rescoff.c: Likewise.
1609
1610 2012-04-26 Mark Wielaard <mjw@redhat.com>
1611
1612 * dwarf2.c (scan_unit_for_symbols): Account for DW_AT_high_pc
1613 possibly being relative to DW_AT_low_pc.
1614 (parse_comp_unit): Likewise.
1615
1616 2012-04-26 Andreas Schwab <schwab@linux-m68k.org>
1617
1618 * elf32-m68k.c (elf_m68k_check_relocs): Mark non-GOT references
1619 also when generating PIE.
1620 (elf_m68k_discard_copies): Mark undefined weak symbols referenced
1621 by relocations as dynamic.
1622
1623 2012-04-26 Hans-Peter Nilsson <hp@axis.com>
1624
1625 Provide a way for programs to recognize BFD_ASSERT calls.
1626 * bfd.c (bfd_assert_handler_type): New API type.
1627 (bfd_set_assert_handler, bfd_get_assert_handler): New API functions.
1628 (_bfd_assert_handler): New variable.
1629 (_bfd_default_assert_handler): New function.
1630 (bfd_assert): Call _bfd_assert_handler, not _bfd_error_handler.
1631 * libbfd-in.h (_bfd_assert_handler): Declare.
1632 * libbfd.h, bfd-in2.h: Regenerate.
1633
1634 2012-04-24 Hans-Peter Nilsson <hp@axis.com>
1635
1636 PR ld/13990
1637 * elf32-arm.c (elf32_arm_gc_sweep_hook): Handle a forced-local
1638 symbol, where PLT refcount is set to -1.
1639
1640 2012-04-24 Alan Modra <amodra@gmail.com>
1641
1642 PR ld/13991
1643 * elf-bfd.h (_bfd_elf_link_just_syms): Define as
1644 _bfd_generic_link_just_syms.
1645 * elflink.c (_bfd_elf_link_just_syms): Delete.
1646 * linker.c (_bfd_generic_link_just_syms): Set sec_info_type.
1647
1648 * bfd-in.h (discarded_section): Renamed from elf_discarded_section.
1649 * section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS,
1650 SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME,
1651 SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE.
1652 * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
1653 * elf.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
1654 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c,
1655 * elf32-crx.c, * elf32-d10v.c, * elf32-epiphany.c,
1656 * elf32-fr30.c, * elf32-frv.c, * elf32-h8300.c,
1657 * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c,
1658 * elf32-i860.c, * elf32-ip2k.c, * elf32-iq2000.c,
1659 * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c,
1660 * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
1661 * elf32-mep.c, * elf32-moxie.c, * elf32-msp430.c,
1662 * elf32-mt.c, * elf32-openrisc.c, * elf32-ppc.c,
1663 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c,
1664 * elf32-score.c, * elf32-score7.c, * elf32-sh.c,
1665 * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c,
1666 * elf32-v850.c, * elf32-vax.c, * elf32-xc16x.c,
1667 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
1668 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
1669 * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c,
1670 * elf64-x86-64.c, * elflink.c, * elfnn-ia64.c,
1671 * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c,
1672 * reloc.c: Update all references.
1673 * bfd-in2.h: Regenerate.
1674
1675 2012-04-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1676
1677 * elf32-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
1678 * elf64-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
1679
1680 2012-04-19 Thomas Schwinge <thomas@codesourcery.com>
1681
1682 * elf32-sh.c (elf_sh_link_hash_entry): Specify an enum identifier for
1683 got_type.
1684 (allocate_dynrelocs, sh_elf_relocate_section, sh_elf_check_relocs): Use
1685 it.
1686
1687 2012-04-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1688
1689 * elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic
1690 relocations when LE conversion happens on the IE tls symbol.
1691
1692 2012-04-17 Roland McGrath <mcgrathr@google.com>
1693
1694 * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding
1695 so that 32-byte boundary is a proper instruction boundary.
1696
1697 2012-04-17 Tristan Gingold <gingold@adacore.com>
1698
1699 * vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to
1700 member of an object archive.<
1701
1702 2012-04-17 Tristan Gingold <gingold@adacore.com>
1703
1704 * vms-lib.c (MAX_EKEYLEN): Define.
1705 (MAX_KEYLEN): Fix value.
1706 (vms_write_index): Add comments and fix indentation.
1707 Adjust comparaison. Add assertions. Free kbn_blk.
1708 (_bfd_vms_lib_write_archive_contents): Use MAX_EKEYLEN.
1709 Compense MAX_KEYLEN adjustment.
1710
1711 2012-04-16 Maciej W. Rozycki <macro@linux-mips.org>
1712
1713 * elfxx-mips.c (mips16_stub_symndx): Handle n64 compound relocs.
1714 (_bfd_mips_elf_check_relocs): Update accordingly.
1715
1716 2012-04-13 Alan Modra <amodra@gmail.com>
1717
1718 PR ld/13947
1719 * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for
1720 reloc sections.
1721
1722 2012-04-12 David S. Miller <davem@davemloft.net>
1723
1724 * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32,
1725 BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs.
1726 * libbfd.h: Regenerate.
1727 * bfd-in2.h: Likewise.
1728 * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function.
1729 (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34,
1730 R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10.
1731 (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs.
1732 (_bfd_sparc_elf_check_relocs): Likewise.
1733 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1734 (_bfd_sparc_elf_relocate_section): Likewise.
1735
1736 2012-04-12 Roland McGrath <mcgrathr@google.com>
1737
1738 * elf32-arm.c (elf32_arm_nacl_plt0_entry, elf32_arm_nacl_plt_entry):
1739 New variables.
1740 (struct elf32_arm_link_hash_table): New member `nacl_p'.
1741 (elf32_arm_link_hash_table_create): Initialize it.
1742 (elf32_arm_nacl_link_hash_table_create): New function.
1743 (arm_movw_immediate, arm_movt_immediate): New functions.
1744 (elf32_arm_populate_plt_entry): Test HTAB->nacl_p.
1745 (elf32_arm_finish_dynamic_sections): Likewise.
1746 (elf32_arm_output_plt_map_1): Likewise.
1747 (bfd_elf32_littlearm_nacl_vec, bfd_elf32_bigarm_nacl_vec):
1748 New backend vector stanza.
1749 (elf32_arm_nacl_modify_segment_map): New function.
1750 * config.bfd: Handle arm-*-nacl*, armeb-*-nacl*.
1751 * targets.c: Support bfd_elf32_{big,little}_nacl_vec.
1752 * configure.in: Likewise.
1753 (bfd_elf32_bigarm_nacl_vec): Add elf-nacl.lo here.
1754 (bfd_elf32_littlearm_nacl_vec): Likewise.
1755 (bfd_elf32_bigarm_vec, bfd_elf32_littlearm_vec): Likewise.
1756 (bfd_elf32_bigarm_symbian_vec): Likewise.
1757 (bfd_elf32_littlearm_symbian_vec): Likewise.
1758 (bfd_elf32_bigarm_vxworks_vec): Likewise.
1759 (bfd_elf32_littlearm_vxworks_vec): Likewise.
1760 * configure: Regenerated.
1761
1762 2012-04-12 Tristan Gingold <gingold@adacore.com>
1763
1764 * elflink.c (elf_link_output_extsym): Add a guard.
1765 (bfd_elf_final_link): Remove assertion.
1766 (bfd_elf_final_link): Add a guard.
1767 * elfnn-ia64.c (INCLUDE_IA64_VMS): Removed.
1768 (elfNN_vms_section_from_shdr, elfNN_vms_object_p)
1769 (elfNN_vms_post_process_headers, elfNN_vms_section_processing)
1770 (elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup):
1771 Remove.
1772 (elfNN-ia64-vms target): Move to ...
1773 * elf64-ia64-vms.c: New file.
1774 * configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo
1775 * Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo.
1776 (BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c.
1777 * configure: Regenerate.
1778 * Makefile.in: Regenerate.
1779
1780 2012-04-11 Nick Clifton <nickc@redhat.com>
1781
1782 PR binutils/13897
1783 * elf64-ppc.c (opd_entry_value): When dealing with sections
1784 without relocs, keep the last section loaded in order to avoid
1785 unnecessary reloads.
1786
1787 2012-04-09 Roland McGrath <mcgrathr@google.com>
1788
1789 * elf.c (_bfd_elf_map_sections_to_segments): Set INFO->user_phdrs.
1790 * elf-nacl.c (nacl_modify_segment_map): Do nothing if INFO->user_phdrs.
1791 (nacl_modify_program_headers): Likewise.
1792
1793 2012-04-03 Roland McGrath <mcgrathr@google.com>
1794
1795 * elf-nacl.c: New file.
1796 * elf-nacl.h: New file.
1797 * elf32-i386.c (elf_backend_modify_segment_map): Define for
1798 bfd_elf32_i386_nacl_vec.
1799 (elf_backend_modify_program_headers): Likewise.
1800 * elf64-x86-64.c (elf_backend_modify_segment_map): Define for
1801 bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec.
1802 (elf_backend_modify_program_headers): Likewise.
1803 * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here.
1804 (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here.
1805 * Makefile.in: Regenerated.
1806 * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here.
1807 (bfd_elf32_x86_64_nacl_vec): Likewise.
1808 (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise.
1809 (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise.
1810 (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise.
1811 (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise.
1812 (bfd_elf32_i386_nacl_vec): Likewise.
1813 (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise.
1814 (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise.
1815 * configure: Regenerated.
1816
1817 2012-03-31 Andreas Schwab <schwab@linux-m68k.org>
1818
1819 * elf32-m68k.c (elf_m68k_relocate_section): Allow
1820 R_68K_TLS_LE{8,16,32} for PIE.
1821
1822 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1823
1824 * elf64-s390.c: Fix several comments regarding PLT entry
1825 description.
1826 * elf32-s390.c: Likewise.
1827
1828 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1829
1830 * elf64-s390.c: Use the section pointer shortcuts in
1831 elf_link_hash_table and remove them from the target specific
1832 variant.
1833 * elf32-s390.c: Likewise.
1834
1835 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1836
1837 * elf64-s390.c (elf_s390x_plt_entry, elf_s390x_first_plt_entry):
1838 New definitions.
1839 (PLT_PIC_ENTRY_WORD*, PLT_PIC12_ENTRY_WORD*): Remove.
1840 (elf_s390_finish_dynamic_symbol): Use memcpy instead of bfd_put_32.
1841 (elf_s390_finish_dynamic_sections): Likewise.
1842 * elf32-s390.c (elf_s390_plt_entry, elf_s390_plt_pic_entry)
1843 (elf_s390_plt_pic12_entry, elf_s390_plt_pic16_entry)
1844 (elf_s390_plt_first_entry, elf_s390_plt_pic_first_entry): New definitions.
1845 (PLT_PIC16_ENTRY_WORD*, PLT_ENTRY_WORD*)
1846 (PLT_PIC_FIRST_ENTRY_WORD*, PLT_FIRST_ENTRY_WORD*): Remove.
1847
1848 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1849
1850 * elf32-s390.c (struct elf_s390_dyn_relocs): Remove.
1851 Rename all occurrences in the file to elf_dyn_relocs.
1852 * elf64-s390.c: Likewise.
1853
1854 2012-03-30 Alan Modra <amodra@gmail.com>
1855
1856 * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic
1857 libraries.
1858
1859 2012-03-29 Alan Modra <amodra@gmail.com>
1860
1861 * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete.
1862 * bfd-in2.h: Regenerate.
1863
1864 2012-03-23 Alan Modra <amodra@gmail.com>
1865
1866 * elf.c (assign_file_positions_for_non_load_sections): Don't warn
1867 on empty alloc sections.
1868
1869 2012-03-23 Alan Modra <amodra@gmail.com>
1870
1871 * linker.c (_bfd_nearby_section): New function, split out from..
1872 (fix_syms): ..here.
1873 * bfd-in.h (_bfd_nearby_section): Declare.
1874 * bfd-in2.h: Regenerate.
1875 * elflink.c (elf_link_input_bfd): Don't use text_index_section or
1876 data_index_section with ld -q or ld -r output relocs against
1877 stripped output sections. Instead use _bfd_nearby_section.
1878
1879 2012-03-23 Alan Modra <amodra@gmail.com>
1880
1881 PR binutils/13894
1882 * elf64-ppc.c (opd_entry_value): Read full symbol table when
1883 sym hashes unavailable.
1884
1885 2012-03-21 Eliot Dresselhaus <eliot@sonic.net>
1886
1887 * elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE
1888 for non-C6X objects.
1889
1890 2012-03-20 Kai Tietz <ktietz@redhat.com>
1891
1892 PR ld/12742
1893 * configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h.
1894 * plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined.
1895 Add windows.h header include if HAVE_WINDOWS_H is defined.
1896 (dlerror): New static function if windows variant is used instead
1897 of dlfcn.h.
1898 (dlclose): Likewise.
1899 (dlopen): Likewise.
1900 (dlsym): Likewise.
1901 * configure: Regenerated.
1902 * config.in: Regenerated.
1903
1904 2012-03-20 H.J. Lu <hongjiu.lu@intel.com>
1905
1906 PR ld/13880
1907 * elf32-i386.c (elf_i386_relocate_section): Don't issue an error
1908 for R_386_GOTOFF relocation against protected function if
1909 SYMBOLIC_BIND is true.
1910
1911 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an
1912 error for R_X86_64_GOTOFF64 relocation against protected function
1913 when building executable or SYMBOLIC_BIND is true.
1914
1915 2012-03-16 Roland McGrath <mcgrathr@google.com>
1916
1917 * config.bfd: Handle x86_64-*-nacl*.
1918 * elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza.
1919 (bfd_elf32_x86_64_nacl_vec): Likewise.
1920 * targets.c: Support them.
1921 * configure.in: Likewise.
1922 * configure: Regenerated.
1923
1924 2012-03-16 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1925
1926 * elf32-arm.c (elf32_arm_attributes_accept_div): New function.
1927 (elf32_arm_attributes_forbid_div): Likewise.
1928 (elf32_arm_merge_eabi_attributes): Correct handling of
1929 Tag_DIV_use.
1930
1931 2012-03-15 Roland McGrath <mcgrathr@google.com>
1932
1933 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use
1934 elf_x86_64_backend_data parameters for plt_eh_frame.
1935
1936 * elf64-x86-64.c (struct elf_x86_64_backend_data): New type.
1937 (get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros.
1938 (elf_x86_64_arch_bed): New variable.
1939 (elf_backend_arch_data): New macro.
1940 (elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE.
1941 (elf_x86_64_allocate_dynrelocs): Likewise.
1942 (elf_x86_64_relocate_section): Likewise.
1943 (elf_x86_64_plt_sym_val): Likewise.
1944 (elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data
1945 parameters for PLT details.
1946 (elf_x86_64_finish_dynamic_sections): Likewise.
1947
1948 2012-03-14 Roland McGrath <mcgrathr@google.com>
1949
1950 * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up
1951 to the full size, padding out with nop instructions.
1952
1953 2012-03-12 Alan Modra <amodra@gmail.com>
1954
1955 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't warn
1956 on zero size dynbss symbol.
1957 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
1958 * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
1959 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
1960 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1961 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
1962 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
1963 * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
1964 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
1965 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
1966 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1967 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1968 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
1969 * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
1970 * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise.
1971 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
1972 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1973 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1974 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
1975 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1976 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
1977 * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise.
1978
1979 2012-03-10 Edmar Wienskoski <edmar@freescale.com>
1980
1981 * archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
1982 * bfd-in2.h: Regenerate.
1983 * cpu-powerpc.c (bfd_powerpc_archs): Add entries for
1984 bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
1985
1986 2012-03-09 H.J. Lu <hongjiu.lu@intel.com>
1987
1988 PR ld/13817
1989 * elf32-i386.c (elf_i386_relocate_section): Restore
1990 R_386_IRELATIVE.
1991
1992 * elf64-x86-64.c (elf_x86_64_relocate_section): Restore
1993 R_X86_64_IRELATIVE.
1994
1995 2012-03-08 Tristan Gingold <gingold@adacore.com>
1996
1997 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum
1998 keylen according to archive kind. Set nextvbn and nextrfa lhd
1999 fields. Add comments.
2000
2001 2012-03-07 Nick Clifton <nickc@redhat.com>
2002
2003 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type
2004 field.
2005 (elf32_mn10300_link_hash_table): Add tls_ldm_got entry;
2006 (elf_mn10300_tdata): Define.
2007 (elf_mn10300_local_got_tls_type): Define.
2008 (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD,
2009 R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
2010 R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
2011 R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs.
2012 (mn10300_reloc_map): Likewise.
2013 (elf_mn10300_tls_transition): New function.
2014 (dtpoff, tpoff, mn10300_do_tls_transition): New functions.
2015 (mn10300_elf_check_relocs): Add TLS support.
2016 (mn10300_elf_final_link_relocate): Likewise.
2017 (mn10300_elf_relocate_section): Likewise.
2018 (mn10300_elf_relax_section): Likewise.
2019 (elf32_mn10300_link_hash_newfunc): Initialise new field.
2020 (_bfd_mn10300_copy_indirect_symbol): New function.
2021 (elf32_mn10300_link_hash_table_create): Initialise new fields.
2022 (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support.
2023 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
2024 (_bfd_mn10300_elf_reloc_type_class): Allocate an
2025 elf_mn10300_obj_tdata structure.
2026 (elf_backend_copy_indirect_symbol): Define.
2027 * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD,
2028 BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE,
2029 BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD,
2030 BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations.
2031 (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to
2032 alongside other MN10300 relocations.
2033 * bfd-in2.h: Regenerate.
2034 * libbfd.h: Regenerate.
2035
2036 2012-03-06 Jakub Jelinek <jakub@redhat.com>
2037
2038 * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE
2039 set relocate to TRUE.
2040
2041 2012-03-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2042
2043 PR ld/12152
2044 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore
2045 overflows for R_SPARC_UA32 in .stab sections.
2046
2047 2012-03-01 Alan Modra <amodra@gmail.com>
2048
2049 * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning.
2050
2051 2012-02-27 Alan Modra <amodra@gmail.com>
2052
2053 * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd
2054 before calling elf specific function.
2055 (sh_elf_osec_readonly_p): Test for error return from above.
2056
2057 2012-02-27 Alan Modra <amodra@gmail.com>
2058
2059 * elf32-spu.c (build_stub): Fix malloc under-allocation.
2060
2061 2012-02-25 Walter Lee <walt@tilera.com>
2062 * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL,
2063 BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
2064 BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
2065 BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
2066 BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
2067 BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
2068 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
2069 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
2070 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
2071 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
2072 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
2073 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
2074 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
2075 BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
2076 BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
2077 BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
2078 BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
2079 BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
2080 BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
2081 BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
2082 BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
2083 BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
2084 BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD,
2085 BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
2086 BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
2087 BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD.
2088 Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT,
2089 BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT,
2090 BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT,
2091 BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT,
2092 BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT,
2093 BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT,
2094 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT,
2095 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT,
2096 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD,
2097 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD,
2098 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD,
2099 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD,
2100 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD,
2101 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD,
2102 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD,
2103 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD,
2104 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE,
2105 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE,
2106 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE,
2107 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE,
2108 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE,
2109 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE,
2110 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE,
2111 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE.
2112 * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro
2113 relocations.
2114 (tilepro_reloc_map): Ditto.
2115 (tilepro_info_to_howto_rela): Ditto.
2116 (reloc_to_create_func): Ditto.
2117 (tilepro_tls_translate_to_le): New.
2118 (tilepro_tls_translate_to_ie): New.
2119 (tilepro_elf_tls_transition): New.
2120 (tilepro_elf_check_relocs): Handle new tls relocations.
2121 (tilepro_elf_gc_sweep_hook): Ditto.
2122 (allocate_dynrelocs): Ditto.
2123 (tilepro_elf_relocate_section): Ditto.
2124 (tilepro_replace_insn): New.
2125 (insn_mask_X1): New.
2126 (insn_mask_X0_no_dest_no_srca): New
2127 (insn_mask_X1_no_dest_no_srca): New
2128 (insn_mask_Y0_no_dest_no_srca): New
2129 (insn_mask_Y1_no_dest_no_srca): New
2130 (srca_mask_X0): New
2131 (srca_mask_X1): New
2132 (insn_tls_le_move_X1): New
2133 (insn_tls_le_move_zero_X0X1): New
2134 (insn_tls_ie_lw_X1): New
2135 (insn_tls_ie_add_X0X1): New
2136 (insn_tls_ie_add_Y0Y1): New
2137 (insn_tls_gd_add_X0X1): New
2138 (insn_tls_gd_add_Y0Y1): New
2139 * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx
2140 relocations.
2141 (tilegx_reloc_map): Ditto.
2142 (tilegx_info_to_howto_rela): Ditto.
2143 (reloc_to_create_func): Ditto.
2144 (tilegx_elf_link_hash_table): New field disable_le_transition.
2145 (tilegx_tls_translate_to_le): New.
2146 (tilegx_tls_translate_to_ie): New.
2147 (tilegx_elf_tls_transition): New.
2148 (tilegx_elf_check_relocs): Handle new tls relocations.
2149 (tilegx_elf_gc_sweep_hook): Ditto.
2150 (allocate_dynrelocs): Ditto.
2151 (tilegx_elf_relocate_section): Ditto.
2152 (tilegx_copy_bits): New.
2153 (tilegx_replace_insn): New.
2154 (insn_mask_X1): New.
2155 (insn_mask_X0_no_dest_no_srca): New.
2156 (insn_mask_X1_no_dest_no_srca): New.
2157 (insn_mask_Y0_no_dest_no_srca): New.
2158 (insn_mask_Y1_no_dest_no_srca): New.
2159 (insn_mask_X0_no_operand): New.
2160 (insn_mask_X1_no_operand): New.
2161 (insn_mask_Y0_no_operand): New.
2162 (insn_mask_Y1_no_operand): New.
2163 (insn_tls_ie_ld_X1): New.
2164 (insn_tls_ie_ld4s_X1): New.
2165 (insn_tls_ie_add_X0X1): New.
2166 (insn_tls_ie_add_Y0Y1): New.
2167 (insn_tls_ie_addx_X0X1): New.
2168 (insn_tls_ie_addx_Y0Y1): New.
2169 (insn_tls_gd_add_X0X1): New.
2170 (insn_tls_gd_add_Y0Y1): New.
2171 (insn_move_X0X1): New.
2172 (insn_move_Y0Y1): New.
2173 (insn_add_X0X1): New.
2174 (insn_add_Y0Y1): New.
2175 (insn_addx_X0X1): New.
2176 (insn_addx_Y0Y1): New.
2177 * libbfd.h: Regenerate.
2178 * bfd-in2.h: Regenerate.
2179
2180 2012-02-25 Walter Lee <walt@tilera.com>
2181
2182 * config.bfd (tilegx-*-*): rename little endian vector; add big
2183 endian vector.
2184 (tilegxbe-*-*): New case.
2185 * configure.in (bfd_elf32_tilegx_vec): Rename...
2186 (bfd_elf32_tilegx_le_vec): ... to this.
2187 (bfd_elf32_tilegx_be_vec): New vector.
2188 (bfd_elf64_tilegx_vec): Rename...
2189 (bfd_elf64_tilegx_le_vec): ... to this.
2190 (bfd_elf64_tilegx_be_vec): New vector.
2191 * configure: Regenerate.
2192 * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename.
2193 (TARGET_LITTLE_NAME): Ditto.
2194 (TARGET_BIG_SYM): Define.
2195 (TARGET_BIG_NAME): Define.
2196 * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename.
2197 (TARGET_LITTLE_NAME): Ditto.
2198 (TARGET_BIG_SYM): Define.
2199 (TARGET_BIG_NAME): Define.
2200 * targets.c (bfd_elf32_tilegx_vec): Rename...
2201 (bfd_elf32_tilegx_le_vec): ... to this.
2202 (bfd_elf32_tilegx_be_vec): Declare.
2203 (bfd_elf64_tilegx_vec): Rename...
2204 (bfd_elf64_tilegx_le_vec): ... to this.
2205 (bfd_elf64_tilegx_be_vec): Declare.
2206 (_bfd_target_vector): Add / rename above vectors.
2207 * arctures.c (bfd_architecture): Define bfd_mach_tilegx32.
2208 * bfd-in2.h: Regenerate.
2209 * cpu-tilegx.c (bfd_tilegx32_arch): define.
2210 (bfd_tilegx_arch): link to bfd_tilegx32_arch.
2211
2212 2012-02-24 Nick Clifton <nickc@redhat.com>
2213
2214 PR ld/13730
2215 * reloc.c (bfd_generic_get_relocated_section_contents): Issue an
2216 error message instead of aborting, when an outofrange reloc is
2217 encountered.
2218
2219 2012-02-23 Iain Sandoe <idsandoe@googlemail.com>
2220
2221 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New.
2222 (bfd_mach_o_canonicalize_one_reloc): Swap non-scattered reloc
2223 bit-fields when target and host differ in endian-ness. When
2224 PAIRs are non-scattered find the 'symbol' from the preceding
2225 reloc. Add FIXME re. reloc symbols on section boundaries.
2226 (bfd_mach_o_swap_out_non_scattered_reloc): New.
2227 (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc.
2228
2229 2012-02-17 Iain Sandoe <idsandoe@googlemail.com>
2230
2231 * mach-o-i386.c (i386_howto_table): Add support for 16 bit
2232 sect-diffs.
2233 (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs.
2234 (bfd_mach_o_i386_swap_reloc_out): Likewise.
2235
2236 2012-02-17 Tristan Gingold <gingold@adacore.com>
2237
2238 * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF):
2239 * libbfd.h: Regenerated.
2240 * bfd-in2.h: Likewise.
2241 * mach-o-i386.c (i386_howto_table): Include local sectdiff.
2242 (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff.
2243 (bfd_mach_o_i386_swap_reloc_out): Likewise.
2244
2245 2012-02-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2246
2247 * elf32-s390.c (elf_s390_relocate_section): Support basr in the
2248 GD->LE and LD->LE optimizations.
2249
2250 2012-02-16 Alan Modra <amodra@gmail.com>
2251
2252 PR binutils/13355
2253 * elf32-rx.c (elf32_rx_relax_section): Correct width check.
2254
2255 2012-02-13 Richard Henderson <rth@redhat.com>
2256
2257 PR ld/13621
2258 * linker.c (fix_syms): Force symbols outside any section into
2259 bfd_abs_section_ptr.
2260
2261 2012-02-13 Alan Modra <amodra@gmail.com>
2262
2263 * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function.
2264 * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare.
2265 * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define.
2266 * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define.
2267
2268 2012-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
2269 Nick Clifton <nickc@redhat.com>
2270
2271 * oasys.c (oasys_write_header): Fix compilation warning on zero-sized
2272 memset.
2273
2274 2012-02-10 Iain Sandoe <idsandoe@googlemail.com>
2275
2276 * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section
2277 vma additions in their logical, rather than physical order.
2278
2279 2012-02-10 Iain Sandoe <idsandoe@googlemail.com>
2280
2281 * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section
2282 parameters.
2283 * mach-o-x86-64.c (text_section_names_xlat): New.
2284 (mach_o_x86_64_segsec_names_xlat): New.
2285 (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat.
2286 * mach-o-i386.c (text_section_names_xlat): Correct section parameters.
2287
2288 2012-02-10 Tristan Gingold <gingold@adacore.com>
2289
2290 * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator
2291 to avoid infinite loop. Add comments.
2292
2293 2012-02-09 H.J. Lu <hongjiu.lu@intel.com>
2294
2295 PR ld/13675
2296 * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte
2297 nop instructions.
2298 (bfd_arch_i386_short_nop_fill): New.
2299 (bfd_arch_i386_long_nop_fill): Likewise.
2300 Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info
2301 initializers. Use bfd_arch_i386_long_nop_fill on 64bit
2302 bfd_arch_info initializers.
2303
2304 * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ...
2305 (bfd_arch_i386_short_nop_fill): This.
2306 Update bfd_arch_info initializers.
2307 * cpu-l1om.c: Likewise.
2308
2309 2012-02-08 Alan Modra <amodra@gmail.com>
2310
2311 * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too.
2312 (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear
2313 the correct h->u.weakdef.
2314
2315 2012-02-07 Alan Modra <amodra@gmail.com>
2316
2317 * elf.c (elf_find_function): Don't use internal_elf_sym.
2318 (_bfd_elf_maybe_function_sym): Likewise. Replace elf_symbol_type
2319 parameter with asymbol.
2320 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
2321 * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype.
2322 (struct elf_backend_data <maybe_function_sym>): Likewise.
2323
2324 2012-02-02 Vidya Praveen (vidya.praveen@atmel.com)
2325
2326 PR bfd/13410
2327 * elf32-avr.c (elf32_avr_relax_section): Correct the
2328 condition that qualifies the candidates for relaxation.
2329
2330 2012-02-02 Tristan Gingold <gingold@adacore.com>
2331
2332 * bfdio.c (real_fopen): Remove unused vms_modes variable.
2333
2334 2012-02-02 Tristan Gingold <gingold@adacore.com>
2335
2336 * mach-o.c (bfd_mach_o_read_header): Silent uninitialized
2337 variable warning.
2338
2339 2012-02-02 Tristan Gingold <gingold@adacore.com>
2340
2341 * archive.c (bfd_slurp_armap): Fix thinko in cast.
2342
2343 2012-01-31 H.J. Lu <hongjiu.lu@intel.com>
2344
2345 PR ld/13616
2346 * archures.c (bfd_arch_info): Add fill.
2347 (bfd_default_arch_struct): Add bfd_arch_default_fill.
2348 (bfd_arch_default_fill): New.
2349
2350 * configure.in: Set bfd version to 2.22.52.
2351 * configure: Regenerated.
2352
2353 * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info
2354 initializer.
2355 * cpu-arc.c: Likewise.
2356 * cpu-arm.c: Likewise.
2357 * cpu-avr.c: Likewise.
2358 * cpu-bfin.c: Likewise.
2359 * cpu-cr16.c: Likewise.
2360 * cpu-cr16c.c: Likewise.
2361 * cpu-cris.c: Likewise.
2362 * cpu-crx.c: Likewise.
2363 * cpu-d10v.c: Likewise.
2364 * cpu-d30v.c: Likewise.
2365 * cpu-dlx.c: Likewise.
2366 * cpu-epiphany.c: Likewise.
2367 * cpu-fr30.c: Likewise.
2368 * cpu-frv.c: Likewise.
2369 * cpu-h8300.c: Likewise.
2370 * cpu-h8500.c: Likewise.
2371 * cpu-hppa.c: Likewise.
2372 * cpu-i370.c: Likewise.
2373 * cpu-i860.c: Likewise.
2374 * cpu-i960.c: Likewise.
2375 * cpu-ia64.c: Likewise.
2376 * cpu-ip2k.c: Likewise.
2377 * cpu-iq2000.c: Likewise.
2378 * cpu-lm32.c: Likewise.
2379 * cpu-m10200.c: Likewise.
2380 * cpu-m10300.c: Likewise.
2381 * cpu-m32c.c: Likewise.
2382 * cpu-m32r.c: Likewise.
2383 * cpu-m68hc11.c: Likewise.
2384 * cpu-m68hc12.c: Likewise.
2385 * cpu-m68k.c: Likewise.
2386 * cpu-m88k.c: Likewise.
2387 * cpu-mcore.c: Likewise.
2388 * cpu-mep.c: Likewise.
2389 * cpu-microblaze.c: Likewise.
2390 * cpu-mips.c: Likewise.
2391 * cpu-mmix.c: Likewise.
2392 * cpu-moxie.c: Likewise.
2393 * cpu-msp430.c: Likewise.
2394 * cpu-mt.c: Likewise.
2395 * cpu-ns32k.c: Likewise.
2396 * cpu-openrisc.c: Likewise.
2397 * cpu-or32.c: Likewise.
2398 * cpu-pdp11.c: Likewise.
2399 * cpu-pj.c: Likewise.
2400 * cpu-plugin.c: Likewise.
2401 * cpu-powerpc.c: Likewise.
2402 * cpu-rl78.c: Likewise.
2403 * cpu-rs6000.c: Likewise.
2404 * cpu-rx.c: Likewise.
2405 * cpu-s390.c: Likewise.
2406 * cpu-score.c: Likewise.
2407 * cpu-sh.c: Likewise.
2408 * cpu-sparc.c: Likewise.
2409 * cpu-spu.c: Likewise.
2410 * cpu-tic30.c: Likewise.
2411 * cpu-tic4x.c: Likewise.
2412 * cpu-tic54x.c: Likewise.
2413 * cpu-tic6x.c: Likewise.
2414 * cpu-tic80.c: Likewise.
2415 * cpu-tilegx.c: Likewise.
2416 * cpu-tilepro.c: Likewise.
2417 * cpu-v850.c: Likewise.
2418 * cpu-vax.c: Likewise.
2419 * cpu-w65.c: Likewise.
2420 * cpu-we32k.c: Likewise.
2421 * cpu-xc16x.c: Likewise.
2422 * cpu-xstormy16.c: Likewise.
2423 * cpu-xtensa.c: Likewise.
2424 * cpu-z80.c: Likewise.
2425 * cpu-z8k.c: Likewise.
2426
2427 * cpu-i386.c: Include "libiberty.h".
2428 (bfd_arch_i386_fill): New.
2429 Add bfd_arch_i386_fill to bfd_arch_info initializer.
2430
2431 * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer.
2432 * cpu-l1om.c: Likewise.
2433
2434 * linker.c (default_data_link_order): Call abfd->arch_info->fill
2435 if fill size is 0.
2436
2437 * bfd-in2.h: Regenerated.
2438
2439 2012-01-27 Michael Eager <eager@eagercon.com>
2440
2441 * elf32-microblaze.c (create_got_section):
2442 Reuse existing .rela.got section.
2443
2444 2012-01-23 Alan Modra <amodra@gmail.com>
2445
2446 * elf-bfd.h: Formatting.
2447 (struct elf_backend_data): Add "maybe_function_sym".
2448 (_bfd_elf_maybe_function_sym): Declare.
2449 * elfxx-target.h (elf_backend_maybe_function_sym): Define.
2450 (elfNN_bed): Init new field.
2451 * elf.c (elf_find_function): Use maybe_function_sym.
2452 (_bfd_elf_maybe_function_sym): New function.
2453 * elf64-ppc.c (elf_backend_maybe_function_sym): Define.
2454 (ppc64_elf_maybe_function_sym): New function.
2455
2456 2012-01-20 Francois Gouget <fgouget@codeweavers.com>
2457
2458 PR binutils/13534
2459 * archive.c (_bfd_ar_sizepad): New function. Correctly install and
2460 pad the size field in an archive header.
2461 (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan
2462 function for the archive size field.
2463 (bfd_generic_openr_next_archived_file): Likewise.
2464 (do_slurp_coff_armap): Likewise.
2465 (_bfd_write_archive_contents): Likewise.
2466 (_bfd_bsd44_write_ar_hdr): Use the new function.
2467 (bfd_ar_hdr_from_filesystem): Likewise.
2468 (_bfd_write_archive_contents): Likewise.
2469 (bsd_write_armap): Likewise.
2470 (coff_write_armap): Likewise.
2471 * archive64.c (bfd_elf64_archive_write_armap): Likewise.
2472 * bfdio.c (bfd_bread): Use correct type for archive element
2473 sizes.
2474 * ar.c (open_inarch): Likewise.
2475 (extract_file): Likewise.
2476 * libbfd-in.h (struct areltdata): Use correct types for
2477 parsed_size and extra_size fields.
2478 Prototype _bfd_ar_sizepad function.
2479 * libbfd.h: Regenerate.
2480
2481 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2482
2483 * elf.c (elfcore_write_prpsinfo): Provide unconditionally.
2484 Return NULL if core file generation is unsupported.
2485 (elfcore_write_prstatus): Likewise.
2486 * elf32-arm.c (elf32_arm_nabi_write_core_note): New function.
2487 (elf_backend_write_core_note): Define.
2488
2489 2012-01-19 Tristan Gingold <gingold@adacore.com>
2490
2491 * pef.c: Add a comment.
2492 * xsym.c: Likewise.
2493
2494 2012-01-17 Alan Modra <amodra@gmail.com>
2495
2496 * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
2497 trailing garbage in the note.
2498 * elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
2499
2500 2012-01-16 Daniel Green <venix1@gmail.com>
2501
2502 PR ld/13491
2503 * coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test
2504 h->root.type not h->type.
2505 * coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.
2506
2507 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
2508
2509 * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
2510 indirect symbols.
2511
2512 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
2513
2514 * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file
2515 position from here... to (bfd_mach_o_build_seg_command): Here.
2516
2517 2012-01-12 Iain Sandoe <idsandoe@googlemail.com>
2518
2519 * mach-o.c (bfd_mach_o_count_indirect_symbols): New.
2520 (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
2521 * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
2522 file. (bfd_mach_o_section): Add indirect_syms field.
2523
2524 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
2525
2526 * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of
2527 vmsize from filesize. Don't compute offsets or file sizes for
2528 zerofill sections.
2529
2530 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
2531
2532 * mach-o.c (bfd_mach_o_build_commands): Make the building of each
2533 command type independent.
2534
2535 2012-01-11 Alan Modra <amodra@gmail.com>
2536
2537 * elf64-ppc.c: Define more insns used in plt call stubs.
2538 (ppc64_elf_brtaken_reloc): Assume isa version 2 or above.
2539 (ppc64_elf_relocate_section): Likewise.
2540 (enum ppc_stub_type): Add ppc_stub_plt_call_r2save.
2541 (struct ppc_link_hash_table): Increase size of stub_count array.
2542 Add plt_stub_align and plt_thread_safe.
2543 (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define.
2544 (plt_stub_size, plt_stub_pad): New functions.
2545 (build_plt_stub): Emit barriers for power7 thread safety. Don't
2546 emit needless save of r2.
2547 (build_tls_get_addr_stub): Adjust params.
2548 (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning
2549 plt stubs. Adjust build_*plt_stub calls.
2550 (ppc_size_one_stub): Similarly.
2551 (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align
2552 params. Choose default for plt_thread_safe based on existence of
2553 calls to thread creation functions. Modify plt_call to
2554 plt_call_r2save when no tocsave reloc found. Align tail of stub
2555 sections.
2556 (ppc64_elf_build_stubs): Align tail of stub sections. Adjust
2557 output of stub statistics.
2558 (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save.
2559 * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
2560
2561 2012-01-10 H.J. Lu <hongjiu.lu@intel.com>
2562
2563 PR ld/13581
2564 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P
2565 check on R_X86_64_PCXX.
2566
2567 2012-01-10 Tristan Gingold <gingold@adacore.com>
2568
2569 * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false
2570 warning.
2571
2572 2012-01-10 Tristan Gingold <gingold@adacore.com>
2573
2574 * bfdio.c (bfd_tell): Handle nested archives.
2575 (bfd_seek): Ditto.
2576 * cache.c (bfd_cache_lookup_worker): Ditto.
2577 * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with
2578 nested archives.
2579 (bfd_generic_openr_next_archived_file): Likewise.
2580
2581 2012-01-09 Iain Sandoe <idsandoe@googlemail.com>
2582
2583 * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement.
2584 (bfd_mach_o_write_symtab): Remove handling for indirect syms.
2585 (bfd_mach_o_primary_symbol_sort_key): Likewise.
2586 (bfd_mach_o_cf_symbols): Likewise.
2587 (bfd_mach_o_sort_symbol_table): Remove.
2588 (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling
2589 for indirect and dysymtab counts. Do the symbol sorting here.
2590 (bfd_mach_o_build_dysymtab_command): Count the symbol types here.
2591 Make the indirect symbols a TODO.
2592 (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols.
2593 (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with
2594 a non-zero value.
2595 (bfd_mach_o_read_symtab_symbol): Record the symbol index.
2596 (bfd_mach_o_read_symtab_symbol): Adjust recording of global status.
2597 * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries.
2598 (IS_MACHO_INDIRECT): Remove.
2599 (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New.
2600
2601 2012-01-06 Nick Clifton <nickc@redhat.com>
2602
2603 PR binutils/13121
2604 * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to
2605 'flaginfo' to avoid conflicts with AIX system headers.
2606
2607 2012-01-06 Tristan Gingold <gingold@adacore.com>
2608
2609 * bfdio.c (bfd_bread): Use arelt_size macro.
2610
2611 2012-01-06 Tristan Gingold <gingold@adacore.com>
2612
2613 * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.
2614
2615 2012-01-05 Nick Clifton <nickc@redhat.com>
2616
2617 PR ld/12161
2618 * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if
2619 necessary.
2620
2621 2012-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2622
2623 Fix zero registers core files when built by gcc-4.7.
2624 * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and
2625 size. Call elfcore_write_note for the local variables. Remove the
2626 final elfcore_write_note call. Add NOTREACHED comments.
2627
2628 2012-01-04 Tristan Gingold <gingold@adacore.com>
2629
2630 * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function.
2631 (bfd_mach_o_generic_stat_arch_elt): Adjust.
2632
2633 2012-01-04 Tristan Gingold <gingold@adacore.com>
2634
2635 * mach-o.c (bfd_mach_o_fat_member_init): New function.
2636 (bfd_mach_o_openr_next_archived_file): Reindent.
2637 Adjust to call bfd_mach_o_fat_member_init.
2638 (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init.
2639
2640 2012-01-04 Tristan Gingold <gingold@adacore.com>
2641
2642 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle
2643 BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1,
2644 BFD_RELOC_MACH_O_X86_64_PCREL32_2,
2645 BFD_RELOC_MACH_O_X86_64_PCREL32_4,
2646 BFD_RELOC_MACH_O_X86_64_BRANCH32,
2647 BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32,
2648 BFD_RELOC_MACH_O_X86_64_GOT.
2649
2650 2012-01-04 Tristan Gingold <gingold@adacore.com>
2651
2652 * mach-o.h (bfd_mach_o_fvmlib_command): New structure.
2653 (bfd_mach_o_load_command): Add fvmlib field.
2654
2655 * mach-o.c (bfd_mach_o_read_fvmlib): New function.
2656 (bfd_mach_o_read_command): Handle fvmlib.
2657
2658 2012-01-04 Tristan Gingold <gingold@adacore.com>
2659
2660 * mach-o.c (bfd_mach_o_convert_architecture): Reindent.
2661 Decode msubtype for ARM.
2662
2663 2012-01-04 Tristan Gingold <gingold@adacore.com>
2664
2665 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments.
2666
2667 2012-01-04 Tristan Gingold <gingold@adacore.com>
2668
2669 * mach-o.h: Reindent header.
2670 (bfd_mach_o_encryption_info_command): New structure.
2671 (bfd_mach_o_load_command): Add encryption_info field.
2672
2673 * mach-o.c (bfd_mach_o_read_encryption_info): New function.
2674 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
2675 (bfd_mach_o_read_command): Adjust error message.
2676
2677 2012-01-04 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
2678
2679 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part
2680 which reads DWARF2 and stores in stash from find_line.
2681 (find_line) Call _bfd_dwarf2_slurp_debug_info.
2682 * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration.
2683 * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate.
2684 * mach-o.c (dsym_subdir): The name of subdir where debug
2685 information may be stored.
2686 (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose
2687 type is UUID.
2688 (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is
2689 corresponding to the executable.
2690 (bfd_mach_o_find_dsym): New. Find a debug information BFD in the
2691 specified binary file.
2692 (bfd_mach_o_follow_dsym): New. Find a debug information BFD for
2693 the original BFD.
2694 (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O
2695 executables, dylibs, and bundles.
2696 (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file.
2697 * mach-o.h (dsym_bfd): The BFD of the dSYM file.
2698
2699 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
2700
2701 * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index
2702 for stabd symbols.
2703 (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs.
2704 (bfd_mach_o_cf_symbols): Likewise.
2705
2706 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
2707
2708 * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo.
2709
2710 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
2711
2712 * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
2713 as the value of an indirect symbol. Keep the string table index in
2714 non-indirect syms for reference.
2715 (bfd_mach_o_write_dysymtab): New.
2716 (bfd_mach_o_primary_symbol_sort_key): New.
2717 (bfd_mach_o_cf_symbols): New.
2718 (bfd_mach_o_sort_symbol_table): New.
2719 (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols.
2720 If we are emitting a dysymtab, process indirect symbols and count the
2721 number of each other kind.
2722 (bfd_mach_o_mangle_sections): New.
2723 (bfd_mach_o_write_contents): Split out some pre-requisite code into
2724 the command builder. Write dysymtab if the command is present.
2725 (bfd_mach_o_count_sections_for_seg): New.
2726 (bfd_mach_o_build_seg_command): New.
2727 (bfd_mach_o_build_dysymtab_command): New.
2728 (bfd_mach_o_build_commands): Reorganize to support the fact that some
2729 commands are optional and should not be emitted if there are no
2730 sections or symbols.
2731 (bfd_mach_o_set_section_contents): Amend comment.
2732 * mach-o.h: Amend and add to comments.
2733 (mach_o_data_struct): Add fields for dysymtab symbols counts and a
2734 pointer to the indirects, when present.
2735 (bfd_mach_o_should_emit_dysymtab): New macro.
2736 (IS_MACHO_INDIRECT): Likewise.
2737
2738 For older changes see ChangeLog-2011
2739 \f
2740 Local Variables:
2741 mode: change-log
2742 left-margin: 8
2743 fill-column: 74
2744 version-control: never
2745 End:
This page took 0.087417 seconds and 4 git commands to generate.