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