]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - bfd/ChangeLog
efa6cb7b4c4d9d3789da08bc156f00b40af6e54c
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
1 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
2
3 * elf64-mips.c (elf_backend_got_header_size): Correct definition.
4 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF
5 backend's GOT header size instead of hardcoding it.
6
7 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
8
9 * elf32-vax.c (elf_vax_relocate_section)
10 <R_VAX_8, R_VAX_16, R_VAX_32>: Don't check if info->shared again.
11
12 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
13
14 * elf32-vax.c (elf_vax_relocate_section)
15 <R_VAX_8, R_VAX_16, R_VAX_32>: Use section flags rather than
16 its name as the check for text sections.
17
18 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
19
20 * elf64-mips.c (mips_elf64_be_swap_reloc_out): Also make sure
21 the third reloc offset is the same as the first.
22
23 2012-05-19 Alan Modra <amodra@gmail.com>
24
25 * elf32-ppc.h (has_vle_insns, is_ppc_vle): Delete.
26 (has_tls_reloc, has_tls_get_addr_call): Move back to..
27 * elf32-ppc.c: ..here.
28 (ppc_elf_section_flags, elf_backend_section_flags): Delete.
29 (ppc_elf_modify_segment_map): Use ELF sh_flags to detect VLE sections.
30
31 2012-05-18 H.J. Lu <hongjiu.lu@intel.com>
32
33 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make
34 _DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute.
35 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
36
37 2012-05-18 Roland McGrath <mcgrathr@google.com>
38
39 * archive.c (_bfd_generic_read_ar_hdr_mag): Fix last change so as
40 not to clobber the ar_fmag field stored in ARED->arch_header.
41
42 2012-05-18 Pedro Alves <palves@redhat.com>
43
44 * mach-o.h: Don't include sysdep.h.
45
46 2012-05-18 Nick Clifton <nickc@redhat.com>
47
48 PR 14072
49 * bfd-in.h: Check for PACKAGE or PACKAGE_VERSION before
50 complaining about config.h not having been included.
51 * bfd-in2.h: Regenerate.
52
53 2012-05-18 Andreas Schwab <schwab@linux-m68k.org>
54
55 * aclocal.m4: Regenerate.
56 * Makefile.in: Regenerate.
57
58 2012-05-17 Daniel Richard G. <skunk@iskunk.org>
59 Nick Clifton <nickc@redhat.com>
60
61 PR 14072
62 * configure.in: Add check that sysdep.h has been included before
63 any system header files.
64 * configure: Regenerate.
65 * config.in: Regenerate.
66 * aclocal.m4: Regenerate.
67 * bfd-in.h: Generate an error if included before config.h.
68 * sysdep.h: Likewise.
69 * bfd-in2.h: Regenerate.
70 * compress.c: Remove #include "config.h".
71 * plugin.c: Likewise.
72 * elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h.
73 * elf64-hppa.c: Likewise.
74 * som.c: Likewise.
75 * xsymc.c: Likewise.
76
77 2012-05-17 Maciej W. Rozycki <macro@linux-mips.org>
78 Alan Modra <amodra@gmail.com>
79
80 * elf.c (ignore_section_sym): Correct comment. Don't return
81 true for absolute section.
82 (elf_map_symbols): Move stray comment. Adjust for above change.
83 Don't discard global section symbols.
84
85 2012-05-17 Alan Modra <amodra@gmail.com>
86
87 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make _DYNAMIC,
88 _GLOBAL_OFFSET_TABLE_ or _PROCEDURE_LINKAGE_TABLE_ absolute.
89 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Don't make _DYNAMIC
90 absolute.
91
92 2012-05-17 Alan Modra <amodra@gmail.com>
93
94 * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call, has_vle_insns,
95 is_ppc_vle): Move to..
96 * elf32-ppc.h: ..here, making is_ppc_vle a macro.
97
98 2012-05-16 Sergio Durigan Junior <sergiodj@redhat.com>
99
100 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma,
101 bfd_get_section_lma, bfd_get_section_alignment,
102 bfd_get_section_flags, bfd_get_section_userdata): Rewrite macros
103 in order to use the `bfd' argument.
104 * bfd-in2.h: Regenerate.
105 * elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd'
106 as the first argument for `bfd_get_section_alignment'.
107 * elf32-arm.c (create_ifunc_sections): Likewise, for
108 `bfd_set_section_alignment'.
109 * elf32-m32r.c (m32r_elf_relocate_section): Likewise, for
110 `bfd_get_section_name'.
111 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
112 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
113 (ppc_elf_relocate_section): Likewise.
114 * elf64-mmix.c (mmix_final_link_relocate): Likewise, for
115 `bfd_get_section_vma'.
116 * elf64-ppc.c (create_linkage_sections): Likewise, for
117 `bfd_set_section_alignment'.
118
119 2012-05-16 Georg-Johann Lay <avr@gjlay.de>
120
121 PR target/13503
122 * reloc.c: Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO.
123 * bfd-in2.h: Regenerate.
124 * libbfd.h: Regenrate.
125 * elf32-avr.c (elf_avr_howto_table): Rename R_AVR_8_HHI8 to
126 R_AVR_8_HLO8.
127 (avr_reloc_map): Likewise.
128
129 2012-05-16 Daniel Richard G. <skunk@iskunk.org>
130
131 PR binutils/13558
132 * bfd/aout-cris.c: Include sysdep.h before bfd.h.
133 * bfd/aout-ns32k.c: Likewise.
134 * bfd/aout-sparcle.c: Likewise.
135 * bfd/aout0.c: Likewise.
136 * bfd/bfd-in2.h: Likewise.
137 * bfd/coff-stgo32.c: Likewise.
138 * bfd/cpu-lm32.c: Likewise.
139 * bfd/cpu-microblaze.c: Likewise.
140 * bfd/cpu-score.c: Likewise.
141 * bfd/cpu-tilegx.c: Likewise.
142 * bfd/cpu-tilepro.c: Likewise.
143 * bfd/elf32-lm32.c: Likewise.
144 * bfd/elf32-microblaze.c: Likewise.
145 * bfd/elf32-score7.c: Likewise.
146 * bfd/elf32-tilepro.c: Likewise.
147 * bfd/elfxx-tilegx.c: Likewise.
148 * bfd/mach-o.h: Likewise.
149 * bfd/nlm32-ppc.c: Likewise.
150 * bfd/ns32knetbsd.c: Likewise.
151 * bfd/pef.h: Likewise.
152 * bfd/plugin.c: Likewise.
153 * bfd/stab-syms.c: Likewise.
154 * bfd/sunos.c: Likewise.
155 * bfd/syms.c: Likewise.
156 * bfd/xsym.h: Likewise.
157
158 2012-05-16 Alan Modra <amodra@gmail.com>
159
160 * elflink.c: Rename flaginfo to flinfo throughout, except..
161 (bfd_elf_lookup_section_flags): ..here, rename finfo to flaginfo.
162 Formatting, style. Simplify flag match.
163
164 2012-05-16 Alan Modra <amodra@gmail.com>
165
166 * dwarf2.c: Formatting.
167 (arange_add): Pass in unit rather than bfd. Update callers.
168 Ignore empty ranges. Don't ask for cleared memory.
169 (parse_comp_unit): Only set unit->base_address if processing
170 DW_TAG_compile_unit.
171 (find_debug_info): Optimise section lookup.
172 (place_sections): Use bfd_alloc for stash->adjusted_sections.
173 (find_line): Match previously parsed comp unit addresses as we
174 do for newly parsed comp units.
175
176 2012-05-16 Alan Modra <amodra@gmail.com>
177
178 * archive.c (_bfd_generic_read_ar_hdr_mag): Ensure sscanf
179 stops at end of ar_size field.
180
181 2012-05-16 Alan Modra <amodra@gmail.com>
182
183 PR ld/13962
184 PR ld/7023
185 * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is
186 out of range. As a special case, fix sh_info for zero sh_size.
187 Do the same for .symtab.
188
189 2012-05-15 James Murray <jsm@jsm-net.demon.co.uk>
190 Stephane Carrez <stcarrez@nerim.fr>
191
192 * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg.
193 * config.bfd: Likewise.
194 * cpu-m9s12x.c: New.
195 * cpu-m9s12xg.c: New.
196 * elf32-m68hc12.c: Add S12X and XGATE co-processor support.
197 Add option to offset S12 addresses into XGATE memory space.
198 Fix carry bug in IMM16 (IMM8 low/high) relocate.
199 * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg.
200 (ALL_MACHINES_CFILES): Likewise.
201 * reloc.c: Add S12X relocs.
202 * Makefile.in: Regenerate.
203 * bfd-in2.h: Regenerate.
204 * libbfd.h: Regenerate.
205
206 2012-05-14 James Lemke <jwlemke@codesourcery.com>
207 Catherine Moore <clm@codesourcery.com>
208
209 * bfd.c (bfd_lookup_section_flags): Add section parm.
210 * ecoff.c (bfd_debug_section): Remove flag_info initializer.
211 * elf-bfd.h (bfd_elf_section_data): Move in section_flag_info.
212 (bfd_elf_lookup_section_flags): Add section parm.
213 * elf32-ppc.c (is_ppc_vle): New function.
214 (ppc_elf_modify_segment_map): New function.
215 (elf_backend_modify_segment_map): Define.
216 (has_vle_insns): New define.
217 * elf32-ppc.h (ppc_elf_modify_segment_map): Declare.
218 * elflink.c (bfd_elf_lookup_section_flags): Add return value & parm.
219 Move in logic to omit / include a section.
220 * libbfd-in.h (bfd_link_info): Add section parm.
221 (bfd_generic_lookup_section_flags): Likewise.
222 * reloc.c (bfd_generic_lookup_section_flags): Likewise.
223 * section.c (bfd_section): Move out section_flag_info.
224 (BFD_FAKE_SECTION): Remove flag_info initializer.
225 * targets.c (_bfd_lookup_section_flags): Add section parm.
226
227 2012-05-14 Catherine Moore <clm@codesourcery.com>
228
229 * archures.c (bfd_mach_ppc_vle): New.
230 * bfd-in2.h: Regenerated.
231 * cpu-powerpc.c (bfd_powerpc_archs): New entry for vle.
232 * elf32-ppc.c (split16_format_type): New enumeration.
233 (ppc_elf_vle_split16): New function.
234 (HOWTO): Add entries for R_PPC_VLE relocations.
235 (ppc_elf_reloc_type_lookup): Handle PPC_VLE relocations.
236 (ppc_elf_section_flags): New function.
237 (ppc_elf_lookup_section_flags): New function.
238 (ppc_elf_section_processing): New function.
239 (ppc_elf_check_relocs): Handle PPC_VLE relocations.
240 (ppc_elf_relocation_section): Likewise.
241 (elf_backend_lookup_section_flags_hook): Define.
242 (elf_backend_section_flags): Define.
243 (elf_backend_section_processing): Define.
244 * elf32-ppc.h (ppc_elf_section_processing): Declare.
245 * libbfd.h: Regenerated.
246 * reloc.c (BFD_RELOC_PPC_VLE_REL8, BFD_RELOC_PPC_VLE_REL15,
247 BFD_RELOC_PPC_VLE_REL24, BFD_RELOC_PPC_VLE_LO16A,
248 BFD_RELOC_PPC_VLE_LO16D, BFD_RELOC_PPC_VLE_HI16A,
249 BFD_RELOC_PPC_VLE_HI16D, BFD_RELOC_PPC_VLE_HA16A,
250 BFD_RELOC_PPC_VLE_HA16D, BFD_RELOC_PPC_VLE_SDA21,
251 BFD_RELOC_PPC_VLE_SDA21_LO, BFD_RELOC_PPC_VLE_SDAREL_LO16A,
252 BFD_RELOC_PPC_VLE_SDAREL_LO16D, BFD_RELOC_PPC_VLE_SDAREL_HI16A,
253 BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A,
254 BFD_RELOC_PPC_VLE_SDAREL_HA16D): New bfd relocations.
255
256 2012-05-11 Georg-Johann Lay <avr@gjlay.de>
257
258 PR target/13503
259 * reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
260 BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
261 * bfd-in2.h: Regenerate.
262 * libbfd.h: Regenrate.
263 * elf32-avr.c (elf_avr_howto_table): Add entries for
264 R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
265 (avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
266 R_AVR_8_HHI8.
267
268 2012-05-10 H.J. Lu <hongjiu.lu@intel.com>
269
270 * elf64-x86-64.c (elf_x86_64_relocate_section): Use int in x32
271 addend overflow check.
272
273 2012-05-10 DJ Delorie <dj@redhat.com>
274
275 * elf32-rx.c (rx_elf_object_p): Ignore empty segments.
276
277 2012-05-10 H.J. Lu <hongjiu.lu@intel.com>
278
279 * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed
280 hex number in x32 addend overflow check.
281
282 2012-05-10 H.J. Lu <hongjiu.lu@intel.com>
283
284 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Handle
285 R_X86_64_RELATIVE64.
286
287 2012-05-09 H.J. Lu <hongjiu.lu@intel.com>
288
289 * elf64-x86-64.c (elf_x86_64_relocate_section): Check addend
290 overflow for R_X86_64_RELATIVE64.
291
292 2012-05-08 Ben Cheng <bccheng@google.com>
293
294 * elf.c: Preserve the original p_align and p_flags if they are
295 valid.
296
297 2012-05-07 Alan Modra <amodra@gmail.com>
298
299 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Update
300 RELOC_AGAINST_DISCARDED_SECTION invocation.
301
302 2012-05-07 Hans-Peter Nilsson <hp@axis.com>
303
304 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Declare and use
305 local variable i_ instead of assuming and using a variable i.
306
307 2012-05-07 Maciej W. Rozycki <macro@linux-mips.org>
308
309 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compound
310 relocations.
311 * elfxx-mips.c (mips_reloc_against_discarded_section): New
312 function.
313 (_bfd_mips_elf_relocate_section): Call it, in place of
314 RELOC_AGAINST_DISCARDED_SECTION.
315 * elf-m10200.c (mn10200_elf_relocate_section): Update arguments
316 to RELOC_AGAINST_DISCARDED_SECTION.
317 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
318 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
319 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
320 * elf32-bfin.c (bfin_relocate_section): Likewise.
321 (bfinfdpic_relocate_section): Likewise.
322 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
323 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
324 * elf32-cris.c (cris_elf_relocate_section): Likewise.
325 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
326 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
327 * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
328 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
329 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
330 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
331 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
332 * elf32-i370.c (i370_elf_relocate_section): Likewise.
333 * elf32-i386.c (elf_i386_relocate_section): Likewise.
334 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
335 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
336 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
337 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
338 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
339 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
340 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
341 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
342 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
343 * elf32-mep.c (mep_elf_relocate_section): Likewise.
344 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
345 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
346 * elf32-mt.c (mt_elf_relocate_section): Likewise.
347 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
348 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
349 * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
350 * elf32-rx.c (rx_elf_relocate_section): Likewise.
351 * elf32-s390.c (elf_s390_relocate_section): Likewise.
352 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
353 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
354 * elf32-sh.c (sh_elf_relocate_section): Likewise.
355 * elf32-spu.c (spu_elf_relocate_section): Likewise.
356 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
357 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
358 * elf32-v850.c (v850_elf_relocate_section): Likewise.
359 * elf32-vax.c (elf_vax_relocate_section): Likewise.
360 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
361 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
362 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
363 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
364 (elf64_alpha_relocate_section): Likewise.
365 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
366 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
367 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
368 * elf64-s390.c (elf_s390_relocate_section): Likewise.
369 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
370 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
371 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
372 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
373 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
374
375 2012-05-05 Alan Modra <amodra@gmail.com>
376
377 PR ld/14052
378 PR ld/13621
379 * linker.c (_bfd_nearby_section): Revert 2012-02-13 change.
380
381 2012-05-05 Alan Modra <amodra@gmail.com>
382
383 * aout-arm.c: Replace all uses of bfd_abs_section, bfd_com_section,
384 bfd_und_section and bfd_ind_section with their _ptr variants, or
385 use corresponding bfd_is_* macros.
386 * aout-ns32k.c: Likewise.
387 * aout-tic30.c: Likewise.
388 * coff-arm.c: Likewise.
389 * coff-tic54x.c: Likewise.
390 * cpu-ns32k.c: Likewise.
391 * elf-attrs.c: Likewise.
392 * elfcode.h: Likewise.
393 * peicode.h: Likewise.
394 * reloc.c: Likewise.
395 * riscix.c: Likewise.
396 * versados.c: Likewise.
397 * section.c: Likewise.
398 (bfd_abs_section, bfd_ind_section, bfd_com_section,
399 bfd_ind_section): Delete.
400 (std_section): New array replacing above.
401 (bfd_abs_section_ptr, bfd_ind_section_ptr, bfd_com_section_ptr,
402 bfd_ind_section_ptr, STD_SECTION): Update.
403 (BFD_FAKE_SECTION, GLOBAL_SYM_INIT): Remove unnecessary casts.
404 * bfd-in2.h: Regenerate.
405
406 2012-05-03 Sean Keys <skeys@ipdatasys.com>
407
408 * cpu-xgate.c: New file. Added XGATE support.
409 * archures.c (bfd_architecture): Add XGATE architecture.
410 (bfd_archures_list): Add reference to XGATE architecture info.
411 * elf-bfd.h (prep_headers): Handle bfd_arch_xgate.
412 * reloc.c: Add various XGATE relocation enums.
413 * targets.c (bfd_elf32_xgate_vec): Declare and add to target vector
414 list.
415 * Makefile.am: Add support for XGATE elf.
416 * configure.in: Ditto.
417 * config.bfd: Ditto.
418 * Makefile.in: Regenerate.
419 * configure: Ditto.
420 * bfd-in2.h: Ditto.
421 * libbfd.h: Ditto.
422 Added files for XGATE relocations.
423 * elf32-xgate.c: Created minimal relocation file.
424 * elf32-xgate.h: Created minimal header file for elf32-xgate.
425
426 2012-05-03 Tristan Gingold <gingold@adacore.com>
427
428 * dwarf2.c (decode_line_info): Ignore
429 DW_LNE_HP_source_file_correlation.
430
431 2012-05-01 Nick Clifton <nickc@redhat.com>
432
433 PR binutils/13121
434 * aoutx.h: Rename 'finfo' to 'flaginfo' to avoid conflicts with
435 AIX system headers.
436 * coff-ppc.c: Likewise.
437 * cofflink.c: Likewise.
438 * elf32-arm.c: Likewise.
439 * elf64-sparc.c: Likewise.
440 * elflink.c: Likewise.
441 * pdp11.c: Likewise.
442 * rescoff.c: Likewise.
443
444 2012-04-26 Mark Wielaard <mjw@redhat.com>
445
446 * dwarf2.c (scan_unit_for_symbols): Account for DW_AT_high_pc
447 possibly being relative to DW_AT_low_pc.
448 (parse_comp_unit): Likewise.
449
450 2012-04-26 Andreas Schwab <schwab@linux-m68k.org>
451
452 * elf32-m68k.c (elf_m68k_check_relocs): Mark non-GOT references
453 also when generating PIE.
454 (elf_m68k_discard_copies): Mark undefined weak symbols referenced
455 by relocations as dynamic.
456
457 2012-04-26 Hans-Peter Nilsson <hp@axis.com>
458
459 Provide a way for programs to recognize BFD_ASSERT calls.
460 * bfd.c (bfd_assert_handler_type): New API type.
461 (bfd_set_assert_handler, bfd_get_assert_handler): New API functions.
462 (_bfd_assert_handler): New variable.
463 (_bfd_default_assert_handler): New function.
464 (bfd_assert): Call _bfd_assert_handler, not _bfd_error_handler.
465 * libbfd-in.h (_bfd_assert_handler): Declare.
466 * libbfd.h, bfd-in2.h: Regenerate.
467
468 2012-04-24 Hans-Peter Nilsson <hp@axis.com>
469
470 PR ld/13990
471 * elf32-arm.c (elf32_arm_gc_sweep_hook): Handle a forced-local
472 symbol, where PLT refcount is set to -1.
473
474 2012-04-24 Alan Modra <amodra@gmail.com>
475
476 PR ld/13991
477 * elf-bfd.h (_bfd_elf_link_just_syms): Define as
478 _bfd_generic_link_just_syms.
479 * elflink.c (_bfd_elf_link_just_syms): Delete.
480 * linker.c (_bfd_generic_link_just_syms): Set sec_info_type.
481
482 * bfd-in.h (discarded_section): Renamed from elf_discarded_section.
483 * section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS,
484 SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME,
485 SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE.
486 * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
487 * elf.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
488 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c,
489 * elf32-crx.c, * elf32-d10v.c, * elf32-epiphany.c,
490 * elf32-fr30.c, * elf32-frv.c, * elf32-h8300.c,
491 * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c,
492 * elf32-i860.c, * elf32-ip2k.c, * elf32-iq2000.c,
493 * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c,
494 * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
495 * elf32-mep.c, * elf32-moxie.c, * elf32-msp430.c,
496 * elf32-mt.c, * elf32-openrisc.c, * elf32-ppc.c,
497 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c,
498 * elf32-score.c, * elf32-score7.c, * elf32-sh.c,
499 * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c,
500 * elf32-v850.c, * elf32-vax.c, * elf32-xc16x.c,
501 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
502 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
503 * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c,
504 * elf64-x86-64.c, * elflink.c, * elfnn-ia64.c,
505 * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c,
506 * reloc.c: Update all references.
507 * bfd-in2.h: Regenerate.
508
509 2012-04-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
510
511 * elf32-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
512 * elf64-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
513
514 2012-04-19 Thomas Schwinge <thomas@codesourcery.com>
515
516 * elf32-sh.c (elf_sh_link_hash_entry): Specify an enum identifier for
517 got_type.
518 (allocate_dynrelocs, sh_elf_relocate_section, sh_elf_check_relocs): Use
519 it.
520
521 2012-04-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
522
523 * elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic
524 relocations when LE conversion happens on the IE tls symbol.
525
526 2012-04-17 Roland McGrath <mcgrathr@google.com>
527
528 * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding
529 so that 32-byte boundary is a proper instruction boundary.
530
531 2012-04-17 Tristan Gingold <gingold@adacore.com>
532
533 * vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to
534 member of an object archive.<
535
536 2012-04-17 Tristan Gingold <gingold@adacore.com>
537
538 * vms-lib.c (MAX_EKEYLEN): Define.
539 (MAX_KEYLEN): Fix value.
540 (vms_write_index): Add comments and fix indentation.
541 Adjust comparaison. Add assertions. Free kbn_blk.
542 (_bfd_vms_lib_write_archive_contents): Use MAX_EKEYLEN.
543 Compense MAX_KEYLEN adjustment.
544
545 2012-04-16 Maciej W. Rozycki <macro@linux-mips.org>
546
547 * elfxx-mips.c (mips16_stub_symndx): Handle n64 compound relocs.
548 (_bfd_mips_elf_check_relocs): Update accordingly.
549
550 2012-04-13 Alan Modra <amodra@gmail.com>
551
552 PR ld/13947
553 * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for
554 reloc sections.
555
556 2012-04-12 David S. Miller <davem@davemloft.net>
557
558 * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32,
559 BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs.
560 * libbfd.h: Regenerate.
561 * bfd-in2.h: Likewise.
562 * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function.
563 (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34,
564 R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10.
565 (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs.
566 (_bfd_sparc_elf_check_relocs): Likewise.
567 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
568 (_bfd_sparc_elf_relocate_section): Likewise.
569
570 2012-04-12 Roland McGrath <mcgrathr@google.com>
571
572 * elf32-arm.c (elf32_arm_nacl_plt0_entry, elf32_arm_nacl_plt_entry):
573 New variables.
574 (struct elf32_arm_link_hash_table): New member `nacl_p'.
575 (elf32_arm_link_hash_table_create): Initialize it.
576 (elf32_arm_nacl_link_hash_table_create): New function.
577 (arm_movw_immediate, arm_movt_immediate): New functions.
578 (elf32_arm_populate_plt_entry): Test HTAB->nacl_p.
579 (elf32_arm_finish_dynamic_sections): Likewise.
580 (elf32_arm_output_plt_map_1): Likewise.
581 (bfd_elf32_littlearm_nacl_vec, bfd_elf32_bigarm_nacl_vec):
582 New backend vector stanza.
583 (elf32_arm_nacl_modify_segment_map): New function.
584 * config.bfd: Handle arm-*-nacl*, armeb-*-nacl*.
585 * targets.c: Support bfd_elf32_{big,little}_nacl_vec.
586 * configure.in: Likewise.
587 (bfd_elf32_bigarm_nacl_vec): Add elf-nacl.lo here.
588 (bfd_elf32_littlearm_nacl_vec): Likewise.
589 (bfd_elf32_bigarm_vec, bfd_elf32_littlearm_vec): Likewise.
590 (bfd_elf32_bigarm_symbian_vec): Likewise.
591 (bfd_elf32_littlearm_symbian_vec): Likewise.
592 (bfd_elf32_bigarm_vxworks_vec): Likewise.
593 (bfd_elf32_littlearm_vxworks_vec): Likewise.
594 * configure: Regenerated.
595
596 2012-04-12 Tristan Gingold <gingold@adacore.com>
597
598 * elflink.c (elf_link_output_extsym): Add a guard.
599 (bfd_elf_final_link): Remove assertion.
600 (bfd_elf_final_link): Add a guard.
601 * elfnn-ia64.c (INCLUDE_IA64_VMS): Removed.
602 (elfNN_vms_section_from_shdr, elfNN_vms_object_p)
603 (elfNN_vms_post_process_headers, elfNN_vms_section_processing)
604 (elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup):
605 Remove.
606 (elfNN-ia64-vms target): Move to ...
607 * elf64-ia64-vms.c: New file.
608 * configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo
609 * Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo.
610 (BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c.
611 * configure: Regenerate.
612 * Makefile.in: Regenerate.
613
614 2012-04-11 Nick Clifton <nickc@redhat.com>
615
616 PR binutils/13897
617 * elf64-ppc.c (opd_entry_value): When dealing with sections
618 without relocs, keep the last section loaded in order to avoid
619 unnecessary reloads.
620
621 2012-04-09 Roland McGrath <mcgrathr@google.com>
622
623 * elf.c (_bfd_elf_map_sections_to_segments): Set INFO->user_phdrs.
624 * elf-nacl.c (nacl_modify_segment_map): Do nothing if INFO->user_phdrs.
625 (nacl_modify_program_headers): Likewise.
626
627 2012-04-03 Roland McGrath <mcgrathr@google.com>
628
629 * elf-nacl.c: New file.
630 * elf-nacl.h: New file.
631 * elf32-i386.c (elf_backend_modify_segment_map): Define for
632 bfd_elf32_i386_nacl_vec.
633 (elf_backend_modify_program_headers): Likewise.
634 * elf64-x86-64.c (elf_backend_modify_segment_map): Define for
635 bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec.
636 (elf_backend_modify_program_headers): Likewise.
637 * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here.
638 (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here.
639 * Makefile.in: Regenerated.
640 * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here.
641 (bfd_elf32_x86_64_nacl_vec): Likewise.
642 (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise.
643 (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise.
644 (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise.
645 (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise.
646 (bfd_elf32_i386_nacl_vec): Likewise.
647 (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise.
648 (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise.
649 * configure: Regenerated.
650
651 2012-03-31 Andreas Schwab <schwab@linux-m68k.org>
652
653 * elf32-m68k.c (elf_m68k_relocate_section): Allow
654 R_68K_TLS_LE{8,16,32} for PIE.
655
656 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
657
658 * elf64-s390.c: Fix several comments regarding PLT entry
659 description.
660 * elf32-s390.c: Likewise.
661
662 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
663
664 * elf64-s390.c: Use the section pointer shortcuts in
665 elf_link_hash_table and remove them from the target specific
666 variant.
667 * elf32-s390.c: Likewise.
668
669 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
670
671 * elf64-s390.c (elf_s390x_plt_entry, elf_s390x_first_plt_entry):
672 New definitions.
673 (PLT_PIC_ENTRY_WORD*, PLT_PIC12_ENTRY_WORD*): Remove.
674 (elf_s390_finish_dynamic_symbol): Use memcpy instead of bfd_put_32.
675 (elf_s390_finish_dynamic_sections): Likewise.
676 * elf32-s390.c (elf_s390_plt_entry, elf_s390_plt_pic_entry)
677 (elf_s390_plt_pic12_entry, elf_s390_plt_pic16_entry)
678 (elf_s390_plt_first_entry, elf_s390_plt_pic_first_entry): New definitions.
679 (PLT_PIC16_ENTRY_WORD*, PLT_ENTRY_WORD*)
680 (PLT_PIC_FIRST_ENTRY_WORD*, PLT_FIRST_ENTRY_WORD*): Remove.
681
682 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
683
684 * elf32-s390.c (struct elf_s390_dyn_relocs): Remove.
685 Rename all occurrences in the file to elf_dyn_relocs.
686 * elf64-s390.c: Likewise.
687
688 2012-03-30 Alan Modra <amodra@gmail.com>
689
690 * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic
691 libraries.
692
693 2012-03-29 Alan Modra <amodra@gmail.com>
694
695 * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete.
696 * bfd-in2.h: Regenerate.
697
698 2012-03-23 Alan Modra <amodra@gmail.com>
699
700 * elf.c (assign_file_positions_for_non_load_sections): Don't warn
701 on empty alloc sections.
702
703 2012-03-23 Alan Modra <amodra@gmail.com>
704
705 * linker.c (_bfd_nearby_section): New function, split out from..
706 (fix_syms): ..here.
707 * bfd-in.h (_bfd_nearby_section): Declare.
708 * bfd-in2.h: Regenerate.
709 * elflink.c (elf_link_input_bfd): Don't use text_index_section or
710 data_index_section with ld -q or ld -r output relocs against
711 stripped output sections. Instead use _bfd_nearby_section.
712
713 2012-03-23 Alan Modra <amodra@gmail.com>
714
715 PR binutils/13894
716 * elf64-ppc.c (opd_entry_value): Read full symbol table when
717 sym hashes unavailable.
718
719 2012-03-21 Eliot Dresselhaus <eliot@sonic.net>
720
721 * elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE
722 for non-C6X objects.
723
724 2012-03-20 Kai Tietz <ktietz@redhat.com>
725
726 PR ld/12742
727 * configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h.
728 * plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined.
729 Add windows.h header include if HAVE_WINDOWS_H is defined.
730 (dlerror): New static function if windows variant is used instead
731 of dlfcn.h.
732 (dlclose): Likewise.
733 (dlopen): Likewise.
734 (dlsym): Likewise.
735 * configure: Regenerated.
736 * config.in: Regenerated.
737
738 2012-03-20 H.J. Lu <hongjiu.lu@intel.com>
739
740 PR ld/13880
741 * elf32-i386.c (elf_i386_relocate_section): Don't issue an error
742 for R_386_GOTOFF relocation against protected function if
743 SYMBOLIC_BIND is true.
744
745 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an
746 error for R_X86_64_GOTOFF64 relocation against protected function
747 when building executable or SYMBOLIC_BIND is true.
748
749 2012-03-16 Roland McGrath <mcgrathr@google.com>
750
751 * config.bfd: Handle x86_64-*-nacl*.
752 * elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza.
753 (bfd_elf32_x86_64_nacl_vec): Likewise.
754 * targets.c: Support them.
755 * configure.in: Likewise.
756 * configure: Regenerated.
757
758 2012-03-16 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
759
760 * elf32-arm.c (elf32_arm_attributes_accept_div): New function.
761 (elf32_arm_attributes_forbid_div): Likewise.
762 (elf32_arm_merge_eabi_attributes): Correct handling of
763 Tag_DIV_use.
764
765 2012-03-15 Roland McGrath <mcgrathr@google.com>
766
767 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use
768 elf_x86_64_backend_data parameters for plt_eh_frame.
769
770 * elf64-x86-64.c (struct elf_x86_64_backend_data): New type.
771 (get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros.
772 (elf_x86_64_arch_bed): New variable.
773 (elf_backend_arch_data): New macro.
774 (elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE.
775 (elf_x86_64_allocate_dynrelocs): Likewise.
776 (elf_x86_64_relocate_section): Likewise.
777 (elf_x86_64_plt_sym_val): Likewise.
778 (elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data
779 parameters for PLT details.
780 (elf_x86_64_finish_dynamic_sections): Likewise.
781
782 2012-03-14 Roland McGrath <mcgrathr@google.com>
783
784 * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up
785 to the full size, padding out with nop instructions.
786
787 2012-03-12 Alan Modra <amodra@gmail.com>
788
789 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't warn
790 on zero size dynbss symbol.
791 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
792 * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
793 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
794 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
795 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
796 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
797 * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
798 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
799 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
800 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
801 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
802 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
803 * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
804 * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise.
805 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
806 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
807 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
808 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
809 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
810 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
811 * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise.
812
813 2012-03-10 Edmar Wienskoski <edmar@freescale.com>
814
815 * archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
816 * bfd-in2.h: Regenerate.
817 * cpu-powerpc.c (bfd_powerpc_archs): Add entries for
818 bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
819
820 2012-03-09 H.J. Lu <hongjiu.lu@intel.com>
821
822 PR ld/13817
823 * elf32-i386.c (elf_i386_relocate_section): Restore
824 R_386_IRELATIVE.
825
826 * elf64-x86-64.c (elf_x86_64_relocate_section): Restore
827 R_X86_64_IRELATIVE.
828
829 2012-03-08 Tristan Gingold <gingold@adacore.com>
830
831 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum
832 keylen according to archive kind. Set nextvbn and nextrfa lhd
833 fields. Add comments.
834
835 2012-03-07 Nick Clifton <nickc@redhat.com>
836
837 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type
838 field.
839 (elf32_mn10300_link_hash_table): Add tls_ldm_got entry;
840 (elf_mn10300_tdata): Define.
841 (elf_mn10300_local_got_tls_type): Define.
842 (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD,
843 R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
844 R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
845 R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs.
846 (mn10300_reloc_map): Likewise.
847 (elf_mn10300_tls_transition): New function.
848 (dtpoff, tpoff, mn10300_do_tls_transition): New functions.
849 (mn10300_elf_check_relocs): Add TLS support.
850 (mn10300_elf_final_link_relocate): Likewise.
851 (mn10300_elf_relocate_section): Likewise.
852 (mn10300_elf_relax_section): Likewise.
853 (elf32_mn10300_link_hash_newfunc): Initialise new field.
854 (_bfd_mn10300_copy_indirect_symbol): New function.
855 (elf32_mn10300_link_hash_table_create): Initialise new fields.
856 (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support.
857 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
858 (_bfd_mn10300_elf_reloc_type_class): Allocate an
859 elf_mn10300_obj_tdata structure.
860 (elf_backend_copy_indirect_symbol): Define.
861 * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD,
862 BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE,
863 BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD,
864 BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations.
865 (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to
866 alongside other MN10300 relocations.
867 * bfd-in2.h: Regenerate.
868 * libbfd.h: Regenerate.
869
870 2012-03-06 Jakub Jelinek <jakub@redhat.com>
871
872 * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE
873 set relocate to TRUE.
874
875 2012-03-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
876
877 PR ld/12152
878 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore
879 overflows for R_SPARC_UA32 in .stab sections.
880
881 2012-03-01 Alan Modra <amodra@gmail.com>
882
883 * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning.
884
885 2012-02-27 Alan Modra <amodra@gmail.com>
886
887 * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd
888 before calling elf specific function.
889 (sh_elf_osec_readonly_p): Test for error return from above.
890
891 2012-02-27 Alan Modra <amodra@gmail.com>
892
893 * elf32-spu.c (build_stub): Fix malloc under-allocation.
894
895 2012-02-25 Walter Lee <walt@tilera.com>
896 * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL,
897 BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
898 BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
899 BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
900 BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
901 BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
902 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
903 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
904 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
905 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
906 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
907 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
908 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
909 BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
910 BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
911 BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
912 BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
913 BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
914 BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
915 BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
916 BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
917 BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
918 BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD,
919 BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
920 BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
921 BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD.
922 Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT,
923 BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT,
924 BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT,
925 BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT,
926 BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT,
927 BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT,
928 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT,
929 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT,
930 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD,
931 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD,
932 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD,
933 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD,
934 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD,
935 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD,
936 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD,
937 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD,
938 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE,
939 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE,
940 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE,
941 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE,
942 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE,
943 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE,
944 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE,
945 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE.
946 * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro
947 relocations.
948 (tilepro_reloc_map): Ditto.
949 (tilepro_info_to_howto_rela): Ditto.
950 (reloc_to_create_func): Ditto.
951 (tilepro_tls_translate_to_le): New.
952 (tilepro_tls_translate_to_ie): New.
953 (tilepro_elf_tls_transition): New.
954 (tilepro_elf_check_relocs): Handle new tls relocations.
955 (tilepro_elf_gc_sweep_hook): Ditto.
956 (allocate_dynrelocs): Ditto.
957 (tilepro_elf_relocate_section): Ditto.
958 (tilepro_replace_insn): New.
959 (insn_mask_X1): New.
960 (insn_mask_X0_no_dest_no_srca): New
961 (insn_mask_X1_no_dest_no_srca): New
962 (insn_mask_Y0_no_dest_no_srca): New
963 (insn_mask_Y1_no_dest_no_srca): New
964 (srca_mask_X0): New
965 (srca_mask_X1): New
966 (insn_tls_le_move_X1): New
967 (insn_tls_le_move_zero_X0X1): New
968 (insn_tls_ie_lw_X1): New
969 (insn_tls_ie_add_X0X1): New
970 (insn_tls_ie_add_Y0Y1): New
971 (insn_tls_gd_add_X0X1): New
972 (insn_tls_gd_add_Y0Y1): New
973 * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx
974 relocations.
975 (tilegx_reloc_map): Ditto.
976 (tilegx_info_to_howto_rela): Ditto.
977 (reloc_to_create_func): Ditto.
978 (tilegx_elf_link_hash_table): New field disable_le_transition.
979 (tilegx_tls_translate_to_le): New.
980 (tilegx_tls_translate_to_ie): New.
981 (tilegx_elf_tls_transition): New.
982 (tilegx_elf_check_relocs): Handle new tls relocations.
983 (tilegx_elf_gc_sweep_hook): Ditto.
984 (allocate_dynrelocs): Ditto.
985 (tilegx_elf_relocate_section): Ditto.
986 (tilegx_copy_bits): New.
987 (tilegx_replace_insn): New.
988 (insn_mask_X1): New.
989 (insn_mask_X0_no_dest_no_srca): New.
990 (insn_mask_X1_no_dest_no_srca): New.
991 (insn_mask_Y0_no_dest_no_srca): New.
992 (insn_mask_Y1_no_dest_no_srca): New.
993 (insn_mask_X0_no_operand): New.
994 (insn_mask_X1_no_operand): New.
995 (insn_mask_Y0_no_operand): New.
996 (insn_mask_Y1_no_operand): New.
997 (insn_tls_ie_ld_X1): New.
998 (insn_tls_ie_ld4s_X1): New.
999 (insn_tls_ie_add_X0X1): New.
1000 (insn_tls_ie_add_Y0Y1): New.
1001 (insn_tls_ie_addx_X0X1): New.
1002 (insn_tls_ie_addx_Y0Y1): New.
1003 (insn_tls_gd_add_X0X1): New.
1004 (insn_tls_gd_add_Y0Y1): New.
1005 (insn_move_X0X1): New.
1006 (insn_move_Y0Y1): New.
1007 (insn_add_X0X1): New.
1008 (insn_add_Y0Y1): New.
1009 (insn_addx_X0X1): New.
1010 (insn_addx_Y0Y1): New.
1011 * libbfd.h: Regenerate.
1012 * bfd-in2.h: Regenerate.
1013
1014 2012-02-25 Walter Lee <walt@tilera.com>
1015
1016 * config.bfd (tilegx-*-*): rename little endian vector; add big
1017 endian vector.
1018 (tilegxbe-*-*): New case.
1019 * configure.in (bfd_elf32_tilegx_vec): Rename...
1020 (bfd_elf32_tilegx_le_vec): ... to this.
1021 (bfd_elf32_tilegx_be_vec): New vector.
1022 (bfd_elf64_tilegx_vec): Rename...
1023 (bfd_elf64_tilegx_le_vec): ... to this.
1024 (bfd_elf64_tilegx_be_vec): New vector.
1025 * configure: Regenerate.
1026 * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename.
1027 (TARGET_LITTLE_NAME): Ditto.
1028 (TARGET_BIG_SYM): Define.
1029 (TARGET_BIG_NAME): Define.
1030 * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename.
1031 (TARGET_LITTLE_NAME): Ditto.
1032 (TARGET_BIG_SYM): Define.
1033 (TARGET_BIG_NAME): Define.
1034 * targets.c (bfd_elf32_tilegx_vec): Rename...
1035 (bfd_elf32_tilegx_le_vec): ... to this.
1036 (bfd_elf32_tilegx_be_vec): Declare.
1037 (bfd_elf64_tilegx_vec): Rename...
1038 (bfd_elf64_tilegx_le_vec): ... to this.
1039 (bfd_elf64_tilegx_be_vec): Declare.
1040 (_bfd_target_vector): Add / rename above vectors.
1041 * arctures.c (bfd_architecture): Define bfd_mach_tilegx32.
1042 * bfd-in2.h: Regenerate.
1043 * cpu-tilegx.c (bfd_tilegx32_arch): define.
1044 (bfd_tilegx_arch): link to bfd_tilegx32_arch.
1045
1046 2012-02-24 Nick Clifton <nickc@redhat.com>
1047
1048 PR ld/13730
1049 * reloc.c (bfd_generic_get_relocated_section_contents): Issue an
1050 error message instead of aborting, when an outofrange reloc is
1051 encountered.
1052
1053 2012-02-23 Iain Sandoe <idsandoe@googlemail.com>
1054
1055 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New.
1056 (bfd_mach_o_canonicalize_one_reloc): Swap non-scattered reloc
1057 bit-fields when target and host differ in endian-ness. When
1058 PAIRs are non-scattered find the 'symbol' from the preceding
1059 reloc. Add FIXME re. reloc symbols on section boundaries.
1060 (bfd_mach_o_swap_out_non_scattered_reloc): New.
1061 (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc.
1062
1063 2012-02-17 Iain Sandoe <idsandoe@googlemail.com>
1064
1065 * mach-o-i386.c (i386_howto_table): Add support for 16 bit
1066 sect-diffs.
1067 (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs.
1068 (bfd_mach_o_i386_swap_reloc_out): Likewise.
1069
1070 2012-02-17 Tristan Gingold <gingold@adacore.com>
1071
1072 * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF):
1073 * libbfd.h: Regenerated.
1074 * bfd-in2.h: Likewise.
1075 * mach-o-i386.c (i386_howto_table): Include local sectdiff.
1076 (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff.
1077 (bfd_mach_o_i386_swap_reloc_out): Likewise.
1078
1079 2012-02-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1080
1081 * elf32-s390.c (elf_s390_relocate_section): Support basr in the
1082 GD->LE and LD->LE optimizations.
1083
1084 2012-02-16 Alan Modra <amodra@gmail.com>
1085
1086 PR binutils/13355
1087 * elf32-rx.c (elf32_rx_relax_section): Correct width check.
1088
1089 2012-02-13 Richard Henderson <rth@redhat.com>
1090
1091 PR ld/13621
1092 * linker.c (fix_syms): Force symbols outside any section into
1093 bfd_abs_section_ptr.
1094
1095 2012-02-13 Alan Modra <amodra@gmail.com>
1096
1097 * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function.
1098 * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare.
1099 * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define.
1100 * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define.
1101
1102 2012-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
1103 Nick Clifton <nickc@redhat.com>
1104
1105 * oasys.c (oasys_write_header): Fix compilation warning on zero-sized
1106 memset.
1107
1108 2012-02-10 Iain Sandoe <idsandoe@googlemail.com>
1109
1110 * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section
1111 vma additions in their logical, rather than physical order.
1112
1113 2012-02-10 Iain Sandoe <idsandoe@googlemail.com>
1114
1115 * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section
1116 parameters.
1117 * mach-o-x86-64.c (text_section_names_xlat): New.
1118 (mach_o_x86_64_segsec_names_xlat): New.
1119 (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat.
1120 * mach-o-i386.c (text_section_names_xlat): Correct section parameters.
1121
1122 2012-02-10 Tristan Gingold <gingold@adacore.com>
1123
1124 * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator
1125 to avoid infinite loop. Add comments.
1126
1127 2012-02-09 H.J. Lu <hongjiu.lu@intel.com>
1128
1129 PR ld/13675
1130 * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte
1131 nop instructions.
1132 (bfd_arch_i386_short_nop_fill): New.
1133 (bfd_arch_i386_long_nop_fill): Likewise.
1134 Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info
1135 initializers. Use bfd_arch_i386_long_nop_fill on 64bit
1136 bfd_arch_info initializers.
1137
1138 * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ...
1139 (bfd_arch_i386_short_nop_fill): This.
1140 Update bfd_arch_info initializers.
1141 * cpu-l1om.c: Likewise.
1142
1143 2012-02-08 Alan Modra <amodra@gmail.com>
1144
1145 * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too.
1146 (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear
1147 the correct h->u.weakdef.
1148
1149 2012-02-07 Alan Modra <amodra@gmail.com>
1150
1151 * elf.c (elf_find_function): Don't use internal_elf_sym.
1152 (_bfd_elf_maybe_function_sym): Likewise. Replace elf_symbol_type
1153 parameter with asymbol.
1154 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
1155 * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype.
1156 (struct elf_backend_data <maybe_function_sym>): Likewise.
1157
1158 2012-02-02 Vidya Praveen (vidya.praveen@atmel.com)
1159
1160 PR bfd/13410
1161 * elf32-avr.c (elf32_avr_relax_section): Correct the
1162 condition that qualifies the candidates for relaxation.
1163
1164 2012-02-02 Tristan Gingold <gingold@adacore.com>
1165
1166 * bfdio.c (real_fopen): Remove unused vms_modes variable.
1167
1168 2012-02-02 Tristan Gingold <gingold@adacore.com>
1169
1170 * mach-o.c (bfd_mach_o_read_header): Silent uninitialized
1171 variable warning.
1172
1173 2012-02-02 Tristan Gingold <gingold@adacore.com>
1174
1175 * archive.c (bfd_slurp_armap): Fix thinko in cast.
1176
1177 2012-01-31 H.J. Lu <hongjiu.lu@intel.com>
1178
1179 PR ld/13616
1180 * archures.c (bfd_arch_info): Add fill.
1181 (bfd_default_arch_struct): Add bfd_arch_default_fill.
1182 (bfd_arch_default_fill): New.
1183
1184 * configure.in: Set bfd version to 2.22.52.
1185 * configure: Regenerated.
1186
1187 * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info
1188 initializer.
1189 * cpu-arc.c: Likewise.
1190 * cpu-arm.c: Likewise.
1191 * cpu-avr.c: Likewise.
1192 * cpu-bfin.c: Likewise.
1193 * cpu-cr16.c: Likewise.
1194 * cpu-cr16c.c: Likewise.
1195 * cpu-cris.c: Likewise.
1196 * cpu-crx.c: Likewise.
1197 * cpu-d10v.c: Likewise.
1198 * cpu-d30v.c: Likewise.
1199 * cpu-dlx.c: Likewise.
1200 * cpu-epiphany.c: Likewise.
1201 * cpu-fr30.c: Likewise.
1202 * cpu-frv.c: Likewise.
1203 * cpu-h8300.c: Likewise.
1204 * cpu-h8500.c: Likewise.
1205 * cpu-hppa.c: Likewise.
1206 * cpu-i370.c: Likewise.
1207 * cpu-i860.c: Likewise.
1208 * cpu-i960.c: Likewise.
1209 * cpu-ia64.c: Likewise.
1210 * cpu-ip2k.c: Likewise.
1211 * cpu-iq2000.c: Likewise.
1212 * cpu-lm32.c: Likewise.
1213 * cpu-m10200.c: Likewise.
1214 * cpu-m10300.c: Likewise.
1215 * cpu-m32c.c: Likewise.
1216 * cpu-m32r.c: Likewise.
1217 * cpu-m68hc11.c: Likewise.
1218 * cpu-m68hc12.c: Likewise.
1219 * cpu-m68k.c: Likewise.
1220 * cpu-m88k.c: Likewise.
1221 * cpu-mcore.c: Likewise.
1222 * cpu-mep.c: Likewise.
1223 * cpu-microblaze.c: Likewise.
1224 * cpu-mips.c: Likewise.
1225 * cpu-mmix.c: Likewise.
1226 * cpu-moxie.c: Likewise.
1227 * cpu-msp430.c: Likewise.
1228 * cpu-mt.c: Likewise.
1229 * cpu-ns32k.c: Likewise.
1230 * cpu-openrisc.c: Likewise.
1231 * cpu-or32.c: Likewise.
1232 * cpu-pdp11.c: Likewise.
1233 * cpu-pj.c: Likewise.
1234 * cpu-plugin.c: Likewise.
1235 * cpu-powerpc.c: Likewise.
1236 * cpu-rl78.c: Likewise.
1237 * cpu-rs6000.c: Likewise.
1238 * cpu-rx.c: Likewise.
1239 * cpu-s390.c: Likewise.
1240 * cpu-score.c: Likewise.
1241 * cpu-sh.c: Likewise.
1242 * cpu-sparc.c: Likewise.
1243 * cpu-spu.c: Likewise.
1244 * cpu-tic30.c: Likewise.
1245 * cpu-tic4x.c: Likewise.
1246 * cpu-tic54x.c: Likewise.
1247 * cpu-tic6x.c: Likewise.
1248 * cpu-tic80.c: Likewise.
1249 * cpu-tilegx.c: Likewise.
1250 * cpu-tilepro.c: Likewise.
1251 * cpu-v850.c: Likewise.
1252 * cpu-vax.c: Likewise.
1253 * cpu-w65.c: Likewise.
1254 * cpu-we32k.c: Likewise.
1255 * cpu-xc16x.c: Likewise.
1256 * cpu-xstormy16.c: Likewise.
1257 * cpu-xtensa.c: Likewise.
1258 * cpu-z80.c: Likewise.
1259 * cpu-z8k.c: Likewise.
1260
1261 * cpu-i386.c: Include "libiberty.h".
1262 (bfd_arch_i386_fill): New.
1263 Add bfd_arch_i386_fill to bfd_arch_info initializer.
1264
1265 * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer.
1266 * cpu-l1om.c: Likewise.
1267
1268 * linker.c (default_data_link_order): Call abfd->arch_info->fill
1269 if fill size is 0.
1270
1271 * bfd-in2.h: Regenerated.
1272
1273 2012-01-27 Michael Eager <eager@eagercon.com>
1274
1275 * elf32-microblaze.c (create_got_section):
1276 Reuse existing .rela.got section.
1277
1278 2012-01-23 Alan Modra <amodra@gmail.com>
1279
1280 * elf-bfd.h: Formatting.
1281 (struct elf_backend_data): Add "maybe_function_sym".
1282 (_bfd_elf_maybe_function_sym): Declare.
1283 * elfxx-target.h (elf_backend_maybe_function_sym): Define.
1284 (elfNN_bed): Init new field.
1285 * elf.c (elf_find_function): Use maybe_function_sym.
1286 (_bfd_elf_maybe_function_sym): New function.
1287 * elf64-ppc.c (elf_backend_maybe_function_sym): Define.
1288 (ppc64_elf_maybe_function_sym): New function.
1289
1290 2012-01-20 Francois Gouget <fgouget@codeweavers.com>
1291
1292 PR binutils/13534
1293 * archive.c (_bfd_ar_sizepad): New function. Correctly install and
1294 pad the size field in an archive header.
1295 (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan
1296 function for the archive size field.
1297 (bfd_generic_openr_next_archived_file): Likewise.
1298 (do_slurp_coff_armap): Likewise.
1299 (_bfd_write_archive_contents): Likewise.
1300 (_bfd_bsd44_write_ar_hdr): Use the new function.
1301 (bfd_ar_hdr_from_filesystem): Likewise.
1302 (_bfd_write_archive_contents): Likewise.
1303 (bsd_write_armap): Likewise.
1304 (coff_write_armap): Likewise.
1305 * archive64.c (bfd_elf64_archive_write_armap): Likewise.
1306 * bfdio.c (bfd_bread): Use correct type for archive element
1307 sizes.
1308 * ar.c (open_inarch): Likewise.
1309 (extract_file): Likewise.
1310 * libbfd-in.h (struct areltdata): Use correct types for
1311 parsed_size and extra_size fields.
1312 Prototype _bfd_ar_sizepad function.
1313 * libbfd.h: Regenerate.
1314
1315 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
1316
1317 * elf.c (elfcore_write_prpsinfo): Provide unconditionally.
1318 Return NULL if core file generation is unsupported.
1319 (elfcore_write_prstatus): Likewise.
1320 * elf32-arm.c (elf32_arm_nabi_write_core_note): New function.
1321 (elf_backend_write_core_note): Define.
1322
1323 2012-01-19 Tristan Gingold <gingold@adacore.com>
1324
1325 * pef.c: Add a comment.
1326 * xsym.c: Likewise.
1327
1328 2012-01-17 Alan Modra <amodra@gmail.com>
1329
1330 * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
1331 trailing garbage in the note.
1332 * elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
1333
1334 2012-01-16 Daniel Green <venix1@gmail.com>
1335
1336 PR ld/13491
1337 * coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test
1338 h->root.type not h->type.
1339 * coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.
1340
1341 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
1342
1343 * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
1344 indirect symbols.
1345
1346 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
1347
1348 * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file
1349 position from here... to (bfd_mach_o_build_seg_command): Here.
1350
1351 2012-01-12 Iain Sandoe <idsandoe@googlemail.com>
1352
1353 * mach-o.c (bfd_mach_o_count_indirect_symbols): New.
1354 (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
1355 * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
1356 file. (bfd_mach_o_section): Add indirect_syms field.
1357
1358 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
1359
1360 * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of
1361 vmsize from filesize. Don't compute offsets or file sizes for
1362 zerofill sections.
1363
1364 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
1365
1366 * mach-o.c (bfd_mach_o_build_commands): Make the building of each
1367 command type independent.
1368
1369 2012-01-11 Alan Modra <amodra@gmail.com>
1370
1371 * elf64-ppc.c: Define more insns used in plt call stubs.
1372 (ppc64_elf_brtaken_reloc): Assume isa version 2 or above.
1373 (ppc64_elf_relocate_section): Likewise.
1374 (enum ppc_stub_type): Add ppc_stub_plt_call_r2save.
1375 (struct ppc_link_hash_table): Increase size of stub_count array.
1376 Add plt_stub_align and plt_thread_safe.
1377 (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define.
1378 (plt_stub_size, plt_stub_pad): New functions.
1379 (build_plt_stub): Emit barriers for power7 thread safety. Don't
1380 emit needless save of r2.
1381 (build_tls_get_addr_stub): Adjust params.
1382 (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning
1383 plt stubs. Adjust build_*plt_stub calls.
1384 (ppc_size_one_stub): Similarly.
1385 (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align
1386 params. Choose default for plt_thread_safe based on existence of
1387 calls to thread creation functions. Modify plt_call to
1388 plt_call_r2save when no tocsave reloc found. Align tail of stub
1389 sections.
1390 (ppc64_elf_build_stubs): Align tail of stub sections. Adjust
1391 output of stub statistics.
1392 (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save.
1393 * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
1394
1395 2012-01-10 H.J. Lu <hongjiu.lu@intel.com>
1396
1397 PR ld/13581
1398 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P
1399 check on R_X86_64_PCXX.
1400
1401 2012-01-10 Tristan Gingold <gingold@adacore.com>
1402
1403 * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false
1404 warning.
1405
1406 2012-01-10 Tristan Gingold <gingold@adacore.com>
1407
1408 * bfdio.c (bfd_tell): Handle nested archives.
1409 (bfd_seek): Ditto.
1410 * cache.c (bfd_cache_lookup_worker): Ditto.
1411 * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with
1412 nested archives.
1413 (bfd_generic_openr_next_archived_file): Likewise.
1414
1415 2012-01-09 Iain Sandoe <idsandoe@googlemail.com>
1416
1417 * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement.
1418 (bfd_mach_o_write_symtab): Remove handling for indirect syms.
1419 (bfd_mach_o_primary_symbol_sort_key): Likewise.
1420 (bfd_mach_o_cf_symbols): Likewise.
1421 (bfd_mach_o_sort_symbol_table): Remove.
1422 (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling
1423 for indirect and dysymtab counts. Do the symbol sorting here.
1424 (bfd_mach_o_build_dysymtab_command): Count the symbol types here.
1425 Make the indirect symbols a TODO.
1426 (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols.
1427 (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with
1428 a non-zero value.
1429 (bfd_mach_o_read_symtab_symbol): Record the symbol index.
1430 (bfd_mach_o_read_symtab_symbol): Adjust recording of global status.
1431 * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries.
1432 (IS_MACHO_INDIRECT): Remove.
1433 (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New.
1434
1435 2012-01-06 Nick Clifton <nickc@redhat.com>
1436
1437 PR binutils/13121
1438 * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to
1439 'flaginfo' to avoid conflicts with AIX system headers.
1440
1441 2012-01-06 Tristan Gingold <gingold@adacore.com>
1442
1443 * bfdio.c (bfd_bread): Use arelt_size macro.
1444
1445 2012-01-06 Tristan Gingold <gingold@adacore.com>
1446
1447 * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.
1448
1449 2012-01-05 Nick Clifton <nickc@redhat.com>
1450
1451 PR ld/12161
1452 * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if
1453 necessary.
1454
1455 2012-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
1456
1457 Fix zero registers core files when built by gcc-4.7.
1458 * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and
1459 size. Call elfcore_write_note for the local variables. Remove the
1460 final elfcore_write_note call. Add NOTREACHED comments.
1461
1462 2012-01-04 Tristan Gingold <gingold@adacore.com>
1463
1464 * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function.
1465 (bfd_mach_o_generic_stat_arch_elt): Adjust.
1466
1467 2012-01-04 Tristan Gingold <gingold@adacore.com>
1468
1469 * mach-o.c (bfd_mach_o_fat_member_init): New function.
1470 (bfd_mach_o_openr_next_archived_file): Reindent.
1471 Adjust to call bfd_mach_o_fat_member_init.
1472 (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init.
1473
1474 2012-01-04 Tristan Gingold <gingold@adacore.com>
1475
1476 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle
1477 BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1,
1478 BFD_RELOC_MACH_O_X86_64_PCREL32_2,
1479 BFD_RELOC_MACH_O_X86_64_PCREL32_4,
1480 BFD_RELOC_MACH_O_X86_64_BRANCH32,
1481 BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32,
1482 BFD_RELOC_MACH_O_X86_64_GOT.
1483
1484 2012-01-04 Tristan Gingold <gingold@adacore.com>
1485
1486 * mach-o.h (bfd_mach_o_fvmlib_command): New structure.
1487 (bfd_mach_o_load_command): Add fvmlib field.
1488
1489 * mach-o.c (bfd_mach_o_read_fvmlib): New function.
1490 (bfd_mach_o_read_command): Handle fvmlib.
1491
1492 2012-01-04 Tristan Gingold <gingold@adacore.com>
1493
1494 * mach-o.c (bfd_mach_o_convert_architecture): Reindent.
1495 Decode msubtype for ARM.
1496
1497 2012-01-04 Tristan Gingold <gingold@adacore.com>
1498
1499 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments.
1500
1501 2012-01-04 Tristan Gingold <gingold@adacore.com>
1502
1503 * mach-o.h: Reindent header.
1504 (bfd_mach_o_encryption_info_command): New structure.
1505 (bfd_mach_o_load_command): Add encryption_info field.
1506
1507 * mach-o.c (bfd_mach_o_read_encryption_info): New function.
1508 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
1509 (bfd_mach_o_read_command): Adjust error message.
1510
1511 2012-01-04 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
1512
1513 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part
1514 which reads DWARF2 and stores in stash from find_line.
1515 (find_line) Call _bfd_dwarf2_slurp_debug_info.
1516 * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration.
1517 * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate.
1518 * mach-o.c (dsym_subdir): The name of subdir where debug
1519 information may be stored.
1520 (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose
1521 type is UUID.
1522 (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is
1523 corresponding to the executable.
1524 (bfd_mach_o_find_dsym): New. Find a debug information BFD in the
1525 specified binary file.
1526 (bfd_mach_o_follow_dsym): New. Find a debug information BFD for
1527 the original BFD.
1528 (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O
1529 executables, dylibs, and bundles.
1530 (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file.
1531 * mach-o.h (dsym_bfd): The BFD of the dSYM file.
1532
1533 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
1534
1535 * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index
1536 for stabd symbols.
1537 (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs.
1538 (bfd_mach_o_cf_symbols): Likewise.
1539
1540 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
1541
1542 * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo.
1543
1544 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
1545
1546 * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
1547 as the value of an indirect symbol. Keep the string table index in
1548 non-indirect syms for reference.
1549 (bfd_mach_o_write_dysymtab): New.
1550 (bfd_mach_o_primary_symbol_sort_key): New.
1551 (bfd_mach_o_cf_symbols): New.
1552 (bfd_mach_o_sort_symbol_table): New.
1553 (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols.
1554 If we are emitting a dysymtab, process indirect symbols and count the
1555 number of each other kind.
1556 (bfd_mach_o_mangle_sections): New.
1557 (bfd_mach_o_write_contents): Split out some pre-requisite code into
1558 the command builder. Write dysymtab if the command is present.
1559 (bfd_mach_o_count_sections_for_seg): New.
1560 (bfd_mach_o_build_seg_command): New.
1561 (bfd_mach_o_build_dysymtab_command): New.
1562 (bfd_mach_o_build_commands): Reorganize to support the fact that some
1563 commands are optional and should not be emitted if there are no
1564 sections or symbols.
1565 (bfd_mach_o_set_section_contents): Amend comment.
1566 * mach-o.h: Amend and add to comments.
1567 (mach_o_data_struct): Add fields for dysymtab symbols counts and a
1568 pointer to the indirects, when present.
1569 (bfd_mach_o_should_emit_dysymtab): New macro.
1570 (IS_MACHO_INDIRECT): Likewise.
1571
1572 For older changes see ChangeLog-2011
1573 \f
1574 Local Variables:
1575 mode: change-log
1576 left-margin: 8
1577 fill-column: 74
1578 version-control: never
1579 End: