ee151a737bd1da28b5b789a0983bc685b5e4692d
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
2
3 * elf32-mips.c (elf_backend_hide_symbol): Delete.
4 * elfn32-mips.c (elf_backend_hide_symbol): Likewise.
5 * elf64-mips.c (elf_backend_hide_symbol): Likewise.
6 * elfxx-mips.h (elf_backend_hide_symbol): Likewise.
7 * elfxx-mips.c (mips_elf_link_hash_entry): Remove "forced_local"
8 and add "needs_lazy_stub".
9 (mips_elf_link_hash_newfunc): Update accordingly.
10 (mips_elf_link_hash_table): Remove "computed_got_sizes" and
11 add "lazy_stub_count".
12 (_bfd_mips_elf_link_hash_table_create): Update accordingly.
13 (mips_elf_output_extsym): Use hd->needs_lazy_stub to detect
14 cases where a lazy stub is being used.
15 (mips_elf_sort_hash_table_f): Use h->root.forced_local instead
16 of h->forced_local.
17 (mips_elf_record_global_got_symbol): Use _bfd_elf_link_hash_hide_symbol
18 instead of _bfd_mips_elf_hide_symbol. Do not increment local_gotno
19 here.
20 (mips_elf_allocate_dynamic_relocations): Move before new first use.
21 (mips_elf_check_recreate_got, mips_elf_recreate_got): New functions.
22 (mips_elf_resolve_final_got_entries): Move earlier in file. Make at
23 most two passes over the hash table. Use mips_elf_check_recreate_got
24 to see if there are any indirect or warning entries and
25 mips_elf_recreate_got to create a new GOT without them.
26 Return a boolean success value.
27 (mips_elf_count_forced_local_got_entries): New function.
28 (mips_elf_make_got_per_bfd): Check h->root.forced_local instead of
29 h->forced_local.
30 (mips_elf_set_global_got_offset): Likewise.
31 (mips_elf_set_no_stub): Replace with...
32 (mips_elf_forbid_lazy_stubs): ...this new function.
33 (mips_elf_resolve_final_got_entry): Delete.
34 (mips_elf_multi_got): Fix formatting. Use mips_elf_forbid_lazy_stubs
35 instead of mips_elf_set_no_stub. Move the code that sets
36 global offsets and allocates dynamic relocations from the main
37 _bfd_mips_elf_size_dynamic_sections loop to here.
38 (_bfd_mips_elf_adjust_dynamic_symbol): Do not allocate room in
39 .MIPS.stubs here; just set hmips->needs_lazy_stub and increment
40 htab->lazy_stub_count.
41 (_bfd_mips_elf_always_size_sections): Move the stub-estimation
42 code to mips_elf_estimate_stub_size and the GOT-sizing code to
43 mips_elf_lay_out_got. Do not call these functions here.
44 (mips_elf_estimate_stub_size): New function, split
45 out from _bfd_mips_elf_always_size_sections. Call
46 mips_elf_resolve_final_got_entries earlier. Count the number
47 of forced-local entries. Do not add stub sizes to loadable_size;
48 after this patch, the stub sizes are already included in the main
49 estimate. Allocate dynamic relocations here rather than in the
50 main _bfd_mips_elf_size_dynamic_sections loop.
51 (mips_elf_estimate_stub_size): New function, split out from
52 _bfd_mips_elf_always_size_sections.
53 (mips_elf_allocate_lazy_stub): New function.
54 (mips_elf_lay_out_lazy_stubs): Likewise.
55 (_bfd_mips_elf_size_dynamic_sections): Call mips_elf_estimate_stub_size,
56 mips_elf_lay_out_got and mips_elf_lay_out_lazy_stubs. Do not handle
57 the allocation of sreldyn specially.
58 (_bfd_mips_elf_hide_symbol): Delete.
59
60 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
61
62 * elfxx-mips.c (allocate_dynrelocs): Ignore indirect and warning
63 symbols.
64
65 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
66
67 * elfxx-mips.c (mips_elf_link_hash_entry): Move bfd_boolean
68 fields to the end of the structure and make them single-bit
69 bitfields.
70 (mips_elf_link_hash_newfunc): Make the initialization statements
71 follow the new field order.
72
73 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
74
75 * elfxx-mips.c (_mips_elf_section_data): Remove the "u.got_info" field.
76 (mips_elf_link_hash_table): Add "sgot" and "got_info" fields.
77 (_bfd_mips_elf_link_hash_table_create): Initialize them.
78 (mips_elf_got_section): Always apply the !maybe_excluded behavior.
79 (mips_elf_got_info): Delete.
80 (mips_elf_initialize_tls_slots): Remove the DYNOBJ local variable.
81 Adjust the call to mips_elf_got_section.
82 (mips_elf_local_got_index): Don't call mips_elf_got_info.
83 Update the call to mips_elf_create_local_got_entry.
84 Use htab->got_info.
85 (mips_elf_global_got_index): Don't call mips_elf_got_info;
86 use htab->got_info and htab->sgot instead.
87 (mips_elf_got_page): Don't call mips_elf_got_info. Update the
88 call to mips_elf_create_local_got_entry.
89 (mips_elf_got16_entry): Likewise.
90 (mips_elf_got_offset_from_index): Replace with DYNOBJ parameter
91 with an INFO parameter. Don't call mips_elf_got_info; use htab->sgot
92 and htab->got_info instead.
93 (mips_elf_create_local_got_entry): Remove the GG and SGOT parameters.
94 Use htab->sgot and htab->got_info.
95 (mips_elf_sort_hash_table): Remove the DYNOBJ local variable.
96 Don't call mips_elf_got_info; use htab->got_info instead.
97 (mips_elf_record_global_got_symbol): Turn G from a paramter to
98 a local variable and read it from htab->got_info.
99 (mips_elf_record_local_got_symbol): Replace the G parameter with
100 an INFO parameter. Make G a local variable and read it from
101 htab->got_info instead.
102 (mips_elf_record_got_page_entry): Likewise.
103 (mips_elf_multi_got): Remove the G parameter and make it a local
104 variable instead. Read it from htab->got_info.
105 (mips_elf_create_got_section): Cache the GOT section in htab->sgot.
106 Store the GOT information in htab->got_info.
107 (mips_elf_calculate_relocation): Don't call mips_elf_got_section
108 and mips_elf_got_info; use htab->sgot and htab->got_info instead.
109 Adjust the calls to mips_elf_got_offset_from_index and
110 mips_elf_adjust_gp.
111 (_bfd_mips_elf_check_relocs): Remove the G and SGOT local variables.
112 Adjust the calls to mips_elf_record_local_got_symbol,
113 mips_elf_record_global_got_symbol and mips_elf_record_got_page_entry.
114 Use htab->sgot.
115 (_bfd_mips_elf_always_size_sections): Remove the DYNOBJ local variable.
116 Don't call mips_elf_got_info; use htab->sgot and htab->got_info instead.
117 Update the call to mips_elf_multi_got.
118 (_bfd_mips_elf_size_dynamic_sections): Don't call mips_elf_got_info;
119 use htab->got_info instead.
120 (_bfd_mips_elf_finish_dynamic_symbol): Update the call to
121 mips_elf_got_section. Get the got_info from the hash table
122 rather than the GOT section.
123 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
124 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
125 (_bfd_mips_elf_hide_symbol): Don't call mips_elf_got_section;
126 get the got_info from the hash table instead. Remove the GOT
127 local variable.
128 (_bfd_mips_elf_final_link): Likewise. Also remove the DYNOBJ
129 local variable.
130
131 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
132
133 * elfxx-mips.c (mips_elf_link_hash_table): Add an "sstubs" field.
134 (_bfd_mips_elf_create_dynamic_sections): Use it to cache the stubs
135 section. Don't check whether the section already exists.
136 (_bfd_mips_elf_adjust_dynamic_symbol): Use htab->sstubs.
137 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
138 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
139 (_bfd_mips_elf_size_dynamic_sections): Likewise. Don't add the
140 dummy stub to an empty section.
141 (_bfd_mips_elf_link_hash_table_create): Initialize the "sstubs" field.
142
143 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
144
145 * reloc.c (BFD_RELOC_MIPS16_GOT16, BFD_RELOC_MIPS16_CALL16): Declare.
146 * libbfd.h, bfd-in2.h: Regenerate.
147 * elf32-mips.c (elf_mips16_howto_table_rel): Fill in reserved
148 R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
149 (mips16_reloc_map): Add mappings.
150 * elf64-mips.c (mips16_elf64_howto_table_rel): Fill in reserved
151 R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
152 (mips16_elf64_howto_table_rela): Likewise.
153 (mips16_reloc_map): Add mappings.
154 * elfn32-mips.c (elf_mips16_howto_table_rel): Fill in reserved
155 R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
156 (elf_mips16_howto_table_rela): Likewise.
157 (mips16_reloc_map): Add mappings.
158 * elfxx-mips.c (mips_elf_create_shadow_symbol): New function.
159 (section_allows_mips16_refs_p): Likewise.
160 (mips16_stub_symndx): Likewise.
161 (mips_elf_check_mips16_stubs): Treat the data argument as a
162 bfd_link_info. Mark every dynamic symbol as needing MIPS16 stubs
163 and create a "shadow" symbol for the original MIPS16 definition.
164 (mips16_reloc_p, got16_reloc_p, call16_reloc_p, hi16_reloc_p)
165 (lo16_reloc_p, mips16_call_reloc_p): New functions.
166 (_bfd_mips16_elf_reloc_unshuffle): Use mips16_reloc_p to generalize
167 relocation checks.
168 (_bfd_mips16_elf_reloc_shuffle): Likewise.
169 (_bfd_mips_elf_lo16_reloc): Handle R_MIPS16_GOT16.
170 (mips_elf_got16_entry): Add comment.
171 (mips_elf_calculate_relocation): Use hi16_reloc_p,
172 lo16_reloc_p, mips16_call_reloc_p, call16_reloc_p and got16_reloc_p
173 to generalize relocation checks. Use section_allows_mips16_refs_p
174 instead of mips16_stub_section_p. Handle R_MIPS16_CALL16 and
175 R_MIPS16_GOT16, allowing the former to refer directly to a
176 MIPS16 function if its stub is not needed.
177 (mips16_stub_section_p): Delete.
178 (_bfd_mips_elf_symbol_processing): Convert odd-valued function
179 symbols into even MIPS16 symbols.
180 (mips_elf_add_lo16_rel_addend): Use mips16_reloc_p to generalize
181 a relocation check.
182 (_bfd_mips_elf_check_relocs): Calculate "bed" and "rel_end"
183 earlier in the function. Use mips16_stub_symndx to identify
184 the target function. Avoid out-of-bounds accesses when the
185 stub has no relocations; report an error instead. Use
186 section_allows_mips16_refs_p instead of mips16_stub_section_p.
187 Use mips16_call_reloc_p and got16_reloc_p to generalize relocation
188 checks. Handle R_MIPS16_CALL16 and R_MIPS16_GOT16. Don't create
189 dynamic relocations for absolute references to __gnu_local_gp.
190 (_bfd_mips_elf_always_size_sections): Pass a bfd_link_info as
191 the argument to mips_elf_check_mips16_stubs. Generalize comment.
192 (_bfd_mips_elf_relocate_section): Use hi16_reloc_p and got16_reloc_p
193 to generalize relocation checks.
194 (_bfd_mips_elf_finish_dynamic_symbol): If a dynamic MIPS16 function
195 symbol has a non-MIPS16 stub, redirect the symbol to the stub.
196 Fix an overly long line. Don't give dynamic symbols type STO_MIPS16.
197 (_bfd_mips_elf_gc_sweep_hook): Handle R_MIPS16_CALL16 and
198 R_MIPS16_GOT16.
199
200 2008-08-06 Alan Modra <amodra@bigpond.net.au>
201
202 * elf32-ppc.c (ppc_elf_relax_section): Clear R_PPC_PLTREL24 addend.
203 (ppc_elf_relocate_section <R_PPC_RELAX32_PLT>): Don't bother here.
204
205 2008-08-05 Alan Modra <amodra@bigpond.net.au>
206 Jaka Močnik <jaka@xlab.si>
207
208 * coffcode.h (coff_slurp_line_table): bfd_alloc lineno_cache first
209 so that we don't inadvertently free it. Use bfd_alloc for sort
210 arrays, and memcpy sorted line table.
211
212 2008-08-04 Alan Modra <amodra@bigpond.net.au>
213
214 * elf32-spu.c (spu_elf_auto_overlay): Use the maximum possible
215 if --fixed-space request is too large.
216
217 2008-08-04 Alan Modra <amodra@bigpond.net.au>
218
219 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Set LC_ALL=C.
220 * Makefile.in: Regenerate.
221 * po/SRC-POTFILES.in: Regenerate.
222
223 2008-08-02 Alan Modra <amodra@bigpond.net.au>
224
225 * elf32-spu.c (mark_overlay_section): Move code calculating
226 max_overlay_size to correct block.
227 (spu_elf_auto_overlay): Don't use %x in einfo error message.
228
229 2008-08-01 Alan Modra <amodra@bigpond.net.au>
230 Jan Kratochvil <jan.kratochvil@redhat.com>
231
232 * elfcore.h (elf_core_file_p): Ensure we have a backend match
233 with the correct arch size before rejecting the generic fallback.
234 * elfcode.h (elf_object_p): Likewise. Ensure arch size matches
235 before accepting a target.
236
237 2008-08-01 Alan Modra <amodra@bigpond.net.au>
238
239 PR 6774
240 * elf.c (rewrite_elf_program_header): Don't wrap p_paddr to
241 include file or program headers.
242
243 2008-07-30 Alan Modra <amodra@bigpond.net.au>
244
245 * coff-ppc.c, coffgen.c, ecoff.c, ecofflink.c, elf.c, elf32-frv.c,
246 elf32-iq2000.c, elf32-m32c.c, elf32-mep.c, elf32-mt.c,
247 elf32-sh-symbian.c, elf64-hppa.c, mach-o.c, peXXigen.c, pef.c,
248 ppcboot.c, vms-misc.c, xsym.c: Silence gcc warnings.
249
250 2008-07-28 Daniel Jacobowitz <dan@codesourcery.com>
251
252 * elfxx-mips.c (mips_elf_calculate_relocation): Avoid generating
253 relocations for undefined weak symbols with non-default visibility.
254 (_bfd_mips_elf_check_relocs): Use possibly_dynamic_relocs for
255 global symbols in shared libraries.
256 (allocate_dynrelocs): New function.
257 (_bfd_mips_elf_adjust_dynamic_symbol): Do not handle
258 possibly_dynamic_relocs here.
259 (_bfd_mips_elf_size_dynamic_sections): Call allocate_dynrelocs.
260
261 2008-07-28 Alexandre Oliva <aoliva@redhat.com>
262
263 * elf32-i386.c (struct elf_i386_link_hash_table): Added field
264 tls_module_base.
265 (elf_i386_link_hash_table_create): Initialize it.
266 (elf_i386_always_size_sections): Set it.
267 (set_tls_module_base): New.
268 (elf_i386_relocate_sections): Call it.
269 * elf64-x86-64.c (struct elf64_x86_64_link_hash_table): Added
270 field tls_module_base.
271 (elf64_x86_64_link_hash_table_create): Initialize it.
272 (elf64_x86_64_always_size_sections): Set it.
273 (set_tls_module_base): New.
274 (elf64_x86_64_relocate_sections): Call it.
275 Reported by Cary Coutant <ccoutant@google.com>
276
277 2008-07-28 Ineiev <ineiev@yahoo.co.uk>
278
279 * elf32-arm.c (arm_map_one_stub): Declare variables at beginning
280 of block.
281 * elf32-avr.c (get_local_syms): Likewise.
282
283 2008-07-28 Alan Modra <amodra@bigpond.net.au>
284
285 PR 6769
286 * bfd-in.h (BFD_VMA_FMT): Define.
287 (printf_vma, sprintf_vma): Use the above.
288 (_bfd_int64_low, _bfd_int64_high): Delete.
289 * bfd-in2.h: Regenerate.
290
291 2008-07-27 Alan Modra <amodra@bigpond.net.au>
292
293 * elf.c (_bfd_elf_make_section_from_shdr): Ignore return from
294 elf_parse_notes. Use bfd_malloc_and_get_section.
295 (elf_parse_notes): Validate note namesz and descsz.
296
297 2008-07-26 Michael Eager <eager@eagercon.com>
298
299 * elf32-ppc.c (ppc_elf_merge_obj_attributes): Check compatibility
300 between single-float, double-float, and soft-float.
301
302 2008-07-24 Daniel Jacobowitz <dan@codesourcery.com>
303
304 * elf32-mips.c (elf_backend_write_section): Define.
305
306 2008-07-24 Nick Clifton <nickc@redhat.com>
307
308 * elf.c (_bfd_elf_map_sections_to_segments): Catch off by one
309 error assigning sections to segments.
310
311 2008-07-22 Nick Clifton <nickc@redhat.com>
312
313 * elf.c (_bfd_elf_map_sections_to_segments): Allow sections in
314 adjoining pages to be included in the same segment.
315
316 2008-07-22 Simon Baldwin <simonb@google.com>
317
318 * elflink.c (elf_link_output_extsym): Set st_size to zero for
319 symbols from dynamic libraries.
320
321 2008-07-21 H.J. Lu <hongjiu.lu@intel.com>
322
323 PR ld/4424
324 * elflink.c (_bfd_elf_merge_symbol): Call bed->relocs_compatible
325 to check if 2 inputs are compatible.
326
327 2008-07-21 Sterling Augustine <sterling@tensilica.com>
328
329 * elf.c (assign_file_positions_for_load_sections): Print vma in
330 error message about overlapping section vmas.
331
332 2008-07-21 H.J. Lu <hongjiu.lu@intel.com>
333
334 PR ld/6747
335 * elf32-frv.c (elf32_frv_relocate_section): Revert the change
336 for PR ld/6446 checked in by accident on May 21, 2008.
337
338 2008-07-21 Nick Clifton <nickc@redhat.com>
339
340 * coff-sh.c (bfd_pe_print_pdata): Define to NULL for non
341 COFF_WITH_PE based SH ports.
342 * libpei.h (_bfd_XX_print_ce_compressed_pdata): Prototype.
343 * arm-wince-pe.c (bfd_pe_print_pdata): Use
344 _bfd_pe_print_ce_compressed_pdata.
345 (slurp_symcache, cleanup_syms, pe_print_ce_compressed_pdata): Move
346 to...
347 * peXXigen.c: ... here and rename pe_print_ce_compressed_pdata to
348 _bfd_XX_print_ce_compressed_pdata.
349
350 2008-07-21 Alan Modra <amodra@bigpond.net.au>
351
352 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Drop
353 unwanted zero terminators.
354
355 2008-07-21 Alan Modra <amodra@bigpond.net.au>
356
357 * elf32-spu.c (spu_elf_relocate_section): Expand
358 RELOC_FOR_GLOBAL_SYMBOL. Don't warn about undefined symbols for
359 R_SPU_PPU32 and R_SPU_PPU64 relocations.
360
361 2008-07-21 Luis Machado <luisgpm@br.ibm.com>
362
363 * elf-bfd.h: Declare elfcore_write_ppc_vsx.
364 * elf.c (elfcore_grok_ppc_vsx): New function.
365 (elfcore_write_ppc_vsx): New function
366 (elfcore_grok_note): Handle VSX notes.
367 (elfcore_write_register_note): Handle VSX notes.
368
369 2008-07-18 Joseph Myers <joseph@codesourcery.com>
370
371 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add new parameter.
372 * bfd-in2.h: Regenerate.
373 * elf32-arm.c (struct elf_arm_obj_tdata): Add field
374 no_wchar_size_warning.
375 (bfd_elf32_arm_set_target_relocs): Add new parameter
376 no_wchar_warn.
377 (elf32_arm_merge_eabi_attributes): Give a warning, not an error,
378 for conflicting wchar_t attributes. Do not warn if
379 --no-wchar-size-warning. Make diagnostic text more specific.
380
381 2008-07-18 H.J. Lu <hongjiu.lu@intel.com>
382
383 PR ld/6748
384 * elf32-arm.c (elf32_arm_link_hash_table_create): Initialize
385 new fields added for ARM long call support.
386
387 2008-07-18 Danny Backx <dannybackx@users.sourceforge.net>
388
389 * pe-arm-wince.c (pe_print_compressed_pdata): Define new function to
390 print compressed pdata structure as described on MSDN. This only
391 applies to a limited set of architectures (ARM, SH4).
392 (slurp_symtab, my_symbol_for_address): Define static helper
393 functions for pe_print_compressed_pdata.
394 * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_print_pdata field.
395 (bfd_coff_have_print_pdata, bfd_coff_print_pdata): Define.
396 * bfd/peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add check on
397 bfd_coff_backend_data, call the function if non-null.
398 * pei-mcore.c: Add target dependent initialisation for
399 bfd_coff_backend_data.
400 * coff-sh.c: Likewise.
401 * coff64-rs6000.c: Likewise.
402 * coff-rs6000.c: Likewise.
403 * libcoff-in.h: Likewise.
404 * cf-i386lynx.c: Likewise.
405 * coff-alpha.c: Likewise.
406 * coff-apollo.c: Likewise.
407 * coff-arm.c: Likewise.
408 * coff-aux.c: Likewise.
409 * coff-h8300.c: Likewise.
410 * coff-h8500.c: Likewise.
411 * coff-i386.c: Likewise.
412 * coff-i860.c: Likewise.
413 * coff-i960.c: Likewise.
414 * coff-ia64.c: Likewise.
415 * coff-m68k.c: Likewise.
416 * coff-m88k.c: Likewise.
417 * coff-maxq.c: Likewise.
418 * coff-mips.c: Likewise.
419 * coff-or32.c: Likewise.
420 * coff-sparc.c: Likewise.
421 * coff-tic30.c: Likewise.
422 * coff-tic4x.c: Likewise.
423 * coff-tic54x.c: Likewise.
424 * coff-tic80.c: Likewise.
425 * coff-w65.c: Likewise.
426 * coff-we32k.c: Likewise.
427 * coff-x86_64.c: Likewise.
428 * coff-z80.c: Likewise.
429 * coff-z8k.c: Likewise.
430 * pe-mcore.c: Likewise.
431 * pe-mips.c: Likewise.
432 * pe-ppc.c: Likewise.
433 * peXXigen.c: Likewise.
434 * pei-ppc.c: Likewise.
435 * libcoff.h: Regenerate.
436
437 2008-07-16 Bernd Schmidt <bernd.schmidt@analog.com>
438
439 * elf32-bfin.c (bfin_check_relocs, bfin_relocate_section,
440 bfin_final_link_relocate, bfin_gc_mark_hook, bfin_gc_sweep_hook,
441 ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE,
442 struct _bfinfdpic_dynamic_got_info): Moved around to keep FD-PIC code
443 separate from non-FD-PIC.
444
445 2008-07-14 DJ Delorie <dj@redhat.com>
446
447 * elf-m10300.c (mn10300_elf_final_link_relocate): Correct overflow
448 checks for PCREL8, PCREL16, GOTPC16, GOTOFF16, PLT16, and GOT16
449 relocs.
450 (mn10300_elf_relax_section): Correct jump offset check when target
451 is in a different section.
452
453 2008-07-15 Jie Zhang <jie.zhang@analog.com>
454
455 * elf32-bfin.c (elf32_bfin_special_sections[]): New.
456 (elf_backend_special_sections): Define.
457
458 2008-07-13 Craig Silverstein <csilvers@google.com>
459
460 PR binutils/6743
461 * dwarf2.c (struct dwarf2_debug): New variable info_ptr_memory.
462 (find_line): Use info_ptr_memory instead of sec_info_ptr.
463 (_bfd_dwarf2_cleanup_debug_info): Likewise.
464
465 2008-07-12 Jie Zhang <jie.zhang@analog.com>
466
467 Revert
468 2008-07-12 Jie Zhang <jie.zhang@analog.com>
469 * elf.c (_bfd_elf_map_sections_to_segments): Don't put
470 executable sections into the same segment with other
471 read only sections if --sep-code.
472 * elf32-bfin.c (elf32_bfin_code_in_l1): New variable.
473 (elf32_bfin_data_in_l1): New variable.
474 (elf32_bfin_final_write_processing): New.
475 (elf32_bfin_special_sections[]): New.
476 (elf_backend_final_write_processing): Define.
477 (elf_backend_special_sections): Define.
478
479 2008-07-12 Jie Zhang <jie.zhang@analog.com>
480
481 * elf.c (_bfd_elf_map_sections_to_segments): Don't put
482 executable sections into the same segment with other
483 read only sections if --sep-code.
484 * elf32-bfin.c (elf32_bfin_code_in_l1): New variable.
485 (elf32_bfin_data_in_l1): New variable.
486 (elf32_bfin_final_write_processing): New.
487 (elf32_bfin_special_sections[]): New.
488 (elf_backend_final_write_processing): Define.
489 (elf_backend_special_sections): Define.
490
491 2008-07-11 Andreas Schwab <schwab@suse.de>
492
493 * dwarf2.c (read_section): Take pointer to bfd_size_type instead
494 of unsigned long as last parameter.
495 (struct dwarf2_debug): Define dwarf_abbrev_size, dwarf_line_size,
496 dwarf_str_size and dwarf_ranges_size as bfd_size_type instead of
497 unsigned long.
498
499 2008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
500
501 * elfxx-mips.c (mips_elf_calculate_relocation): Calculate GP and GP0
502 for all relocation types. Allow any type of relocation to refer to
503 __gnu_local_gp.
504
505 2008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
506
507 * elfxx-mips.c (mips_elf_check_mips16_stubs): Use ELF_ST_IS_MIPS16.
508 (mips_elf_calculate_relocation): Likewise.
509 (_bfd_mips_elf_add_symbol_hook): Likewise.
510 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
511 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
512
513 2008-07-10 Andreas Schwab <schwab@suse.de>
514
515 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Add missing
516 paren.
517
518 2008-07-09 Craig Silverstein <csilvers@google.com>
519
520 * Makefile.am (BFD32_LIBS): Add compress.lo.
521 (BFD32_LIBS_CFILES): Add compress.c.
522 (BFD_H_FILES): Likewise.
523 * Makefile.in: Regenerate.
524 * bfd-in2.h: Regenerate.
525 * config.in: Add HAVE_ZLIB_H
526 * configure.in: Add test for libz and zlib.h
527 * configure: Regenerate.
528 * dwarf2.c (read_section): New function.
529 (read_indirect_string): Call new function read_section.
530 (read_abbrevs): Likewise.
531 (decode_line_info): Likewise.
532 (read_debug_ranges): Likewise.
533 (find_line): Call new function read_section when just one
534 .zdebug_info section is found, otherwise read and compress
535 multiple sections.
536 (_bfd_dwarf2_cleanup_debug_info): Free sec_info_ptr.
537 * elf.c (_bfd_elf_make_section_from_shdr): Add zdebug prefix.
538 (special_sections_z): New struct.
539 (special_sections): Refer to special_sections_z.
540 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Recognize
541 sections named .zdebug_*.
542 (_bfd_mips_elf_fake_sections): Likewise.
543 * compress.c: New file.
544 (bfd_uncompress_section_contents): New function.
545
546 2008-07-07 Christophe Lyon <christophe.lyon@st.com>
547
548 * elf32-arm.c (arm_type_of_stub): Don't crash on local symbols in
549 the presence of a PLT.
550
551 2008-07-07 Alan Modra <amodra@bigpond.net.au>
552
553 * bfd.c (bfd_demangle): Always trim off bfd_get_symbol_leading_char.
554
555 2008-07-02 Alan Modra <amodra@bigpond.net.au>
556
557 * elf32-ppc.c (is_pic_glink_stub): New function.
558 (ppc_elf_get_synthetic_symtab): Don't generate symbols when
559 multiple shared/pie stubs per plt entry.
560
561 2008-06-30 Richard Sandiford <rdsandiford@googlemail.com>
562
563 * elf.c (_bfd_elf_get_synthetic_symtab): Increment p by
564 bed->s->int_rels_per_ext_rel.
565
566 2008-06-30 Richard Sandiford <rdsandiford@googlemail.com>
567
568 * syms.c (BSF_SYNTHETIC): New flag.
569 * elf.c (_bfd_elf_get_synthetic_symtab): Set it.
570 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Likewise.
571 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
572 * bfd-in.h (bfd_asymbol_flavour): Return bfd_target_unknown_flavour
573 for synthetic symbols.
574 * bfd-in2.h: Regenerate.
575
576 2008-06-30 Daniel Jacobowitz <dan@codesourcery.com>
577
578 * elf32-arm.c (record_arm_to_thumb_glue, record_thumb_to_arm_glue):
579 Expand comments.
580 (arm_map_one_stub): Use | 1 when setting the low bit.
581
582 2008-06-29 Andreas Schwab <schwab@suse.de>
583
584 * elf32-m68k.c (elf_m68k_relocate_section): Don't ignore existing
585 addend on _GLOBAL_OFFSET_TABLE_.
586
587 2008-06-24 Daniel Jacobowitz <dan@codesourcery.com>
588
589 * elf32-arm.c (STUB_ENTRY_NAME): Define.
590 (arm_thumb_thumb_long_branch_stub): Use bx instead of b.n.
591 (arm_pic_long_branch_stub): Mention R_ARM_REL32 instead of
592 R_ARM_ABS32.
593 (struct elf32_arm_stub_hash_entry): Add output_name.
594 (arm_build_one_stub): Move offsets into the offset argument
595 of _bfd_final_link_relocate. Correct offset for
596 arm_thumb_arm_v4t_stub_long_branch.
597 (elf32_arm_size_stubs): Set stub_entry->output_name.
598 (elf32_arm_ouput_plt_map_sym): Rename to elf32_arm_output_map_sym.
599 Update all callers.
600 (elf32_arm_output_stub_sym): New.
601 (arm_map_one_stub): Correct formatting. Use elf32_arm_output_stub_sym.
602
603 2008-06-20 Alan Modra <amodra@bigpond.net.au>
604
605 * elf32-spu.c (needs_ovl_stub): Correctly return nonovl_stub for
606 non-branch insns.
607
608 2008-06-20 Alan Modra <amodra@bigpond.net.au>
609
610 * elf32-spu.c (build_stub): Allow wraparound on stub branches.
611 (allocate_spuear_stubs, build_spuear_stubs): Return value from
612 count_stub/build_stub.
613 (spu_elf_build_stubs): Correct location of stub reloc error message.
614
615 2008-06-18 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
616
617 * elf32-cr16.c (ELF_MACHINE_ALT1): Define to EM_CR16_OLD.
618
619 2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
620
621 * configure: Regenerate.
622
623 2008-06-17 Alan Modra <amodra@bigpond.net.au>
624
625 * elf32-spu.c (struct spu_link_hash_table): Add extra_stack_space.
626 (spu_elf_check_vma): Add extra_stack_space param, copy to htab.
627 (spu_elf_auto_overlay): Use it.
628 (RECURSE_UNMARK): Define as 0.
629 (unmark_overlay_section): Heed RECURSE_UNMARK.
630 * elf32-spu.h (spu_elf_check_vma): Update prototype.
631
632 2008-06-12 DJ Delorie <dj@redhat.com>
633
634 * elf32-m32c.c (ELF_MACHINE_ALT1): Define as EM_M32C_OLD.
635
636 2008-06-09 Paul Brook <paul@codesourcery.com>
637
638 bfd/
639 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Allow BE8 shared
640 libraries.
641
642 2008-06-09 Christophe Lyon <christophe.lyon@st.com>
643
644 * elf32-arm.c (arm_stub_is_thumb): Define.
645 (elf32_arm_final_link_relocate): Handle near mode switching stubs.
646
647 2008-06-07 Alan Modra <amodra@bigpond.net.au>
648
649 * elf32-spu.c (spu_elf_auto_overlay): Add valid area below sp
650 to stack calculation.
651
652 2008-06-06 Paul Brook <paul@codesourcery.com>
653
654 bfd/
655 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Reject BE8 input.
656
657 2008-06-06 Alan Modra <amodra@bigpond.net.au>
658
659 * elf32-spu.c (spu_elf_auto_overlay): Relax requirement that
660 file names be unique. Specify archive:path in overlay script.
661
662 2008-06-05 Alan Modra <amodra@bigpond.net.au>
663
664 PR ld/6590
665 * elf64-ppc.c (ppc_build_one_stub): Correct reloc offsets.
666
667 2008-06-04 Alan Modra <amodra@bigpond.net.au>
668
669 * elf.c (ignore_section_sym): Don't test section sym value here.
670 (elf_map_symbols): Instead check zero value here as was done prior
671 to 2006-05-26 change.
672
673 2008-06-04 Nick Clifton <nickc@redhat.com>
674
675 PR ld/6019
676 * elf32-avr.c (elf32_avr_relax_section): Handle the case where
677 there are no local symbols.
678
679 2008-06-04 Alan Modra <amodra@bigpond.net.au>
680
681 * elf32-spu.c (get_sym_h): Don't attempt to read global syms.
682 (process_stubs): Likewise.
683 (discover_functions): Don't used cached symbols.
684 (maybe_insert_function): Correct condition under which function
685 array is realloc'd.
686 (mark_functions_via_relocs): Delete unused variable.
687
688 2008-05-30 Frediano Ziglio <frediano.ziglio@vodafone.com>
689 Nick Clifton <nickc@redhat.com>
690
691 PR ld/6511
692 * elf64-hppa.c (allocate_global_data_opd): Default to using the
693 dynamic symbol table for local function names in shared libraries.
694
695 2008-05-29 Jan Kratochvil <jan.kratochvil@redhat.com>
696
697 * elf.c (assign_file_positions_for_load_sections): Adjust pre-section
698 gaps based on VMA and P_VADDR instead of LMA and P_PADDR addresses.
699
700 2008-05-28 Alan Modra <amodra@bigpond.net.au>
701
702 * elf32-spu.c (spu_elf_object_p): New function.
703 (elf_backend_object_p): Define.
704 (build_stub): Correct second word of 8 byte overlay stubs.
705 (spu_elf_relocate_section): Formatting.
706
707 2008-05-24 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
708
709 * elf.c (elfcore_write_register_note): New function.
710 * elf-bfd.h (elfcore_write_register_note): New prototype.
711
712 2008-05-22 Christophe Lyon <christophe.lyon@st.com>
713
714 * elf32-arm.c (arm_type_of_stub): Ignore STT_SECTION symbols.
715 (elf32_arm_stub_add_mapping_symbol): Remove.
716 (elf32_arm_add_stub): Don't generate mapping symbols. Change
717 prototype.
718 (elf32_arm_size_stubs): Use new elf32_arm_add_stub
719 prototype. Don't generate thumb to arm glue for calls.
720 (arm_map_one_stub): Define.
721 (elf32_arm_output_arch_local_syms): Generate mapping symbols for
722 long calls stubs.
723
724 2008-05-21 Nick Clifton <nickc@redhat.com>
725
726 * elf32-arm.c (group_sections): Reformat comments.
727
728 PR ld/6446
729 * elf32-frv.c (elf32_frv_relocate_section): Set EF_FRV_PIC by
730 default (for FDPIC). Clear it if any inter-segment relocations
731 are found.
732
733 * elf64-hppa.c (elf64_hppa_finalize_opd): Check NULL return
734 from elf_link_hash_lookup.
735
736 2008-05-21 Maxim Kuvyrkov <maxim@codesourcery.com>
737
738 Add multi-GOT support for m68k.
739 * elf32-m68k.c (struct elf_m68k_link_hash_entry: got_entry_key,
740 glist): New fields.
741 (struct elf_m68k_got_entry_key, struct elf_m68k_got_entry,
742 struct elf_m68k_got, struct elf_m68k_bfd2got_entry,
743 struct elf_m68k_multi_got): New data structures.
744 (struct elf_m68k_link_hash_table: local_gp_p, use_neg_got_offsets_p,
745 allow_multigot_p, multi_got_): New fields.
746 (elf_m68k_multi_got): New macro.
747 (elf_m68k_link_hash_newfunc): Initialize new fields of
748 struct elf_m68k_link_hash_entry.
749 (elf_m68k_link_hash_table_create): Initialize new fields of
750 struct elf_m68k_link_hash_table.
751 (elf_m68k_link_hash_table_free): New static function implementing hook.
752 (elf_m68k_init_got, elf_m68k_clear_got, elf_m68k_create_empty_got): New
753 static functions for struct elf_m68k_got.
754 (elf_m68k_init_got_entry_key, elf_m68k_got_entry_hash,
755 elf_m68k_got_entry_eq): New static functions for
756 struct elf_m68k_got_entry.
757 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT,
758 ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): New macros.
759 (enum elf_m68k_get_entry_howto): New enum.
760 (elf_m68k_get_got_entry, elf_m68k_update_got_entry_type,
761 elf_m68k_remove_got_entry_type): New static functions for
762 struct elf_m68k_got_entry.
763 (elf_m68k_add_entry_to_got): New static function.
764 (elf_m68k_bfd2got_entry_hash, elf_m68k_bfd2got_entry_eq,
765 elf_m68k_bfd2got_entry_del, elf_m68k_get_bfd2got_entry): New static
766 functions for struct elf_m68k_bfd2got_entry.
767 (struct elf_m68k_can_merge_gots_arg, elf_m68k_can_merge_gots_1,
768 elf_m68k_can_merge_gots): New traversal.
769 (struct elf_m68k_merge_gots_arg, elf_m68k_merge_gots_1,
770 elf_m68k_merge_gots): Ditto.
771 (struct elf_m68k_finalize_got_offsets_arg,
772 elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Ditto.
773 (struct elf_m68k_partition_multi_got_arg,
774 elf_m68k_partition_multi_got_1, elf_m68k_init_symndx2h_1,
775 elf_m68k_partition_multi_got): Ditto.
776 (elf_m68k_find_got_entry_ptr, elf_m68k_remove_got_entry): New static
777 functions.
778 (elf_m68k_copy_indirect_symbol): New static function implementing
779 a hook.
780 (elf_m68k_check_relocs): Update to add entries to multi-GOT.
781 (elf_m68k_gc_sweep_hook): Update to remove entries from multi-GOT.
782 (elf_m68k_always_size_sections): Assign BFDs to GOTs.
783 (elf_m68k_relocate_section): Update to properly handle GOT relocations.
784 (elf_m68k_finish_dynamic_symbol): Update to traverse all GOT entries
785 of a global symbol.
786 (bfd_elf_m68k_set_target_options): New function.
787 (bfd_elf32_bfd_link_hash_table_free): Define hook.
788 (bfd_elf32_bfd_final_link): Change expansion to bfd_elf_final_link
789 to skip generic calculation of GOT offsets.
790 (elf_backend_copy_indirect_symbol): Define hook.
791 * bfd-in.h (bfd_elf_m68k_set_target_options): Declare function.
792 * bfd-in2.h: Regenerate.
793
794 2008-05-21 André Johansen <andrejoh@gmail.com>
795
796 PR 868
797 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free memory allocated
798 for filenames in function tables and variable tables.
799
800 2008-05-19 Alan Modra <amodra@bigpond.net.au>
801
802 PR 2995, PR 6473
803 * elf.c (_bfd_elf_make_section_from_shdr): Leave lma equal to
804 vma when all p_paddr fields are zero and there is more than
805 one PT_LOAD header.
806
807 2008-05-15 Christophe Lyon <christophe.lyon@st.com>
808
809 Add long call support for ARM.
810 * elf32-arm.c (THM2_MAX_FWD_BRANCH_OFFSET): Define.
811 (THM2_MAX_BWD_BRANCH_OFFSET): Define.
812 (ARM_MAX_FWD_BRANCH_OFFSET): Define.
813 (ARM_MAX_BWD_BRANCH_OFFSET): Define.
814 (THM_MAX_FWD_BRANCH_OFFSET): Define.
815 (THM_MAX_BWD_BRANCH_OFFSET): Define.
816 (arm_long_branch_stub): Define.
817 (arm_pic_long_branch_stub): Define.
818 (arm_thumb_v4t_long_branch_stub): Define.
819 (arm_thumb_thumb_long_branch_stub): Define.
820 (arm_thumb_arm_v4t_long_branch_stub): Define.
821 (STUB_SUFFIX): Define.
822 (elf32_arm_stub_type): Define.
823 (elf32_arm_stub_hash_entry): Define.
824 (elf32_arm_link_hash_entry): Add stub_cache field.
825 (arm_stub_hash_lookup): Define.
826 (elf32_arm_link_hash_table): Add stub_hash_table, stub_bfd,
827 add_stub_section, layout_sections_again, stub_group, bfd_count,
828 top_index, input_list fields.
829 (elf32_arm_link_hash_newfunc): Init new field.
830 (stub_hash_newfunc): New function.
831 (elf32_arm_link_hash_table_create): Init stub_hash_table.
832 (elf32_arm_hash_table_free): New function.
833 (arm_type_of_stub): New function.
834 (elf32_arm_stub_name): New function.
835 (elf32_arm_get_stub_entry): New function.
836 (elf32_arm_stub_add_mapping_symbol): New function.
837 (elf32_arm_add_stub): New function.
838 (arm_build_one_stub): New function.
839 (arm_size_one_stub): New function.
840 (elf32_arm_setup_section_lists): New function.
841 (elf32_arm_next_input_section): New function.
842 (group_sections): New function.
843 (elf32_arm_size_stubs): New function.
844 (elf32_arm_build_stubs): New function.
845 (bfd_elf32_arm_add_glue_sections_to_bfd): Skip stub sections.
846 (bfd_elf32_arm_process_before_allocation): No longer handle
847 R_ARM_CALL and R_ARM_THM_CALL.
848 (using_thumb_only): New function.
849 (elf32_arm_final_link_relocate): Redirect calls to stub if range
850 exceeds encoding capabilities.
851 (bfd_elf32_bfd_link_hash_table_free): Define.
852 * bfd-in.h (R_ARM_max): Fix value to 130.
853 (elf32_arm_setup_section_lists): Protype.
854 (elf32_arm_next_input_section): Protype.
855 (elf32_arm_size_stubs): Protype.
856 (elf32_arm_build_stubs): Protype.
857 * bfd-in2.h: Regenerate.
858
859 2008-05-14 Ulrich Weigand <uweigand@de.ibm.com>
860
861 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Fix memset calls.
862 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
863
864 2008-05-14 Alan Modra <amodra@bigpond.net.au>
865
866 * Makefile.am: Run "make dep-am".
867 * Makefile.in: Regenerate.
868
869 2008-05-14 Ulrich Weigand <uweigand@de.ibm.com>
870 Alan Modra <amodra@bigpond.net.au>
871
872 * elf32-ppc.c (section_covers_vma): New function.
873 (ppc_elf_get_synthetic_symtab): New function.
874 (bfd_elf32_get_synthetic_symtab): Define.
875 * elf64-ppc.c (section_covers_vma): New function.
876 (ppc64_elf_get_synthetic_symtab): Generate sym@plt on glink branch
877 table entries, and __glink_PLTresolve on resolver stub.
878 (ppc64_elf_build_stubs): Rename __glink sym to __glink_PLTresolve.
879
880 2008-05-12 Alan Modra <amodra@bigpond.net.au>
881
882 PR 6443
883 * elf32-ppc.c (MUST_BE_DYN_RELOC): Delete.
884 (must_be_dyn_reloc): New function.
885 (ppc_elf_check_relocs): Don't set DF_STATIC_TLS for tprel relocs
886 in pies.
887 (ppc_elf_tls_optimize): Optimise pies.
888 (ppc_elf_relocate_section): Use a section symbol rather than no
889 symbol if possible for LD->IE TLS sequence, but don't error if
890 we must use no symbol.
891 * elf64-ppc.c (MUST_BE_DYN_RELOC): As for elf32-ppc.c.
892 (must_be_dyn_reloc): Likewise.
893 (ppc64_elf_check_relocs): Likewise.
894 (ppc64_elf_tls_optimize): Likewise.
895 (ppc64_elf_relocate_section): Likewise.
896
897 2008-05-12 Alan Modra <amodra@bigpond.net.au>
898
899 * elf32-spu.c (spu_elf_relocate_section): Rename is_ea to is_ea_sym.
900
901 2008-05-10 Paul Pluzhnikov <ppluzhnikov@google.com>
902
903 * elfcore.h (elf_core_file_p): Warn about core truncation.
904
905 2008-05-07 Bob Wilson <bob.wilson@acm.org>
906
907 * elf32-xtensa.c (xtensa_property_section_name): New.
908 (xtensa_make_property_section): New.
909 (xtensa_get_property_section): Make static. Do not create a new
910 section if it does not exist.
911
912 2008-05-08 Alan Modra <amodra@bigpond.net.au>
913
914 * elf32-spu.c (spu_elf_special_sections): Add "._ea".
915 (spu_elf_relocate_section): Handle relocations against symbols
916 defined in ._ea specially.
917
918 2008-05-03 Daniel Jacobowitz <dan@codesourcery.com>
919
920 * elf32-arm.c (elf32_arm_symbian_link_hash_table_create): Use
921 ARRAY_SIZE.
922 (elf32_arm_symbian_plt_sym_val): New.
923 (elf_backend_plt_sym_val): Define.
924
925 2008-05-03 Alan Modra <amodra@bigpond.net.au>
926
927 PR 2995, PR 6473
928 * elf.c (rewrite_elf_program_header): Rather than clearing
929 p_paddr_valid at end, don't set it in the first place. Delete
930 comment no longer relevant. When not p_paddr_valid, don't set
931 paddr from vaddr, and don't set p_vaddr_offset.
932
933 2008-05-01 Cary Coutant <ccoutant@google.com>
934
935 * elf.c (bfd_elf_get_str_section): Fix memory leak caused by
936 corrupt string table.
937
938 2008-05-01 Joel Brobecker <brobecker@adacore.com>
939
940 * cache.c (cache_bread_1): Renames cache_bread.
941 (cache_bread): New function.
942
943 2008-05-01 Alan Modra <amodra@bigpond.net.au>
944
945 PR 2995, PR 6473
946 * elf.c (_bfd_elf_make_section_from_shdr): Always set lma from p_paddr.
947 (assign_file_positions_for_load_sections): Combine nested "if".
948 (copy_elf_program_header): Don't set p_paddr_valid or p_vaddr_offset
949 when all header p_paddr fields are zero.
950
951 2008-04-30 Edmar Wienskoski <edmar@freescale.com>
952
953 * cpu-powerpc.c (bfd_powerpc_archs): Add e500mc entry.
954
955 2008-04-29 Daniel Jacobowitz <dan@codesourcery.com>
956
957 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound)
958 (_bfd_elf_canonicalize_dynamic_reloc): Find dynamic relocations
959 even if they are not loaded.
960 * elflink.c (_bfd_elf_init_2_index_sections): Set data_index_section
961 first.
962
963 2008-04-25 Jay Foad <jay.foad@gmail.com>
964
965 * reloc16.c (bfd_coff_reloc16_get_value): Add support for
966 undefined weak symbols.
967
968 2008-04-25 Nick Clifton <nickc@redhat.com>
969
970 * po/vi.po: Updated Vietnamese translation.
971
972 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
973
974 * aclocal.m4: Regenerate.
975 * configure: Regenerate.
976
977 2008-04-21 Cary Coutant <ccoutant@google.com>
978
979 * archive.c (_bfd_write_archive_contents): Fix incorrect use of
980 ARFMAG.
981
982 2008-04-21 Nathan Sidwell <nathan@codesourcery.com>
983
984 * elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Don't
985 set the value of undefined symbols in shared objects.
986 (_bfd_mips_vxworks_finish_dynamic_symbol): Clear value for
987 undefined symbols unless pointer equality is needed.
988
989 2008-04-18 Dennis Roberts <dennis.roberts@sunquestinfo.com>
990
991 * aix5ppc-core.c: Define macros for the default architecture and
992 machine for matching core files.
993 (xcoff64_core_p): Set the architecture and machine to the default
994 values defined in the macros mentioned above.
995 * rs6000-core.c: Define macros to determine whether or not the
996 core file header uses the core_dumpxx header format.
997 (rs6000coff_core_p): Don't match core files that use the
998 core_dumpxx header format.
999
1000 2008-04-16 Pedro Alves <pedro@codesourcery.com>
1001
1002 * config.bfd (i[3-7]86-*-dicos*, x86_64-*-dicos*): Add.
1003
1004 2008-04-16 David S. Miller <davem@davemloft.net>
1005
1006 * reloc.c (BFD_RELOC_SPARC_GOTDATA_HIX22,
1007 BFD_RELOC_SPARC_GOTDATA_LOX10, BFD_RELOC_SPARC_GOTDATA_OP_HIX22,
1008 BFD_RELOC_SPARC_GOTDATA_OP_LOX10, BFD_RELOC_SPARC_GOTDATA_OP): New.
1009 * libbfd.h: Regnerate.
1010 * bfd-in2.h: Regenerate.
1011 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Add entries for
1012 GOTDATA relocations.
1013 (sparc_reloc_map): Likewise.
1014 (_bfd_sparc_elf_check_relocs): Handle R_SPARC_GOTDATA_* like
1015 R_SPARC_GOT*.
1016 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1017 (_bfd_sparc_elf_relocate_section): Transform R_SPARC_GOTDATA_HIX22,
1018 R_SPARC_GOTDATA_LOX10, R_SPARC_GOTDATA_OP_HIX22, and
1019 R_SPARC_GOTDATA_OP_LOX10 into the equivalent R_SPARC_GOT* reloc.
1020 Simply ignore R_SPARC_GOTDATA_OP relocations.
1021
1022 2008-04-14 Aurelien Jarno <aurelien@aurel32.net>
1023
1024 * configure.in: Link with the PIC version of libiberty on
1025 Linux/MIPS hosts.
1026 * configure: Regenerate.
1027
1028 2008-04-14 Edmar Wienskoski <edmar@freescale.com>
1029
1030 * archures.c: Add bfd_mach_ppc_e500mc.
1031 * bfd-in2.h: Regenerate.
1032
1033 2008-04-08 Alan Modra <amodra@bigpond.net.au>
1034
1035 * elf32-spu.c (spu_elf_build_stubs): Correct error message.
1036 (mark_functions_via_relocs): Remove premature init of symtab_hdr.
1037 (collect_overlays): Commment typo fix.
1038
1039 2008-04-08 Kees Cook <kees@canonical.com>
1040
1041 * elflink.c (bfd_elf_size_dynamic_sections): Ignore GNU-stack note
1042 in EXEC_P bfds.
1043
1044 2008-04-08 Alan Modra <amodra@bigpond.net.au>
1045
1046 * elf32-spu.c: Include libiberty.h.
1047 (struct spu_link_hash_table): Add local_stire, overlay_fixed, reserved,
1048 non_ovly_stub, spu_elf_load_ovl_mgr, spu_elf_open_overlay_script,
1049 spu_elf_relink, auto_overlay fields.
1050 (AUTO_OVERLAY, AUTO_RELINK, OVERLAY_RODATA): Define.
1051 (needs_ovl_stub): Flip test so that call to non-function warning
1052 is emitted during relocate_section rather than earlier.
1053 (spu_elf_check_vma): Stash --auto-overlay parameters, and clear
1054 auto_overlay if no section exceeds local store.
1055 (struct call_info): Add count, max_depth, is_pasted fields.
1056 (struct function_info): Add rodata, last_caller, call_count,
1057 depth, new visit flags.
1058 (insert_callee): Increment call count.
1059 (copy_callee): New function.
1060 (mark_functions_via_relocs): Investigate all reloc types to count
1061 possible function pointer stubs for --auto-overlay. Track
1062 last_caller and increment function call_count.
1063 (pasted_function): Insert a "call" into call info for pasted section.
1064 (remove_cycles): Track max depth of calls. Don't emit call graph
1065 pruning warning for --auto-overlay.
1066 (build_call_tree): Don't transfer_calls for --auto-overlay.
1067 Adjust remove_cycles call.
1068 (sort_calls, sort_lib, sort_bfds): New functions.
1069 (struct _mos_param, struct _uos_param, struct _cl_param): New.
1070 (mark_overlay_section, unmark_overlay_section): New functions.
1071 (collect_lib_sectios, auto_ovl_lib_functions): New functions.
1072 (collect_overlays, find_pasted_call): New functions.
1073 (sum_stack): Deal with is_pasted "calls". Exit before printing
1074 when --auto-overlay.
1075 (spu_elf_auto_overlay): New function.
1076 (spu_elf_final_link): Call spu_elf_auto_overlay.
1077 * elf32-spu.h (spu_elf_check_vma): Update prototype.
1078
1079 2008-04-07 Alan Modra <amodra@bigpond.net.au>
1080
1081 * elf32-spu.c (allocate_spuear_stubs): Ensure _SPUEAR_ symbol
1082 is defined in overlay section before creating a stub.
1083 (build_spuear_stubs): Likewise.
1084 (spu_elf_size_stubs, spu_elf_build_stubs): Adjust calls.
1085
1086 2008-04-02 Alan Modra <amodra@bigpond.net.au>
1087
1088 * elf32-spu.c (insert_callee): Reorder call list so most recent
1089 call is always first.
1090 (interesting_section): Move.
1091 (mark_functions_via_relocs): Fold interesting_section and
1092 reloc_count tests in callers to here. Simplify output section
1093 owner test.
1094 (discover_functions): Set "gaps" when no symbols and some
1095 "interesting_section". Run pasted_function loop for no symbol
1096 bfds.
1097 (for_each_node, transfer_calls): New functions.
1098 (mark_non_root): Adjust to suit for_each_node.
1099 (call_graph_traverse): Likewise. Fix memory leak. Rename to..
1100 (remove_cycles): ..this.
1101 (build_call_tree): Use for_each_node and transfer_calls.
1102 (struct _sum_stack_param): New.
1103 (sum_stack): Adjust to suit for_each_node. Return error on
1104 malloc failure. Move code to print root node cumulative stack from..
1105 (spu_elf_stack_analysis): ..here. Use for_each_node.
1106
1107 2008-03-31 Cary Coutant <ccoutant@google.com>
1108
1109 PR 6006
1110 * archive.c (_bfd_slurp_extended_name_table): Change
1111 ARFMAG[0] to ARFMAG[1].
1112 (_bfd_construct_extended_name_table): Likewise.
1113
1114 2008-03-31 Daniel Jacobowitz <dan@codesourcery.com>
1115
1116 * elfxx-mips.c (mips_elf_record_got_page_entry): Update comment.
1117 (_bfd_mips_elf_check_relocs): Update comments. Always call
1118 mips_elf_record_got_page_entry for R_MIPS_GOT_PAGE.
1119
1120 2008-03-27 Cary Coutant <ccoutant@google.com>
1121
1122 Add support for thin archives.
1123 * archive.c (_bfd_find_nested_archive): New function.
1124 (get_extended_arelt_filename): Add origin parameter.
1125 (_bfd_generic_read_ar_hdr_mag): Deal with extended name
1126 combined with a file offset.
1127 (append_relative_path): New function.
1128 (_bfd_get_elt_at_filepos): Deal with external members and
1129 nested archives.
1130 (bfd_generic_openr_next_archived_file): Thin archives.
1131 (bfd_generic_archive_p): Recognize new magic string.
1132 (adjust_relative_path): New function.
1133 (_bfd_construct_extended_name_table): Construct extended
1134 names for thin archive members.
1135 (_bfd_write_archive_contents): Emit new magic string, skip
1136 copying files for thin archives.
1137 * bfd-in.h (bfd_is_thin_archive): New macro.
1138 * bfd.c (struct bfd): New fields for thin archives.
1139 * libbfd-in.h (struct areltdata): New field for thin archives.
1140 * opncls.c (bfd_close): Delete BFDs for nested archives.
1141
1142 2008-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
1143
1144 * elf32-bfin.c (bfin_final_link_relocate): New function, wrapper around
1145 _bfd_final_link_relocate that also handles R_pcrel24 relocs.
1146 (bfinfdpic_relocate_section, bfin_relocate_section): Use it.
1147
1148 2008-03-25 Nathan Sidwell <nathan@codesourcery.com>
1149
1150 * elf32-arm.c (elf32_arm_final_link_relocate): Skip dynamic relocs
1151 in vxworks tls_vars sections.
1152 (allocate_dynrelocs, elf32_arm_size_dynamic_sections): Likewise.
1153 * elf32-i386.c (allocate_dynrelocs,
1154 elf_i386_size_dynamic_sections, elf_i386_relocate_section): Likewise.
1155 * elf32-ppc.c (allocate_dynrelocs, ppc_elf_size_dynamic_sections,
1156 ppc_elf_relocate_section): Likewise.
1157 * elf32-sh.c (allocate_dynrelocs, sh_elf_size_dynamic_sections,
1158 sh_elf_relocate_section): Likewise.
1159 * elfxx-sparc.c (allocate_dynrelocs,
1160 _bfd_sparc_elf_size_dynamic_sections,
1161 _bfd_sparc_elf_relocate_section): Likewise.
1162
1163 2008-03-21 Adam Nemet <anemet@caviumnetworks.com>
1164
1165 * elf.c (_bfd_elf_print_private_bfd_data): Use bfd_fprintf_vma to
1166 print the values from the dynamic section.
1167
1168 2008-03-20 Richard Sandiford <rsandifo@nildram.co.uk>
1169
1170 * elfxx-mips.c (MIPS_ELF_GNU_GOT1_MASK): New macro.
1171 (_bfd_mips_elf_finish_dynamic_sections): Use it instead of 0x80000000.
1172
1173 2008-03-20 Alan Modra <amodra@bigpond.net.au>
1174
1175 * elf32-spu.c (spu_elf_create_sections): Remove output_bfd parameter.
1176 (spu_elf_find_overlays, spu_elf_size_stubs): Likewise
1177 (process_stubs, discover_functions, build_call_tree): Likewise.
1178 (spu_elf_stack_analysis): Likewise.
1179 (spu_elf_check_vma): Likewise. Move.
1180 (struct call_info): Make "is_tail" a bitfield.
1181 (insert_callee): Clear fun->start and set fun->is_func if we find
1182 a non-tail call.
1183 * elf32-spu.h (spu_elf_create_sections): Update prototype.
1184 (spu_elf_find_overlays, spu_elf_size_stubs, spu_elf_check_vma): Ditto.
1185
1186 2008-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1187
1188 * aclocal.m4: Regenerate.
1189 * configure: Likewise.
1190 * Makefile.in: Likewise.
1191
1192 2008-03-16 H.J. Lu <hongjiu.lu@intel.com>
1193
1194 PR ld/5789
1195 PR ld/5943
1196 * elf32-i386.c (elf_i386_relocate_section): Issue an error
1197 for R_386_GOTOFF relocaton against undefined hidden/internal
1198 symbols when building a shared object.
1199
1200 * elf64-x86-64.c (elf64_x86_64_relocate_section): Issue an
1201 error for R_X86_64_PC8/R_X86_64_PC16/R_X86_64_PC32
1202 relocaton against undefined hidden/internal symbols when
1203 building a shared object.
1204 (elf64_x86_64_finish_dynamic_symbol): Return FALSE when symbol
1205 is referenced locally, but isn't defined in a regular file.
1206
1207 2008-03-15 H.J. Lu <hongjiu.lu@intel.com>
1208
1209 * bfd-in.h (BFD_NO_FLAGS, HAS_RELOC, EXEC_P, HAS_LINENO,
1210 HAS_DEBUG, HAS_SYMS, HAS_LOCALS, DYNAMIC, WP_TEXT, D_PAGED,
1211 BFD_IS_RELAXABLE, BFD_TRADITIONAL_FORMAT, BFD_IN_MEMORY,
1212 HAS_LOAD_PAGE, BFD_LINKER_CREATED): Moved to ...
1213 * bfd.c: Here.
1214
1215 * bfd.c (bfd): Change cacheable, target_defaulted, opened_once,
1216 mtime_set, no_export, output_has_begun and has_armap to bit
1217 field.
1218
1219 * bfd-in2.h: Regenerated.
1220
1221 2008-03-14 Daniel Jacobowitz <dan@codesourcery.com>
1222
1223 * cache.c (close_one): Remove mtime hack.
1224
1225 2008-03-14 H.J. Lu <hongjiu.lu@intel.com>
1226
1227 PR ld/5913
1228 * elfxx-ia64.c (elfNN_ia64_tprel_base): Remove BFD_ASSERT.
1229 (elfNN_ia64_dtprel_base): Likewise.
1230 (elfNN_ia64_relocate_section): Go to missing_tls_sec if
1231 tls_sec is NULL before calling elfNN_ia64_tprel_base or
1232 elfNN_ia64_dtprel_base. Report unsupported TLS relocations.
1233
1234 2008-03-14 Alan Modra <amodra@bigpond.net.au>
1235
1236 * elf32-spu.c (process_stubs, spu_elf_relocate_section): Move
1237 common code to..
1238 (maybe_needs_stub): ..here, a new function that also omits stubs
1239 for .eh_frame, and..
1240 (needs_ovl_stub): ..here. Create stubs for labels in code section
1241 referenced by switch jump table.
1242 (spu_elf_find_overlays): Set htab->ovly_load and htab->ovly_return.
1243 (enum _insn_type): Delete.
1244 (enum _stub_type): New.
1245 (count_stub, build_stub): Adjust.
1246 (allocate_spuear_stubs, build_spuear_stubs): Adjust.
1247
1248 2008-03-13 Alan Modra <amodra@bigpond.net.au>
1249
1250 * elf.c (_bfd_elf_make_section_from_shdr): Remove unnecessary cast.
1251 (_bfd_elf_assign_file_position_for_section): Simplify align.
1252 (_bfd_elf_init_reloc_shdr): Ensure shift expression wide enough
1253 for sh_addralign.
1254 (elf_fake_sections, swap_out_syms): Likewise.
1255 * elflink.c (bfd_elf_final_link): Likewise.
1256
1257 2008-03-13 Alan Modra <amodra@bigpond.net.au>
1258
1259 * Makefile.am: Run "make dep-am".
1260 * Makefile.in: Regenerate.
1261 * po/SRC-POTFILES.in: Regenerate.
1262
1263 2008-03-12 Bernd Schmidt <bernd.schmidt@analog.com>
1264
1265 From Jie Zhang <jie.zhang@analog.com>
1266 * elf32-bfin.c (struct bfinfdpic_relocs_info): Make got17m4,
1267 gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4, fdgoffhilo,
1268 gotoff, call and sym not bitfields.
1269 (bfinfdpic_gc_sweep_hook): New function; update the relocation
1270 information for the relocations of the section being removed.
1271 (bfinfdpic_check_relocs): Accumulate the number of relocations
1272 which set got17m4, gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4,
1273 fdgoffhilo, gotoff, call and sym fields.
1274 (elf_backend_gc_sweep_hook): Redefine for FD-PIC.
1275
1276 2008-03-12 Alan Modra <amodra@bigpond.net.au>
1277
1278 PR 5900
1279 * elf-bfd.h: Include elf/internal.h after elf/external.h.
1280 * elfcode.h (elf_swap_symbol_in): Map reserved shndx range.
1281 (elf_swap_symbol_out): Adjust SHN_XINDEX test.
1282 (elf_swap_ehdr_out): Mask SHN_LORESERVE and SHN_XINDEX to values
1283 seen in external structs.
1284 (valid_section_index_p): Delete.
1285 (elf_object_p): Don't increment section numbers over reserved range.
1286 Simplify test for valid sh_link, sh_info and e_shstrndx fields.
1287 (elf_write_shdrs_and_ehdr): Mask SHN_LORESERVE and SHN_XINDEX to values
1288 seen in external structs. Don't increment section numbers over
1289 reserved range.
1290 * elf.c (bfd_elf_sym_name): Remove redundant tests on st_shndx.
1291 (bfd_section_from_shdr): Likewise.
1292 (group_signature): Range check before accessing elf_elfsections.
1293 (_bfd_elf_setup_sections): Likewise.
1294 (bfd_section_from_shdr): Likewise.
1295 (bfd_section_from_shdr): Don't increment section number over
1296 reserved sections.
1297 (assign_file_positions_for_non_load_sections): Likewise.
1298 (assign_file_positions_except_relocs): Likewise.
1299 (_bfd_elf_write_object_contents): Likewise.
1300 (assign_section_numbers): Likewise. Adjust for changed SHN_*.
1301 (prep_headers): Delete unused variable.
1302 * elflink.c (bfd_elf_link_record_local_dynamic_symbol): Adjust
1303 for changed SHN_* values.
1304 (check_dynsym, elf_link_input_bfd): Likewise.
1305 (bfd_elf_final_link): Likewise. Don't skip over reserved section
1306 range.
1307 (elf_fixup_link_order): Check that sh_link field is valid.
1308 * elf-hppa.h (elf_hppa_add_symbol_hook): Make "index" unsigned.
1309 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Range check before
1310 accesssing elf_elfsections.
1311 * elf32-avr.c (elf32_avr_size_stubs): Likewise.
1312 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
1313 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Likewise.
1314 * elf64-hppa.c (elf64_hppa_check_relocs): Adjust for changed
1315 SHN_* defines. Test for SHN_BAD return from
1316 _bfd_elf_section_from_bfd_section
1317
1318 2008-03-12 Alan Modra <amodra@bigpond.net.au>
1319
1320 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Update prototype.
1321 * elf.c (_bfd_elf_section_from_bfd_section): Return unsigned int,
1322 SHN_BAD on error.
1323 (_bfd_elf_print_private_bfd_data): Test for SHN_BAD result from
1324 _bfd_elf_section_from_bfd_section, not -1.
1325 (swap_out_syms): Likewise.
1326 * elflink.c (elf_link_add_object_symbols): Likewise.
1327 (bfd_elf_get_bfd_needed_list): Likewise.
1328 (bfd_elf_match_symbols_in_sections): Likewise.
1329 (elf_link_add_object_symbols): Don't bother testing for symbols
1330 using normal sections before calling bfd_section_from_elf_index.
1331 (elf_link_input_bfd, bfd_elf_final_link): Likewise.
1332 (bfd_elf_reloc_symbol_deleted_p): Likewise.
1333 * elfcode.h (elf_slurp_symbol_table): Likewise.
1334 * elf32-spu.c (get_sym_h): Likewise.
1335 * elf32-xtensa.c (get_elf_r_symndx_section): Likewise.
1336 * elf64-ppc.c (opd_entry_value, get_sym_h, ppc64_elf_edit_toc): Ditto.
1337 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
1338
1339 2008-03-11 Alan Modra <amodra@bigpond.net.au>
1340
1341 * elf32-spu.c (spu_elf_relocate_section): Test identical conditions
1342 to those in process_stubs for overlay symbols.
1343
1344 2008-03-09 Paul Brook <paul@codesourcery.com>
1345
1346 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
1347 Tag_VFP_arch values.
1348
1349 2008-03-08 Paul Brook <paul@codesourcery.com>
1350
1351 * elf32-arm.c (insert_thumb_branch): Rewrite.
1352 (elf32_thumb_to_arm_stub): Use new insert_thumb_branch.
1353
1354 2008-03-07 Paul Brook <paul@codesourcery.com>
1355
1356 * elf32-arm.c (elf32_arm_howto_table_1): Fix bitmasks for MOVW and
1357 MOVT relocations.
1358 (elf32_arm_final_link_relocate): Fix off by one MOVW/MOVT sign
1359 extension.
1360 (elf32_arm_relocate_section): Handle MOVW and MOVT
1361 relocations. Improve safety check for other weird relocations.
1362 (elf32_arm_check_relocs): Only set h->needs_plt for branch/call
1363 relocations.
1364
1365 2008-03-03 Bob Wilson <bob.wilson@acm.org>
1366
1367 * xtensa-isa.c (xtensa_isa_num_pipe_stages): Make max_stage static and
1368 only compute its value once.
1369
1370 2008-03-03 Alan Modra <amodra@bigpond.net.au>
1371
1372 * elf32-spu.c (struct got_entry): Add "addend" field.
1373 (count_stub, build_stub): Use a new stub if relocation addend
1374 differs from existing stubs for this symbol.
1375 (process_stubs): Deal with addends.
1376 (spu_elf_relocate_section, spu_elf_output_symbol_hook): Likewise.
1377
1378 2008-03-02 H.J. Lu <hongjiu.lu@intel.com>
1379
1380 PR ld/5789
1381 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return true
1382 for hidden and local symbols.
1383
1384 2008-03-03 Alan Modra <amodra@bigpond.net.au>
1385
1386 * elf32-ppc.c (allocate_dynrelocs): Discard relocs on
1387 undefined symbols with internal or hidden visibility.
1388 (ppc_elf_relocate_section): Likewise. Use SYMBOL_CALLS_LOCAL
1389 rather than SYMBOL_REFERENCES_LOCAL on branches. Don't
1390 return immediately on dynamic reloc error.
1391
1392 2008-03-01 Alan Modra <amodra@bigpond.net.au>
1393
1394 * elf64-ppc.c (build_plt_stub): Add relocs on plt call stubs
1395 if emitrelocations.
1396 (get_relocs): New function, split out from..
1397 (ppc_build_one_stub): ..here. Add relocs on plt_branch stubs if
1398 emitrelocations. Remove indx temp.
1399 (ppc_size_one_stub): Count new stub relocs.
1400 (ppc64_elf_size_stubs): Count new glink reloc.
1401 (ppc64_elf_build_stubs): Emit glink reloc if emitrelocations.
1402 (ppc64_elf_finish_dynamic_sections): Output glink relocs.
1403 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Describe non-pic
1404 glink code.
1405
1406 2008-02-28 Alan Modra <amodra@bigpond.net.au>
1407
1408 * elf32-spu.c (mark_functions_via_relocs): Don't assume that
1409 the "->start" pointer reaches to function origin, so that we
1410 can handle functions split over more than two sections.
1411 (build_call_tree): Likewise.
1412 (pasted_function): Don't attempt to set fun->start back to the
1413 function origin, just go back one section.
1414
1415 2008-02-27 Catherine Moore <clm@codesourcery.com>
1416
1417 * elf.c ( _bfd_elf_print_private_bfd_data): Call
1418 elf_backend_get_target_dtag if defined.
1419 * elf32-mips.c (elf_backend_get_target_dtag): Define.
1420 * elf64-mips.c: Likewise.
1421 * elfn32-mips.c: Likewise.
1422 * elfxx-mips.c (_bfd_mips_elf_get_target_dtag): New.
1423 * elfxx-mips.h (_bfd_mips_elf_get_target_dtag): Declare.
1424 * elf-bfd.h (elf_backend_get_target_dtag): Add prototype.
1425 * elfxx-target.h (elf_backend_get_target_dtag): Add default.
1426 (elf_backend_data): Add elf_backend_get_target_dtag.
1427
1428 2008-02-26 Alan Modra <amodra@bigpond.net.au>
1429
1430 * elf32-ppc.c (ppc_elf_check_relocs): Set pointer_equality_needed
1431 for R_PPC_REL32 syms. Don't set non_got_ref on branch reloc syms,
1432 and assume branch relocs are not dynamic when non-shared.
1433 (readonly_dynrelocs): New function, split out from..
1434 (maybe_set_textrel): ..here, renamed from old readonly_dynrelocs.
1435 (ppc_elf_adjust_dynamic_symbol): For symbols generating plt entries,
1436 clear non_got_ref..
1437 (allocate_dynrelocs): ..and don't set u.def for undefined weak.
1438 Do allow dynamic relocs on undefined symbols.
1439 (ppc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
1440 (ppc_elf_relocate_section): Mirror dynamic reloc changes in
1441 check_relocs.
1442 (ppc_elf_finish_dynamic_symbol): Don't give a warning on weak
1443 plt symbols needing pointer_equality_needed.
1444
1445 2008-02-23 Alan Modra <amodra@bigpond.net.au>
1446
1447 * elf32-ppc.c (ppc_elf_check_relocs): Revert non_got_ref change.
1448
1449 2008-02-23 Alan Modra <amodra@bigpond.net.au>
1450
1451 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Copy
1452 pointer_equality_needed.
1453 (ppc_elf_check_relocs): Split out non-branch relocs from others
1454 that might emit dynamic relocs. Set pointer_equality_needed
1455 for their symbols. Don't set non_got_ref on branch reloc symbols.
1456 (ppc_elf_hash_symbol): New function.
1457 (elf_backend_hash_symbol): Define.
1458 (ppc_elf_finish_dynamic_symbol): Handle pointer_equality_needed.
1459 Error if pointer_equality_needed on weak plt symbol.
1460
1461 2008-02-22 H.J. Lu <hongjiu.lu@intel.com>
1462
1463 PR ld/5788
1464 * elflink.c (elf_create_symbuf): Correct buffer size and
1465 position.
1466
1467 2008-02-22 Nick Clifton <nickc@redhat.com>
1468
1469 PR 868
1470 * dwarf2.c: Revert previous patch. All of the allocate memory is
1471 on an obstack which will be freed at some other time.
1472
1473 2008-02-20 Nick Clifton <nickc@redhat.com>
1474
1475 PR 868
1476 * libbfd.c (bfd_realloc_or_free): New function. Performs like
1477 bfd_realloc, but if the (re)allocation fails, the pointer is
1478 freed.
1479 * libbfd-in.h: Prototype.
1480 * libbfd.h: Regenerate.
1481 * bfdio.c (bfd_bwrite): Use the new function.
1482 (bfd_seek): Likewise.
1483 * bfdwin.c:(bfd_get_file_window): Likewise.
1484 * elf-strtab.c (_bfd_elf_strtab_add): Likewise.
1485 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
1486 * elf32-xtensa.c (vsprintf_msg): Likewise.
1487 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
1488 * stabs.c (_bfd_link_seciton_stabs): Likewise.
1489 * vms-misc.c (_bfd_vms_get_record): Likewise.
1490 * vms-tir.c (check_section): Likewise.
1491 * vms.c (vms_new_section_hook): Likewise.
1492 * elf32-arm.c (elf32_arm_section_map_add): Check that the
1493 allocation of sec_data->map succeeded before using it.
1494 * elflink.c (elf_link_output_sym): Do not overwrite finfo->
1495 symshndxbuf until it is known that the reallocation succeeded.
1496
1497 2008-02-20 Diogo de Carvalho Kraemer <diogo@kraemer.eng.br>
1498 Nick Clifton <nickc@redhat.com>
1499
1500 PR 868
1501 * dwarf2.c (read_abbrevs): Free the abbreviation table if we run
1502 out of memory.
1503 (decode_line_info): Free the line_info_table before returning a
1504 failure result.
1505 (_bfd_dwarf2_cleanup_debug_info): Free the abbreviation table.
1506 Free the line table. Free the function table. Free the variable
1507 table.
1508
1509 2008-02-17 Mark Kettenis <kettenis@gnu.org>
1510
1511 * elf.c (swap_out_syms): Avoid preprocessing directive within
1512 macro arg.
1513
1514 2008-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
1515
1516 * elf.c (assign_file_positions_for_load_sections): Set the type of
1517 PT_NOTE sections to SHT_NOTE.
1518
1519 2008-02-17 Ulrich Weigand <uweigand@de.ibm.com>
1520
1521 * simple.c (bfd_simple_get_relocated_section_contents): Set
1522 link_info.output_bfd.
1523
1524 2008-02-16 Nathan Sidwell <nathan@codesourcery.com>
1525
1526 * dwarf2.c (find_line): Don't trust debug information after an
1527 unparseable compilation unit.
1528
1529 2008-02-15 Alan Modra <amodra@bigpond.net.au>
1530
1531 PR 5765
1532 * section.c (SEC_LINK_DUPLICATES): Correct. Renumber following flags.
1533 * bfd-in2.h: Regenerate.
1534
1535 2008-02-15 Alan Modra <amodra@bigpond.net.au>
1536
1537 * elf-bfd.h (enum elf_object_id): Add HPPA_ELF_TDATA.
1538 * elf.c (bfd_elf_allocate_object): Don't check for already allocated
1539 tdata.
1540 * elf32-hppa.c (elf32_hppa_mkobject): New function.
1541 (bfd_elf32_mkobject): Define.
1542 * elf32-ppc.c (is_ppc_elf_target): Delete. Replace all uses with..
1543 (is_ppc_elf): ..this new macro.
1544 * elf64-ppc.c (is_ppc64_elf_target): Delete. Replace all uses with..
1545 (is_ppc64_elf): ..this new macro.
1546
1547 2008-02-15 Alan Modra <amodra@bigpond.net.au>
1548
1549 * elflink.c: Replace all accesses to hash->creator field with
1550 output_bfd->xvec.
1551 * cofflink.c: Likewise.
1552 * coff-h8300.c: Likewise.
1553 * ecoff.c: Likewise.
1554 * elf32-m68hc1x.c: Likewise.
1555 * elf32-ppc.c: Likewise.
1556 * elf64-alpha.c: Likewise.
1557 * elf64-ppc.c: Likewise.
1558 * elf64-sparc.c: Likewise.
1559 * elfxx-mips.c: Likewise.
1560 * i386linux.c: Likewise.
1561 * m68klinux.c: Likewise.
1562 * sparclinux.c: Likewise.
1563 * sunos.c: Likewise.
1564 * xcofflink.c: Likewise.
1565 * linker.c: Likewise.
1566 (_bfd_link_hash_table_init): Don't store creator.
1567
1568 2008-02-14 Peter Jones <pjones@redhat.com>
1569
1570 * efi-rtdrv-ia32.c: New file.
1571 * efi-bsdrv-ia32.c: New file.
1572 * efi-rtdrv-ia64.c: New file.
1573 * efi-bsdrv-ia64.c: New file.
1574 * efi-rtdrv-x86_64.c: New file.
1575 * efi-bsdrv-x86_64.c: New file.
1576 * peicode.h (pe_bfd_object_p): Add support for boot service and
1577 runtime service drivers.
1578 * libpei.h: Add macros for EFI formats, and rename the efi application
1579 format macros to disambiguate.
1580 * targets.c: Add bfd_target _vec externs.
1581 (_bfd_tar): Add EFI _vec entries.
1582 * config.bfd: Add EFI vectors into the selection routines.
1583 * configure.in: add EFI _vec entries.
1584 * configure: Regenerate.
1585 * Makefile.am: Add EFI files.
1586 * Makefile.in: Regenerate.
1587
1588 2008-02-14 Nathan Sidwell <nathan@codesourcery.com>
1589
1590 * dwarf1.c (struct dwarf1_debug): Add syms member.
1591 (alloc_dwarf1_unit, alloc_dwarf1_func): Check for out of memory.
1592 (parse_line_table, _bfd_dwarf1_find_nearest_line): Relocate
1593 section contents, check for out of memory.
1594
1595 * dwarf1.c (struct dwarf1_debug): Change data pointers to bfd_byte.
1596 (parse_die): Change data pointers to bfd_byte.
1597 (parse_line_table, parse_functions_in_unit): Likewise.
1598
1599 2008-02-14 Alan Modra <amodra@bigpond.net.au>
1600
1601 * elflink.c (compute_bucket_count): Warning fixes.
1602
1603 2008-02-12 DJ Delorie <dj@redhat.com>
1604
1605 * elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of
1606 relocation pointing to local symbol in merged section.
1607
1608 * elf32-iq2000.c (iq2000_elf_relocate_offset16): New.
1609 (iq2000_elf_relocate_section): Call it.
1610
1611 2008-02-12 Nick Clifton <nickc@redhat.com>
1612
1613 PR ld/5692
1614 * elf-bfd.h (enum elf_object_id): New enum, used to identify
1615 target specific extensions to the elf_obj_tdata structure.
1616 (struct elf_obj_tdata): New field 'object_id'.
1617 (elf_object_id, elf_program_header_size, elf_symtab_hdr): New
1618 macros for accessing fields in the elf_obj_tdata structure.
1619 (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object.
1620 (bfd_elf_allocate_object): New function.
1621 * elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object
1622 and implement by calling bfd_elf_allocate_object.
1623 (bfd_elf_allocate_object): New function: Allocates an
1624 elf_obj_tdata structure, possibly with a target specific
1625 extension.
1626 * elfxx-target.h (bfd_elfNN_mkobject): Use
1627 bfd_elf_make_generic_object as the default value.
1628 * elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata
1629 for consistency with other, similar structures.
1630 (is_arm_elf): New macro. Checks a BFD to make sure that is an ARM
1631 ELF bfd.
1632 (elf32_arm_mkobject): Call bfd_elf_allocate_object.
1633 (bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check
1634 the bfd being processed.
1635 (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
1636 (bfd_elf32_arm_set_target_relocs): Likewise.
1637 (bfd_elf32_arm_final_link_relocate): Likewise.
1638 (bfd_elf32_arm_copy_private_bfd_data): Likewise.
1639 (bfd_elf32_arm_merge_eabi_attributes): Likewise.
1640 (bfd_elf32_arm_merge_private_bfd_data): Likewise.
1641 (bfd_elf32_arm_check_relocs): Likewise.
1642 (bfd_elf32_arm_gc_mark_extra_sections): Likewise.
1643 (bfd_elf32_arm_size_dynamic_sections): Likewise.
1644 (bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr.
1645 (bfd_elf32_arm_init_maps): Likewise.
1646 (bfd_elf32_arm_final_link_relocate): Likewise.
1647 (bfd_elf32_arm_relocate_section): Likewise.
1648 (bfd_elf32_arm_gc_sweep_hook): Likewise.
1649 (bfd_elf32_arm_check_relocs): Likewise.
1650 (bfd_elf32_arm_size_dynamic_sections): Likewise.
1651 * elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object.
1652 (is_i386_elf): New macro. Checks a BFD to make sure that is an x86
1653 ELF bfd.
1654 (elf_i386_check_relocs): Use is_i386_elf macro to check the bfd
1655 being processed.
1656 (elf_i386_size_dynamic_sections): Likewise.
1657 (elf_i386_relocate_section): Likewise.
1658 (elf_i386_check_relocs): Use elf_symtab_hdr.
1659 (elf_i386_gc_sweep_hook): Likewise.
1660 (elf_i386_size_dynamic_sections): Likewise.
1661 (elf_i386_relocate_section): Likewise.
1662 * elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object.
1663 (elf_create_pointer_linker_section): Use is_ppc_elf_target to
1664 verify that the bfd before accessing target specific fields.
1665 (ppc_elf_check_relocs): Likewise.
1666 (elf_finish_pointer_linker_section): Likewise.
1667 (elf_create_pointer_linker_section): Use elf_symtab_hdr.
1668 (ppc_elf_check_relocs): Likewise.
1669 (ppc_elf_gc_sweep_hook): Likewise.
1670 (ppc_elf_tls_optimize): Likewise.
1671 (ppc_elf_size_dynamic_sections): Likewise.
1672 (ppc_elf_relax_section): Likewise.
1673 (ppc_elf_relocate_section): Likewise.
1674 * elf32-s390.c (struct elf_s390_obj_tdata): Add a comment
1675 reminding programmers to keep this structure in sync with the one
1676 defined in elf64-s390.c.
1677 (elf_s390_mkobject): Call bfd_elf_allocate_object.
1678 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
1679 ELF bfd.
1680 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
1681 being processed.
1682 (elf_s390_size_dynamic_sections): Likewise.
1683 (elf_s390_relocate_section): Likewise.
1684 (elf_s390_check_relocs): Use elf_symtab_hdr.
1685 (elf_s390_gc_sweep_hook): Likewise.
1686 (elf_s390_size_dynamic_sections): Likewise.
1687 (elf_s390_relocate_section): Likewise.
1688 * elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object.
1689 (is_sh_elf): New macro. Checks a BFD to make sure that is an SH
1690 ELF bfd.
1691 (sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the
1692 bfd being processed.
1693 (sh_elf_relocate_section): Likewise.
1694 (sh_elf_check_relocs): Likewise.
1695 (sh_elf_copy_private_data): Likewise.
1696 (sh_elf_relax_section): Use elf_symtab_hdr.
1697 (sh_elf_size_dynamic_sections): Likewise.
1698 (sh_elf_relocate_section): Likewise.
1699 (sh_elf_get_relocated_section_contents): Likewise.
1700 (sh_elf_gc_sweep_hook): Likewise.
1701 (sh_elf_check_relocs): Likewise.
1702 * elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object.
1703 (is_alpha_elf): New macro. Checks a BFD to make sure that is an
1704 Alpha ELF bfd.
1705 (elf64_alpha_create_got_section): Use is_alpha_elf macro to check
1706 the bfd being processed.
1707 (elf64_alpha_create_dynamic_section): Likewise.
1708 (elf64_alpha_check_relocs): Likewise.
1709 (elf64_alpha_size_got_sections): Likewise.
1710 (elf64_alpha_relax_section): Likewise.
1711 (elf64_alpha_relocate_section): Likewise.
1712 (elf64_alpha_final_link): Likewise.
1713 (elf64_alpha_check_relocs): Use elf_symtab_hdr.
1714 (elf64_alpha_relax_section): Likewise.
1715 (elf64_alpha_relocate_section_r): Likewise.
1716 (elf64_alpha_relocate_section): Likewise.
1717 * elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object.
1718 (ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd
1719 being processed.
1720 (opd_entry_value): Likewise.
1721 (allocate_dynrelocs): Likewise.
1722 (ppc64_elf_relocate_section): Likewise.
1723 (ppc64_elf_check_relocs): Use elf_symtab_hdr.
1724 (opd_entry_value): Likewise.
1725 (ppc64_elf_gc_sweep_hook): Likewise.
1726 (get_sym_h): Likewise.
1727 (ppc64_elf_edit_opd): Likewise.
1728 (ppc64_elf_tls_optimize): Likewise.
1729 (ppc64_elf_edit_toc): Likewise.
1730 (ppc64_elf_size_dynamic_sections): Likewise.
1731 (toc_adjusting_stub_needed): Likewise.
1732 (ppc64_elf_size_stubs): Likewise.
1733 (ppc64_elf_relocate_section): Likewise.
1734 * elf64-s390.c (struct elf_s390_obj_tdata): Add a comment
1735 reminding programmers to keep this structure in sync with the one
1736 defined in elf32-s390.c.
1737 (elf_s390_mkobject): Call bfd_elf_allocate_object.
1738 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
1739 ELF bfd.
1740 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
1741 being processed.
1742 (elf_s390_size_dynamic_sections): Likewise.
1743 (elf_s390_relocate_section): Likewise.
1744 (elf_s390_check_relocs): Use elf_symtab_hdr.
1745 (elf_s390_gc_sweep_hook): Likewise.
1746 (elf_s390_size_dynamic_sections): Likewise.
1747 (elf_s390_relocate_section): Likewise.
1748 * elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object.
1749 (is_x86_64_elf): New macro. Checks a BFD to make sure that is an
1750 x86_64 ELF bfd.
1751 (elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd
1752 being processed.
1753 (elf64_x86_64_size_dynamic_sections): Likewise.
1754 (elf64_x86_64_relocate_section): Likewise.
1755 (elf64_x86_64_check_relocs): Use elf_symtab_hdr.
1756 (elf64_x86_64_gc_sweep_hook): Likewise.
1757 (elf64_x86_64_size_dynamic_sections): Likewise.
1758 (elf64_x86_64_relocate_section): Likewise.
1759 * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object.
1760 (is_sparc_elf): New macro. Checks a BFD to make sure that is a Sparc
1761 ELF bfd.
1762 (_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the
1763 bfd being processed.
1764 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1765 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1766 (_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr.
1767 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1768 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1769 (_bfd_sparc_elf_relocate_section): Likewise.
1770
1771 2008-02-12 Alan Modra <amodra@bigpond.net.au>
1772
1773 PR 5303, 5755
1774 * arange-set.c: Delete.
1775 * arange-set.h: Delete.
1776 * dwarf2.c: Revert 2007-09-21 changes.
1777 * Makefile.am: Likewise.
1778 * Makefile.in: Regenerate.
1779 * po/SRC-POTFILES.in: Regenerate.
1780
1781 2008-02-11 Bernd Schmidt <bernd.schmidt@analog.com>
1782
1783 * elf32-bfin.c (bfin_relocate_section): Set up dynobj before using it
1784 if necessary.
1785 (elf32_bfin_merge_private_bfd_data): Simplify, and ensure object type
1786 mismatches are detected.
1787
1788 * elf32-bfin.c (bfinfdpic_relocate_section): Take more care not to
1789 emit invalid relocs or rofixup entries for deleted .eh_frame entries.
1790
1791 2008-02-11 Daniel Jacobowitz <dan@codesourcery.com>
1792
1793 * cache.c (cache_bread): Set bfd_error_file_truncated if EOF
1794 was reached.
1795 * srec.c (srec_scan): Calculate the checksum. Complain on mismatch.
1796
1797 2008-02-07 Alan Modra <amodra@bigpond.net.au>
1798
1799 * elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling
1800 of _ovly_buf_table size.
1801 (spu_elf_build_stubs): Use low bit of .size as "present" bit.
1802 Adjust initialisations relating to _ovly_buf_table.
1803
1804 2008-02-04 Bob Wilson <bob.wilson@acm.org>
1805
1806 * elf32-xtensa (elf_xtensa_relocate_section): After finding an invalid
1807 relocation, do not continue processing it. Ignore R_XTENSA_ASM_EXPAND
1808 relocations against dynamic symbols.
1809 (elf_xtensa_finish_dynamic_sections): Do not fail if there is no
1810 .xt.lit section.
1811
1812 2008-02-04 Kai Tietz <kai.tietz@onevision.com>
1813 H.J. Lu <hongjiu.lu@intel.com>
1814
1815 PR 5715
1816 * warning.m4: Enable -Wno-format by default when using gcc on
1817 mingw.
1818 * configure: Regenerated.
1819
1820 2008-02-04 Adam Nemet <anemet@caviumnetworks.com>
1821
1822 * archures.c: Update copyright.
1823 (bfd_mach_mips_octeon): New macro.
1824 * bfd-in2.h: Regenerate.
1825 * elfxx-mips.c (_bfd_elf_mips_mach): Handle Octeon.
1826 (mips_set_isa_flags): Likewise.
1827 (mips_mach_extensions): Add Octeon.
1828 * cpu-mips.c: Update copyright.
1829 (I_mipsocteon): New enum constant.
1830 (arch_info_struct): Add Octeon.
1831
1832 2008-02-04 Alan Modra <amodra@bigpond.net.au>
1833
1834 * elf32-spu.c (spu_elf_relocate_section): Correct return type.
1835 Return error status on unexpected relocation errors.
1836
1837 2008-02-04 Alan Modra <amodra@bigpond.net.au>
1838
1839 PR ld/5692
1840 * elf.c (bfd_elf_get_elf_syms): Revert 2008-01-31. Instead abort
1841 on non-ELF input.
1842 * elf32-arm.c (elf32_arm_size_dynamic_sections): Skip glue
1843 processing on non-ELF input.
1844
1845 2008-01-31 Marc Gauthier <marc@tensilica.com>
1846
1847 * config.bfd (xtensa*-*-*): Recognize processor variants.
1848
1849 2008-01-31 Nick Clifton <nickc@redhat.com>
1850
1851 PR ld/5692
1852 * elf.c (bfd_elf_get_elf_syms): Check the return value of
1853 get_elf_backend_data.
1854
1855 2008-01-28 Fabian Groffen <grobian@gentoo.org>
1856
1857 * config.bfd (x86_64-*-solaris2): Add support for this target.
1858
1859 2008-01-28 Alan Modra <amodra@bigpond.net.au>
1860
1861 Rewrite SPU overlay handling code. Put overlay calls stubs in the
1862 overlays where possible. Use a faster call stub, or optionally at
1863 compile time, a more compact stub. Double size of _ovly_buf_table
1864 so that low bit of _ovly_table.buf can be used as a "present" bit.
1865 Reserve an extra _ovly_table entry for index zero.
1866 * elf32-spu.c: (struct spu_link_hash_table): Delete a number of fields,
1867 add new ones.
1868 (struct got_entry): New.
1869 (struct spu_stub_hash_entry): Delete.
1870 (stub_hash_newfunc, spu_elf_link_hash_table_free): Delete.
1871 (spu_elf_link_hash_table_create): Adjust for struct changes.
1872 (spu_stub_name): Delete.
1873 (spu_elf_find_overlays): Don't track sections from overlay regions.
1874 Instead set ovl_buf number in spu elf section data. Error if
1875 overlays in one region don't start at the same address. Adjust
1876 for struct _spu_elf_section_data changes.
1877 (SIZEOF_STUB1, SIZEOF_STUB2, ILA_79, ILA_78): Delete.
1878 (OVL_STUB_SIZE, BRSL, LNOP, ILA): Define.
1879 (needs_ovl_stub): Adjust for struct _spu_elf_section_data changes.
1880 (enum _insn_type): New.
1881 (count_stub, build_stub): New functions.
1882 (allocate_spuear_stubs): Use count_stub.
1883 (build_spuear_stubs): Use build_stub.
1884 (populate_stubs, sort_stubs): Delete.
1885 (process_stubs): New function.
1886 (write_one_stub): Delete.
1887 (spu_elf_size_stubs, spu_elf_build_stubs): Rewrite.
1888 (alloc_stack_info): Adjust for struct _spu_elf_section_data changes.
1889 (maybe_insert_function, check_function_ranges): Likewise.
1890 (find_function, pasted_function, build_call_tree): Likewise.
1891 (spu_elf_stack_analysis, spu_elf_modify_segment_map): Likewise.
1892 (spu_elf_modify_program_headers): Likewise.
1893 (interesting_section): Detect stub sections differently. Delete
1894 htab param, adjust all callers.
1895 (spu_elf_relocate_section): Rewrite stub handling.
1896 (spu_elf_output_symbol_hook): Likewise.
1897 (bfd_elf32_bfd_link_hash_table_free): Delete.
1898 * elf32-spu.h (struct _spu_elf_section_data): Move input-only and
1899 output-only fields into a union. Add ovl_buf.
1900 (spu_elf_size_stubs, spu_elf_build_stubs): Update prototypes.
1901
1902 2008-01-25 DJ Delorie <dj@redhat.com>
1903
1904 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.
1905
1906 2008-01-25 Kai Tietz <kai.tietz@onevision.com>
1907
1908 * bfd-in.h: Add mingw I64 support.
1909 * bfd-in2.h: Regenerated.
1910 * bfd.c: (bfd_get_sign_extend_vma): Add pe-x86-64 and pei-x86-64.
1911
1912 2008-01-21 Alan Modra <amodra@bigpond.net.au>
1913
1914 PR 4453
1915 * format.c (bfd_check_format_matches): Don't accept archives as
1916 fully matching unless they have a map.
1917
1918 2008-01-21 Alan Modra <amodra@bigpond.net.au>
1919
1920 * elflink.c (_bfd_elf_link_output_relocs): Correct error return.
1921
1922 2008-01-21 Alan Modra <amodra@bigpond.net.au>
1923
1924 * ecoff.c (_bfd_ecoff_archive_p): Delete.
1925 * libecoff.h (_bfd_ecoff_archive_p): Delete.
1926 * coff-alpha.c (ecoffalpha_little_vec): Use bfd_generic_archive_p.
1927 * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
1928 (ecoff_biglittle_vec): Likewise.
1929
1930 2008-01-19 Alan Modra <amodra@bigpond.net.au>
1931
1932 PR 5646
1933 * elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr
1934 non-NULL before dereferencing.
1935
1936 2008-01-15 Alan Modra <amodra@bigpond.net.au>
1937
1938 PR 5604
1939 * elf-bfd.h (struct elf_backend_data): Add gc_keep. Remove param
1940 names from others.
1941 (_bfd_elf_gc_keep): Declare.
1942 * elfxx-target.h (elf_backend_gc_keep): Define.
1943 (elfNN_bed): Init new field.
1944 * elflink.c (_bfd_elf_gc_keep): New function.
1945 (bfd_elf_gc_sections): Call gc_keep.
1946 * elf64-ppc.c (elf_backend_gc_keep): Define.
1947 (struct _ppc64_elf_section_data): Move .opd related fields to
1948 a struct so they don't occupy the same storage. Adjust accesses
1949 throughout file.
1950 (ppc64_elf_gc_keep): New function, split out from..
1951 (ppc64_elf_gc_mark_hook): ..here. Don't call _bfd_elf_gc_mark
1952 to mark .opd section, just set gc_mark.
1953 (ppc64_elf_edit_opd): Remove no_opd_opt parm. Don't set opd->adjust
1954 unless we are changing .opd. Test non-NULL opd->adjust at all
1955 accesses throughout file.
1956 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
1957
1958 2008-01-15 Alan Modra <amodra@bigpond.net.au>
1959
1960 * bfd-in.h (BFD_HOST_LONG_LONG): Delete.
1961 * bfd-in2.h: Regenerate.
1962
1963 2008-01-11 Tristan Gingold <gingold@adacore.com>
1964 Eric Botcazou <ebotcazou@adacore.com>
1965
1966 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Exit early if generating a
1967 relocatable.
1968 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
1969 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
1970 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
1971 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
1972 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
1973 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
1974 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
1975 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
1976 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
1977 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
1978 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
1979 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
1980 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Likewise.
1981 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
1982 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1983 * elflink.c (bfd_elf_gc_sections): Do not punt on relocatable output
1984 or executable output with relocations.
1985
1986 2008-01-09 Nick Clifton <nickc@redhat.com>
1987
1988 PR gas/5552
1989 * elf32-fr30.c (fr30_elf_howto_table): Set partial_inplace field
1990 to FALSE for all relocs.
1991
1992 2008-01-09 Richard Sandiford <rsandifo@nildram.co.uk>
1993
1994 PR ld/5526
1995 * elf-bfd.h (eh_cie_fde): Add u.cie.u.full_cie and u.cie.merged
1996 fields. Rename u.cie.u.merged to u.cie.u.merged_with.
1997 (eh_frame_sec_info): Add a cies field.
1998 (eh_frame_hdr_info): Add a merge_cies field.
1999 * elf-eh-frame.c (cie): Add a reloc_index member to the personality
2000 union.
2001 (_bfd_elf_begin_eh_frame_parsing): Set hdr_info->merge_cies instead
2002 of hdr_info->cies.
2003 (_bfd_elf_parse_eh_frame): Remove tmp_cie. Ccreate an array of
2004 cie structures in all cases and use it instead of extended_cies.
2005 If merging, store the cie array in sec_info->cies and point each
2006 CIE's eh_fde_cie at the associated element. Do not try to
2007 calculate the value of the personality routine here; record the
2008 offset of the relocation instead. Do not merge CIEs here.
2009 (_bfd_elf_end_eh_frame_parsing): Do not free hdr_info->cies here...
2010 (_bfd_elf_discard_section_eh_frame_hdr): ...do it here instead.
2011 (_bfd_elf_gc_mark_fdes): Mark the original (unmerged) CIE.
2012 (find_merged_cie): New function.
2013 (_bfd_elf_gc_mark_fdes): Use it. Free sec_info->cies.
2014
2015 2008-01-07 Nick Clifton <nickc@redhat.com>
2016
2017 PR binutils/5535
2018 * vms.c (vms_close_and_cleanup): Check for the presence of a
2019 vms_private_data_struct before examining any of its fields.
2020
2021 2008-01-07 H.J. Lu <hongjiu.lu@intel.com>
2022
2023 PR ld/5522
2024 * elflink.c (elf_link_input_bfd): Don't write out a section if
2025 its output section is marked with SEC_NEVER_LOAD.
2026
2027 For older changes see ChangeLog-2007
2028 \f
2029 Local Variables:
2030 mode: change-log
2031 left-margin: 8
2032 fill-column: 74
2033 version-control: never
2034 End:
This page took 0.071188 seconds and 4 git commands to generate.