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