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