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