(elf_link_input_bfd): Handle the case where a badly formatted input file results
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2005-04-27 Nick Clifton <nickc@redhat.com>
2
3 * elflink.c (elf_link_input_bfd): Handle the case where a badly
4 formatted input file results in a reloc which has no associated
5 global symbol.
6
7 2005-04-26 Jerome Guitton <guitton@gnat.com>
8
9 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
10
11 2005-04-25 David S. Miller <davem@davemloft.net>
12
13 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
14 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
15 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
16 Likewise.
17
18 2005-04-25 H.J. Lu <hongjiu.lu@intel.com>
19
20 PR 858
21 * elflink.c (elf_link_input_bfd): Make non-debugging reference
22 to discarded section an error.
23
24 2005-04-21 Jerome Guitton <guitton@gnat.com>
25
26 * configure.in: Replace BFD_NEED_DECLARATION checks by the
27 corresponding AC_CHECK_DECLS.
28 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
29 HAVE_DECL_*.
30 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
31 * configure: Regenerate.
32 * config.in: Ditto.
33
34 2005-04-21 Andreas Schwab <schwab@suse.de>
35
36 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
37 unsigned from type of dynamic_interpreter.
38 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
39 casts again.
40
41 * elf.c (assign_section_numbers): Fix comment.
42
43 2005-04-21 Jerome Guitton <guitton@gnat.com>
44
45 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
46 for struct som_exec_auxhdr fields.
47
48 2005-04-21 Nick Clifton <nickc@redhat.com>
49
50 * aout-adobe.c: Convert to ISO C and fix formatting.
51 * aout-arm.c: Convert to ISO C and fix formatting.
52 * aout-cris.c: Convert to ISO C and fix formatting.
53 * aout-ns32k.c: Convert to ISO C and fix formatting.
54 * aout-tic30.c: Convert to ISO C and fix formatting.
55 * coffcode.h: Convert to ISO C and fix formatting.
56 * coffswap.h: Convert to ISO C and fix formatting.
57 * i386aout.c: Convert to ISO C and fix formatting.
58 * libaout.h: Convert to ISO C and fix formatting.
59 * libcoff-in.h: Convert to ISO C and fix formatting.
60 * libcoff.h: Convert to ISO C and fix formatting.
61 * libecoff.h: Convert to ISO C and fix formatting.
62 * libnlm.h: Convert to ISO C and fix formatting.
63 * libpei.h: Convert to ISO C and fix formatting.
64 * libxcoff.h: Convert to ISO C and fix formatting.
65 * nlm-target.h: Convert to ISO C and fix formatting.
66 * nlm.c: Convert to ISO C and fix formatting.
67 * nlm32-alpha.c: Convert to ISO C and fix formatting.
68 * nlm32-i386.c: Convert to ISO C and fix formatting.
69 * nlm32-ppc.c: Convert to ISO C and fix formatting.
70 * nlm32-sparc.c: Convert to ISO C and fix formatting.
71 * nlmcode.h: Convert to ISO C and fix formatting.
72 * nlmswap.h: Convert to ISO C and fix formatting.
73 * pe-mips.c: Convert to ISO C and fix formatting.
74 * peXXigen.c: Convert to ISO C and fix formatting.
75 * peicode.h: Convert to ISO C and fix formatting.
76 * vms-gsd.c: Convert to ISO C and fix formatting.
77 * vms-hdr.c: Convert to ISO C and fix formatting.
78 * vms-misc.c: Convert to ISO C and fix formatting.
79 * vms-tir.c: Convert to ISO C and fix formatting.
80 * vms.c: Convert to ISO C and fix formatting.
81 * vms.h: Convert to ISO C and fix formatting.
82
83 * coffgen.c (coff_print_symbol): Restore correct formatting of
84 output.
85
86 2005-04-20 David S. Miller <davem@davemloft.net>
87
88 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
89 (_bfd_sparc_elf_link_hash_table_create): Likewise.
90 (allocate_dynrelocs): Likewise.
91
92 2005-04-20 Jerome Guitton <guitton@gnat.com>
93
94 * configure.in: Fix the check for basename declaration. Add check
95 for declarations of ftello, ftello64, fseeko, fseeko64.
96 * configure: Regenerate.
97 * config.in: Ditto.
98 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
99
100 2005-04-19 David S. Miller <davem@davemloft.net>
101
102 * elfxx-sparc.c: New file.
103 * elfxx-sparc.h: New file.
104 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
105 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
106 (elfxx-sparc.lo): New rule.
107 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
108 (elf64-sparc.lo): Likewise.
109 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
110 (bfd_elf64_sparc_vec): Likewise.
111 * configure: Regenerate.
112 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
113 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
114 which is more consistent with elf32-sparc.c
115
116 2005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
117
118 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
119 (mips_elf_create_local_got_entry): Check h->root.forced_local.
120
121 2005-04-19 Alan Modra <amodra@bigpond.net.au>
122
123 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
124 dynamic relocs in non-SEC_ALLOC sections.
125 (ppc_elf_gc_sweep_hook): Likewise.
126 (ppc_elf_relax_section): Likewise.
127 (ppc_elf_relocate_section): Likewise.
128
129 2005-04-18 Nick Clifton <nickc@redhat.com>
130
131 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
132 assigning a value to return_value.
133
134 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
135
136 PR 855
137 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
138 created group data.
139
140 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
141
142 PR 855
143 * elf.c (setup_group): Properly handle zero group count.
144
145 2005-04-17 Mark Kettenis <kettenis@gnu.org>
146
147 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
148 (som_is_subspace, compare_subspaces, som_compute_checksum)
149 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
150 protoypes.
151 (hppa_som_reloc, compare_syms, compare_subspaces)
152 (som_print_symbol, som_get_section_contents)
153 (som_set_section_contents): Remove space after 'void *'.
154 (som_bfd_print_private_bfd_data): Use %lx to print longs.
155 (som_bfd_merge_private_bfd_data)
156 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
157 defines.
158
159 2004-04-15 Julian Brown <julian@codesourcery.com>
160
161 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
162 * bfd-in2.h: Regenerate.
163 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
164 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
165 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
166 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
167 relocations if requested to.
168 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
169 use_blx rather than symbian_p.
170 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
171 use_blx is in effect.
172 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
173 for SymbianOS.
174
175 2005-04-15 Nick Clifton <nickc@redhat.com>
176
177 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
178 values.
179
180 2005-04-15 Alan Modra <amodra@bigpond.net.au>
181
182 PR ld/815
183 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
184 used as a list pointer.
185
186 2005-04-14 Alan Modra <amodra@bigpond.net.au>
187
188 * Makefile.am (NO_WERROR): Define.
189 * warning.m4: New file
190 * acinclude.m4: Include warning.m4.
191 * configure.in: Invoke AM_BINUTILS_WARNINGS.
192 * Makefile.in: Regenerate.
193 * configure: Regenerate.
194
195 2005-04-14 Alan Modra <amodra@bigpond.net.au>
196
197 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
198 Write trailing padding.
199
200 * merge.c (merge_strings): Round up section size for alignment.
201
202 2005-04-14 David S. Miller <davem@davemloft.net>
203
204 Add TLS support for 64-bit Sparc ELF.
205 * elf64-sparc.c (sparc64_elf_dyn_relocs,
206 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
207 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
208 sparc64_elf_hash_entry, sparc64_elf_tdata,
209 sparc64_elf_local_got_tls_type): New defines.
210 (sparc64_elf_mkobject): New function.
211 (sparc64_elf_link_hash_table): Add members for dynamic linker
212 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
213 uion to track TLS GOT references. Add sym_sec to cache
214 mappings from local sym to section.
215 (link_hash_newfunc): New function.
216 (sparc64_elf_bfd_link_hash_table_create): Rename to
217 sparc64_elf_link_hash_table_create for consistency.
218 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
219 (sparc64_elf_create_dynamic_sections): Initialize new section
220 members of sparc64_elf_link_hash_table. Only init srelbss
221 if not-shared.
222 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
223 New functions.
224 (SPARC_NOP): Define.
225 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
226 sparc64_elf_plt_ptr_offset): Delete.
227 (sparc64_plt_entry_build): New function to build PLT entries
228 gradually instread of all at once at the end of linking.
229 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
230 local vars. Get them from sparc64_elf_hash_table instead.
231 Check early on if r_symndx is in bounds. Handle TLS transitions.
232 Account for TLS GOT references and DF_STATIC_TLS, as needed.
233 For TLS relocs, record the tls_type in either
234 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
235 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
236 to the __tls_get_addr symbol. For PLT relocs, track references
237 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
238 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
239 symbol references, count the number of relocations needed for
240 that symbol. For default switch case, don't error, this lets
241 the TLS relocs not explicitly handled by this function get
242 accepted.
243 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
244 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
245 it from sparc64_elf_hash_table. Store the real PLT offset
246 in h->plt.offset, and build PLT entries one at a time. Also
247 get .dynbss section pointer from htab.
248 (allocate_dynrelocs, readonly_dynrelocs,
249 sparc64_omit_section_dynsym): New functions.
250 (sparc64_elf_omit_section_dynsym): Use these new functions as
251 helpers.
252 (dtpoff_base, tpoff): New functions.
253 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
254 locals, get them from sparc64_elf_hash_table. Handle TLS
255 relocations and refcounting in main relocation loop.
256 (sparc64_elf_finish_dynamic_symbol): Use
257 sparc64_elf_link_hash_table. Build PLT entries as we see
258 them. Handle TLS GOT relocations.
259 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
260 from sparc64_elf_hash_table. Initialize only PLT header
261 not all entries since we not build PLT entries one by one.
262 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
263 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
264 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
265
266 2005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
267
268 * elflink.c (elf_link_input_bfd): Update check for removed
269 sections.
270
271 2005-04-12 Alan Modra <amodra@bigpond.net.au>
272
273 * Makefile.am: Run "make dep-am".
274 * Makefile.in: Regenerate.
275 * aclocal.m4: Regenerate.
276 * libcoff.h: Regenerate.
277
278 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
279
280 * linker.c (_bfd_generic_link_output_symbols): Also check if
281 the output section of an input section has been removed from
282 the output file.
283
284 * section.c (bfd_section_list_remove): Clear the next field
285 of the removed section.
286 (bfd_section_removed_from_list): New.
287 * bfd-in2.h: Regenerated.
288
289 2005-04-11 David S. Miller <davem@davemloft.net>
290
291 * elf32-sparc.c (elf32_sparc_relocate_section,
292 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
293 R_SPARC_TLS_LE_{HIX22,LOX10}.
294 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
295 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
296 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
297 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
298
299 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
300
301 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
302
303 2005-04-11 Nick Clifton <nickc@redhat.com>
304
305 * aout-target.h: Convert to ISO C.
306 * aoutf1.h: Convert to ISO C.
307 * aoutx.h: Convert to ISO C.
308 * bout.c: Convert to ISO C.
309 * dwarf1.c: Convert to ISO C.
310 * ecoffswap.h: Convert to ISO C.
311 * freebsd.h: Convert to ISO C.
312 * genlink.h: Convert to ISO C.
313 * ieee.c: Convert to ISO C.
314 * ihex.c: Convert to ISO C.
315 * libcoff-in.h: Convert to ISO C.
316 * mach-o.c: Convert to ISO C.
317 * mach-o.h: Convert to ISO C.
318 * netbsd.h: Convert to ISO C.
319 * ns32k.h: Convert to ISO C.
320 * ns32knetbsd.c: Convert to ISO C.
321 * oasys.c: Convert to ISO C.
322 * pdp11.c: Convert to ISO C.
323 * pef-traceback.h: Convert to ISO C.
324 * pef.c: Convert to ISO C.
325 * pef.h: Convert to ISO C.
326 * riscix.c: Convert to ISO C.
327 * som.c: Convert to ISO C.
328 * som.h: Convert to ISO C.
329 * srec.c: Convert to ISO C.
330 * stabs.c: Convert to ISO C.
331 * sunos.c: Convert to ISO C.
332 * tekhex.c: Convert to ISO C.
333 * versados.c: Convert to ISO C.
334 * version.h: Convert to ISO C.
335 * xcoff-target.h: Convert to ISO C.
336 * xcofflink.c: Convert to ISO C.
337 * xsym.c: Convert to ISO C.
338 * xsym.h: Convert to ISO C.
339
340 2005-04-08 Paul Brook <paul@codesourcery.com>
341
342 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
343 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
344 (ARM2THUMB_PIC_GLUE_SIZE): Define.
345 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
346 (elf32_arm_to_thumb_stub): Create PIC stubs.
347 (record_arm_to_thumb_glue): Use different stub size for relocatable
348 images.
349
350 2005-04-05 Alan Modra <amodra@bigpond.net.au>
351
352 * elf64-ppc.c (dec_dynrel_count): New function split out from
353 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
354 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
355 (ppc64_elf_tls_optimize): Likewise.
356
357 2005-04-05 Mark Kettenis <kettenis@gnu.org>
358
359 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
360 CORE_WCOOKIE_OFFSET.
361 (SPARC64_WCOOKIE_OFFSET): New.
362 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
363
364 2005-04-05 Nick Clifton <nickc@redhat.com>
365
366 * po/rw.po: New translation: Kinyarwanda
367 * configure.in (ALL_LINGUAS): Add rw
368 * configure: Regenerate.
369
370 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
371
372 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
373 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
374 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
375 section flags.
376 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
377 to check for SHT_MIPS_OPTIONS sections.
378 (_bfd_mips_elf_set_section_contents): Likewise.
379
380 2005-04-04 Eric Christopher <echristo@redhat.com>
381
382 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
383 Clean up gp handling code.
384
385 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
386
387 * elf.c (bfd_elf_set_group_contents): Ignore linker created
388 group section.
389 (assign_section_numbers): Accept link_info. Check SHT_GROUP
390 sections for relocatable files only. Remove the linker created
391 group sections.
392 (_bfd_elf_compute_section_file_positions): Pass link_info to
393 assign_section_numbers.
394
395 * elfxx-ia64.c (elfNN_ia64_object_p): New.
396 (elf_backend_object_p): Defined.
397
398 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
399
400 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
401
402 2005-04-03 Fred Fish <fnf@specifixinc.com>
403
404 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
405 dwarf_ranges_size members.
406 (struct comp_unit): Add base_address member.
407 (struct funcinfo): Replace low/high members with an arange.
408 (arange_add): Replace incoming "unit" parameter with "abfd" and
409 "first_arange" pointers. Reorganize/rewrite function body.
410 (decode_line_info): Change arange_add call to pass bfd and arange
411 pointers.
412 (lookup_address_in_line_info_table): Use arange list instead of
413 individual low/high members. Walk function's arange list to find
414 lowest PC in list, to test for overlapping functions.
415 (read_debug_ranges): New function, reads the debug_ranges section.
416 (lookup_address_in_function_table): Use arange list instead of
417 individual low/high members. Rewrite to find smallest range that
418 matches.
419 (read_rangelist): Read a given rangelist from debug_ranges.
420 (scan_unit_for_functions): Use arange list instead of individual
421 low/high members. Handle a DW_AT_ranges attribute.
422 (parse_comp_unit): Use arange list instead of individual low/high
423 members. Save comp unit base address. Handle a DW_AT_ranges
424 attribute.
425
426 2005-04-01 H.J. Lu <hongjiu.lu@intel.com>
427
428 * elf.c (assign_section_numbers): Really use the kept section.
429
430 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
431
432 * elf-bfd.h (_bfd_elf_check_kept_section): New.
433
434 * elf.c (assign_section_numbers): When sh_link points to a
435 discarded section, call _bfd_elf_check_kept_section to see if
436 the kept section can be used. Otherwise reject sh_link
437 pointing to discarded section.
438
439 * elflink.c (_bfd_elf_check_kept_section): New.
440 (elf_link_input_bfd): Use it.
441
442 2005-04-01 Alan Modra <amodra@bigpond.net.au>
443
444 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
445 that we no longer need.
446
447 2005-04-01 Alan Modra <amodra@bigpond.net.au>
448
449 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
450 rather than 0.
451 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
452
453 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
454
455 * elf.c (assign_section_numbers): Fix a typo.
456
457 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
458
459 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
460 error message.
461 (_bfd_elf_section_already_linked): Likewise.
462
463 2005-03-31 Jerome Guitton <guitton@gnat.com>
464
465 * config.in: Regenerate.
466
467 2005-03-31 Jerome Guitton <guitton@gnat.com>
468
469 * config.in (HAVE_DECL_BASENAME): New configure macro.
470 * configure.in: Check for basename.
471 * configure: Regenerate.
472
473 2005-03-30 Julian Brown <julian@codesourcery.com>
474
475 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
476 bfd_elf32_is_arm_mapping_symbol_name.
477 * bfd-in2.h: Regenerate.
478 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
479 bfd_elf32_is_arm_mapping_symbol_name.
480 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
481 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
482 (arm_elf_find_function): Likewise.
483 (elf32_arm_output_symbol_hook): Likewise.
484
485 2005-03-30 Julian Brown <julian@codesourcery.com>
486
487 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
488 * bfd-in2.h: Regenerate.
489 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
490 bfd_elf32_is_arm_mapping_symbol_name.
491 (elf32_arm_output_symbol_hook): Likewise.
492 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
493 mapping symbols.
494 (is_arm_mapping_symbol_name): Function moved from here...
495 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
496 and made global.
497
498 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
499
500 * configure.in: Check for ffs decl and alphabetize.
501 * config.in: Regenerate.
502 * configure: Regenerate.
503 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and
504 alphabetize.
505
506 2005-03-29 Fred Fish <fnf@specifixinc.com>
507
508 * dwarf2.c (struct comp_unit): Fix typo.
509 (scan_unit_for_functions): Remove unused local variable "name"
510 and dead code that set it.
511
512 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
513 Phil Blundell <philb@gnu.org>
514
515 * bfd-in2.h, libbfd.h: Regenerated.
516 * reloc.c: Add ARM TLS relocations.
517 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
518 relocations.
519 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
520 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
521 (elf32_arm_tls_ie32_howto): New.
522 (elf32_arm_howto_from_type): Support TLS relocations.
523 (elf32_arm_reloc_map): Likewise.
524 (elf32_arm_reloc_type_lookup): Likewise.
525 (TCB_SIZE): Define.
526 (struct elf32_arm_obj_tdata): New.
527 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
528 (elf32_arm_mkobject): New function.
529 (struct elf32_arm_relocs_copied): Add pc_count.
530 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
531 (GOT_TLS_IE): Define.
532 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
533 (elf32_arm_link_hash_newfunc): Initialize tls_type.
534 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
535 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
536 (dtpoff_base, tpoff): New functions.
537 (elf32_arm_final_link_relocate): Handle TLS relocations.
538 (IS_ARM_TLS_RELOC): Define.
539 (elf32_arm_relocate_section): Warn about TLS mismatches.
540 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
541 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
542 TLS relocations and pc_count.
543 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
544 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
545 calls.
546 (elf32_arm_size_dynamic_sections): Handle TLS.
547 (elf32_arm_finish_dynamic_symbol): Likewise.
548 (bfd_elf32_mkobject): Define.
549
550 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
551
552 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
553 relocation types. Don't count relocations which will use a PLT.
554
555 2005-03-29 Joel Brobecker <brobecker@gnat.com>
556
557 * elf.c (elfcore_grok_nto_status): Print tid as long.
558 (elfcore_grok_nto_regs): Likewise.
559
560 2005-03-29 Joel Brobecker <brobecker@gnat.com>
561
562 * irix-core.c: Remove some unnecessary prototypes.
563
564 2005-03-28 Joel Brobecker <brobecker@adacore.com>
565
566 * irix-core.c: Convert to ISO C.
567
568 2005-03-28 Joel Brobecker <brobecker@adacore.com>
569
570 * irix-core.c (do_sections): Replace + by | in expression.
571 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
572 to unused parameters to avoid a compiler warning.
573
574 2005-03-28 Mark Kettenis <kettenis@gnu.org>
575
576 * netbsd-core.c: Convert to ISO C. Fix formatting.
577
578 2005-03-24 Eric Christopher <echristo@redhat.com>
579
580 * elfxx-mips.c: Revert previous patch.
581
582 2005-03-24 Nick Clifton <nickc@redhat.com>
583
584 * targets.c (_bfd_target_vector): Only include the
585 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
586 all targets enabled.
587
588 2005-03-24 James E Wilson <wilson@specifixinc.com>
589
590 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
591 (BFD64_BACKENDS): Add elf32-ia64.lo.
592 * Makefile.in: Regenerate.
593
594 2005-03-23 Eric Christopher <echristo@redhat.com>
595
596 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
597 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
598 after emitting relocation.
599 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
600 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
601 and readonly_reloc.
602
603 2005-03-23 Mike Frysinger <vapier@gentoo.org>
604 Nick Clifton <nickc@redhat.com>
605
606 * config.bfd: Accept any C library to accompany a GNU Linux
607 implementation, not just the GNU C library.
608 * configure.in: Likewise.
609 * configure: Regenerate.
610
611 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
612
613 * bfd-in.h (_bfd_elf_provide_symbol): New.
614 * bfd-in2.h: Regenerated.
615
616 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
617 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
618 of set_linker_sym.
619
620 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
621 from elf32-ppc.c.
622
623 2005-03-22 Hans-Peter Nilsson <hp@axis.com>
624
625 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
626
627 2005-03-22 Bob Wilson <bob.wilson@acm.org>
628
629 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
630 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
631 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
632 (xtensa_opcode_decode): Rearrange code.
633
634 2005-03-22 Nick Clifton <nickc@redhat.com>
635
636 * binary.c: Convert to ISO C90 formatting.
637 * coff-arm.c: Convert to ISO C90 formatting.
638 * coffgen.c: Convert to ISO C90 formatting.
639 * elf32-gen.c: Convert to ISO C90 formatting.
640 * elf64-gen.c: Convert to ISO C90 formatting.
641 * hash.c: Convert to ISO C90 formatting.
642 * ieee.c: Convert to ISO C90 formatting.
643
644 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
645
646 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
647 unresolved symbols in R_ARM_NONE relocations.
648
649 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
650
651 * elf32-arm.c (elf32_arm_final_link_relocate): Add
652 UNRESOLVED_RELOC_P argument. Set it appropriately.
653 (elf32_arm_relocate_section): Update call to
654 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
655 unresolved_reloc instead.
656
657 2005-03-23 Alan Modra <amodra@bigpond.net.au>
658
659 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
660 .gnu.warning.* sections.
661
662 2005-03-22 Alan Modra <amodra@bigpond.net.au>
663
664 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
665 written_address_p.
666 (ppc_elf_create_linker_section): Don't try to reuse existing section.
667 (elf_create_pointer_linker_section): Delete info parm. Don't make
668 h dynamic. Don't set written_address_p.
669 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
670 (bfd_put_ptr): Delete.
671 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
672 Always write section contents. Assert global sym is def_regular.
673 Use offset bottom bit as a written flag.
674 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
675 calls.
676
677 2005-03-22 Alan Modra <amodra@bigpond.net.au>
678
679 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
680 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
681 and end syms.
682
683 2005-03-21 Nick Clifton <nickc@redhat.com>
684
685 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
686 targets.
687 (t2a1_bx_pc_insn): Likewise.
688 (t2a2_noop_insn): Likewise.
689 (t2a3_b_insn): Likewise.
690 (t2a1_push_insn): Likewise.
691 (t2a2_ldr_insn): Likewise.
692 (t2a3_mov_insn): Likewise.
693 (t2a4_bx_insn): Likewise.
694 (t2a5_pop_insn): Likewise.
695 (t2a6_bx_insn): Likewise.
696 (coff_arm_relocate_section): Only declare the high_address
697 variable for non WINCE targets.
698
699 2005-03-22 Alan Modra <amodra@bigpond.net.au>
700
701 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
702 SEC_LINKER_CREATED. Attach to dynobj.
703 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
704
705 2005-03-21 Alan Modra <amodra@bigpond.net.au>
706
707 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
708 sym_offset. Add name, bss_name, sym_name, sym_val.
709 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
710 Add sdata array of elf_linker_section_t.
711 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
712 (enum elf_linker_section_enum): Delete.
713 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
714 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
715 the special sections are needed. Adjust htab->sdata refs.
716 Ensure dynobj is set in sreloc code.
717 (ppc_elf_size_dynamic_sections): Strip sdata sections.
718 (ppc_elf_set_sdata_syms): New function.
719 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
720 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
721 sym_val instead of sym_hash.
722 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
723
724 2005-03-21 Alan Modra <amodra@bigpond.net.au>
725
726 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
727 (ppc_elf_merge_private_bfd_data): Likewise.
728
729 2005-03-21 Alan Modra <amodra@bigpond.net.au>
730
731 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
732 (ppc_elf_create_linker_section): Don't create rel_section.
733 (elf_create_pointer_linker_section): Don't size relocs.
734 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
735 Don't generate relocs.
736 (ppc_elf_relocate_section): Adjust calls to
737 elf_finish_pointer_linker_section.
738
739 2005-03-21 Alan Modra <amodra@bigpond.net.au>
740
741 * elf32-ppc.c (is_ppc_elf_target): New function.
742 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
743 for bfd_target_elf_flavour. Do this test before endian check.
744 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
745 (ppc_elf_size_dynamic_sections): Likewise.
746
747 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
748
749 * elf-bfd.h (elf_backend_data): Add int to
750 elf_backend_section_from_shdr.
751 (bfd_elf_section_data): Update comment for this_idx.
752 (_bfd_elf_make_section_from_shdr): Add int.
753 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
754
755 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
756 and use it to set this_idx in bfd_elf_section_data.
757 (bfd_section_from_shdr): Pass shindex to
758 _bfd_elf_make_section_from_shdr.
759 (_bfd_elf_section_from_bfd_section): Use this_idx in
760 bfd_elf_section_data to find section index.
761
762 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
763 index and pass it to _bfd_elf_make_section_from_shdr.
764 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
765 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
766 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
767 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
768 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
769 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
770 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
771 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
772 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
773
774 2005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
775 Ross Ridge <rridge@csclub.uwaterloo.ca>
776
777 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
778 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
779 cases. Add comment.
780
781 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
782
783 * elflink.c (elf_mark_used_section): Remove check for special
784 sections.
785
786 2005-03-18 Andreas Schwab <schwab@suse.de>
787
788 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
789 from bfd_vma to ia64_insn, remove broken cast.
790
791 2005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
792
793 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
794 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
795 elf_m68k_finish_dynamic_sections): Use it.
796
797 2005-03-17 Paul Brook <paul@codesourcery.com>
798 Dan Jacobowitz <dan@codesourcery.com>
799 Mark Mitchell <mark@codesourcery.com>
800
801 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
802 (elf32_arm_additional_program_headers): Likewise.
803 (elf_backend_modify_segment_map): Define.
804 (elf_backend_additional_program_headers): Likewise.
805 (elf32_arm_symbian_modify_segment_map): Use
806 elf32_arm_modify_segment_map.
807
808 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
809
810 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
811 for special sections.
812
813 2005-03-18 Alan Modra <amodra@bigpond.net.au>
814
815 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
816 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
817 section_sym_count param, and return number of section symbols.
818 (bfd_elf_size_dynamic_sections): Clear section symbol area of
819 .dynsym contents. Don't bother calling swap_symbol_out on the
820 first all-zero dynsym.
821 (elf_mark_used_section): Formatting. Avoid twiddling flags in
822 special sections like bfd_abs_section.
823 (bfd_elf_gc_sections): Spelling fix.
824
825 2005-03-16 Fred Fish <fnf@specifixinc.com>
826
827 PR binutils/790
828 * dwarf2.c (read_indirect_string): Fix apparent typo, check
829 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
830
831 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
832
833 * elflink.c (elf_mark_used_section): New.
834 (bfd_elf_gc_sections): Call elf_gc_mark_section for
835 non-relocatable link if we don't do GC.
836
837 2005-03-16 Nick Clifton <nickc@redhat.com>
838 Ben Elliston <bje@au.ibm.com>
839
840 * configure.in (werror): New switch: Add -Werror to the
841 compiler command line. Enabled by default. Disable via
842 --disable-werror.
843 * configure: Regenerate.
844
845 2005-03-16 Nick Clifton <nickc@redhat.com>
846
847 * ecoff.c: Convert to ISO C90 formatting.
848
849 2005-03-16 Alan Modra <amodra@bigpond.net.au>
850
851 * elf32-ppc.c: Divide file into general and linker specific
852 functions. Sort linker functions into roughly the order in which
853 they are called by the ELF linker code.
854
855 2005-03-16 Alan Modra <amodra@bigpond.net.au>
856
857 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
858 on section. Correct comment, and add FIXME.
859 (ppc_elf_additional_program_headers): Don't bump header count for
860 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
861 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
862 do allocate memory if they need it.
863
864 2005-03-15 Mikkel Krautz <krautz@gmail.com>
865
866 * config.bfd (x86_64-elf): Add target.
867
868 2005-03-15 Alan Modra <amodra@bigpond.net.au>
869
870 * po/es.po: Commit new Spanish translation.
871
872 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
873
874 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
875 for global symbol when reporting overflow.
876
877 2005-03-11 Jakub Jelinek <jakub@redhat.com>
878
879 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
880 * libbfd.h: Rebuilt.
881 * archive.c (_bfd_ar_spacepad): New function.
882 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
883 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
884 coff_write_armap): Use it.
885 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
886 uid/gid support.
887 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
888
889 2005-03-10 Mark Kettenis <kettenis@gnu.org>
890
891 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
892 has_table to the start of the function.
893
894 2005-03-10 Ben Elliston <bje@au.ibm.com>
895
896 * archive.c: Include hashtab.h.
897 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
898 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
899 (hash_file_ptr): New function.
900 (eq_file_ptr): Likewise.
901 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
902 * libbfd-in.h: Include hashtab.h.
903 (struct artdata): Change `cache' member type to htab_t.
904 * libbfd.h: Rebuild.
905
906 2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
907
908 * configure.in: Bump version to 2.16.90.
909 * configure: Regenerated.
910
911 2005-03-07 Jakub Jelinek <jakub@redhat.com>
912
913 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
914 close is a function like macro in system headers.
915
916 2005-03-07 Alan Modra <amodra@bigpond.net.au>
917
918 PR ld/778
919 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
920 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
921
922 2005-03-06 Alan Modra <amodra@bigpond.net.au>
923
924 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
925
926 2005-03-05 Alan Modra <amodra@bigpond.net.au>
927
928 * po/bfd.pot: Regenerate.
929
930 2005-03-05 Alan Modra <amodra@bigpond.net.au>
931
932 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
933 with is_func.
934 (func_desc_adjust): Force dot-syms local in executables as well
935 as shared libs.
936
937 2005-03-04 David Daney <ddaney@avtrex.com>
938
939 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
940 '__gnu_local_gp' symbol used by gas -mno-shared.
941
942 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
943
944 * elf-bfd.h (elf_backend_data): Add "const char *" to
945 elf_backend_section_from_phdr.
946
947 * elf.c (bfd_section_from_phdr): Pass "proc" to the
948 elf_backend_section_from_phdr hook.
949
950 2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
951 Joseph Myers <joseph@codesourcery.com>
952
953 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
954 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
955 and tls_ldm_offset.
956 (struct mips_elf_got_per_bfd_arg): Add global_count.
957 (struct mips_elf_count_tls_arg): New.
958 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
959 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
960 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
961 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
962 (TLS_RELOC_P): Define.
963 (TP_OFFSET, DTP_OFFSET): Define.
964 (dtprel_base, tprel_base): New functions.
965 (mips_elf_link_hash_newfunc): Initialize tls_type.
966 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
967 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
968 TLS entries.
969 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
970 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
971 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
972 (mips_tls_got_index): New functions.
973 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
974 arguments. Pass them to mips_elf_create_local_got_entry. Use
975 mips_tls_got_index.
976 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
977 Handle TLS entries.
978 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
979 mips_elf_create_local_got_entry.
980 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
981 arguments. Handle TLS entries.
982 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
983 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
984 TLS entries.
985 (mips_elf_record_global_got_symbol): Likewise.
986 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
987 Count TLS entries.
988 (mips_elf_merge_gots): Handle TLS entries when merging.
989 (mips_elf_initialize_tls_index): New function.
990 (mips_elf_set_global_got_offset): Handle TLS entries.
991 (mips_elf_adjust_gp): Handle TLS.
992 (mips_elf_multi_got): Remove redundant call to
993 mips_elf_resolve_final_got_entries. Initialize global_count.
994 Correct a comment. Initialize new TLS members of mips_got_info.
995 Assign TLS GOT indexes for new GOTs.
996 (mips_elf_create_got_section): Initialize new TLS members of
997 mips_got_info.
998 (mips_elf_calculate_relocation): Handle TLS relocs.
999 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
1000 functions.
1001 (_bfd_mips_elf_always_size_sections): Handle TLS.
1002 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1003 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
1004 changed functions.
1005 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
1006 (_bfd_mips_elf_hide_symbol): Handle TLS.
1007 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
1008 (mips_reloc_map): Add TLS relocs.
1009 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
1010 * elf64-mips.c (mips_elf64_howto_table_rel)
1011 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
1012 * reloc.c: Define new MIPS TLS relocations.
1013 * libbfd.h, bfd-in2.h: Regenerated.
1014
1015 2005-03-02 Jan Beulich <jbeulich@novell.com>
1016
1017 * Makefile.am: Add dependency of cache.o on libiberty.h.
1018 * cache.c: Include libiberty.h.
1019 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
1020
1021 2005-03-01 Zack Weinberg <zack@codesourcery.com>
1022
1023 * elf.c (bfd_section_from_shdr <default case>): Call
1024 elf_backend_section_from_shdr hook unconditionally, and return
1025 what it returns.
1026 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
1027 * elfxx-target.h (elf_backend_section_from_shdr)
1028 (elf_backend_section_from_phdr): Default to
1029 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
1030 respectively.
1031
1032 2005-03-01 Alan Modra <amodra@bigpond.net.au>
1033
1034 * targets.h: Typo fix.
1035 * bfd-in2.h: Regenerate.
1036
1037 * bout.c (b_out_write_object_contents): Don't use sizeof on host
1038 structs to size on-disk structures.
1039 (b_out_set_section_contents): Size the external struct, not the
1040 internal one for on-disk size.
1041 (b_out_sizeof_headers): Likewise.
1042
1043 2005-03-01 Alan Modra <amodra@bigpond.net.au>
1044
1045 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
1046 entry points with the func descriptor as well as undefweak.
1047
1048 2005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
1049
1050 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
1051 present when IMPORT_NAME_UNDOECRATE is used.
1052
1053 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
1054
1055 PR 757
1056 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
1057 int.
1058
1059 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
1060 to _bfd_elf_merge_symbol.
1061
1062 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
1063 unsigned int to return the alignment of the old common symbol
1064 in the dynamic object.
1065 (_bfd_elf_add_default_symbol): Pass NULL to
1066 _bfd_elf_merge_symbol.
1067 (elf_link_add_object_symbols): Pass &old_alignment to
1068 _bfd_elf_merge_symbol. Get the alignment of the new common
1069 symbol in the dynamic object.
1070
1071 2005-02-24 Ben Elliston <bje@au.ibm.com>
1072
1073 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
1074 * format.c (bfd_check_format_matches): Likewise.
1075 * archive.c (BFD_GNU960_ARMAG): Likewise.
1076 (bfd_generic_archive_p): Likewise.
1077 (_bfd_write_archive_contents): Likewise.
1078
1079 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
1080
1081 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
1082 * configure: Regenerate.
1083
1084 2005-02-24 Julian Brown <julian@sirius.codesourcery.com>
1085
1086 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
1087 COMDAT group sections to have default visibility.
1088
1089 2005-02-24 Alan Modra <amodra@bigpond.net.au>
1090
1091 * coffcode.h (coff_print_aux): Warning fix.
1092 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
1093 instead of section pointer to identify.
1094 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
1095 the correct size buffer for local sym mangling too.
1096 (h8300_bfd_link_add_symbols): Likewise.
1097 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
1098 warning.
1099 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
1100 * elf32-xtensa.c (literal_value_hash): Warning fix.
1101 * versados.c (process_otr): Warning fix.
1102 (versados_canonicalize_reloc): Likewise.
1103 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
1104 * vms.c (fill_section_ptr): Warning fix.
1105
1106 2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
1107
1108 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
1109 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
1110
1111 2005-02-23 Nick Clifton <nickc@redhat.com>
1112
1113 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
1114 the relvaddr field of the Elf32_crinfo structure.
1115
1116 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
1117 variables that are passed by reference to
1118 m68hc11_get_relocation_value in case that function does not
1119 initialise them.
1120
1121 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
1122 return statements and replace with a single return at the end of
1123 the function. This helps pacify the flow analysis code in gcc 4.0.
1124
1125 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
1126 strtab to avoid compile time warning.
1127
1128 2005-02-23 Ben Elliston <bje@au.ibm.com>
1129
1130 * opncls.c (bfd_zalloc): Document this function.
1131
1132 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
1133
1134 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
1135 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
1136 Replace SEC_SHARED with SEC_COFF_SHARED.
1137 (styp_to_sec_flags): Likewise.
1138
1139 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
1140 (TARGET_LITTLE_SYM): Likewise.
1141
1142 * section.c (SEC_ARCH_BIT_0): Removed.
1143 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
1144 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
1145 (SEC_SHARED): Renamed to ...
1146 (SEC_COFF_SHARED): This.
1147 (SEC_BLOCK): Renamed to ...
1148 (SEC_TIC54X_BLOCK): This.
1149 (SEC_CLINK): Renamed to ...
1150 (SEC_TIC54X_CLINK): This.
1151 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
1152 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
1153 end.
1154 * bfd-in2.h: Regenerated.
1155
1156 2005-02-21 Fred Fish <fnf@specifixinc.com>
1157
1158 * dwarf2.c (find_abstract_instance_name): Call recursively
1159 to handle a DW_AT_specification.
1160
1161 2005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1162
1163 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
1164 mips_elf_create_dynamic_relocation,
1165 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
1166 Remove #if 0'd code.
1167
1168 2005-02-21 Alan Modra <amodra@bigpond.net.au>
1169
1170 * Makefile.am: Run "make dep-am"
1171 * Makefile.in: Regenerate.
1172
1173 2005-02-21 Alan Modra <amodra@bigpond.net.au>
1174
1175 * coffgen.c (bfd_coff_get_comdat_section): Check that
1176 coff_section_data isn't NULL.
1177
1178 2005-02-21 Alan Modra <amodra@bigpond.net.au>
1179
1180 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
1181 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
1182 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
1183 useless assignments.
1184 (xcoff_write_archive_contents_big): Likewise.
1185 (_bfd_xcoff_put_ldsymbol_name): Likewise.
1186 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
1187 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
1188 * cofflink.c (process_embedded_commands): Warning fixes.
1189 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
1190 Warning fixes.
1191 * dwarf2.c: Warning fixes.
1192 * elf-bfd.h: Likewise.
1193 * elf-eh-frame.c: Likewise.
1194 * elf-strtab.c: Likewise.
1195 * elf.c: Likewise.
1196 * elf32-m68k.c: Likewise.
1197 * elf32-ppc.c: Likewise.
1198 * elf32-sh-symbian.c: Likewise.
1199 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
1200 * elf64-sh64.c: Likewise.
1201 * peicode.h: Likewise.
1202 * elf64-mmix.c: Warning fixes.
1203 * elfcode.h: Likewise.
1204 * elfxx-mips.c: Likewise.
1205 * libbfd-in.h: Likewise.
1206 * libbfd.c: Likewise.
1207 * mach-o.c: Likewise.
1208 * merge.c: Likewise.
1209 * mmo.c: Likewise.
1210 * opncls.c: Likewise.
1211 * pef.c: Likewise.
1212 * srec.c: Likewise.
1213 * vms-hdr.c: Likewise.
1214 * vms-tir.c: Likewise.
1215 * xtensa-isa.c: Likewise.
1216 * xtensa-modules.c: Likewise.
1217 * xsym.c: Likewise.
1218 (pstrcmp): Use correct choice of string lengths. Fix return value.
1219 (bfd_sym_module_name): Correct string length.
1220 * bfd-in2.h: Regenerate.
1221 * libbfd.h: Regenerate.
1222
1223 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
1224
1225 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
1226 uninitialized check_segment[1] in TLSMOFF case.
1227 Reported by Alan Modra.
1228 (elf32_frv_relocate_section): Improve errors and warnings.
1229
1230 2005-02-17 Alan Modra <amodra@bigpond.net.au>
1231
1232 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
1233
1234 2005-02-16 Alan Modra <amodra@bigpond.net.au>
1235
1236 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
1237 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
1238 * pef.c (bfd_pef_scan): Don't ignore return value of
1239 bfd_pef_scan_start_address.
1240 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
1241 bfd_mach_o_scan_start_address.
1242 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
1243 * elfxx-mips.c: Remove unnecessary prototypes.
1244 (sort_dynamic_relocs_64): Abort if not BFD64.
1245
1246 2005-02-16 Alan Modra <amodra@bigpond.net.au>
1247
1248 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
1249 Skip toc reloc adjust if reloc_count is zero.
1250
1251 2005-02-15 Nigel Stephens <nigel@mips.com>
1252 Maciej W. Rozycki <macro@mips.com>
1253
1254 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
1255 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
1256 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1257 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
1258 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
1259 dst_mask.
1260 (mips16_gprel_reloc): Remove bit shuffling; call
1261 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1262 and _bfd_mips16_elf_reloc_shuffle() instead.
1263 (mips16_reloc_map): New reloc map for MIPS16 relocs.
1264 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1265 relocs.
1266 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
1267 elf_mips16_howto_table_rel.
1268 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
1269 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
1270 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1271 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
1272 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
1273 dst_mask.
1274 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
1275 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
1276 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
1277 placeholders.
1278 (mips16_gprel_reloc): Remove bit shuffling; call
1279 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1280 and _bfd_mips16_elf_reloc_shuffle() instead.
1281 (mips16_reloc_map): New reloc map for MIPS16 relocs.
1282 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1283 relocs.
1284 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
1285 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
1286 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
1287 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
1288 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1289 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
1290 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
1291 dst_mask.
1292 (mips16_gprel_reloc): Remove bit shuffling; call
1293 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1294 and _bfd_mips16_elf_reloc_shuffle() instead.
1295 (mips16_reloc_map): New reloc map for MIPS16 relocs.
1296 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1297 relocs.
1298 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
1299 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
1300 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
1301 handle bit shuffling for MIPS16 relocs.
1302 (_bfd_mips16_elf_reloc_shuffle): Likewise.
1303 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
1304 and _bfd_mips16_elf_reloc_shuffle().
1305 (_bfd_mips_elf_generic_reloc): Likewise.
1306 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
1307 and R_MIPS16_LO16.
1308 (mips_elf_obtain_contents): Remove bit shuffling.
1309 (mips_elf_perform_relocation): Likewise; call
1310 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
1311 instead.
1312 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
1313 and R_MIPS16_LO16.
1314 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
1315 (_bfd_mips16_elf_reloc_shuffle): Likewise.
1316 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
1317 (BFD_RELOC_MIPS16_HI16_S): Likewise.
1318 (BFD_RELOC_MIPS16_LO16): Likewise.
1319 * bfd-in2.h: Regenerate.
1320 * libbfd.h: Regenerate.
1321
1322 2005-02-15 Jan Beulich <jbeulich@novell.com>
1323
1324 * elfxx-ia64.c (ia64_howto_table): Correct strings for
1325 R_IA64_DTPMOD64[LM]SB.
1326
1327 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
1328
1329 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
1330 backward branch in the same section.
1331 (elfNN_ia64_relocate_section): Inform users that the input
1332 section is too big to relax br instruction when overflow
1333 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
1334 and R_IA64_PCREL21F.
1335
1336 2005-02-14 Orjan Friberg <orjanf@axis.com>
1337
1338 * elfcore.h (elf_core_file_p): Move the call to
1339 elf_backend_object_p to allow the correct machine to be set before
1340 processing the program headers.
1341
1342 2005-02-14 Nick Clifton <nickc@redhat.com>
1343
1344 PR binutils/716
1345 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
1346 aware flag from the input bfd to the output bfd.
1347
1348 2005-02-11 Maciej W. Rozycki <macro@mips.com>
1349
1350 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
1351 R_MIPS_LITERAL relocations for external symbols.
1352 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
1353 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
1354
1355 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
1356
1357 * bfd-in2.h: Rebuilt.
1358
1359 2005-02-11 Paul Brook <paul@codesourcery.com>
1360
1361 * elf-bfd.h (struct elf_link_hash_table): Add
1362 is_relocatable_executable.
1363 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
1364 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
1365 symbols in relocatable executables.
1366 (bfd_elf_record_link_assignment): Create dynamic section symbols in
1367 relocatable executables.
1368 (_bfd_elf_link_renumber_dynsyms): Ditto.
1369 (bfd_elf_final_link): Ditto.
1370 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
1371 relocations into relocatable executables.
1372 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
1373 executables. Also copy absolute relocations.
1374 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
1375 in relocatable executables.
1376 (allocate_dynrelocs): Copy relocations for relocatable executables.
1377 Output dynamic symbols for symbols defined in linker scripts.
1378
1379 2005-02-11 Nick Clifton <nickc@redhat.com>
1380
1381 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
1382 to avoid a compile time warning.
1383
1384 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
1385 BFD_ASSERT.
1386
1387 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
1388 inclusion of coffcode.h so that it is actually picked up.
1389
1390 * coffcode.h (coff_std_swap_table): Add an unused attribute in
1391 case it is not used.
1392
1393 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
1394 structure and macro.
1395
1396 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
1397 array.
1398
1399 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
1400 to protect the declaration of this array.
1401
1402 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
1403 Avoid call to memcpy with a size of 0.
1404
1405 2005-02-12 Alan Modra <amodra@bigpond.net.au>
1406
1407 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
1408 old-style branches to undefined dot-symbols which will be
1409 satisfied by a plt call.
1410
1411 2005-02-11 Alan Modra <amodra@bigpond.net.au>
1412
1413 * elf64-ppc.c (move_plt_plist): New function, extracted from..
1414 (ppc64_elf_copy_indirect_symbol): ..here.
1415 (func_desc_adjust): Use move_plt_plist.
1416
1417 2005-02-10 Paul Brook <paul@codesourcery.com>
1418
1419 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
1420
1421 2005-02-10 Paul Brook <paul@codesourcery.com>
1422
1423 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
1424 symbols local.
1425 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
1426 (elf_link_renumber_local_hash_table_dynsyms): New function.
1427 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
1428
1429 2005-02-10 Jakub Jelinek <jakub@redhat.com>
1430
1431 * bfd-in.h (BFD_LINKER_CREATED): Define.
1432 * bfd-in2.h: Rebuilt.
1433 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
1434 BFD_LINKER_CREATED bfds when determining input bfds without
1435 .note.GNU-stack section.
1436
1437 2005-02-10 Maciej W. Rozycki <macro@mips.com>
1438
1439 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
1440 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
1441 relocations against external symbols unchanged.
1442
1443 2005-02-08 Paul Brook <paul@codesourcery.com>
1444
1445 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
1446 sections.
1447
1448 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
1449
1450 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
1451 prefix here.
1452
1453 2005-02-07 Maciej W. Rozycki <macro@mips.com>
1454
1455 * elf64-mips.c: Fix formatting throughout.
1456
1457 2005-02-07 Maciej W. Rozycki <macro@mips.com>
1458
1459 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
1460
1461 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
1462
1463 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
1464 *ABS*/*UND* sections.
1465 (elf32_frv_relocate_section): Move zero-addend-required error...
1466 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
1467 missing needed TLS section.
1468
1469 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
1470
1471 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
1472 being the last symbol.
1473 (aout_link_add_symbols): Just return TRUE if a warning
1474 symbol was last.
1475
1476 2005-02-07 Maciej W. Rozycki <macro@mips.com>
1477
1478 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
1479 R_MIPS_GPREL32 relocations against external symbols.
1480 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
1481 comment.
1482
1483 2005-02-07 Alan Modra <amodra@bigpond.net.au>
1484
1485 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
1486 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
1487 elf_string_from_elf_strtab.
1488 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
1489 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
1490 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
1491 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
1492 looking at cached symtab info first, before iterating over headers.
1493 For SHT_REL and SHT_RELA, load dynsymtab if needed.
1494 * elfcode.h (elf_object_p): Don't load section header stringtab
1495 specially.
1496
1497 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
1498
1499 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
1500 against protected function when building shared library.
1501
1502 PR 584
1503 * elf64-x86-64.c (is_32bit_relative_branch): New.
1504 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
1505 protected function symbol when building shared library for
1506 32bit relative branch instruction.
1507
1508 2005-02-06 Alan Modra <amodra@bigpond.net.au>
1509
1510 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
1511 syms when doing a relocatable link.
1512 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
1513 at u.def.section.
1514 (ppc64_elf_tls_setup): Likewise.
1515 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
1516
1517 2005-02-04 Alan Modra <amodra@bigpond.net.au>
1518
1519 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
1520 (link_hash_newfunc): Clear all locals using memset.
1521 (make_fdh): Remove flags param. Always create fake func desc
1522 weak. Link the descriptor with the code entry sym.
1523 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
1524 (add_symbol_adjust): Adjust make_fdh call.
1525 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
1526 descriptor to strong undefined if code entry is strong.
1527
1528 2005-02-04 Alan Modra <amodra@bigpond.net.au>
1529
1530 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
1531 lookup here. Set to new before calling bfd_link_repair_undef_list.
1532 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
1533
1534 2005-02-03 Alan Modra <amodra@bigpond.net.au>
1535
1536 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
1537
1538 2005-02-03 Alan Modra <amodra@bigpond.net.au>
1539
1540 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
1541 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
1542 before the as-needed lib was loaded. Abort on unexpected refs.
1543
1544 2005-02-02 Alan Modra <amodra@bigpond.net.au>
1545
1546 * elflink.c (elf_smash_syms): Expand comments.
1547 (elf_link_add_object_symbols): Only call elf_smash_syms for
1548 as-needed dynamic objects.
1549
1550 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
1551 everything, just the field specific to ia64.
1552 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
1553
1554 2005-02-01 Alan Modra <amodra@bigpond.net.au>
1555
1556 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
1557 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
1558 undefined syms.
1559 (struct add_symbol_adjust_data): New.
1560 (add_symbol_adjust): Make an undefweak func desc for old ABI
1561 objects to link with --as-needed shared libs. Return fail status.
1562 Don't adjust old ABI func entry sym to weak if func desc syms
1563 isn't defined.
1564 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
1565 and return status.
1566
1567 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
1568
1569 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
1570 for clarity.
1571
1572 2005-02-01 Alan Modra <amodra@bigpond.net.au>
1573
1574 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
1575 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
1576 remove anything but new and undefweak.
1577 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
1578 existing _DYNAMIC.
1579 (_bfd_elf_create_dynamic_sections): Formatting.
1580 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
1581 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
1582 (struct elf_smash_data): New.
1583 (elf_smash_syms): New function.
1584 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
1585 unneeded dynamic objects to loaded list.
1586 (elf_link_output_extsym): Don't handle as-needed here. Strip
1587 bfd_link_hash_new symbols.
1588 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1589 delref when dynindx is already -1.
1590 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
1591 symbols.
1592 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
1593
1594 2005-02-01 Ben Elliston <bje@au.ibm.com>
1595
1596 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
1597
1598 2005-02-01 Ben Elliston <bje@au.ibm.com>
1599
1600 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
1601 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
1602 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
1603 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
1604 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
1605 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
1606 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
1607 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
1608 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
1609 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
1610 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
1611 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c, doc/chew.c,
1612 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
1613 throughout. Similarly, collapse #if 1'd code.
1614
1615 2005-02-01 Ben Elliston <bje@au.ibm.com>
1616
1617 * elf-bfd.h (bfd_elf_discard_group): Remove.
1618 * elf.c (bfd_elf_discard_group): Likewise.
1619 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
1620
1621 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
1622
1623 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
1624 (_bfd_elf_eh_frame_address_size): Declare.
1625 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
1626 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
1627 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
1628 (elf_backend_eh_frame_address_size): Define.
1629 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
1630 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
1631 size from the new backend hook.
1632 (_bfd_elf_write_section_eh_frame): Likewise.
1633 (_bfd_elf_eh_frame_address_size): New function.
1634
1635 2005-01-31 Andrew Cagney <cagney@gnu.org>
1636
1637 * configure: Regenerate to track ../gettext.m4.
1638
1639 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1640
1641 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
1642 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
1643
1644 2005-01-31 Nick Clifton <nickc@redhat.com>
1645
1646 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
1647 sparc-lynxos, vax-vms) be obsolete.
1648
1649 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
1650
1651 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
1652 * elf32-arm.c (ELF_MINPAGESIZE): Define.
1653 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
1654 * elfcode.h (elf_object_p): Use minpagesize instead of
1655 maxpagesize.
1656 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
1657 (elfNN_bed): Include ELF_MINPAGESIZE.
1658
1659 2005-01-28 Julian Brown <julian@codesourcery.com>
1660
1661 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1662 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1663 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
1664 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
1665 passing flag value from ld. Set flag value in global hash table entry.
1666 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
1667 relocation.
1668
1669 2005-01-27 Andrew Cagney <cagney@gnu.org>
1670
1671 * configure: Regenerate to track ../gettext.m4 change.
1672
1673 2005-01-25 Mark Mitchell <mark@codesourcery.com>
1674
1675 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
1676 SymbianOS.
1677
1678 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
1679
1680 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
1681 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
1682 for TLSMOFF.
1683 * reloc.c: Add R_FRV_TLSMOFF.
1684 * elf32-frv.c (elf32_frv_howto_table): Likewise.
1685 (frv_reloc_map, frv_reloc_type_lookup): Map it.
1686 (elf32_frv_relocate_section): Handle it.
1687 (elf32_frv_check_relocs): Likewise.
1688 * libbfd.h, bfd-in2.h: Rebuilt.
1689 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
1690 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
1691 when given an undefweak TLS symbol. Fix constant TLS PLT entries
1692 such that they return the constant in gr9.
1693 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
1694 symbols.
1695 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
1696 too, such that they shrink on relaxation.
1697 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
1698 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
1699 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
1700 if we can guarantee the use of 16-bit constants.
1701 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
1702 Introduce TLS support for FR-V FDPIC.
1703 * reloc.c: Add TLS relocations.
1704 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
1705 (elf32_frv_rel_tlsdesc_value_howto): New.
1706 (elf32_frv_rel_tlsoff_howto): New.
1707 (frv_reloc_map): Add new mappings.
1708 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
1709 reloc information.
1710 (frvfdpic_dynamic_got_plt_info): New.
1711 (frvfdpic_plt_tls_ret_offset): New.
1712 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
1713 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
1714 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
1715 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
1716 section as local.
1717 (struct frvfdpic_relocs_info): Add TLS fields.
1718 (frvfdpic_relocs_info_hash): Warning clean up.
1719 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
1720 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
1721 (FRVFDPIC_TLS_BIAS): Define.
1722 (tls_biased_base): New.
1723 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
1724 relocations.
1725 (frv_reloc_type_lookup): Likewise.
1726 (frvfdpic_info_to_howto_rel): Likewise.
1727 (elf32_frv_relocate_section): Likewise.
1728 (_frv_create_got_section): Create the PLT section here.
1729 (elf32_frvfdpic_create_dynamic_sections): Not here.
1730 (_frvfdpic_count_nontls_entries): Move out of...
1731 (_frvfdpic_count_got_plt_entries): ... here.
1732 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
1733 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
1734 support.
1735 (_frvfdpic_relax_tls_entries): New.
1736 (_frvfdpic_compute_got_alloc_data): Add TLS support.
1737 (_frvfdpic_get_tlsdesc_entry): New.
1738 (_frvfdpic_assign_got_entries): Add TLS support.
1739 (_frvfdpic_assign_plt_entries): Likewise.
1740 (_frvfdpic_reset_got_plt_entries): New.
1741 (_frvfdpic_size_got_plt): Move out of...
1742 (elf32_frvfdpic_size_dynamic_sections): ... here.
1743 (_frvfdpic_relax_got_plt_entries): New.
1744 (elf32_frvfdpic_relax_section): New.
1745 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
1746 (elf32_frv_check_relocs): Add TLS support.
1747 (bfd_elf32_bfd_relax_section): Define for FDPIC.
1748 * libbfd.h, bfd-in2.h: Rebuilt.
1749
1750 2005-01-25 Alan Modra <amodra@bigpond.net.au>
1751
1752 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
1753 loadable reloc sections.
1754 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
1755 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
1756
1757 2005-01-25 Alan Modra <amodra@bigpond.net.au>
1758
1759 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
1760 sections immediately when linking shared libs. Instead, wait until
1761 we know a lib is needed.
1762 (_bfd_elf_link_create_dynstrtab): Extract from..
1763 (_bfd_elf_link_create_dynamic_sections_): ..here.
1764 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
1765 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
1766 for non-existent .dynamic.
1767 (elf_link_output_extsym): Don't complain about undefined symbols
1768 in as-needed dynamic libs that aren't actually linked.
1769
1770 2005-01-24 Andrew Cagney <cagney@gnu.org>
1771
1772 * configure: Regenerate, ../gettext.m4 was updated.
1773
1774 2005-01-21 Ben Elliston <bje@au.ibm.com>
1775
1776 * aout-encap.c: Remove unused file.
1777
1778 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
1779
1780 PR 679
1781 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
1782 non-function symbols are local.
1783 (_bfd_elf_symbol_refs_local_p): Likewise.
1784
1785 2005-01-18 Alan Modra <amodra@bigpond.net.au>
1786
1787 * bfd.c (bfd_link_just_syms): Add abfd param.
1788 * bfd-in2.h: Regenerate.
1789
1790 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
1791
1792 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
1793 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
1794 instructions. If the amount of padding is known, reduce the size
1795 of the CIE or FDE by that amount.
1796
1797 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
1798
1799 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
1800 augmentation_size. Use bfd_signed_vmas for data_align.
1801 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
1802 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
1803 functions. Don't read past the end of the enclosing CIE or FDE.
1804 (skip_bytes): New utility function.
1805 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
1806 sanity checking.
1807 (_bfd_elf_write_section_eh_frame): Use new functions.
1808
1809 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
1810
1811 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
1812 assert-style REQUIRE() macro to handle sanity checks.
1813
1814 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
1815
1816 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
1817 (comp_unit): Here.
1818 (read_unsigned_leb128): Removed.
1819 (read_signed_leb128): Removed.
1820 (find_abstract_instance_name): Updated.
1821 (parse_comp_unit): Accept info_ptr_unit.
1822 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
1823 comp unit and pass it to parse_comp_unit.
1824
1825 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
1826 (read_signed_leb128): Moved to ...
1827 * libbfd.c: Here.
1828
1829 * libbfd-in.h (read_unsigned_leb128): New prototype.
1830 (read_signed_leb128): Likewise.
1831 * libbfd.h: Regenerated.
1832
1833 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
1834 Nick Clifton <nickc@redhat.com>
1835
1836 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
1837 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
1838 arch_sh4a_nofpu_up in order to match the external names and make the
1839 testsuite's job easier.
1840 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
1841 names.
1842 * bfd-in2.h: Regenerate.
1843
1844 2005-01-15 Andrew Cagney <cagney@gnu.org>
1845
1846 * bfd.m4: New file.
1847 * acinclude.m4: Move BFD_NEED_DECLARATION,
1848 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
1849 the new file bfd.m4. Include ../bfd/bfd.m4.
1850 * configure: Re-generate.
1851
1852 2005-01-12 Alan Modra <amodra@bigpond.net.au>
1853
1854 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
1855 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
1856 reaching PLT.
1857 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
1858 R_PPC_RELAX32PC_PLT.
1859
1860 2005-01-11 Alan Modra <amodra@bigpond.net.au>
1861
1862 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
1863 symbols.
1864 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
1865 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
1866 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
1867 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
1868 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
1869 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
1870 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
1871 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
1872 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
1873 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
1874 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
1875 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
1876 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
1877 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
1878
1879 2005-01-11 Alan Modra <amodra@bigpond.net.au>
1880
1881 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
1882 .dynsbss flags.
1883
1884 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
1885
1886 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
1887 * bfd-in2.h: Regenerate.
1888 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
1889 to support these new machine values.
1890 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
1891 the maxq10.
1892 (bfd_maxq_arch): Update values for the maxq20.
1893
1894 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
1895
1896 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
1897 non-shared object, do not reserve space in .plt and .rela.plt for
1898 regular symbols neither defined nor referenced in shared objects.
1899
1900 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
1901
1902 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
1903 to zero the structure.
1904 (create_got_section): Use BFD_ASSERT instead of abort.
1905 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
1906 'srelgot' fields.
1907 (create_got_section): New function.
1908 (sparc64_elf_create_dynamic_sections): Likewise.
1909 (sparc64_elf_check_relocs): Invoke create_got_section instead of
1910 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
1911 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
1912 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
1913 (sparc64_elf_finish_dynamic_symbol): Likewise.
1914 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
1915 (elf_backend_create_dynamic_sections): Define to
1916 sparc64_elf_create_dynamic_sections.
1917
1918 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
1919
1920 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
1921 (elf_backend_omit_section_dynsym): Define to it.
1922 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
1923 (elf_backend_omit_section_dynsym): Define to it.
1924
1925 2005-01-07 Jakub Jelinek <jakub@redhat.com>
1926
1927 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
1928 PT_DYNAMIC segment, unless .dynamic.
1929
1930 2005-01-06 Paul Brook <paul@codesourcery.com>
1931
1932 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
1933 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
1934 * configure: Regenerate.
1935 * elf32-arm.c: Add VxWorks target bfd.
1936 (USE_REL): Remove.
1937 (elf32_arm_link_hash_table): Add use_rel.
1938 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
1939 elf32_arm_relocate_section): Replace USE_REL with runtime check.
1940 Correct offset calculation for RELA case.
1941 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
1942 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
1943 (elf32_arm_vxworks_link_hash_table_create): New function.
1944 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
1945 (bfd_elf32_littlearm_vxworks_vec): Ditto.
1946 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
1947
1948 2005-01-06 Alan Modra <amodra@bigpond.net.au>
1949
1950 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
1951 multi_toc_needed.
1952 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
1953 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
1954 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
1955 (ppc64_elf_next_toc_section): Heed no_multi_toc.
1956 (ppc64_elf_reinit_toc): Set multi_toc_needed.
1957 (toc_adjusting_stub_needed): Rewrite.
1958 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
1959 toc tests. Adjust for toc_adjusting_stub_needed changes.
1960 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
1961 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
1962 * section.c: Expand comment on backend bits.
1963 * bfd-in2.h: Regenerate.
1964 * libbfd.h: Regenerate.
1965
1966 2005-01-06 Alan Modra <amodra@bigpond.net.au>
1967
1968 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
1969 toc adjusting stub, do not test source section flags.
1970
1971 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
1972
1973 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
1974 from STABS debugging sections again.
1975
1976 2005-01-05 Fred Fish <fnf@specifixinc.com>
1977
1978 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
1979 (find_abstract_instance_name): New function.
1980 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
1981 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
1982 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
1983
1984 2004-12-31 Paul Brook <paul@copdesourcery.com>
1985
1986 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
1987
1988 2004-12-31 Alan Modra <amodra@bigpond.net.au>
1989
1990 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
1991 Commit missing changes from 2004-12-22.
1992 * bfd-in2.h: Regenerate.
1993
1994 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
1995
1996 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
1997
1998 2004-12-21 Kris Warkentin <kewarken@qnx.com>
1999
2000 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
2001 Add 'base' argument for constructing register sections. Reformat.
2002 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
2003 gp and fp regs. Reformat.
2004
2005 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
2006
2007 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
2008 * bfd-in2.h: Regenerate.
2009 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
2010 (avr_reloc_map): Likewise.
2011 (avr_final_link_relocate): Likewise.
2012
2013 2004-12-22 Alan Modra <amodra@bigpond.net.au>
2014
2015 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
2016 as-needed dynamic libs as undefined.
2017 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
2018 libs when finding they are needed.
2019
2020 2004-12-20 Alan Modra <amodra@bigpond.net.au>
2021
2022 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
2023 (opd_entry_value): Use opd_relocs if available.
2024 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
2025 copy .opd relocations to opd_relocs.
2026 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
2027
2028 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
2029
2030 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
2031 * elf32-v850.c (v850_elf_howto_table): Add entry for
2032 R_V850_LO16_SPLIT_OFFSET.
2033 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
2034 (v850_elf_perform_lo16_relocation): New function, extracted from...
2035 (v850_elf_perform_relocation): ...here. Use it to handle
2036 R_V850_LO16_SPLIT_OFFSET.
2037 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
2038 R_V850_LO16_SPLIT_OFFSET.
2039 * libbfd.h, bfd-in2.h: Regenerate.
2040
2041 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
2042
2043 * config.bfd: Add s390x-ibm-tpf support.
2044
2045 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
2046
2047 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
2048 to prototype, to make hash info available.
2049 Prevent wrapped symbols from being adjusted twice.
2050
2051 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
2052
2053 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
2054 overflow for calls to undefined weak symbols.
2055
2056 2004-12-11 Alan Modra <amodra@bigpond.net.au>
2057
2058 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
2059 canonical sections syms have a name.
2060
2061 2004-12-11 Alan Modra <amodra@bigpond.net.au>
2062
2063 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
2064 have been adjusted for output.
2065 (ppc64_elf_relocate_section): Mark sections with reloc_done.
2066
2067 2004-12-10 Alan Modra <amodra@bigpond.net.au>
2068
2069 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
2070 add symtab_hdr param.
2071 (group_signature): Update calls.
2072 * elf-bfd.h (bfd_elf_sym_name): Update.
2073 * elf32-ppc.c (ppc_elf_relocate_section): Update.
2074 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
2075 (ppc64_elf_relocate_section): Update.
2076 * elflink.c (elf_link_input_bfd): Update.
2077
2078 2004-12-10 Jakub Jelinek <jakub@redhat.com>
2079
2080 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
2081 st_shndx on STT_SECTION sections.
2082
2083 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
2084
2085 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
2086 ELF section symbols.
2087
2088 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
2089
2090 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
2091 return a real value, unless it is a PLT symbol.
2092 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
2093 bal if possible.
2094
2095 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
2096 R_MIPS_JALR entry to 0.
2097
2098 * archures.c: Define bfd_mach_mips9000.
2099 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
2100 (mips_set_isa_flags): Handle bfd_mach_mips9000.
2101 * cpu-mips.c (I_mips9000): Define.
2102 (arch_info_struct): Add case for bfd_mach_mips9000.
2103 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
2104 * bfd-in2.h: Regenerate.
2105
2106 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
2107
2108 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
2109 overflow.
2110
2111 2004-12-07 Ben Elliston <bje@gnu.org>
2112
2113 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
2114
2115 2004-12-06 Daniel Jacobowitz <dan@debian.org>
2116
2117 Suggested by Fergal Daly <fergal@esatclear.ie>:
2118 * simple.c (simple_dummy_multiple_definition): New function.
2119 (bfd_simple_get_relocated_section_contents): Use it.
2120
2121 2004-12-03 Jan Beulich <jbeulich@novell.com>
2122
2123 * elf.c (elf_find_function): Don't use the last file symbol ever,
2124 seen, but the last one seen prior to the symbol being reported.
2125 Don't report a filename at all for global symbols when that might
2126 be ambiguous/wrong.
2127
2128 2004-12-01 Paul Brook <paul@codesourcery.com>
2129
2130 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
2131 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
2132 version.
2133
2134 2004-12-01 Paul Brook <paul@codesourcery.com>
2135
2136 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
2137 sections undefined.
2138
2139 2004-11-30 Paul Brook <paul@codesourcery.com>
2140
2141 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
2142 no_pipeline_knowledge
2143 (elf32_arm_link_hash_table_create): Ditto.
2144 (bfd_elf32_arm_process_before_allocation): Ditto.
2145 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
2146 handling.
2147 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
2148 prototype.
2149 * bfd-in2.h: Regenerate.
2150
2151 2004-11-30 Randolph Chung <tausq@debian.org>
2152
2153 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
2154 (elf32_hppa_grok_psinfo): New function.
2155 (elf_backend_grok_prstatus): Define.
2156 (elf_backend_grok_psinfo): Define.
2157
2158 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
2159
2160 PR 574:
2161 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
2162
2163 2004-11-24 Paul Brook <paul@codesourcery.com>
2164
2165 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
2166
2167 2004-11-24 Paul Brook <paul@codesourcery.com>
2168
2169 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
2170 (elf32_arm_swap_symbol_out): New function.
2171 (elf32_arm_size_info): Add.
2172 (elf_backend_size_info): Define.
2173
2174 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2175
2176 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
2177 make_bfd_asection.
2178
2179 2004-11-19 Alan Modra <amodra@bigpond.net.au>
2180
2181 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
2182 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
2183 * nlmcode.h (nlm_write_object_contents): Warning fix.
2184
2185 2004-11-18 Bob Wilson <bob.wilson@acm.org>
2186
2187 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
2188
2189 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2190
2191 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
2192 (elf32_arm_plt_thumb_stub): New.
2193 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
2194 and plt_got_offset.
2195 (elf32_arm_link_hash_traverse): Fix typo.
2196 (elf32_arm_link_hash_table): Add obfd.
2197 (elf32_arm_link_hash_newfunc): Initialize new fields.
2198 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
2199 (elf32_arm_link_hash_table_create): Initialize obfd.
2200 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
2201 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
2202 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
2203 interworking BFD is not dynamic.
2204 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
2205 not emit glue for PLT references.
2206 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
2207 emit glue for PLT references. Support the Thumb PLT prefix.
2208 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
2209 plt_thumb_refcount.
2210 (elf32_arm_check_relocs): Likewise.
2211 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
2212 plt_thumb_refcount.
2213 (allocate_dynrelocs): Handle Thumb PLT references.
2214 (elf32_arm_finish_dynamic_symbol): Likewise.
2215 (elf32_arm_symbol_processing): New function.
2216 (elf_backend_symbol_processing): Define.
2217
2218 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
2219
2220 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
2221 add_fde_encoding. Remove need_relative.
2222 * elf-eh-frame.c (extra_augmentation_string_bytes)
2223 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
2224 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
2225 in cases where the CIE has no existing 'R' augmentation. Use
2226 size_of_output_cie_fde when assigning offsets. Use the final offset
2227 as the new section size.
2228 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
2229 Account for any extra augmentation bytes in the returned offset.
2230 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
2231 moved before being modified. Pad growing entries with DW_CFA_nops.
2232 Add 'z' and 'R' augmentations as directed by add_augmentation_size
2233 and add_fde_encoding.
2234
2235 2004-11-15 Mark Mitchell <mark@codesourcery.com>
2236
2237 * elf32-arm.c (elf32_arm_relocate_section): Use
2238 arm_real_reloc_type.
2239
2240 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
2241
2242 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
2243 for discard relocations; don't add an R_MIPS_NONE to the main body
2244 of .rel.dyn.
2245
2246 2004-11-04 Paul Brook <paul@codesourcery.com>
2247
2248 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
2249 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
2250 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
2251 default version definition for unversioned symbols.
2252 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
2253 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
2254 _bfd_elf_slurp_version_tables. Set default version for unversioned
2255 imported symbols.
2256
2257 2004-11-15 Paul Brook <paul@codesourcery.com>
2258
2259 * elflink.c (elf_link_add_object_symbols): Don't assume version
2260 indices are consecutive.
2261
2262 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
2263
2264 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
2265 composite relocations against the personality data.
2266
2267 2004-11-13 Paul Brook <paul@codesourcery.com>
2268
2269 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
2270 R_ARM_PREL31 relocations to PLT entries.
2271 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
2272 (elf32_arm_check_relocs): Ditto.
2273
2274 2004-11-12 Bob Wilson <bob.wilson@acm.org>
2275
2276 * xtensa-isa.c (xtensa_interface_class_id): New.
2277
2278 2004-11-11 Bob Wilson <bob.wilson@acm.org>
2279
2280 * elf32-xtensa.c (property_table_compare): Remove assertion about
2281 entries with the same address and non-zero size.
2282 (xtensa_read_table_entries): Report such entries as errors.
2283
2284 2004-11-11 Mark Mitchell <mark@codesourcery.com>
2285
2286 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
2287 R_ARM_RELATIVE on Symbian OS.
2288
2289 2004-11-09 Mark Mitchell <mark@codesourcery.com>
2290
2291 * som.c (som_bfd_print_private_bfd_data): New function.
2292 (som_object_setup): Save the auxiliary header. Don't assume that
2293 zero is an invalid entry point for a shared library.
2294 (som_object_p): Allocate the auxiliary header on the heap.
2295
2296 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
2297 declaration.
2298 (elf32_arm_symbian_modify_segment_map): Likewise.
2299
2300 2004-11-09 Daniel Jacobowitz <dan@debian.org>
2301
2302 From David Poole <daveml@mbuf.com>:
2303 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
2304 (elf32_arm_size_dynamic_sections): Call it.
2305
2306 2004-11-09 Alan Modra <amodra@bigpond.net.au>
2307
2308 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
2309 (ALL_MACHINES_CFILES): Fix typo.
2310 * Makefile.in: Regenerate.
2311 * po/SRC-POTFILES.in: Regenerate.
2312
2313 2004-11-08 Mark Mitchell <mark@codesourcery.com>
2314
2315 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
2316 R_ARM_RELATIVE relocation for Symbian OS, mention the section
2317 symbol in the relocation.
2318
2319 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
2320 Vineet Sharma <vineets@noida.hcltech.com>
2321
2322 * coff-maxq.c: New File.
2323 * cpu-maxq.c: New File.
2324 * coffcode.h: Likewise.
2325 * config.bfd: Likewise.
2326 * configure.in (maxqcoff_vec): New target vector.
2327 * Makefile.am: Add support for maxq target.
2328 * configure.in: Likewise.
2329 * archures.c:. Likewise.
2330 * targets.c: Likewise.
2331 * bfd_in2.h : Regenerated.
2332 * Makefile.in: Regenerated.
2333 * configure: Regenerated.
2334 * doc/Makefile.in: Regenerated.
2335
2336 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2337
2338 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
2339 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
2340 C_NT_WEAK aux entries.
2341 (_bfd_coff_generic_relocate_section): Handle undefined
2342 aliases.
2343
2344 2004-11-07 Andreas Schwab <schwab@suse.de>
2345
2346 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
2347 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
2348 non-default visibility.
2349
2350 2004-11-01 Mark Mitchell <mark@codesourcery.com>
2351
2352 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
2353 D_PAGED.
2354 (elf32_arm_symbian_modify_segment_map): Don't
2355 reset includes_filehdr and includes_phdrs here.
2356
2357 2004-11-04 Daniel Jacobowitz <dan@debian.org>
2358
2359 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
2360 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
2361 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
2362 dependency.
2363 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
2364 to a new removed list. Remove normal configuration stanzas.
2365 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
2366 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
2367 elfarm-nabi.lo with elf32-arm.lo.
2368 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
2369 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
2370 * elf32-arm.h: Remove.
2371 * elfarm-oabi.c: Remove.
2372 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
2373 and bfd_elf32_littlearm_oabi_vec.
2374 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
2375
2376 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
2377
2378 * config.bfd: Support crisv32-*-* like cris-*-*.
2379 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
2380 (bfd_mach_cris_v10_v32): New macros.
2381 * cpu-cris.c: Tweak formatting.
2382 (get_compatible): New function.
2383 (N): New macro.
2384 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
2385 bfd_arch_info_type:s.
2386 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
2387 get_compatible for member compatible and link bfd_cris_arch_v32 as
2388 next.
2389 * elf32-cris.c (cris_elf_pcrel_reloc)
2390 (cris_elf_set_mach_from_flags): New functions.
2391 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
2392 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
2393 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
2394 numbers for bfd_mach_cris_v32.
2395 (PLT_ENTRY_SIZE_V32): New macro.
2396 (elf_cris_plt0_entry): Drop last comma in initializer.
2397 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
2398 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
2399 PLT initializers.
2400 (cris_elf_relocate_section): Change all "%B(%A)" messages to
2401 "%B, section %A".
2402 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
2403 (elf_cris_finish_dynamic_sections): Similar.
2404 (elf_cris_adjust_dynamic_symbol): Similar.
2405 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
2406 section %A".
2407 <switch with PIC relocs>: Emit error and return FALSE for
2408 bfd_mach_cris_v10_v32.
2409 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
2410 Emit warning when generating textrel reloc.
2411 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
2412 (cris_elf_final_write_processing): Set flags according to mach.
2413 (cris_elf_print_private_bfd_data): Display
2414 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
2415 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
2416 new_flags. Don't call cris_elf_final_write_processing. Don't
2417 look at the actual elf header flags at all; use
2418 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
2419 in bfd_get_mach for ibfd and obfd and handle merging of compatible
2420 objects.
2421 (bfd_elf32_bfd_copy_private_bfd_data): Define.
2422 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
2423 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
2424 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
2425 * bfd-in2.h, libbfd.h: Regenerate.
2426
2427 2004-11-04 Alan Modra <amodra@bigpond.net.au>
2428
2429 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
2430 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
2431 comment.
2432 (struct adjust_toc_info): New.
2433 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
2434
2435 2004-11-03 Bob Wilson <bob.wilson@acm.org>
2436
2437 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
2438 if there are no segments.
2439
2440 2004-11-02 Daniel Jacobowitz <dan@debian.org>
2441
2442 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
2443
2444 2004-11-02 Nick Clifton <nickc@redhat.com>
2445
2446 * elf32-iq2000.c: Convert to ISO C90 formatting.
2447
2448 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
2449
2450 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
2451
2452 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
2453
2454 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
2455 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
2456 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
2457
2458 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2459
2460 * elf32-sh.c (tpoff): Take alignment into account.
2461
2462 2004-10-28 Nick Clifton <nickc@redhat.com>
2463
2464 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
2465 performing a relocatable link.
2466 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
2467 for MIPS ports under Irix.
2468
2469 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
2470
2471 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
2472 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
2473 (elf32_arm_final_link_relocate): Ditto.
2474 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
2475 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
2476 (elf32_arm_adjust_dynamic_symbol): Ditto.
2477 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
2478 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
2479 (elf32_arm_r_howto): ... To here.
2480 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
2481
2482 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
2483
2484 PR 475
2485 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
2486 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
2487 and R_IA64_SECREL64LSB.
2488
2489 2004-10-26 Paul Brook <paul@codesourcery.com>
2490
2491 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
2492 (bfd_elf_size_dynamic_sections): Create default version definition.
2493 (elf_link_output_extsym): Adjust for default symbol version.
2494
2495 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
2496
2497 * mmo.c: Adjust to ISO C.
2498
2499 * mmo.c (mmo_write_section_description): New function broken out
2500 of mmo_internal_write_section.
2501 (mmo_internal_write_section): For each of .text and .data, call
2502 mmo_write_section_description before outputting contents if it has
2503 nontrivially deducible vma or contents.
2504 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
2505 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
2506 symbols if found within the .data address range.
2507
2508 2004-10-24 Daniel Jacobowitz <dan@debian.org>
2509
2510 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
2511
2512 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
2513
2514 * mmo.c (File Layout): Correct place of misplaced blurb about
2515 special data.
2516
2517 2004-10-22 Mark Kettenis <kettenis@gnu.org>
2518
2519 * config.bfd: Add mips64*-*-openbsd.
2520
2521 2004-10-21 Bob Wilson <bob.wilson@acm.org>
2522
2523 * elf32-xtensa.c (ebb_propose_action): Put declarations before
2524 statements.
2525
2526 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
2527
2528 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
2529 * configure: Regenerate.
2530
2531 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
2532
2533 PR 463
2534 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
2535 to linker reloc_overflow callback.
2536 (aout_link_input_section_ext): Likewise.
2537 (aout_link_reloc_link_order): Likewise.
2538 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
2539 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
2540 Likewise.
2541 (alpha_relocate_section): Likewise.
2542 * coff-arm.c (coff_arm_relocate_section): Likewise.
2543 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
2544 * coff-h8500.c (extra_case): Likewise.
2545 * coff-i960.c (coff_i960_relocate_section): Likewise.
2546 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2547 * coff-mips.c (mips_relocate_section): Likewise.
2548 * coff-or32.c (coff_or32_relocate_section): Likewise.
2549 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2550 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
2551 * coff-sh.c (sh_relocate_section): Likewise.
2552 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2553 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
2554 * coff-z8k.c (extra_case): Likewise.
2555 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
2556 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
2557 (_bfd_coff_generic_relocate_section): Likewise.
2558 * ecoff.c (ecoff_reloc_link_order): Likewise.
2559 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
2560 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
2561 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2562 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
2563 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
2564 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
2565 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2566 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
2567 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
2568 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2569 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2570 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
2571 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2572 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2573 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2574 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2575 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2576 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
2577 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2578 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2579 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2580 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2581 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
2582 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2583 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2584 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2585 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2586 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2587 * elf32-v850.c (v850_elf_relocate_section): Likewise.
2588 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2589 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2590 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2591 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
2592 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2593 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2594 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2595 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2596 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2597 * elflink.c (elf_reloc_link_order): Likewise.
2598 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2599 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2600 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
2601 * linker.c (_bfd_generic_reloc_link_order): Likewise.
2602 * pdp11.c (pdp11_aout_link_input_section): Likewise.
2603 (aout_link_reloc_link_order): Likewise.
2604 * reloc.c (bfd_generic_get_relocated_section_contents):
2605 Likewise.
2606 * xcofflink.c (xcoff_reloc_link_order): Likewise.
2607 * simple.c (simple_dummy_reloc_overflow): Updated.
2608
2609 2004-10-20 Andreas Schwab <schwab@suse.de>
2610
2611 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
2612 (elf_backend_plt_sym_val): Define.
2613
2614 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
2615
2616 * config.bfd: Set targ_underscore=yes for PE COFF targets
2617
2618 2004-10-19 Alan Modra <amodra@bigpond.net.au>
2619
2620 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
2621 (ppc64_elf_edit_opd): Likewise.
2622
2623 2004-10-18 Mark Mitchell <mark@codesourcery.com>
2624
2625 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
2626 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
2627 set SEC_ALLOC and SEC_LOAD.
2628
2629 2004-10-18 Nick Clifton <nickc@redhat.com>
2630
2631 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
2632 'name' for relocs against both local and global symbols.
2633
2634 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2635
2636 * bfd-in2.h: Regenerate.
2637 * bfd.c (struct bfd): Add no_export.
2638 * elflink.c (elf_link_add_object_symbols): Handle no_export.
2639
2640 2004-10-15 Alan Modra <amodra@bigpond.net.au>
2641
2642 * config.bfd: Whitespace cleanup.
2643 * Makefile.am: Run "make dep-am"
2644 * Makefile.in: Regenerate.
2645
2646 2004-10-15 Jakub Jelinek <jakub@redhat.com>
2647
2648 * elflink.c (struct already_linked_section): Removed.
2649 (try_match_symbols_in_sections, already_linked): Removed.
2650 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
2651 prefix of section names when finding already_linked_table
2652 chain. Compare section names. Instead of calling already_linked,
2653 do it inline and only for sections in the same already_linked_list.
2654
2655 2004-10-15 Alan Modra <amodra@bigpond.net.au>
2656
2657 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
2658 parameter. If called after _bfd_elf_write_section_eh_frame,
2659 don't allow a -2 return unless need_* bit is already set, and
2660 handle offsets adjusted for output_offset.
2661 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
2662 * elf.c (_bfd_elf_section_offset): Update call.
2663
2664 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
2665
2666 PR 440
2667 * coffcode.h (coff_compute_section_file_positions): Cast to
2668 bfd_vma when computing page alignment.
2669
2670 2004-10-13 Mark Mitchell <mark@codesourcery.com>
2671
2672 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
2673 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
2674
2675 2004-10-12 Mark Mitchell <mark@codesourcery.com>
2676
2677 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
2678 relocations use a virtual address, not a section offset.
2679
2680 2004-10-12 Bob Wilson <bob.wilson@acm.org>
2681
2682 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
2683 (narrow_instruction, widen_instruction): Remove unnecessary calls to
2684 xtensa_format_encode.
2685 (ebb_propose_action): Inline call to ebb_add_proposed_action.
2686 (ebb_add_proposed_action): Delete.
2687
2688 2004-10-12 Bob Wilson <bob.wilson@acm.org>
2689
2690 * elf32-xtensa.c: Use ISO C90 formatting.
2691
2692 2004-10-12 Paul Brook <paul@codesourcery.com>
2693
2694 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
2695 message.
2696
2697 2004-10-12 Paul Brook <paul@codesourcery.com>
2698
2699 * elf32-arm.h: Support EABI version 4 objects.
2700
2701 2004-10-12 Alan Modra <amodra@bigpond.net.au>
2702
2703 PR 325
2704 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
2705 Don't mark as default.
2706 (bfd_x86_64_arch): Don't mark as default.
2707
2708 2004-10-12 Alan Modra <amodra@bigpond.net.au>
2709
2710 * elflink.c (enum action_discarded): New.
2711 (elf_section_complain_discarded): Delete.
2712 (elf_action_discarded): New function subsuming the above and also
2713 controlling reloc behaviour.
2714 (elf_link_input_bfd): Use it.
2715
2716 2004-10-11 Jakub Jelinek <jakub@redhat.com>
2717
2718 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
2719 (special_sections): Add .gnu.liblist and .gnu.conflict.
2720 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
2721
2722 2004-10-11 Alan Modra <amodra@bigpond.net.au>
2723
2724 PR 233
2725 * elflink.c (elf_link_input_bfd): Try harder to support
2726 relocations against symbols in removed linkonce sections.
2727
2728 2004-10-11 Alan Modra <amodra@bigpond.net.au>
2729
2730 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
2731
2732 PR 354
2733 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
2734 sections do not reference symbols in non-SEC_ALLOC sections.
2735
2736 2004-10-11 Alan Modra <amodra@bigpond.net.au>
2737
2738 PR 437
2739 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
2740 (_bfd_elf_link_omit_section_dynsym): Formatting.
2741
2742 2004-10-10 Alan Modra <amodra@bigpond.net.au>
2743
2744 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
2745 * libbfd.h: Regnerate.
2746 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
2747 * elf32-frv.c: Likewise.
2748 * elf32-m32r.c: Likewise.
2749 * elf32-ppc.c: Likewise.
2750 * elf64-hppa.c: Likewise.
2751 * elfxx-ia64.c: Likewise.
2752 * opncls.c: Likewise.
2753
2754 2004-10-10 Alan Modra <amodra@bigpond.net.au>
2755
2756 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
2757 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
2758 offsets stored in struct eh_cie_fde entries before doing other
2759 work.
2760
2761 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
2762 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
2763 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
2764 setting offsets for removed CIEs. Don't set "sec", instead set
2765 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
2766 CIE in hdr_info. Only set make_relative and make_lsda_relative
2767 for CIEs. Use pointers rather than array indices.
2768 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
2769 make_lsda_relative, need_* on cie_inf for FDEs.
2770 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
2771 section output_offset. Delete cie_offset, instead use cie_inf
2772 pointer to CIE entry. Use need_relative and need_lsda_relative on
2773 CIE entry for FDEs. Use pointers rather than array indices.
2774
2775 2004-10-09 Alan Modra <amodra@bigpond.net.au>
2776
2777 * coff-rs6000.c (rs6000coff_vec): Add initializer for
2778 bfd_is_target_special_symbol.
2779 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2780 * som.c (som_bfd_is_target_special_symbol): Define.
2781
2782 2004-10-08 Nick Clifton <nickc@redhat.com>
2783
2784 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
2785 * configure: Regenerate.
2786 * bfd-in2.h: Regenerate.
2787 * syms.c (bfd_is_target_special_symbol): New interface function.
2788 Returns true when a symbol should be considered to be special.
2789 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
2790 the symbol jump table.
2791 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
2792 Return true iff the symbol is a mapping symbol.
2793 (bfd_elf32_bfd_is_target_special_symbol): Define.
2794 * elfxx-target.h: Provide a default definition for
2795 bfd_is_target_special_symbol.
2796 * aout-target.h: Likewise.
2797 * aout-tic30.c: Likewise.
2798 * binary.c: Likewise.
2799 * coffcode.h: Likewise.
2800 * i386msdos.c: Likewise.
2801 * ieee.c: Likewise.
2802 * ihex.c: Likewise.
2803 * libaout.h: Likewise.
2804 * libbfd-in.h: Likewise
2805 * libecoff.h: Likewise.
2806 * mach-o.c: Likewise.
2807 * mmo.c: Likewise.
2808 * nlm-target.h: Likewise.
2809 * oasys.c: Likewise.
2810 * pef.c: Likewise.
2811 * ppcboot.c: Likewise.
2812 * srec.c: Likewise.
2813 * tekhex.c: Likewise.
2814 * versados.c: Likewise.
2815 * vms.c: Likewise.
2816 * xcoff-target.h: Likewise.
2817 * xsym.c: Likewise.
2818 * libbfd.h: Regenerate.
2819
2820 2004-10-08 Daniel Jacobowitz <dan@debian.org>
2821
2822 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
2823 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
2824 (elf_backend_section_from_shdr): Define.
2825
2826 2004-10-08 Alan Modra <amodra@bigpond.net.au>
2827
2828 * syms.c (bfd_is_local_label): Return false for file symbols.
2829
2830 2004-10-07 Bob Wilson <bob.wilson@acm.org>
2831 David Heine <dlheine@tensilica.com>
2832
2833 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
2834 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
2835 (elf32xtensa_no_literal_movement): New global variable.
2836 (elf_howto_table): Add entries for new relocations.
2837 (elf_xtensa_reloc_type_lookup): Handle new relocations.
2838 (property_table_compare): When addresses are equal, compare sizes and
2839 various property flags.
2840 (property_table_matches): New.
2841 (xtensa_read_table_entries): Extend to read new property tables. Add
2842 output_addr parameter to indicate that output addresses should be used.
2843 Use bfd_get_section_limit.
2844 (elf_xtensa_find_property_entry): New.
2845 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
2846 (elf_xtensa_check_relocs): Handle new relocations.
2847 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
2848 relocations. Use new xtensa-isa.h functions.
2849 (build_encoding_error_message): Remove encode_result parameter. Add
2850 new target_address parameter used to detect alignment errors.
2851 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
2852 error handling. Use new is_operand_relocation function.
2853 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
2854 Use underbar macro for error messages. Formatting.
2855 (get_const16_opcode): New.
2856 (get_l32r_opcode): Add a separate flag for initialization.
2857 (get_relocation_opnd): Operand number is no longer explicit in the
2858 relocation. Change to decode the opcode and analyze its operands.
2859 (get_relocation_slot): New.
2860 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
2861 Use new xtensa-isa.h functions to handle multislot instructions.
2862 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
2863 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
2864 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
2865 check_loop_aligned, check_branch_target_aligned_address, narrowable,
2866 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
2867 get_single_format, init_op_single_format_table): New.
2868 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
2869 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
2870 (contract_asm_expansion): Add error_message parameter and pass it to
2871 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
2872 with R_XTENSA_SLOT0_OP.
2873 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
2874 instructions. Use new xtensa-isa.h functions.
2875 (r_reloc struct): Add new virtual_offset field.
2876 (r_reloc_init): Add contents and content_length parameters. Set
2877 virtual_offset field to zero. Add contents to target_offset field for
2878 partial_inplace relocations.
2879 (r_reloc_is_defined): Check for null.
2880 (print_r_reloc): New debug function.
2881 (source_reloc struct): Replace xtensa_operand field with pair of the
2882 opcode and the operand position. Add is_abs_literal field.
2883 (init_source_reloc): Specify operand by opcode/position pair. Set
2884 is_abs_literal field.
2885 (source_reloc_compare): When target_offsets are equal, compare other
2886 fields to make sorting predictable.
2887 (literal_value struct): Add is_abs_literal field.
2888 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
2889 (init_literal_value): New.
2890 (is_same_value): Replace with ...
2891 (literal_value_equal): ... this function. Add comparisons of
2892 virtual_offset and is_abs_literal fields.
2893 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
2894 failure. Initialize has_last_loc field.
2895 (value_map_hash_table_delete): New.
2896 (hash_literal_value): Rename to ...
2897 (literal_value_hash): ... this. Include is_abs_literal flag and
2898 virtual_offset field in the hash value.
2899 (get_cached_value): Rename to ...
2900 (value_map_get_cached_value): ... this. Update calls to
2901 literal_value_hash and literal_value_equal.
2902 (add_value_map): Check for allocation failure. Update calls to
2903 value_map_get_cached_value and literal_value_hash.
2904 (text_action, text_action_list, text_action_t): New types.
2905 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
2906 text_action_add, text_action_add_literal, offset_with_removed_text,
2907 offset_with_removed_text_before_fill, find_insn_action,
2908 print_action_list, print_removed_literals): New.
2909 (offset_with_removed_literals): Delete.
2910 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
2911 fix_array, fix_array_count, allocated_relocs, relocs_count, and
2912 allocated_relocs_count fields.
2913 (init_xtensa_relax_info): Initialize new fields.
2914 (reloc_bfd_fix struct): Add new translated field.
2915 (reloc_bfd_fix_init): Add translated parameter and use it to set the
2916 translated field.
2917 (fix_compare, cache_fix_array): New.
2918 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
2919 section via get_xtensa_relax_info. Use cache_fix_array to set up
2920 sorted fix_array and use bsearch instead of linear search.
2921 (section_cache_t): New struct.
2922 (init_section_cache, section_cache_section, clear_section_cache): New.
2923 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
2924 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
2925 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
2926 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
2927 New.
2928 (retrieve_contents): Use bfd_get_section_limit.
2929 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
2930 to compute_removed_literals. Free value_map_hash_table when no longer
2931 needed.
2932 (analyze_relocations): Check is_relaxable_asm_section flag. Call
2933 compute_text_actions for all sections.
2934 (find_relaxable_sections): Mark sections as relaxable if they contain
2935 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
2936 call. Increment relax_info src_count field only for appropriate
2937 relocation types. Remove is_literal_section check.
2938 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
2939 r_reloc_init and find_associated_l32r_irel. Check
2940 is_relaxable_asm_section flag. Handle L32R instructions with absolute
2941 literals. Pass is_abs_literal flag to init_source_reloc.
2942 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
2943 CONST16 instructions. Adjust calls to r_reloc_init and
2944 pcrel_reloc_fits. Handle weak symbols conservatively.
2945 (find_associated_l32r_irel): Add bfd parameter and pass it to
2946 is_l32r_relocation.
2947 (compute_text_actions, compute_ebb_proposed_actions,
2948 compute_ebb_actions, check_section_ebb_pcrels_fit,
2949 check_section_ebb_reduces, text_action_add_proposed,
2950 compute_fill_extra_space): New.
2951 (remove_literals): Replace with ...
2952 (compute_removed_literals): ... this function. Call
2953 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
2954 Call xtensa_read_table_entries to get the property table. Skip
2955 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
2956 is_removable_literal, remove_dead_literal, and
2957 identify_literal_placement functions.
2958 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
2959 instead of linear search.
2960 (is_removable_literal, remove_dead_literal,
2961 identify_literal_placement): New.
2962 (relocations_reach): Update check for literal not referenced by any
2963 PC-relative relocations. Adjust call to pcrel_reloc_fits.
2964 (coalesce_shared_literal, move_shared_literal): New.
2965 (relax_section): Use bfd_get_section_limit. Call
2966 translate_section_fixes. Update calls to r_reloc_init and
2967 offset_with_removed_text. Check new is_relaxable_asm_section flag.
2968 Add call to pin_internal_relocs. Add special handling for
2969 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
2970 info to calculate new addend_displacement variable. Replace code for
2971 deleting literals with more general code to perform the actions
2972 determined by the action_list for the section.
2973 (translate_section_fixes, translate_reloc_bfd_fix): New.
2974 (translate_reloc): Check new is_relaxable_asm_section flag. Call
2975 find_removed_literal only if is_operand_relocation. Update call to
2976 offset_with_removed_text. Use new target_offset and removed_bytes
2977 variables.
2978 (move_literal): New.
2979 (relax_property_section): Use bfd_get_section_limit. Set new
2980 is_full_prop_section flag and handle new property tables. Update calls
2981 to r_reloc_init and offset_with_removed_text. Check
2982 is_relaxable_asm_section flag. Handle expansion of zero-sized
2983 unreachable entries, with use of offset_with_removed_text_before_fill.
2984 For relocatable links, combine entries only for literal tables.
2985 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
2986 calls to offset_with_removed_text. Translate st_size field for
2987 function symbols.
2988 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
2989 failure. Add contents parameter. Update call to get_bfd_fix. Update
2990 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
2991 R_XTENSA_ASM_EXPAND relocs.
2992 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
2993 call to get_bfd_fix. Include offset from contents for partial_inplace
2994 relocations.
2995 (is_reloc_sym_weak): New.
2996 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
2997 (prop_sec_len): New.
2998 (xtensa_is_property_section): Handle new property sections.
2999 (is_literal_section): Delete.
3000 (internal_reloc_compare): When r_offset matches, compare r_info and
3001 r_addend to make sorting predictable.
3002 (internal_reloc_matches): New.
3003 (xtensa_get_property_section_name): Handle new property sections.
3004 (xtensa_get_property_predef_flags): New.
3005 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
3006 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
3007 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
3008 (xtisa_errno, xtisa_error_msg): New variables.
3009 (xtensa_isa_errno, xtensa_isa_error_msg): New.
3010 (xtensa_insnbuf_alloc): Add error handling.
3011 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
3012 use xtensa_format_decode. Add error handling.
3013 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
3014 instruction length to find the number of bytes to copy.
3015 (xtensa_isa_init): Add error handling. Replace calls to
3016 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
3017 tables in the xtensa_modules structure.
3018 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
3019 xtensa_extend_isa): Delete.
3020 (xtensa_isa_free): Change to only free lookup tables.
3021 (opname_lookup_compare): Replace with ...
3022 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
3023 (xtensa_insn_maxlength): Rename to ...
3024 (xtensa_isa_maxlength): ... this.
3025 (xtensa_insn_length): Delete.
3026 (xtensa_insn_length_from_first_byte): Replace with ...
3027 (xtensa_isa_length_from_chars): ... this function.
3028 (xtensa_num_opcodes): Rename to ...
3029 (xtensa_isa_num_opcodes): ... this.
3030 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
3031 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
3032 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
3033 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
3034 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
3035 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
3036 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
3037 (xtensa_opcode_lookup): Add error handling.
3038 (xtensa_decode_insn): Replace with ...
3039 (xtensa_opcode_decode): ... this function, with new format and
3040 slot parameters. Add error handling.
3041 (xtensa_encode_insn): Replace with ...
3042 (xtensa_opcode_encode): ... this function, which does the encoding via
3043 one of the entries in the "encode_fns" array. Add error handling.
3044 (xtensa_opcode_name): Add error handling.
3045 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
3046 xtensa_opcode_is_call): New.
3047 (xtensa_num_operands): Replace with ...
3048 (xtensa_opcode_num_operands): ... this function. Add error handling.
3049 (xtensa_opcode_num_stateOperands,
3050 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
3051 xtensa_opcode_funcUnit_use, xtensa_operand_name,
3052 xtensa_operand_is_visible): New.
3053 (xtensa_get_operand, xtensa_operand_kind): Delete.
3054 (xtensa_operand_inout): Add error handling and special-case for
3055 "sout" operands.
3056 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
3057 operate on one slot of an instruction. Added error handling.
3058 (xtensa_operand_encode): Handle default operands with no encoding
3059 functions. Check for success by comparing against decoded value.
3060 Add error handling.
3061 (xtensa_operand_decode): Handle default operands. Return decoded value
3062 through argument pointer. Add error handling.
3063 (xtensa_operand_is_register, xtensa_operand_regfile,
3064 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
3065 (xtensa_operand_isPCRelative): Rename to ...
3066 (xtensa_operand_is_PCrelative): ... this. Add error handling.
3067 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
3068 through argument pointer. Add error handling.
3069 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
3070 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
3071 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
3072 xtensa_regfile_shortname, xtensa_regfile_view_parent,
3073 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
3074 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
3075 xtensa_state_is_exported, xtensa_sysreg_lookup,
3076 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
3077 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
3078 xtensa_interface_num_bits, xtensa_interface_inout,
3079 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
3080 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
3081 * xtensa-modules.c: Rewrite to use new data structures.
3082 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
3083 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
3084 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
3085 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
3086 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
3087 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
3088 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
3089 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
3090 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
3091 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
3092 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
3093 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
3094 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
3095 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
3096 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
3097 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
3098 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
3099 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
3100 * Makefile.in: Regenerate.
3101 * bfd-in2.h: Likewise.
3102 * libbfd.h: Likewise.
3103
3104 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
3105
3106 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
3107 against the absolute section.
3108 (mips_elf64_write_rela): Likewise.
3109
3110 2004-10-07 Jan Beulich <jbeulich@novell.com>
3111
3112 * elf.c (elf_find_function): Don't generally check for matching
3113 section, just for non-file symbols. Remove redunant comparison
3114 for the latter.
3115 * elf32-arm.h (arm_elf_find_function): Likewise.
3116
3117 2004-10-07 Jeff Baker <jbaker@qnx.com>
3118
3119 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
3120 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
3121 was specified.
3122
3123 2004-10-04 Roland McGrath <roland@redhat.com>
3124
3125 * hash.c (bfd_hash_set_default_size): Use const for table.
3126 Use size_t instead of int for variable compared to sizeof results.
3127
3128 2004-10-05 Alan Modra <amodra@bigpond.net.au>
3129
3130 PR 425
3131 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
3132
3133 2004-10-01 Paul Brook <paul@codesourcery.com>
3134
3135 * elf32-arm.h (elf32_arm_fake_sections,
3136 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
3137 functions.
3138 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
3139
3140 2004-10-01 Alan Modra <amodra@bigpond.net.au>
3141
3142 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
3143 need_lsda_relative.
3144 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
3145 need_relative or need_lsda_relative if we are processing an
3146 offset for a reloc on a FDE initial loc or LSDA field
3147 respectively.
3148 (_bfd_elf_write_section_eh_frame): Test need_relative and
3149 need_lsda_relative in place of corresponding make_* field
3150 when deciding to use pc-relative encodings.
3151
3152 2004-09-30 Paul Brook <paul@codesourcery.com>
3153
3154 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
3155 target2 relocation type.
3156
3157 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
3158
3159 PR 414
3160 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
3161
3162 2004-09-30 Paul Brook <paul@codesourcery.com>
3163
3164 * reloc.c: Add BFD_RELOC_ARM_SMI.
3165 * bfd-in2.h: Regenerate.
3166 * libbfd.h: Ditto.
3167
3168 2004-09-24 Alan Modra <amodra@bigpond.net.au>
3169
3170 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
3171 vma and output offset to address.
3172 * simple.c (simple_save_output_info): Only set output section
3173 and offset for debug sections, or those not already set up by
3174 the linker.
3175 (bfd_simple_get_relocated_section_contents): Update comment.
3176
3177 2004-09-24 Alan Modra <amodra@bigpond.net.au>
3178
3179 * elf.c (IS_LOADED): Delete.
3180 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
3181 Restore SEC_HAS_CONTENTS test to the one place it was used prior
3182 to 2004-09-22.
3183
3184 2004-09-23 Alan Modra <amodra@bigpond.net.au>
3185
3186 PR gas/396
3187 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3188 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
3189 redundant assignment of EM_SPARC.
3190
3191 2004-09-22 Brian Ford <ford@vss.fsi.com>
3192
3193 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
3194 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
3195 constants.
3196 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3197
3198 2004-09-22 Alan Modra <amodra@bigpond.net.au>
3199
3200 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
3201 (elf_backend_modify_segment_map): Don't define.
3202
3203 2004-09-22 Alan Modra <amodra@bigpond.net.au>
3204
3205 * elf.c (IS_LOADED): Define.
3206 (assign_file_positions_for_segments): Don't round up file offset of
3207 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
3208 Delete code handling link script adjustment of lma. Do the adjust
3209 in later code handling similar ajustments. Remove dead code error
3210 check. Warn if section lma would require a negative offset
3211 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
3212 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
3213 update voff in section loop. Change voff in segment loop to be an
3214 adjustment on top of "off". Set sec->filepos and update "off" later.
3215 Test for loadable sections consistently using IS_LOADED. Similarly,
3216 test for alloc-only sections other than .tbss consistently.
3217 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
3218 Tidy PT_NOTE handling. Use %B and %A in error messages.
3219 (assign_file_positions_except_relocs): Use %B in error message.
3220
3221 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
3222
3223 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
3224 (CONFIG_STATUS_DEPENDENCIES): New.
3225 (Makefile): Removed.
3226 (config.status): Likewise.
3227 * Makefile.in: Regenerated.
3228
3229 2004-09-17 Paul Brook <paul@codesourcery.com>
3230
3231 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
3232 (bfd_elf32_arm_process_before_allocation): Update prototype.
3233 * bfd-in2.h: Regenerate.
3234 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
3235 (elf32_arm_link_hash_table_create): Set it.
3236 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
3237 (bfd_elf32_arm_set_target_relocs): New function.
3238 (arm_real_reloc_type): New function.
3239 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
3240 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
3241 (elf32_arm_gc_sweep_hook): Ditto.
3242 (elf32_arm_check_relocs): Ditto.
3243 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
3244 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
3245 R_ARM_GOT_TARGET2.
3246 (elf32_arm_got_prel): New variable.
3247 (elf32_arm_howto_from_type): New function.
3248 (elf32_arm_info_to_howto): Use it.
3249 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
3250 BFD_RELOC_ARM_TARGET2.
3251 * libbfd.h: Regenerate.
3252 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
3253
3254 2004-09-17 Alan Modra <amodra@bigpond.net.au>
3255
3256 * ecoff.c: Update u.undef.next refs.
3257 * elf64-ppc.c: Likewise.
3258 * elflink.c: Likewise.
3259 * linker.c: Likewise.
3260 * xcofflink.c: Likewise.
3261
3262 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
3263 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
3264 fields to indirect struct.
3265 * elf-m10300.c: Update u.weakdef refs.
3266 * elf32-arm.h: Likewise.
3267 * elf32-cris.c: Likewise.
3268 * elf32-frv.c: Likewise.
3269 * elf32-hppa.c: Likewise.
3270 * elf32-i370.c: Likewise.
3271 * elf32-i386.c: Likewise.
3272 * elf32-m32r.c: Likewise.
3273 * elf32-m68k.c: Likewise.
3274 * elf32-ppc.c: Likewise.
3275 * elf32-s390.c: Likewise.
3276 * elf32-sh.c: Likewise.
3277 * elf32-sparc.c: Likewise.
3278 * elf32-vax.c: Likewise.
3279 * elf32-xtensa.c: Likewise.
3280 * elf64-alpha.c: Likewise.
3281 * elf64-hppa.c: Likewise.
3282 * elf64-ppc.c: Likewise.
3283 * elf64-s390.c: Likewise.
3284 * elf64-sh64.c: Likewise.
3285 * elf64-sparc.c: Likewise.
3286 * elf64-x86-64.c: Likewise.
3287 * elfxx-ia64.c: Likewise.
3288 * elfxx-mips.c: Likewise.
3289 * elflink.c: Likewise. Also u.elf_hash_value.
3290 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
3291 indirection.
3292 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3293 (bfd_elf_gc_record_vtinherit): Alloc vtable.
3294 (bfd_elf_gc_record_vtentry): Likewise.
3295 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
3296
3297 2004-09-17 Alan Modra <amodra@bigpond.net.au>
3298
3299 * Makefile.am: Run "make dep-am".
3300 * Makefile.in: Regenerate.
3301 * bfd-in2.h: Regenerate.
3302 * po/SRC-POTFILES.in: Regenerate.
3303 * po/bfd.pot: Regenerate.
3304
3305 2004-09-16 Alan Modra <amodra@bigpond.net.au>
3306
3307 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
3308 with bitfields. Make "type" and "other" bitfields too.
3309 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
3310 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
3311 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
3312 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
3313 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
3314 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
3315 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
3316 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
3317 * elf-hppa.h: Update all uses of elf_link_hash_flags.
3318 * elf-m10300.c: Likewise.
3319 * elf.c: Likewise.
3320 * elf32-arm.h: Likewise.
3321 * elf32-cris.c: Likewise.
3322 * elf32-frv.c: Likewise.
3323 * elf32-hppa.c: Likewise.
3324 * elf32-i370.c: Likewise.
3325 * elf32-i386.c: Likewise.
3326 * elf32-m32r.c: Likewise.
3327 * elf32-m68k.c: Likewise.
3328 * elf32-ppc.c: Likewise.
3329 * elf32-s390.c: Likewise.
3330 * elf32-sh-symbian.c: Likewise.
3331 * elf32-sh.c: Likewise.
3332 * elf32-sh64.c: Likewise.
3333 * elf32-sparc.c: Likewise.
3334 * elf32-vax.c: Likewise.
3335 * elf32-xtensa.c: Likewise.
3336 * elf64-alpha.c: Likewise.
3337 * elf64-hppa.c: Likewise.
3338 * elf64-ppc.c: Likewise.
3339 * elf64-s390.c: Likewise.
3340 * elf64-sh64.c: Likewise.
3341 * elf64-sparc.c: Likewise.
3342 * elf64-x86-64.c: Likewise.
3343 * elflink.c: Likewise.
3344 * elfxx-ia64.c: Likewise.
3345 * elfxx-mips.c: Likewise.
3346 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
3347 * configure: Regenerate.
3348 * aclocal.m4: Regenerate.
3349
3350 2004-09-16 Alan Modra <amodra@bigpond.net.au>
3351
3352 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
3353 around uses of R_ARM_TARGET1.
3354 (elf32_arm_check_relocs): Likewise.
3355
3356 2004-09-13 Paul Brook <paul@codesourcery.com>
3357
3358 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
3359 prototype.
3360 * bfd-in2.h: Regenerate.
3361 * libbfd.h: Regenerate.
3362 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
3363 (elf32_arm_link_hash_table_create): Set target1_is_rel.
3364 (bfd_elf32_arm_process_before_allocation): Ditto.
3365 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
3366 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
3367 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
3368 * reloc.c: Ditto.
3369
3370 2004-09-10 Joel Brobecker <brobecker@gnat.com>
3371
3372 * hpux-core.c (thread_section_p): New function.
3373 (hpux_core_core_file_p): Fix computation of offset in call
3374 to bfd_seek. Create a ".reg" section from an arbitrary
3375 ".reg/<id>" section if none was created after having read
3376 all sections.
3377
3378 2004-09-11 Andreas Schwab <schwab@suse.de>
3379
3380 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
3381 * aclocal.m4: Rebuild.
3382 * configure: Rebuild.
3383
3384 2004-09-10 Joel Brobecker <brobecker@gnat.com>
3385
3386 * section.c (bfd_sections_find_if): Fix parameter name in
3387 comment to match code.
3388
3389 2004-09-10 Alan Modra <amodra@bigpond.net.au>
3390
3391 * elf.c (assign_file_positions_except_relocs): Assign relocs
3392 stored in a bfd section.
3393
3394 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
3395
3396 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
3397 h->gotplt_refcount to 0, not -1.
3398
3399 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
3400
3401 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
3402 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
3403 symname.
3404 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
3405 handle symbol visibility here.
3406
3407 2004-09-07 Alan Modra <amodra@bigpond.net.au>
3408
3409 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
3410 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
3411 callers.
3412 (ppc_stub_name): Remove trailing "+0" on stub name.
3413 (create_linkage_sections): Create relocations for
3414 branch lookup table when --emit-relocs as well as when --shared.
3415 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
3416 relbrlt test. For --emit-stub-syms, always output a sym even when
3417 one already exists on a plt call stub. Put stub type in the stub
3418 symbol name.
3419 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
3420 test.
3421 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
3422 reloc_count in stub sections. Adjust relbrlt test.
3423 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
3424 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
3425 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
3426 for relocs against discarded symbols. Fix comments.
3427
3428 2004-09-06 Mark Mitchell <mark@codesourcery.com>
3429
3430 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
3431 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
3432 from ...
3433 (map_sections_to_segments): ... here. Use it. Assign a file
3434 position to the .dynamic section if it is not loadable, but part
3435 of the PT_DYNAMIC segment.
3436 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
3437 offsets, not VMAs, for the BPABI. Do not fill in the header in
3438 the .got.plt section for the BPABI.
3439 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
3440 PT_DYNAMIC segment.
3441 (elf_backend_want_got_plt): Define to zero for Symbian OS.
3442
3443 2004-09-06 Nick Clifton <nickc@redhat.com>
3444
3445 * elflink.c (elf_link_add_object_symbols): Set the error code to
3446 bfd_error_wrong_format when the input format does not match the
3447 output format.
3448
3449 2004-09-06 Alan Modra <amodra@bigpond.net.au>
3450
3451 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
3452 (ppc64_elf_check_directives): ..here.
3453 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
3454 before accessing ppc64_elf_tdata.
3455 (ppc64_elf_finish_dynamic_sections): And here too.
3456
3457 2004-09-04 Alan Modra <amodra@bigpond.net.au>
3458
3459 * bfd.c (_bfd_default_error_handler): Correct loop exit.
3460
3461 2004-09-03 Mark Mitchell <mark@codesourcery.com>
3462
3463 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
3464 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
3465 (bfd_elf32_littlearm_symbian_vec): Likewise.
3466 * configure: Regenerated.
3467 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
3468 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
3469 (PLT_ENTRY_SIZE): Likewise.
3470 (bfd_vma_elf32_arm_symbian_plt_entry): New
3471 variable.
3472 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
3473 and symbian_p.
3474 (create_got_section): Don't create sections when generating BPABI
3475 objects.
3476 (elf32_arm_create_dynamic_sections): Tidy.
3477 (elf32_arm_link_hash_table_create): Set plt_header_size,
3478 plt_entry_size, and symbian_p.
3479 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
3480 generating BPABI objects.
3481 (allocate_dynrelocs): Use htab->plt_header_size, not
3482 PLT_HEADER_SIZE. Do not add to .got.plt when
3483 generating BPABI objects.
3484 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
3485 * elfarm-nabi.c: Add SymbianOS target vectors.
3486 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
3487 (_bfd_elf_link_create_dynamic_sections): Likewise.
3488 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
3489 (elfNN_bed): Use it.
3490 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
3491 (bfd_elf32_littlearm_symbian_vec): Likewise.
3492 (_bfd_target_vector): Add them.
3493
3494 2004-09-03 Nick Clifton <nickc@redhat.com>
3495
3496 PR 360
3497 * coffcode.h (handle_COMDAT): Replace abort with an warning
3498 message and allow the scan to continue.
3499
3500 2004-09-02 Alan Modra <amodra@bigpond.net.au>
3501
3502 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
3503 in when reading relocs, not our sorted syms. Remove unnecessary
3504 var.
3505
3506 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
3507
3508 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
3509
3510 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
3511
3512 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
3513 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
3514 replace uses of *_alias with *_noncanonical.
3515 * aclocal.m4: Rebuild with aclocal 1.4p6.
3516 * Makefile.in: Rebuild with automake 1.4p6.
3517 * doc/Makefile.in: Rebuild with automake 1.4p6.
3518 * configure.in: Autoupdate with autoupdate 2.59.
3519 * config.in: Regenerate with autoheader 2.59.
3520 * configure: Regnerate with autoconf 2.59.
3521
3522 2004-08-28 Alan Modra <amodra@bigpond.net.au>
3523
3524 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
3525 symbol pointer arrays before modifying.
3526
3527 2004-08-28 Alan Modra <amodra@bigpond.net.au>
3528
3529 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
3530 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
3531 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
3532 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
3533 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
3534 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
3535 Use both symbol tables on non-relocatable objects. Use a common
3536 error exit. Fix "mid" warning.
3537 * libbfd.h: Regenerate.
3538 * bfd-in2.h: Regenerate.
3539
3540 2004-08-28 Alan Modra <amodra@bigpond.net.au>
3541
3542 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
3543 object file.
3544 (struct sfpr_def_parms): Save some space.
3545 (sfpr_define): Here too.
3546
3547 * elf64-ppc.c (compare_symbols): Put section syms first.
3548 (sym_exists_at): New function.
3549 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
3550 points only for relocatable files. Use .opd section contents
3551 otherwise. Generally clean up the code.
3552
3553 2004-08-27 Alan Modra <amodra@bigpond.net.au>
3554
3555 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
3556 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
3557 (struct sfpr_def_parms): New.
3558 (sfpr_define): New function.
3559 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
3560 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
3561 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
3562 (savefpr1_tail, restfpr1_tail): New functions.
3563 (savevr, savevr_tail, restvr, restvr_tail): New functions.
3564 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
3565 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
3566 code. Define all ABI mandated _save and _rest functions.
3567
3568 2004-08-26 Paul Brook <paul@codesourcery.com>
3569
3570 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
3571
3572 2004-08-26 Alan Modra <amodra@bigpond.net.au>
3573
3574 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
3575 TRUE or FALSE.
3576
3577 2004-08-26 Alan Modra <amodra@bigpond.net.au>
3578
3579 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
3580 that pcrel correction is applied for R_386_PC32.
3581
3582 2004-08-25 Alan Modra <amodra@bigpond.net.au>
3583
3584 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
3585 for R_386_32 and R_386_PC32 relocs against symbols defined in
3586 discarded sections.
3587
3588 2004-08-25 Dmitry Diky <diwil@spec.ru>
3589
3590 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
3591 Add new relocations.
3592 * bfd-in2.h: Regenerate.
3593 * libbfd.h: Regenerate.
3594 * elf32-msp430.c: Clean-up code.
3595 (elf_msp430_howto_table): Add new relocation entries.
3596 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
3597 (msp430_elf_relax_section): New function.
3598 (msp430_elf_relax_delete_bytes): New function.
3599 (msp430_elf_symbol_address_p): New function.
3600
3601 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3602
3603 * elf32-m32r.c (m32r_elf_relocate_section): Handle
3604 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
3605
3606 2004-08-20 Daniel Jacobowitz <dan@debian.org>
3607
3608 * elflink.c (_bfd_elf_section_already_linked): Handle
3609 SEC_LINK_DUPLICATES_SAME_CONTENTS.
3610
3611 2004-08-19 Mark Mitchell <mark@codesourcery.com>
3612
3613 * config.bfd (arm*-*-symbianelf*): New target.
3614 (arm*-*-eabi*): Likewise.
3615
3616 2004-08-19 Alan Modra <amodra@bigpond.net.au>
3617
3618 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
3619 "struct ppc_link_hash_entry *".
3620 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
3621 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
3622
3623 2004-08-19 Jakub Jelinek <jakub@redhat.com>
3624
3625 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
3626 entries (where fd_aux overlaps next entry's fd_func).
3627 Add non_overlapping argument, use it.
3628 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
3629 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
3630 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
3631 as indexes into opd_sym_map/opd_adjust array.
3632 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
3633
3634 2004-08-18 Alan Modra <amodra@bigpond.net.au>
3635
3636 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
3637 if we can look up their function descriptor in a regular file.
3638
3639 2004-08-18 Nick Clifton <nickc@redhat.com>
3640
3641 PR 324
3642 * cofflink.c (coff_link_add_symbols): Check that the comdat
3643 pointer in the coff_section_data structure has been initialised
3644 before using it.
3645
3646 2004-08-18 Alan Modra <amodra@bigpond.net.au>
3647
3648 PR 338
3649 * elflink.c (bfd_elf_record_link_assignment): Add comment about
3650 changing bfd_link_hash_undefined to bfd_link_hash_new.
3651
3652 2004-08-17 Jakub Jelinek <jakub@redhat.com>
3653
3654 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
3655 if not yet defined.
3656 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
3657 (synthetic_opd, synthetic_relocatable): New variables.
3658 (compare_symbols, compare_relocs): New helper routines.
3659 (ppc64_elf_get_synthetic_symtab): New function.
3660 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
3661 to relsyms.
3662 * bfd-in2.h: Regenerated.
3663 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
3664 to relsyms. Return 0 if abfd is relocatable.
3665
3666 2004-08-17 Alan Modra <amodra@bigpond.net.au>
3667
3668 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
3669
3670 2004-08-17 Nick Clifton <nickc@redhat.com>
3671
3672 * (is_arm_mapping_symbol_name): New function - return true
3673 when a symbol name matches the requirements for an ARM mapping
3674 symbol name.
3675 (arm_elf_find_function): New function based on
3676 elf_find_function in elf.c but skipping ARM mapping symbols
3677 and including thumb function symbols.
3678 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
3679 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
3680
3681 2004-08-17 Alan Modra <amodra@bigpond.net.au>
3682
3683 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
3684 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
3685 (ppc64_elf_brtaken_reloc): Here too.
3686
3687 2004-08-17 Alan Modra <amodra@bigpond.net.au>
3688
3689 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
3690 symbol visibility.
3691 (ppc64_elf_check_directives): Check that we have the right hash
3692 table before proceeding.
3693
3694 2004-08-17 Alan Modra <amodra@bigpond.net.au>
3695
3696 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
3697 (adjust_opd_syms): Attach opd syms for deleted entries to one of
3698 the sections that will be discarded.
3699
3700 2004-08-16 Alan Modra <amodra@bigpond.net.au>
3701
3702 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
3703
3704 2004-08-16 Alan Modra <amodra@bigpond.net.au>
3705
3706 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
3707 free space available.
3708
3709 2004-08-16 Alan Modra <amodra@bigpond.net.au>
3710
3711 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
3712 occurrences with bfd_byte * thoughout file.
3713
3714 * coff-rs6000.c (do_shared_object_padding): Warning fix.
3715 (xcoff_write_armap_big): Likewise.
3716 (xcoff_write_archive_contents_old): Likewise.
3717 (xcoff_write_archive_contents_big): Likewise.
3718
3719 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
3720
3721 2004-08-13 Nick Clifton <nickc@redhat.com>
3722
3723 * elf32-arm.h: Convert to ISO C90.
3724
3725 2004-08-13 Alan Modra <amodra@bigpond.net.au>
3726
3727 PR 293
3728 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
3729 zero the plt field.
3730
3731 2004-08-13 Alan Modra <amodra@bigpond.net.au>
3732
3733 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
3734 (bfd_archive_filename, bfd_get_section_ident): Delete.
3735 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
3736 bfd_archive_filename.
3737 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
3738 to warn about symbols in discarded sections. Use _bfd_error_handler.
3739 * aout-adobe.c (aout_adobe_callback): See below.
3740 * aout-cris.c (swap_ext_reloc_in): ..
3741 * coff-arm.c (find_thumb_glue, find_arm_glue,
3742 coff_arm_relocate_section, bfd_arm_process_before_allocation,
3743 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
3744 coff_arm_copy_private_bfd_data): ..
3745 * coff-i860.c (i860_reloc_processing): ..
3746 * coff-mcore.c (mcore_coff_unsupported_reloc,
3747 coff_mcore_relocate_section): ..
3748 * coff-ppc.c (coff_ppc_relocate_section): ..
3749 * coff-rs6000.c (xcoff_create_csect_from_smclas
3750 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
3751 sh_swap_insns, sh_relocate_section): ..
3752 * coff-tic54x.c (tic54x_reloc_processing): ..
3753 * coff-tic80.c (coff_tic80_relocate_section): ..
3754 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
3755 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
3756 coff_slurp_symbol_table, coff_classify_symbol,
3757 coff_slurp_reloc_table): ..
3758 * coffgen.c (_bfd_coff_read_string_table): ..
3759 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
3760 _bfd_coff_generic_relocate_section): ..
3761 * cpu-arm.c (bfd_arm_merge_machines): ..
3762 * cpu-sh.c (sh_merge_bfd_arch): ..
3763 * elf-hppa.h (elf_hppa_relocate_section): ..
3764 * elf.c (bfd_elf_string_from_elf_section, setup_group,
3765 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
3766 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
3767 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
3768 * elf32-arm.h (find_thumb_glue, find_arm_glue,
3769 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
3770 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
3771 elf32_arm_relocate_section, elf32_arm_set_private_flags,
3772 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
3773 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
3774 cris_elf_merge_private_bfd_data
3775 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
3776 * elf32-gen.c (elf32_generic_link_add_symbols): ..
3777 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
3778 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
3779 elf32_hppa_relocate_section): ..
3780 * elf32-i370.c (i370_elf_merge_private_bfd_data,
3781 i370_elf_check_relocs, i370_elf_relocate_section): ..
3782 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
3783 elf_i386_relocate_section): ..
3784 * elf32-m32r.c (m32r_elf_relocate_section,
3785 m32r_elf_merge_private_bfd_data): ..
3786 * elf32-m68hc1x.c (m68hc12_add_stub,
3787 _bfd_m68hc11_elf_merge_private_bfd_data): ..
3788 * elf32-m68k.c (elf_m68k_relocate_section): ..
3789 * elf32-mcore.c (mcore_elf_unsupported_reloc,
3790 mcore_elf_relocate_section): ..
3791 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
3792 ppc_elf_check_relocs, ppc_elf_relocate_section,
3793 ppc_elf_begin_write_processing): ..
3794 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
3795 elf_s390_relocate_section): ..
3796 * elf32-sh-symbian.c (sh_symbian_import_as,
3797 sh_symbian_process_embedded_commands,
3798 sh_symbian_relocate_section): ..
3799 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
3800 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
3801 sh_elf_merge_private_data): ..
3802 * elf32-sparc.c (elf32_sparc_check_relocs,
3803 elf32_sparc_relocate_section,
3804 elf32_sparc_merge_private_bfd_data): ..
3805 * elf32-v850.c (v850_elf_check_relocs,
3806 v850_elf_merge_private_bfd_data): ..
3807 * elf32-xtensa.c (elf_xtensa_check_relocs,
3808 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
3809 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
3810 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
3811 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
3812 * elf64-gen.c (elf64_generic_link_add_symbols): ..
3813 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
3814 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
3815 ppc64_elf_relocate_section): ..
3816 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
3817 elf_s390_relocate_section): ..
3818 * elf64-sh64.c (sh_elf64_relocate_section): ..
3819 * elf64-sparc.c (sparc64_elf_check_relocs,
3820 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
3821 sparc64_elf_merge_private_bfd_data): ..
3822 * elf64-x86-64.c (elf64_x86_64_check_relocs,
3823 elf64_x86_64_relocate_section): ..
3824 * elflink.c (_bfd_elf_add_default_symbol,
3825 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
3826 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
3827 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
3828 elf_get_linked_section_vma, elf_fixup_link_order,
3829 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
3830 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
3831 * elfxx-ia64.c (elfNN_ia64_relax_section,
3832 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
3833 * elfxx-mips.c (mips_elf_perform_relocation,
3834 _bfd_mips_elf_check_relocs,
3835 _bfd_mips_elf_merge_private_bfd_data): ..
3836 * ieee.c (ieee_slurp_external_symbols): ..
3837 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
3838 * libbfd.c (_bfd_generic_verify_endian_match): ..
3839 * linker.c (_bfd_generic_link_add_one_symbol,
3840 _bfd_generic_section_already_linked): ..
3841 * pdp11.c (translate_to_native_sym_flags): ..
3842 * pe-mips.c (coff_pe_mips_relocate_section): ..
3843 * peicode.h (pe_ILF_build_a_bfd): ..
3844 * srec.c (srec_bad_byte): ..
3845 * stabs.c (_bfd_link_section_stabs): ..
3846 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
3847 Replace all uses of bfd_archive_filename and bfd_get_section_ident
3848 with corresponding %B and %A in _bfd_error_handler format string.
3849 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
3850 calls to use %A and %B. Fix "against symbol .. from section" and
3851 similar error messages. Combine multiple _bfd_error_handler calls
3852 where they were separated due to bfd_archive_filename deficiencies.
3853 * bfd-in2.h: Regenerate.
3854
3855 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
3856
3857 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
3858 relocation.
3859
3860 2004-08-10 Alan Modra <amodra@bigpond.net.au>
3861
3862 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
3863 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
3864 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
3865 Add twiddled_syms.
3866 (link_hash_newfunc): Init was_undefined.
3867 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
3868 Use undefweak instead.
3869 (ppc64_elf_check_directives): Fix undefs chain.
3870 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
3871 references.
3872 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
3873 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
3874 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
3875
3876 2004-08-09 Jakub Jelinek <jakub@redhat.com>
3877
3878 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
3879 error, test input_section flags rather than sec.
3880
3881 2004-08-09 Alan Modra <amodra@bigpond.net.au>
3882
3883 * elf-bfd.h (struct elf_backend_data): Add
3884 elf_backend_archive_symbol_lookup.
3885 (_bfd_elf_archive_symbol_lookup): Declare.
3886 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
3887 (elf_link_add_archive_symbols): ..extracted from here. Call the
3888 backend version.
3889 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
3890 (elfNN_bed): Init new field.
3891 * elf64-ppc.c (elf_backend_check_directives): Define.
3892 (elf_backend_archive_symbol_lookup): Define.
3893 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
3894 a ppc_link_hash_entry pointer.
3895 (get_fdh): Move.
3896 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
3897 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
3898 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
3899 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
3900 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
3901 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
3902 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
3903 descriptor symbols.
3904
3905 2004-08-09 Alan Modra <amodra@bigpond.net.au>
3906
3907 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
3908 (ppc64_elf_add_symbol_hook): Test for NULL section.
3909 (get_sym_h): Formatting.
3910 (ppc64_elf_size_stubs): Include reloc addend in value stored as
3911 stub target_value.
3912
3913 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
3914 long branch stubs with code handling plt and r2off branch stubs.
3915
3916 2004-08-09 Alan Modra <amodra@bigpond.net.au>
3917
3918 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
3919 * elflink.c (elf_link_input_bfd): Formatting.
3920 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
3921 all callers.
3922 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
3923 (link_hash_newfunc): Don't set it.
3924 (ppc64_elf_copy_indirect_symbol): Nor copy it.
3925 (ppc64_elf_mark_entry_syms): Delete.
3926 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
3927 sections. Use get_opd_info.
3928 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
3929
3930 2004-08-09 Alan Modra <amodra@bigpond.net.au>
3931
3932 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
3933
3934 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
3935 (func_desc_adjust): Don't set have_undefweak.
3936 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
3937 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
3938
3939 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
3940 "struct ppc_link_hash_entry *". Adjust all references.
3941 (ppc64_elf_hide_symbol): Correct a comment.
3942
3943 * elf64-ppc.c (get_opd_info): New function.
3944 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
3945 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
3946 before calling get_fdh. Test fdh rather than h before dereferencing
3947 fdh. Mark removed symbols in opd_adjust.
3948 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
3949 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
3950 opd symbols.
3951 (ppc64_elf_output_symbol_hook): Likewise.
3952
3953 2004-08-06 Paul Brook <paul@codesourcery.com>
3954
3955 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
3956 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
3957 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
3958 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
3959 and BFD_RELOC_ARM_SBREL32.
3960 * bfd-in2.h, bbfd.h: Regenerate.
3961
3962 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3963
3964 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
3965 the dynamic link symbol actually in use.
3966
3967 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
3968
3969 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
3970
3971 2004-07-31 Joel Brobecker <brobecker@gnat.com>
3972 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3973
3974 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
3975 SHN_MIPS_TEXT and SHN_MIPS_DATA.
3976
3977 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
3978 Nick Clifton <nickc@redhat.com>
3979
3980 PR 290
3981 * bfd.c (_bfd_default_error_handler): Make it global.
3982
3983 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
3984
3985 * elf.c (assign_section_numbers): Cope gracefully with sections
3986 which have SHF_LINK_ORDER set but no sh_link set up.
3987 * elflink.c (elf_get_linked_section_vma): Likewise.
3988
3989 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
3990 it to NULL.
3991
3992 * elfxx-target.h (elf_backend_link_order_error_handler): New.
3993 Set it to _bfd_default_error_handler.
3994 (elfNN_bed): Add elf_backend_link_order_error_handler.
3995
3996 * libbfd-in.h (_bfd_default_error_handler): New.
3997
3998 * libbfd.h: Regenerated.
3999
4000 2004-07-30 Jakub Jelinek <jakub@redhat.com>
4001
4002 * archures.c (bfd_mach_sparc_64bit_p): Define.
4003 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
4004 * bfd-in2.h: Rebuilt.
4005
4006 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
4007
4008 Introduce SH2a support.
4009 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
4010 * archures.c (bfd_mach_sh2a_nofpu): New.
4011 * bfd-in2.h: Rebuilt.
4012 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
4013 (arch_info_struct): Add sh2a_nofpu.
4014 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
4015 2003-12-29 DJ Delorie <dj@redhat.com>
4016 * reloc.c: Add relocs for sh2a.
4017 * bfd-in2.h: Regenerate.
4018 * libbfd.hh: Regenerate.
4019 2003-12-01 Michael Snyder <msnyder@redhat.com>
4020 * archures.c (bfd_mach_sh2a): New.
4021 * bfd-in2.h: Rebuilt.
4022 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
4023 (SH2A_NEXT): New.
4024 (arch_info_struct): Add sh2a.
4025 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
4026
4027 2004-07-28 Nick Clifton <nickc@redhat.com>
4028 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4029
4030 PR 273
4031 * som.c (setup_sections): Improve estimation of space sizes in
4032 relocatable objects.
4033
4034 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
4035 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
4036 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
4037 to targ_selvecs.
4038 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
4039 * configure: Regenerate.
4040 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
4041 case that accepts OSABI=NetBSD and OSABI=SysV.
4042 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
4043 the base of .got or .data (if .got does not exist).
4044 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
4045 set OSABI=NetBSD.
4046 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
4047 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
4048 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
4049 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
4050
4051 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
4052
4053 PR 161/251
4054 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
4055 (elf_sec_group): Defined.
4056 (bfd_elf_match_symbols_in_sections): New prototype.
4057 (_bfd_elf_setup_group_pointers): Likewise.
4058
4059 * elf.c (bfd_elf_discard_group): Abort.
4060 (bfd_elf_set_group_contents): Also include relocation sections.
4061 Remove zero-fill for ld -r.
4062 (_bfd_elf_setup_group_pointers): New function.
4063 (elf_sort_elf_symbol): Likewise.
4064 (elf_sym_name_compare): Likewise.
4065 (bfd_elf_match_symbols_in_sections): Likewise.
4066
4067 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
4068
4069 * elflink.c (match_group_member): New.
4070 (elf_link_input_bfd): Check group member for discarded section.
4071 (try_match_symbols_in_sections): New function.
4072 (already_linked): Likewise.
4073 (_bfd_elf_section_already_linked): Support mixing comdat group
4074 and linkonce section.
4075
4076 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
4077 * linker.c (bfd_section_already_linked_table_traverse): New.
4078
4079 * libbfd.h: Regenerated.
4080
4081 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
4082
4083 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
4084 BFD_RELOC_CRX_SWITCH32.
4085 * bfd-in2.h: Regenerate.
4086 * libbfd.h: Regenerate.
4087 * elf32-crx.c: Support relocation/relaxation of
4088 BFD_RELOC_CRX_SWITCH* types.
4089
4090 2004-07-27 Alan Modra <amodra@bigpond.net.au>
4091
4092 * elf64-ppc.c: Correct "Linker stubs" comment.
4093
4094 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
4095
4096 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
4097 linked-to section.
4098 (elf_linked_to_section): New.
4099
4100 * elf.c (assign_section_numbers): Set up sh_link for
4101 SHF_LINK_ORDER.
4102
4103 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
4104 to sh_link for SHT_IA_64_UNWIND sections.
4105
4106 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
4107
4108 * elflink.c (elf_fixup_link_order): Add _() to error message.
4109
4110 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
4111
4112 * elflink.c (elf_fixup_link_order): Issue a warning and flag
4113 an error if failed.
4114
4115 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
4116
4117 * aout-adobe.c (aout_32_section_already_linked): Defined.
4118 * aout-target.h (MY_section_already_linked): Likewise.
4119 * aout-tic30.c (MY_section_already_linked): Likewise.
4120 * binary.c (binary_section_already_linked): Likewise.
4121 * bout.c (b_out_section_already_linked): Likewise.
4122 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
4123 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
4124 * coffcode.h (coff_section_already_linked): Likewise.
4125 * i386msdos.c (msdos_section_already_linked): Likewise.
4126 * i386os9k.c (os9k_section_already_linked): Likewise.
4127 * ieee.c (ieee_section_already_linked): Likewise.
4128 * ihex.c (ihex_section_already_linked): Likewise.
4129 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
4130 * mmo.c (mmo_section_already_linked): Likewise.
4131 * nlm-target.h (nlm_section_already_linked): Likewise.
4132 * oasys.c (oasys_section_already_linked): Likewise.
4133 * pef.c (bfd_pef_section_already_linked): Likewise.
4134 * ppcboot.c (ppcboot_section_already_linked): Likewise.
4135 * som.c (som_bfd_discard_group): Likewise.
4136 * srec.c (srec_section_already_linked): Likewise.
4137 * tekhex.c (tekhex_section_already_linked): Likewise.
4138 * versados.c (versados_section_already_linked): Likewise.
4139 * vms.c (vms_section_already_linked): Likewise.
4140 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
4141 * xsym.c (bfd_sym_section_already_linked): Likewise.
4142
4143 * bfd-in.h (bfd_section_already_linked_table_init): New.
4144 (bfd_section_already_linked_table_free): Likewise.
4145
4146 * coff-rs6000.c (rs6000coff_vec): Add
4147 _bfd_generic_section_already_linked.
4148 (pmac_xcoff_vec): Likewise.
4149 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4150 (aix5coff64_vec): Likewise.
4151
4152 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
4153 * elflink.c (_bfd_elf_section_already_linked): New function.
4154
4155 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
4156
4157 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
4158 (_bfd_generic_section_already_linked): New.
4159 (bfd_section_already_linked_hash_entry): Likewise.
4160 (bfd_section_already_linked): Likewise.
4161 (bfd_section_already_linked_table_lookup): Likewise.
4162 (bfd_section_already_linked_table_insert): Likewise.
4163
4164 * linker.c (bfd_section_already_linked): New.
4165 (_bfd_section_already_linked_table): Likewise.
4166 (bfd_section_already_linked_table_lookup): Likewise.
4167 (bfd_section_already_linked_table_insert): Likewise.
4168 (already_linked_newfunc): Likewise.
4169 (bfd_section_already_linked_table_init): Likewise.
4170 (bfd_section_already_linked_table_free): Likewise.
4171 (_bfd_generic_section_already_linked): Likewise.
4172
4173 * section.c (bfd_section): Remove comdat.
4174 (bfd_comdat_info): Moved to ...
4175 * bfd-in.h (coff_comdat_info): Here.
4176 (bfd_coff_get_comdat_section): New.
4177 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
4178 * libcoff-in.h (coff_section_tdata): Add comdat.
4179 * coffcode.h (handle_COMDAT): Updated.
4180 * cofflink.c (coff_link_add_symbols): Likewise.
4181 * ecoff.c (bfd_debug_section): Likewise.
4182
4183 * targets.c (bfd_target): Add _section_already_linked.
4184 (BFD_JUMP_TABLE_LINK): Updated.
4185
4186 * bfd-in2.h: Regenerated.
4187 * libbfd.h: Likewise.
4188 * libcoff.h: Likewise.
4189
4190 2003-07-21 Paul Brook <paul@codesourcery.com>
4191
4192 * elflink.c (elf_get_linked_section_vma, compare_link_order,
4193 elf_fixup_link_order): New functions.
4194 (bfd_elf_final_link): Call elf_fixup_link_order.
4195
4196 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
4197
4198 * elf-bfd.h (ELF_COMMON_DEF_P): New.
4199 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
4200 common definitions.
4201 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
4202 _bfd_elf_symbol_refs_local_p.
4203 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
4204 symbols.
4205
4206 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
4207
4208 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
4209 DYN_NO_NEEDED.
4210 (bfd_elf_get_dyn_lib_class): New prototype.
4211 * elf.c (bfd_elf_get_dyn_lib_class): New function.
4212
4213 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
4214 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
4215 entry is needed. Issue an error if a DT_NEEDED entry is needed
4216 for a file marked DYN_NO_NEEDED.
4217 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
4218 for DT_NEEDED tags.
4219
4220 * bfd-in2.h: Regenerated.
4221
4222 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4223
4224 * elflink.c (elf_section_complain_discarded): Don't complain in
4225 .PARISC.unwind.
4226
4227 2004-07-10 James E Wilson <wilson@specifixinc.com>
4228
4229 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
4230 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
4231 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
4232 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
4233 Fix callers.
4234 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
4235 bfd_put_64 to bfd_putl64.
4236 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
4237
4238 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
4239
4240 PR 240
4241 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
4242 .init/.fini sections when trying to relax it.
4243
4244 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
4245
4246 * elf.c (assign_file_positions_for_segments): Make sure the
4247 .dynamic section is the first section in the PT_DYNAMIC segment.
4248
4249 2004-07-09 Nick Clifton <nickc@redhat.com>
4250
4251 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
4252 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
4253 sh_elf_get_flags_from_mach functions so that they do not conflict
4254 when this target is built with other sh-elf targets.
4255 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
4256 suppression of this function.
4257 (sh_elf_find_flags): Likewise.
4258
4259 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
4260
4261 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
4262 (ALL_MACHINES_CFILES): Add cpu-crx.c.
4263 (BFD32_BACKENDS): Add elf32-crx.lo.
4264 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
4265 (cpu-crx.lo): New target.
4266 (elf32-crx.lo): New target.
4267 * Makefile.in: Regenerate.
4268 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
4269 (bfd_archures_list): Add bfd_crx_arch.
4270 * bfd-in2.h: Regenerate.
4271 * config.bfd: Handle crx-*-elf*, crx*.
4272 * configure.in: Handle bfd_elf32_crx_vec.
4273 * configure: Regenerate.
4274 * cpu-crx.c: New file.
4275 * elf32-crx.c: Likewise.
4276 * libbfd.h: Regenerate.
4277 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
4278 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
4279 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
4280 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
4281 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
4282 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
4283 * targets.c (bfd_elf32_crx_vec): Declare.
4284 (bfd_target_vector): Add bfd_elf32_crx_vec.
4285
4286 2004-07-06 Nick Clifton <nickc@redhat.com>
4287
4288 * config.bfd: Add sh-symbian-elf target.
4289 * configure.in: Add bfd_elf32_shl_symbian_vec.
4290 * configure: Regenerate.
4291 * elf-bfd.h (struct elf_backend_data): Add new field
4292 'check_directives'.
4293 * elflink.c (elf_link_add_object_symbols): Invoke the
4294 check_directives function, if defined.
4295 * elfxx-target.h: Provide a default, NULL definition for
4296 check_directives.
4297 * targets.c: Add bfd_elf32_shl_symbian_vec.
4298 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
4299 definition.
4300 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
4301 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
4302 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
4303 not already been defined.
4304 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
4305 * sh-symbian.c: New file. Provide functions to support the
4306 * sh-symbian-elf target.
4307 * Makefile.am: Add elf32-sh-symbian.c
4308 * Makefile.in: Regenerate.
4309
4310 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
4311
4312 * elf32-sh.c: Include ../opcodes/sh-opc.h.
4313 * Makefile.am: Ran make dep-am.
4314 * Makefile.in: Ran make dep-in.
4315
4316 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
4317
4318 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
4319 externals properly.
4320
4321 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
4322
4323 * config.bfd: Add want64 to configuration target s390-*-linux*.
4324
4325 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
4326
4327 * bfd.c (bfd_get_section_ident): New.
4328
4329 * elflink.c (elf_link_read_relocs_from_section): Call
4330 bfd_get_section_ident to identify the section when reporting
4331 error.
4332 (_bfd_elf_link_output_relocs): Likewise.
4333 (elf_link_output_extsym): Likewise.
4334 (elf_link_input_bfd): Likewise.
4335 (bfd_elf_gc_record_vtinherit): Likewise.
4336
4337 * bfd-in2.h: Regenerated.
4338
4339 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
4340 Nick Clifton <nickc@redhat.com>
4341
4342 PR 204
4343 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
4344 of section symbols to mips_elf_sort_hash_table ().
4345
4346 2004-07-01 Alan Modra <amodra@bigpond.net.au>
4347
4348 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
4349 change. Comment.
4350 (elf_section_complain_discarded): New function. Handle
4351 .gcc_except_table too.
4352 (elf_link_input_bfd): Rewrite handling of relocs against symbols
4353 in discarded sections.
4354 * elf-bfd.h (elf_discarded_section): Protect macro arg.
4355
4356 2004-06-30 James E Wilson <wilson@specifixinc.com>
4357
4358 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
4359 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
4360
4361 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
4362
4363 PR 233
4364 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
4365 local references to discarded sections and report their
4366 locations.
4367
4368 2004-06-30 Alan Modra <amodra@bigpond.net.au>
4369
4370 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
4371 sec_info_type, test section name instead.
4372
4373 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
4374
4375 PR 240
4376 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
4377 in .init/.fini sections.
4378
4379 2004-06-29 Bob Wilson <bob.wilson@acm.org>
4380
4381 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
4382 bfd_get_section_limit.
4383
4384 2004-06-29 Bob Wilson <bob.wilson@acm.org>
4385
4386 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
4387 output section size.
4388
4389 2004-06-29 Alan Modra <amodra@bigpond.net.au>
4390
4391 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
4392 rawsize.
4393 (mmix_elf_perform_relocation): Adjust for above change.
4394 (mmix_elf_relocate_section): Likewise.
4395 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
4396 (mmix_elf_get_section_contents): Delete.
4397 (bfd_elf64_get_section_contents): Delete.
4398 (mmix_elf_relocate_section): Zero stub area.
4399 * linker.c (default_indirect_link_order): Alloc max of section size
4400 and rawsize.
4401 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
4402 * section.c (bfd_malloc_and_get_section): Likewise.
4403 (struct bfd_section): Update rawsize comment.
4404 * bfd-in2.h: Regenerate.
4405
4406 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
4407
4408 2004-06-29 Alan Modra <amodra@bigpond.net.au>
4409
4410 * bfd-in.h (bfd_get_section_limit): Define.
4411 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
4412 (_bfd_final_link_relocate): Use bfd_get_section_limit.
4413 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
4414 * coff-arm.c (coff_arm_relocate_section): Likewise.
4415 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
4416 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
4417 (bfd_ns32k_final_link_relocate): Likewise.
4418 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
4419 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
4420 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
4421 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
4422 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
4423 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
4424 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
4425 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
4426 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
4427 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
4428 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
4429 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
4430 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
4431 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
4432 * elf32-v850.c (v850_elf_reloc): Likewise.
4433 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
4434 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
4435 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
4436 * elf64-mips.c (mips_elf64_gprel32_reloc)
4437 (mips16_gprel_reloc): Likewise.
4438 * elf64-mmix.c (mmix_elf_reloc): Likewise.
4439 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
4440 * elf64-sparc.c (init_insn_reloc): Likewise.
4441 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
4442 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
4443 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
4444 (_bfd_mips_elf_generic_reloc): Likewise.
4445 * bfd-in2.h: Regenerate.
4446
4447 2004-06-28 Alan Modra <amodra@bigpond.net.au>
4448
4449 * bfd-in.h (struct stab_info): Move from stabs.c.
4450 * stabs.c (struct stab_link_includes_table): Delete.
4451 (stab_link_includes_lookup): Delete.
4452 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
4453 level of indirection from sinfo parm.
4454 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
4455 stabstr section. Adjust hash table accesses.
4456 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
4457 alloc. Adjust stab_info test.
4458 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
4459 (_bfd_coff_final_link): Adjust stab_info test.
4460 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
4461 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
4462 in place.
4463 * libcoff-in.h (struct coff_link_hash_table): Likewise.
4464 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
4465 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
4466 stabstr section. Adjust stab_info test.
4467 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
4468 (_bfd_write_stab_strings): Adjust prototypes.
4469 * libbfd.h: Regenerate.
4470 * libcoff.h: Regenerate.
4471 * bfd-in2.h: Regenerate.
4472
4473 2004-06-27 Mark Kettenis <kettenis@gnu.org>
4474
4475 From Miod Vallat <miod@online.fr>:
4476 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
4477
4478 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
4479
4480 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
4481 (struct elf32_mn10300_link_hash_entry): Remove
4482 pcrel_relocs_copied.
4483 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
4484 R_MN10300_32. Don't adjust pcrel_relocs_copied.
4485 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
4486 and gotoff relocations if the symbol doesn't bind locally. Use
4487 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
4488 relocation for PCREL32.
4489 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
4490 to test whether a symbol binds locally.
4491 (elf32_mn10300_link_hash_newfunc): Don't initialize
4492 pcrel_relocs_copied.
4493 (_bfd_mn10300_elf_discard_copies): Delete.
4494 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
4495
4496 2004-06-26 Mark Kettenis <kettenis@gnu.org>
4497
4498 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
4499
4500 2004-06-25 Joel Brobecker <brobecker@gnat.com>
4501
4502 * som.c (som_set_reloc_info): Correct small typo.
4503
4504 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
4505
4506 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
4507 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
4508 (m32r_elf_gcsweep_hook): Likewise.
4509 (m32r_elf_check_relocs): Likewise.
4510 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
4511 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
4512 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
4513 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
4514 * bfd-in2.h: Regenerated.
4515 * libbfd.h: Regenerated.
4516
4517 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
4518
4519 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
4520 relocation symbol.
4521 (elf64_x86_64_relocate_section): Issue an error for
4522 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
4523 against global symbols when building shared library.
4524
4525 2004-06-24 Alan Modra <amodra@bigpond.net.au>
4526
4527 * section.c (struct sec): Rename "_cooked_size" to "size".
4528 Rename "_raw_size" to "rawsize".
4529 (STD_SECTION): Adjust comments.
4530 (bfd_set_section_size, bfd_get_section_contents): Use size.
4531 (bfd_malloc_and_get_section): New function.
4532 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
4533 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
4534 Correctly free reloc and contents memory.
4535 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
4536 and fake CIE now that we can shink section size to zero.
4537 (_bfd_elf_write_section_eh_frame): Likewise..
4538 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
4539 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
4540 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
4541 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
4542 unneeded indirection.
4543 * elf.c (_bfd_elf_section_offset): .. and update call.
4544 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
4545 * libbfd.h: Regenerate.
4546 * bfd-in2.h: Regenerate.
4547
4548 Replace occurrences of "_raw_size" and "_cooked_size" in most places
4549 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
4550 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
4551 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
4552 Similarly use "rawsize", if non-zero, in reloc functions to validate
4553 reloc addresses. Use new bfd_malloc_and_get_section in most places
4554 where bfd_get_section_contents was called. Expand all occurrences of
4555 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
4556 grok_prstatus and similar functions to "size".
4557 * aix386-core.c (aix386_core_file_p): ..
4558 * aix5ppc-core.c (xcoff64_core_p): ..
4559 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
4560 aout_adobe_set_section_contents): ..
4561 * aout-target.h (callback): ..
4562 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
4563 MY_bfd_final_link): ..
4564 * aoutf1.h (sunos4_core_file_p): ..
4565 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
4566 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
4567 final_link, aout_link_input_section): ..
4568 * binary.c (binary_object_p, binary_canonicalize_symtab,
4569 binary_set_section_contents): ..
4570 * bout.c (b_out_callback, b_out_write_object_contents,
4571 b_out_set_section_contents, b_out_bfd_relax_section,
4572 b_out_bfd_get_relocated_section_contents): ..
4573 * cisco-core.c (cisco_core_file_validate): ..
4574 * coff-alpha.c (alpha_ecoff_object_p,
4575 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
4576 * coff-arm.c (coff_arm_relocate_section,
4577 bfd_arm_allocate_interworking_sections): ..
4578 * coff-h8300.c (h8300_reloc16_extra_cases,
4579 h8300_bfd_link_add_symbols): ..
4580 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
4581 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
4582 ppc_bfd_coff_final_link): ..
4583 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
4584 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
4585 sh_align_loads, sh_coff_get_relocated_section_contents): ..
4586 * coff64-rs6000.c (xcoff64_write_object_contents,
4587 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
4588 * coffcode.h (coff_compute_section_file_positions,
4589 coff_write_object_contents): ..
4590 * coffgen.c (make_a_section_from_file, coff_write_symbols,
4591 coff_section_symbol, build_debug_section): ..
4592 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
4593 process_embedded_commands, _bfd_coff_link_input_bfd,
4594 _bfd_coff_write_global_sym): ..
4595 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
4596 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
4597 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
4598 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
4599 _bfd_dwarf2_find_nearest_line): ..
4600 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
4601 ecoff_compute_section_file_positions,
4602 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
4603 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
4604 _bfd_elf_discard_section_eh_frame_hdr,
4605 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
4606 _bfd_elf_write_section_eh_frame,
4607 _bfd_elf_write_section_eh_frame_hdr): ..
4608 * elf-hppa.h (elf_hppa_sort_unwind): ..
4609 * elf-m10200.c (mn10200_elf_relax_section,
4610 mn10200_elf_relax_delete_bytes,
4611 mn10200_elf_get_relocated_section_contents): ..
4612 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
4613 mn10300_elf_check_relocs, mn10300_elf_relax_section,
4614 mn10300_elf_relax_delete_bytes,
4615 mn10300_elf_get_relocated_section_contents,
4616 _bfd_mn10300_elf_adjust_dynamic_symbol,
4617 _bfd_mn10300_elf_discard_copies,
4618 _bfd_mn10300_elf_size_dynamic_sections,
4619 _bfd_mn10300_elf_finish_dynamic_sections): ..
4620 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
4621 _bfd_elf_make_section_from_phdr, elf_fake_sections,
4622 bfd_elf_set_group_contents, map_sections_to_segments,
4623 elf_sort_sections, assign_file_positions_for_segments,
4624 SECTION_SIZE, copy_private_bfd_data,
4625 _bfd_elf_get_dynamic_reloc_upper_bound,
4626 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
4627 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
4628 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
4629 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
4630 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
4631 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
4632 bfd_elf32_arm_process_before_allocation,
4633 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
4634 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
4635 elf32_arm_write_section): ..
4636 * elf32-cris.c (cris_elf_grok_prstatus,
4637 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
4638 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
4639 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
4640 elf_cris_discard_excess_dso_dynamics,
4641 elf_cris_discard_excess_program_dynamics): ..
4642 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
4643 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
4644 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
4645 _frv_create_got_section, _frvfdpic_assign_plt_entries,
4646 elf32_frvfdpic_size_dynamic_sections,
4647 elf32_frvfdpic_modify_segment_map,
4648 elf32_frvfdpic_finish_dynamic_sections): ..
4649 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
4650 elf32_h8_get_relocated_section_contents): ..
4651 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
4652 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
4653 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
4654 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
4655 elf32_hppa_finish_dynamic_sections): ..
4656 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
4657 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
4658 i370_elf_finish_dynamic_sections): ..
4659 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
4660 allocate_dynrelocs, elf_i386_size_dynamic_sections,
4661 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
4662 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
4663 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
4664 * elf32-ip2k.c (ip2k_is_switch_table_128,
4665 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
4666 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
4667 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
4668 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
4669 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
4670 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
4671 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
4672 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
4673 m32r_elf_get_relocated_section_contents): ..
4674 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
4675 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
4676 m68hc11_elf_relax_delete_bytes): ..
4677 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
4678 m68hc12_elf_size_one_stub): ..
4679 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
4680 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
4681 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
4682 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
4683 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
4684 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
4685 elf32_mips_grok_prstatus): ..
4686 * elf32-or32.c (or32_elf_consth_reloc): ..
4687 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
4688 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
4689 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
4690 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
4691 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
4692 ppc_elf_final_write_processing): ..
4693 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
4694 allocate_dynrelocs, elf_s390_size_dynamic_sections,
4695 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
4696 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
4697 sh_elf_relax_delete_bytes, sh_elf_align_loads,
4698 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
4699 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
4700 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
4701 * elf32-sh64-com.c (sh64_address_in_cranges,
4702 sh64_get_contents_type): ..
4703 * elf32-sh64.c (sh64_find_section_for_address,
4704 sh64_elf_final_write_processing): ..
4705 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
4706 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
4707 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
4708 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
4709 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
4710 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
4711 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
4712 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
4713 elf_vax_finish_dynamic_sections): ..
4714 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
4715 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
4716 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
4717 xstormy16_elf_finish_dynamic_sections): ..
4718 * elf32-xtensa.c (xtensa_read_table_entries,
4719 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
4720 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
4721 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
4722 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
4723 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
4724 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
4725 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
4726 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
4727 xtensa_callback_required_dependence): ..
4728 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
4729 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
4730 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
4731 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
4732 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
4733 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
4734 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
4735 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
4736 * elf64-hppa.c (allocate_dynrel_entries,
4737 elf64_hppa_size_dynamic_sections,
4738 elf64_hppa_finish_dynamic_sections): ..
4739 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
4740 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
4741 elf64_mips_grok_prstatus): ..
4742 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
4743 mmix_elf_relocate_section, mmix_elf_final_link,
4744 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
4745 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
4746 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
4747 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
4748 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
4749 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
4750 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
4751 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
4752 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
4753 ppc64_elf_finish_dynamic_sections): ..
4754 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
4755 allocate_dynrelocs, elf_s390_size_dynamic_sections,
4756 elf_s390_finish_dynamic_sections): ..
4757 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
4758 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
4759 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
4760 sh64_elf64_finish_dynamic_sections): ..
4761 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
4762 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
4763 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
4764 sparc64_elf_finish_dynamic_symbol,
4765 sparc64_elf_finish_dynamic_sections): ..
4766 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
4767 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
4768 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
4769 elf64_x86_64_finish_dynamic_sections): ..
4770 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
4771 * elfcode.h (elf_slurp_reloc_table): ..
4772 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
4773 elf_finalize_dynstr, elf_link_add_object_symbols,
4774 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
4775 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
4776 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
4777 elf32_mips_grok_prstatus): ..
4778 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
4779 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
4780 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
4781 elfNN_ia64_finish_dynamic_sections): ..
4782 * elfxx-mips.c (mips_elf_create_procedure_table,
4783 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
4784 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
4785 mips_elf_global_got_index, mips_elf_multi_got,
4786 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
4787 mips_elf_allocate_dynamic_relocations,
4788 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
4789 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
4790 _bfd_mips_elf_always_size_sections,
4791 _bfd_mips_elf_size_dynamic_sections,
4792 _bfd_mips_elf_finish_dynamic_symbol,
4793 _bfd_mips_elf_finish_dynamic_sections,
4794 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
4795 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
4796 _bfd_elf_mips_get_relocated_section_contents,
4797 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
4798 * hp300hpux.c (callback): ..
4799 * hppabsd-core.c (make_bfd_asection): ..
4800 * hpux-core.c (make_bfd_asection): ..
4801 * i386linux.c (linux_link_create_dynamic_sections,
4802 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
4803 * i386msdos.c (msdos_write_object_contents): ..
4804 * i386os9k.c (os9k_callback, os9k_write_object_contents,
4805 os9k_set_section_contents): ..
4806 * ieee.c (parse_expression, ieee_slurp_external_symbols,
4807 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
4808 ieee_write_section_part, do_with_relocs, do_as_repeat,
4809 do_without_relocs, ieee_write_debug_part, init_for_output,
4810 ieee_set_section_contents): ..
4811 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
4812 * irix-core.c (do_sections, make_bfd_asection): ..
4813 * libaout.h (aout_section_merge_with_text_p): ..
4814 * libbfd.c (_bfd_generic_get_section_contents,
4815 _bfd_generic_get_section_contents_in_window): ..
4816 * linker.c (default_indirect_link_order): ..
4817 * lynx-core.c (make_bfd_asection): ..
4818 * m68klinux.c (linux_link_create_dynamic_sections,
4819 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
4820 * mach-o.c (bfd_mach_o_make_bfd_section,
4821 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
4822 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
4823 bfd_mach_o_scan_read_segment): ..
4824 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
4825 _bfd_merge_sections): ..
4826 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
4827 mmo_map_set_sizes, mmo_canonicalize_symtab,
4828 mmo_internal_write_section, mmo_write_object_contents): ..
4829 * netbsd-core.c (netbsd_core_file_p): ..
4830 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
4831 nlm_alpha_set_public_section): ..
4832 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
4833 * nlm32-sparc.c (nlm_sparc_write_import): ..
4834 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
4835 nlm_compute_section_file_positions): ..
4836 * oasys.c (oasys_object_p, oasys_slurp_section_data,
4837 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
4838 * opncls.c (get_debug_link_info): ..
4839 * osf-core.c (make_bfd_asection): ..
4840 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
4841 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
4842 final_link, aout_link_input_section): ..
4843 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
4844 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
4845 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
4846 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
4847 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
4848 * ptrace-core.c (ptrace_unix_core_file_p): ..
4849 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
4850 _bfd_final_link_relocate, bfd_generic_relax_section,
4851 bfd_generic_get_relocated_section_contents): ..
4852 * reloc16.c (bfd_coff_reloc16_relax_section,
4853 bfd_coff_reloc16_get_relocated_section_c): ..
4854 * riscix.c (riscix_some_aout_object_p): ..
4855 * rs6000-core.c (read_hdr, make_bfd_asection): ..
4856 * sco5-core.c (make_bfd_asection): ..
4857 * simple.c (bfd_simple_get_relocated_section_contents): ..
4858 * som.c (som_object_setup, setup_sections, som_prep_headers,
4859 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
4860 som_set_reloc_info, som_get_section_contents,
4861 som_bfd_link_split_section): ..
4862 * sparclinux.c (linux_link_create_dynamic_sections,
4863 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
4864 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
4865 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
4866 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
4867 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
4868 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
4869 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
4870 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
4871 sunos_finish_dynamic_link): ..
4872 * syms.c (_bfd_stab_section_find_nearest_line): ..
4873 * tekhex.c (first_phase, tekhex_set_section_contents,
4874 tekhex_write_object_contents): ..
4875 * trad-core.c (trad_unix_core_file_p): ..
4876 * versados.c (process_esd, process_otr, process_otr): ..
4877 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
4878 * vms-misc.c (add_new_contents): ..
4879 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
4880 * vms.c (vms_set_section_contents): ..
4881 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
4882 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
4883 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
4884 * xsym.c (bfd_sym_scan): .. See above.
4885
4886 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
4887
4888 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
4889 calling _bfd_merged_section_offset only for section symbols.
4890
4891 2004-06-22 Alan Modra <amodra@bigpond.net.au>
4892
4893 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
4894 for handling SEC_MERGE symbols in relax_section.
4895
4896 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
4897
4898 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
4899 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
4900 linked together. Mark the result as h8300sx code.
4901
4902 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
4903
4904 * elf-bfd.h (struct elf_backend_data): Added
4905 elf_backend_omit_section_dynsym.
4906 (_bfd_elf_link_omit_section_dynsym): Declare.
4907 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
4908 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
4909 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
4910 (_bfd_elf_link_renumber_dynsyms): ... this function.
4911 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
4912 _bfd_elf_link_omit_section_dynsym).
4913 (elfNN_bed): Added elf_backend_omit_section_dynsym.
4914
4915 2004-06-21 Nick Clifton <nickc@redhat.com>
4916
4917 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
4918 flags.
4919
4920 2004-06-17 Jerome Guitton <guitton@gnat.com>
4921
4922 * bfd-in.h (bfd_cache_close_all): New function declaration.
4923 * bfd-in2.h: Regenerate.
4924 * cache.c (bfd_cache_close_all): New function definition.
4925
4926 2004-06-16 Mark Kettenis <kettenis@gnu.org>
4927
4928 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
4929 4.10 and beyond.
4930 * configure: Regenerate.
4931
4932 2004-06-16 Daniel Jacobowitz <dan@debian.org>
4933
4934 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
4935 the pre-existing section.
4936
4937 2004-06-15 Alan Modra <amodra@bigpond.net.au>
4938
4939 * section.c (struct sec): Remove usused flags. Reorganize a little.
4940 (bfd_get_section_size_before_reloc): Delete.
4941 (bfd_get_section_size_after_reloc): Delete.
4942 (STD_SECTION): Update.
4943 (bfd_get_section_size_now): Delete.
4944 (bfd_set_section_contents): Don't referece reloc_done.
4945 (bfd_get_section_contents): Remove reloc_done comment.
4946 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
4947 reloc_done.
4948 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
4949 * ecoff.c (bfd_debug_section): Update initializer.
4950 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
4951 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
4952 * bfd-in.h (bfd_section_size): Expand.
4953 (bfd_get_section_size): New macro.
4954 * bfd-in2.h: Regenerate.
4955 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
4956 bfd_get_section_size_before_reloc with bfd_get_section_size.
4957 * coffcode.h (coff_write_object_contents): Likewise.
4958 * coffgen.c (build_debug_section): Likewise.
4959 * dwarf1.c (parse_line_table): Likewise.
4960 (_bfd_dwarf1_find_nearest_line): Likewise.
4961 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
4962 * i386msdos.c (msdos_write_object_contents): Likewise.
4963 * pdp11.c (squirt_out_relocs): Likewise.
4964 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
4965 * elf64-mmix.c (mmix_elf_final_link): Update comment.
4966
4967 2004-06-14 Chris Demetriou <cgd@broadcom.com>
4968
4969 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
4970 removal) with updated comment.
4971 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
4972 BFD_RELOC_32_PCREL.
4973 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
4974 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
4975
4976 2004-06-12 Alan Modra <amodra@bigpond.net.au>
4977
4978 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
4979 overflow on branches to undefweaks.
4980
4981 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4982
4983 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
4984 as ecoff_section_data() does not return a valid lvalue.
4985
4986 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
4987
4988 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
4989 (elf_link_add_object_symbols): Likewise.
4990
4991 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
4992 (elf_backend_reloc_type_class): New.
4993
4994 2004-06-08 Mark Kettenis <kettenis@gnu.org>
4995
4996 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
4997 netbsd-core.lo.
4998 * configure: Regenerate.
4999
5000 2004-06-07 Daniel Jacobowitz <dan@debian.org>
5001
5002 From: Albert Chin-A-Young <china@thewrittenword.com>
5003 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
5004 to unsigned int.
5005
5006 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
5007
5008 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
5009 change.
5010
5011 2004-05-28 DJ Delorie <dj@redhat.com>
5012
5013 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
5014 for linking, but otherwise adjust reloc for merged sections.
5015
5016 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
5017
5018 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
5019 _bfd_merged_section_offset for local symbols.
5020
5021 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
5022
5023 * Makefile.am: Regenerate dependencies.
5024 * Makefile.in: Regenerate.
5025 * archures.c: Add bfd_mach_sh3_nommu .
5026 * bfd-in2.h: Regenerate.
5027 * cpu-sh.c: Add sh3-nommu architecture.
5028 (bfd_to_arch_table): Create new table.
5029 (sh_get_arch_from_bfd_mach): Create new function.
5030 (sh_get_arch_up_from_bfd_mach): Create new function.
5031 (sh_merge_bfd_arch): Create new function.
5032 * elf32-sh.c (sh_ef_bfd_table): Add table.
5033 (sh_elf_check_relocs): Replace switch statement with
5034 use of sh_ef_bfd_table .
5035 (sh_elf_get_flags_from_mach): Add new function.
5036 (sh_find_elf_flags): Likewise.
5037 (sh_elf_copy_private_data): Replace most of non-elf contents
5038 with a call to sh_merge_bfd_arch() .
5039
5040 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
5041
5042 * Makefile.am (bfdver.h): Use explicit filename, not $< .
5043 * Makefile.in: Regenerate.
5044
5045 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
5046
5047 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
5048 custom calling conventions for dynamic symbols.
5049 (mn10300_elf_relax_section): Avoid relaxing a function as a local
5050 symbol if it's an alias to a global one.
5051
5052 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
5053
5054 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
5055 change.
5056
5057 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
5058
5059 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
5060 loop over hashes.
5061
5062 2004-05-26 Alan Modra <amodra@bigpond.net.au>
5063
5064 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
5065 for SHT_GROUP sections.
5066
5067 2004-05-25 Alan Modra <amodra@bigpond.net.au>
5068
5069 * elflink.c (elf_link_add_object_symbols): Don't set up merge
5070 section data here..
5071 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
5072 * merge.c: Formatting. Remove unnecessary casts. Expand
5073 bfd_get_section_alignment macro.
5074 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
5075 use throughout file.
5076 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
5077 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
5078 section name to determine sinfo group, instead test output section
5079 and alignment.
5080 (_bfd_merge_sections): Add struct bfd_link_info param. Call
5081 _bfd_strip_section_from_output rather than just twiddling flags.
5082 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
5083 (_bfd_merge_sections): Update prototype.
5084 * libbfd.h: Regenerate.
5085
5086 2004-05-24 Mark Kettenis <kettenis@gnu.org>
5087
5088 * netbsd-core.c: Correctly indent section that sets architecture
5089 from machine ID.
5090
5091 From Miod Vallat <miod@online.fr>:
5092 * m88kopenbsd.c: New file.
5093 * targets.c (m88k_openbsd_vec): New.
5094 * config.bfd: Add m88k-*-openbsd*.
5095 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
5096 (m88kopenbsd_vec): New.
5097 * configure: Regenerate.
5098 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
5099 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
5100 Run "make dep-am".
5101 * Makefile.in: Regenerate.
5102 * po/SRC-POTFILES.in: Regenerate.
5103
5104 2004-05-24 Nick Clifton <nickc@redhat.com>
5105
5106 * hash.c: Remove bogus node "Changing the default Hash Table Size"
5107 introduced by hash table size patch.
5108
5109 2004-05-22 Ben Elliston <bje@au.ibm.com>
5110
5111 * configure.in (is_release): Remove.
5112 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
5113 (AC_OUTPUT): Don't output bfdver.h from version.h.
5114 * configure: Regenerate.
5115 * Makefile.am (RELEASE): New variable.
5116 (bfdver.h): New target.
5117 * Makefile.in: Regenerate.
5118 * doc/Makefile.in: Likewise.
5119
5120 2004-05-22 Ben Elliston <bje@au.ibm.com>
5121
5122 * Makefile.am (config.status): Don't depend on version.h.
5123 * Makefile.in: Regenerate.
5124
5125 2004-05-22 Alan Modra <amodra@bigpond.net.au>
5126
5127 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
5128 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
5129 * libbfd.h: Regenerate.
5130 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
5131 (_bfd_elf_rel_local_sym): Likewise.
5132 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
5133 (elf_link_input_bfd): Likewise.
5134 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
5135 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5136 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
5137 (elfNN_ia64_relocate_section): Likewise.
5138
5139 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
5140
5141 * hash.c (bfd_default_hash_table_size): New variable.
5142 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
5143 (bfd_hash_set_default_size): New function. Set the default size
5144 to a selected prime number close to the argument. Document new
5145 function.
5146 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
5147 * bfd-in2.h: Regenerate.
5148 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
5149 * Makefile.in: Regenerate.
5150
5151 2004-05-21 Mark Kettenis <kettenis@gnu.org>
5152
5153 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
5154 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
5155 arm, m68k, m88k and hppa core files.
5156
5157 2004-05-21 Nick Clifton <nickc@redhat.com>
5158
5159 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
5160 (bfd_bwrite): Likewise.
5161 (bfd_tell): Likewise.
5162 (bfd_flush): Likewise.
5163 (bfd_stat): Likewise.
5164 (bfd_seek): Likewise.
5165 (bfd_get_mtime): Likewise.
5166 (bfd_get_size): Likewise.
5167
5168 2004-05-19 Ben Elliston <bje@au.ibm.com>
5169
5170 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
5171
5172 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
5173
5174 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
5175 (bfd_generic_openr_next_archived_file): Likewise.
5176
5177 2004-05-17 Bob Wilson <bob.wilson@acm.org>
5178
5179 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
5180 section names by inserting a new substring after .gnu.linkonce, except
5181 for .gnu.linkonce.t.* where the "t." is replaced.
5182
5183 2004-05-17 Adam Nemet <anemet@lnxw.com>
5184
5185 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
5186 (m68-*-lynxos* case): Likewise.
5187 (powerpc-*-lyxnos* case): New case.
5188 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
5189
5190 2004-05-17 David Heine <dlheine@tensilica.com>
5191
5192 * aout-target.h (MY_bfd_copy_private_header_data): Define.
5193 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
5194 * bfd.c (bfd_copy_private_header_data): Define.
5195 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
5196 interface.
5197 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
5198 * coffcode.h (coff_bfd_copy_private_header_data): Define.
5199 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
5200 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
5201 segments by calling copy_private_bfd_data.
5202 (_bfd_elf_copy_private_header_data): Define.
5203 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
5204 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
5205 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
5206 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
5207 * mmo.c (mmo_bfd_copy_private_header_data): Define.
5208 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
5209 * som.c (som_bfd_copy_private_header_data): Define.
5210 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
5211 * vms.c (vms_bfd_copy_private_header_data): Define.
5212 * bfd-in2.h: Regenerate.
5213 * libbfd.h: Regenerate.
5214
5215 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5216
5217 * elfxx-mips.c (MINUS_TWO): Define.
5218 (mips_elf_higher, mips_elf_highest,
5219 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
5220 some bfd_vma values.
5221 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
5222
5223 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5224
5225 * som.c (log2): Rename to exact_log2. Adjust all callers.
5226
5227 2004-05-13 Paul Brook <paul@codesourcery.com>
5228
5229 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
5230 dwarf3 format CIE entries. Remove comment about the size of the
5231 ra_column field. It is now correctly deduced.
5232
5233 2004-05-13 Joel Sherrill <joel@oarcorp.com>
5234
5235 * config.bfd (or32-*-rtems*): Switch to elf.
5236
5237 2004-05-13 Nick Clifton <nickc@redhat.com>
5238
5239 * po/fr.po: Updated French translation.
5240
5241 2004-05-11 Jakub Jelinek <jakub@redhat.com>
5242
5243 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
5244 into .dynsym if elf_section_data (sec)->dynindx <= 0.
5245 Adjust counting of last_local.
5246 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
5247 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
5248 created by the linker nor !SHF_ALLOC.
5249
5250 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
5251 DT_PLTGOT to the start of the .got.plt section instead of the
5252 .got output section. Set sh_entsize for .got section in addition
5253 to .got.plt.
5254 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
5255 is at sgot->output_section->vma.
5256 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
5257 DT_PLTGOT to the start of the .got.plt section instead of the
5258 .got output section.
5259 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
5260 is at sgot->output_section->vma. Set sh_entsize for .got section
5261 in addition to .got.plt.
5262 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
5263 (bfd_section_from_phdr): Likewise.
5264 (map_sections_to_segments): Likewise.
5265 (assign_file_positions_for_segments): Likewise.
5266 (get_program_header_size): Likewise.
5267 * elflink.c (bfd_elf_size_dynamic_sections): Set
5268 elf_tdata (output_bfd)->relro from info->relro.
5269 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
5270
5271 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
5272
5273 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
5274 a zero symndx for which we hadn't accounted a dynamic relocation.
5275 (_frvfdpic_add_rofixup): Likewise.
5276
5277 2004-05-07 Brian Ford <ford@vss.fsi.com>
5278 DJ Delorie <dj@redhat.com>
5279
5280 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
5281 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
5282 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
5283 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
5284
5285 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
5286
5287 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
5288 immediately if there's no link info.
5289 (elf32_frvfdpic_copy_private_bfd_data): New.
5290 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
5291
5292 2004-05-06 Zack Weinberg <zack@codesourcery.com>
5293
5294 * dwarf2.c (add_line_info): Also set info->filename to NULL if
5295 filename argument is null; do not call strlen on a null pointer.
5296
5297 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
5298
5299 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
5300 special case.
5301
5302 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
5303
5304 * configure.in (bfd_elf32_frvfdpic_vec): New.
5305 * configure: Rebuilt.
5306 * targets.c (bfd_elf32_frvfdpic_vec): New.
5307 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
5308 on the latter.
5309 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
5310 frvfdpic instead of frv. Rearrange elf-target macros such that
5311 the FDPIC-specific ones are only defined for this new target
5312 vector.
5313 (bfd_elf32_frvfdpic_vec): Declare.
5314 (IS_FDPIC): New.
5315 (elf32_frv_relocate_section): Use it to enable segment checking
5316 and to control rofixup emission. Add output section vma to
5317 applied relocation in non-LOAD non-ALLOC sections. Use
5318 _bfd_error_handler for errors.
5319 (_frv_create_got_section): Create .rel.got and .rofixup only in
5320 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
5321 linker script.
5322 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
5323 (elf32_frvfdpic_modify_segment_map): Likewise.
5324 (elf32_frv_finish_dynamic_sections): New, do-nothing.
5325 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
5326 error message if we miscompute the rofixup size.
5327 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
5328 (frvfdpic_elf_encode_eh_address): Likewise.
5329 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
5330 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
5331 relocs. Reject unknown relocation types.
5332 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
5333 (frv_elf_merge_private_bfd_data): Likewise.
5334 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
5335 0x4000 for newly-added elf32-frvfdpic.
5336
5337 2004-05-05 Nick Clifton <nickc@redhat.com>
5338
5339 PR/136
5340 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
5341 returning NULL as most users of this function do not check its
5342 return value.
5343 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
5344 of bfd_cache_lookup().
5345 * sco5-core.c (sco5_core_file_p): Likewise.
5346 * trad-core.c (trad_unix_core_file_p): Likewise.
5347
5348 2004-05-05 Nick Clifton <nickc@redhat.com>
5349
5350 * cache.c (bfd_cache_lookup): Improve formatting.
5351 * archive.c: Fix formatting.
5352
5353 2004-05-05 Peter Barada <peter@the-baradas.com>
5354
5355 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
5356 * cpu-m68k.c(bfd_m68k_arch): Likewise.
5357 * bfd-in2.h(bfd_architecture): Regenerate.
5358
5359 2004-05-03 Alan Modra <amodra@bigpond.net.au>
5360
5361 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
5362 SEC_MERGE sections.
5363 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
5364 those against discarded link-once and SEC_MERGE section symbols.
5365
5366 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
5367
5368 * section.c (bfd_get_section_by_name_if): New.
5369 * bfd-in2.h: Regenerated.
5370
5371 2004-05-02 Alan Modra <amodra@bigpond.net.au>
5372
5373 * som.c (som_bfd_is_group_section): Define.
5374
5375 2004-05-01 Alan Modra <amodra@bigpond.net.au>
5376
5377 * section.c (bfd_make_section_anyway): Copy the whole
5378 bfd_hash_entry, not just "next" from existing entry.
5379
5380 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
5381
5382 * elf.c (bfd_section_from_shdr): Maintain the section order in
5383 a section group.
5384 (special_sections): Add ".note.GNU-stack".
5385 (elf_fake_sections): Handle section group for relocatable
5386 link..
5387
5388 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
5389
5390 * section.c (bfd_sections_find_if): New.
5391 * bfd-in2.h: Regenerated.
5392
5393 2004-04-30 Alan Modra <amodra@bigpond.net.au>
5394
5395 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
5396
5397 * elf-bfd.h (bfd_elf_is_group_section): Declare.
5398 * elf.c (bfd_elf_is_group_section): New function.
5399 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
5400 * section.c (bfd_generic_is_group_section): New function.
5401 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
5402 (BFD_JUMP_TABLE_LINK): Adjust.
5403 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
5404 * aout-target.h (MY_bfd_is_group_section): Define.
5405 * aout-tic30.c (MY_bfd_is_group_section): Define.
5406 * bfd.c (bfd_is_group_section): Define.
5407 * binary.c (binary_bfd_is_group_section): Define.
5408 * bout.c (b_out_bfd_is_group_section): Define.
5409 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
5410 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
5411 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
5412 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
5413 * coffcode.h (coff_bfd_is_group_section): Define.
5414 * i386msdos.c (msdos_bfd_is_group_section): Define.
5415 * i386os9k.c (os9k_bfd_is_group_section): Define.
5416 * ieee.c (ieee_bfd_is_group_section): Define.
5417 * ihex.c (ihex_bfd_is_group_section): Define.
5418 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
5419 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
5420 * mmo.c (mmo_bfd_is_group_section): Define.
5421 * nlm-target.h (nlm_bfd_is_group_section): Define.
5422 * oasys.c (oasys_bfd_is_group_section): Define.
5423 * pef.c (bfd_pef_bfd_is_group_section): Define.
5424 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
5425 * srec.c (srec_bfd_is_group_section): Define.
5426 * tekhex.c (tekhex_bfd_is_group_section): Define.
5427 * versados.c (versados_bfd_is_group_section): Define.
5428 * vms.c (vms_bfd_is_group_section): Define.
5429 * xsym.c (bfd_sym_bfd_is_group_section): Define.
5430 * bfd-in2.h: Regenerate.
5431 * libbfd.h: Regenerate.
5432
5433 2004-04-30 Alan Modra <amodra@bigpond.net.au>
5434
5435 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
5436
5437 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
5438
5439 * configure.in: Update version to 2.15.91.
5440 * configure: Regenerate.
5441
5442 2004-04-29 Brian Ford <ford@vss.fsi.com>
5443
5444 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
5445 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
5446 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
5447 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
5448 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
5449 .gnu.linkonce.wi. sections.
5450 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
5451 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
5452 .gnu.linkonce.wi..
5453 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
5454 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5455
5456 2004-04-28 Chris Demetriou <cgd@broadcom.com>
5457
5458 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
5459 * bfd-in2.h: Regenerate.
5460 * libbfd.h: Likewise.
5461
5462 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5463
5464 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
5465 dup_common fields.
5466 (setup_sections): Use som_subspace_dictionary_record struct instead
5467 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
5468 is_comdat, is_common or dup_common.
5469 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
5470 is_comdat, is_common and dup_common in section subspace_dict from
5471 copy_data.
5472 (som_begin_writing): Use som_subspace_dictionary_record struct.
5473 (som_finish_writing): Likewise.
5474 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
5475 is_common and dup_common flags in info for symbol. Add comment
5476 regarding linker support for these fields. Slightly reorganize
5477 function.
5478 (som_build_and_write_symbol_table): Set is_comdat, is_common and
5479 dup_common fields in symbol table from symbol info.
5480 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
5481 arguments. Set corresponding fields in copy_data. Change all callers.
5482 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
5483 symbol table.
5484 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
5485 * som.h (som_subspace_dictionary_record): Define.
5486 (som_copyable_section_data_struct): Add is_comdat, is_common and
5487 dup_common fields.
5488 (som_section_data_struct): Use som_subspace_dictionary_record struct
5489 instead of subspace_dictionary_record.
5490 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
5491
5492 2004-04-27 Bob Wilson <bob.wilson@acm.org>
5493
5494 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
5495 if set. Check reloc_done flag before applying relocations. Use
5496 output addresses, both when applying relocations and when comparing
5497 against the specified section.
5498 (elf_xtensa_relocate_section): Use output address to check if dynamic
5499 reloc is in a literal pool. Set section's reloc_done flag.
5500
5501 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
5502
5503 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
5504 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
5505 section.
5506 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
5507 section.
5508
5509 2004-04-27 Alan Modra <amodra@bigpond.net.au>
5510
5511 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
5512 structure field removed in 2004-04-24 patch.
5513 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
5514
5515 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
5516 Constify hdr arg.
5517 * elf32-arm.h (elf32_arm_section_flags): Likewise.
5518 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
5519 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
5520 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
5521 field before calling elf_backend_section_flags.
5522
5523 2004-04-24 Chris Demetriou <cgd@broadcom.com>
5524
5525 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
5526 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
5527 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
5528 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
5529 and BFD_RELOC_32_PCREL.
5530 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
5531 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
5532 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
5533 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
5534 (mips_elf_next_relocation): Move comment about matching HI/LO
5535 relocations to...
5536 (_bfd_mips_elf_relocate_section): Here. Remove handling for
5537 R_MIPS_GNU_REL_HI16.
5538
5539 2004-04-23 Chris Demetriou <cgd@broadcom.com>
5540
5541 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
5542 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
5543 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
5544 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
5545 and update comments to reflect current usage.
5546 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
5547 and MIPS_R_SWITCH, as well as several empty entries. Update comment
5548 for MIPS_R_PCREL16.
5549 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
5550 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
5551 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
5552 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
5553 type number to be MIPS_R_PCREL16.
5554 (mips_relocate_section): Remove support for link-time relaxation
5555 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
5556 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
5557 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
5558 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
5559 relaxation of branches used by embedded-PIC.
5560 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
5561 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
5562 related members, update comment.
5563 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
5564 code related to embedded-PIC.
5565 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
5566 initialization of now-removed 'adjust' member of
5567 'struct ecoff_debug_info'.
5568
5569 2004-04-23 Chris Demetriou <cgd@broadcom.com>
5570
5571 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
5572
5573 2004-04-21 Philip Blundell <pb@nexus.co.uk>
5574
5575 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
5576 relocs for locally defined symbols during -shared final link.
5577 (elf32_arm_final_link_relocate): Likewise.
5578
5579 2004-04-22 Jakub Jelinek <jakub@redhat.com>
5580
5581 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
5582 ELF_LINK_POINTER_EQUALITY_NEEDED.
5583 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
5584 if r_type is not R_X86_64_PC32.
5585 (elf64_x86_64_finish_dynamic_symbol): If
5586 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
5587 SHN_UNDEF symbols.
5588
5589 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5590
5591 * elf32-sh.c (sh_elf_plt_sym_val): New function.
5592 (elf_backend_plt_sym_val): Define.
5593
5594 2004-04-22 Andrew Cagney <cagney@redhat.com>
5595
5596 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
5597
5598 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5599
5600 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
5601 make_bfd_asection.
5602 * som.c (som_set_section_contents): Constantify second argument.
5603 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
5604 (som_object_setup): Rework to avoid warning.
5605 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
5606 Likewise.
5607
5608 2004-04-22 Andrew Cagney <cagney@redhat.com>
5609
5610 * cache.c (bfd_cache_close): Check for a previously closed file.
5611
5612 2004-04-22 Jakub Jelinek <jakub@redhat.com>
5613
5614 * bfd.c (bfd_get_synthetic_symtab): Define.
5615 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
5616 NAME##_get_synthetic_symtab.
5617 (struct bfd_target): Add _bfd_get_synthetic_symtab.
5618 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
5619 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
5620 relplt_name fields.
5621 (_bfd_elf_get_synthetic_symtab): New prototype.
5622 * elfcode.h (elf_get_synthetic_symtab): Define.
5623 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
5624 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
5625 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
5626 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
5627 * bfd-in2.h: Rebuilt.
5628 * libbfd.h: Rebuilt.
5629 * elf32-i386.c (elf_i386_plt_sym_val): New function.
5630 (elf_backend_plt_sym_val): Define.
5631 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
5632 (elf_backend_plt_sym_val): Define.
5633 * elf32-s390.c (elf_s390_plt_sym_val): New function.
5634 (elf_backend_plt_sym_val): Define.
5635 * elf64-s390.c (elf_s390_plt_sym_val): New function.
5636 (elf_backend_plt_sym_val): Define.
5637 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
5638 (elf_backend_plt_sym_val): Define.
5639 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
5640 (elf_backend_plt_sym_val): Define.
5641 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
5642 (elf_backend_plt_sym_val): Define.
5643 * aout-target.h (MY_get_synthetic_symtab): Define.
5644 * aout-tic30.c (MY_get_synthetic_symtab): Define.
5645 * coff-rs6000.c (rs6000coff_vec): Add
5646 _bfd_nodynamic_get_synthetic_symtab.
5647 (pmac_xcoff_vec): Likewise.
5648 * coff64-rs6000.c (rs6000coff64_vec): Add
5649 _bfd_nodynamic_get_synthetic_symtab.
5650 (aix5coff64_vec): Likewise.
5651 * sunos.c (MY_get_synthetic_symtab): Define.
5652 * vms.c (vms_get_synthetic_symtab): Define.
5653
5654 2004-04-22 Nick Clifton <nickc@redhat.com>
5655
5656 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
5657
5658 2004-04-22 Peter Barada <peter@the-baradas.com>
5659
5660 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
5661 * bfd2-in.h: Regenerate.
5662 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
5663
5664 2004-04-21 Chris Demetriou <cgd@broadcom.com>
5665
5666 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
5667 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
5668 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
5669 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
5670 * bfd-in2.h: Regenerate.
5671
5672 2004-04-21 Bob Wilson <bob.wilson@acm.org>
5673
5674 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
5675 require relocations against a weak symbol to reference the same
5676 symbol hash entry if not a final, static link.
5677 (get_cached_value, add_value_map): Add final_static_link argument.
5678 (remove_literals): Pass final_static_link argument as needed.
5679
5680 2004-04-21 Andrew Cagney <cagney@redhat.com>
5681
5682 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
5683 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
5684 (opncls_bwrite, opncls_bclose, opncls_bflush)
5685 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
5686 bfd iovec that uses function callbacks.
5687 (bfd_close): Use the iovec's bclose.
5688 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
5689 (cache_bclose, cache_bflush, cache_bstat)
5690 (cache_iovec): New functions and global variable, implement a
5691 cache "iovec", where applicable set bfd_error.
5692 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
5693 * bfdio.c (struct bfd_iovec): Define.
5694 (real_read): Delete function.
5695 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
5696 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
5697 assume that bread and bwrite set bfd_error.
5698 * bfd.c (struct bfd): Add "iovec", update comments.
5699 * bfd-in2.h, libbfd.h: Re-generate.
5700
5701 2004-04-21 Andrew Cagney <cagney@redhat.com>
5702
5703 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
5704
5705 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
5706
5707 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
5708 (bfd_elf_gc_sections): Fail if a shared object is being created.
5709 Do not fail if dynamic sections have been created. Instead call
5710 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
5711 dynamically referenced symbols. Do not mark the whole graph
5712 rooted at .eh_frame, only the section proper.
5713
5714 2004-04-20 DJ Delorie <dj@redhat.com>
5715
5716 * reloc.c: Add BFD_RELOC_32_SECREL.
5717 * bfd-in2.h: Regenerate.
5718 * libbfd.h: Likewise.
5719 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
5720 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
5721 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
5722
5723 2004-04-19 Jakub Jelinek <jakub@redhat.com>
5724
5725 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
5726 relocs against hidden/protected undefweak symbols properly.
5727 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5728
5729 2004-04-18 Mark Kettenis <kettenis@gnu.org>
5730
5731 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
5732 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
5733 core files.
5734
5735 2004-04-17 Brian Ford <ford@vss.fsi.com>
5736
5737 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
5738 filepos for the SizeOfHeaders field.
5739 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
5740 overflow.
5741 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
5742
5743 2004-04-16 Alan Modra <amodra@bigpond.net.au>
5744
5745 * simple.c (bfd_simple_get_relocated_section_contents): Don't
5746 change reloc_done. Set and restore _cooked_size.
5747 (RETURN): Delete.
5748
5749 2004-04-15 Mark Kettenis <kettenis@gnu.org>
5750
5751 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
5752 core files.
5753
5754 2004-04-15 Nick Clifton <nickc@redhat.com>
5755
5756 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
5757
5758 2004-04-15 Alan Modra <amodra@bigpond.net.au>
5759
5760 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
5761
5762 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
5763
5764 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
5765 when it is a definition.
5766
5767 2004-04-14 Alan Modra <amodra@bigpond.net.au>
5768
5769 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
5770 when statically linking PIC code.
5771 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5772
5773 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5774
5775 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
5776 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
5777 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
5778 * configure: Regenerate.
5779
5780 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
5781
5782 * elflink.c: Include libiberty.h.
5783 * Makefile.am (elflink.lo): Depend on libiberty.h.
5784 * Makefile.in: Regenerate.
5785
5786 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
5787
5788 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
5789 ".MIPS.stubs".
5790
5791 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
5792
5793 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
5794 reserve the memory for dynamic linker
5795
5796 2004-04-05 Mark Kettenis <kettenis@gnu.org>
5797
5798 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
5799 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
5800
5801 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
5802
5803 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
5804 RELOC_FOR_GLOBAL_SYMBOL.
5805 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
5806
5807 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
5808
5809 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5810 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
5811
5812 2004-04-01 Paul Brook <paul@codesourcery.com>
5813
5814 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
5815 * elf32-arm.h (struct elf32_elf_section_map): New.
5816 (struct _arm_elf_section_data): New.
5817 (elf32_arm_section_data): Define.
5818 (struct elf32_arm_link_hash_table): Add byteswap_code.
5819 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
5820 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
5821 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
5822 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
5823 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
5824 (bfd_elf32_new_section_hook, elf_backend_write_section,
5825 elf_backend_link_output_symbol_hook): Define.
5826
5827 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
5828
5829 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
5830 that keeps the characters in a B_INCL..B_EINCL range.
5831 (_bfd_link_section_stabs): When computing the sum of the
5832 characters in a B_INCL..B_EINCL range also keep a copy of those
5833 characters. Use this information to distinguish between
5834 include sections that have the same sum and the same length
5835 but which are nevertheless unique.
5836
5837 2004-03-31 Paul Brook <paul@codesourcery.com>
5838
5839 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
5840 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
5841
5842 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
5843
5844 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
5845 to 'sum_chars' and add field 'num_chars'.
5846 (_bfd_link_section_stabs): When computing the sum of the
5847 characters in a B_INCL..B_EINCL range also keep a count of the
5848 number of characters. Use this information to help distinguish
5849 between include sections when have the same sum but which
5850 nevertheless are still unique.
5851
5852 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
5853
5854 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
5855
5856 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
5857 Tomer Levi <Tomer.Levi@nsc.com>
5858
5859 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
5860 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
5861 (BFD32_BACKENDS): Add elf32-cr16c.lo.
5862 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
5863 (cpu-cr16c.lo): New target.
5864 (elf32-cr16c.lo): Likewise.
5865 * Makefile.in: Regenerate.
5866 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
5867 (bfd_archures_list): Add bfd_cr16c_arch.
5868 * config.bfd: Handle cr16c-*-elf*.
5869 * configure.in: Handle bfd_elf32_cr16c_vec.
5870 * configure: Regenerate.
5871 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
5872 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
5873 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
5874 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
5875 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
5876 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
5877 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
5878 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
5879 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
5880 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
5881 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
5882 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
5883 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
5884 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
5885 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
5886 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
5887 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
5888 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
5889 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
5890 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
5891 * targets.c (bfd_elf32_cr16c_vec): Declare.
5892 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
5893 * cpu-cr16c.c: New file.
5894 * elf32-cr16c.c: Likewise.
5895 * libbfd.h: Regenerate.
5896 * bfd-in2.h: Likewise.
5897
5898 2004-03-30 Jakub Jelinek <jakub@redhat.com>
5899
5900 * elf.c (map_sections_to_segments): Fix handling of .tbss.
5901
5902 2004-03-27 Alan Modra <amodra@bigpond.net.au>
5903
5904 * Makefile.am: Remove all mention of elflink.h.
5905 * Makefile.in: Regenerate.
5906 * bfd-in.h (bfd_elf_discard_info): Declare.
5907 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
5908 * bfd-in2.h: Regenerate.
5909 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
5910 bfd_elf32_link_record_dynamic_symbol,
5911 bfd_elf64_link_record_dynamic_symbol,
5912 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
5913 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
5914 _bfd_elf32_link_record_local_dynamic_symbol,
5915 _bfd_elf64_link_record_local_dynamic_symbol,
5916 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
5917 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
5918 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
5919 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
5920 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
5921 _bfd_elf32_reloc_symbol_deleted_p,
5922 _bfd_elf64_reloc_symbol_deleted_p): Delete.
5923 (bfd_elf_link_record_dynamic_symbol,
5924 bfd_elf_link_record_local_dynamic_symbol,
5925 bfd_elf_final_link, bfd_elf_gc_sections,
5926 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
5927 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
5928 bfd_elf_reloc_symbol_deleted_p): Declare.
5929 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
5930 * elf32-arm.h: Update for changed function names. Remove local
5931 WILL_CALL_FINISH_DYNAMIC_SECTION define.
5932 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
5933 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
5934 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
5935 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
5936 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5937 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
5938 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
5939 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
5940 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
5941 (bfd_elfNN_print_symbol): Define.
5942 * elfcode.h: Don't include elflink.h.
5943 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
5944 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
5945 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
5946 elf_gc_record_vtinherit, elf_gc_record_vtentry,
5947 elf_link_record_local_dynamic_symbol): Don't define.
5948 * elflink.c: Update for changed function names. Move elflink.h
5949 code here.
5950 * elflink.h: Delete file.
5951 * po/SRC-POTFILES.in: Regenerate.
5952 * po/bfd.pot: Regenerate.
5953
5954 2004-03-27 Alan Modra <amodra@bigpond.net.au>
5955
5956 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
5957 "name" for global syms accidentally removed in 2004-03-20 change.
5958
5959 2004-03-27 Alan Modra <amodra@bigpond.net.au>
5960
5961 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
5962 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
5963 where Elf_External_* is different for 64 and 32 bit, with
5964 corresponding elf_size_info field.
5965 (struct elf_final_link_info): Use "bfd_byte *" instead
5966 of "Elf_External_Sym *" for external_syms and symbuf.
5967 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
5968 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
5969 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
5970 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
5971 (elf_link_sort_cmp2): Adjust.
5972 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
5973 using ELF_R_SYM macro. Set u.sym_mask.
5974 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
5975 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
5976 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
5977 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
5978 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
5979 swap_syn_out functions. Rearrange dyn swap in/out switch.
5980 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
5981 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
5982 (elf_link_flush_output_syms): Add elf_backend_data arg.
5983 (elf_link_check_versioned_symbol): Likewise.
5984 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
5985 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
5986 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
5987 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
5988 ELF_R_TYPE and ELF_R_INFO macros.
5989 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
5990 based on size rather than using ELF_R_INFO.
5991 (elf_gc_mark): Set up r_sym_shift local var and use instead of
5992 ELF_R_SYM macro.
5993 (struct alloc_got_off_arg): New.
5994 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
5995 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
5996 (elf_gc_allocate_got_offsets): Adjust.
5997 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
5998 ELF_R_SYM. Use bfd_section_from_elf_index.
5999 (elf_bfd_discard_info): Set cookie.r_sym_shift.
6000 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
6001 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
6002
6003 2004-03-26 Stan Shebs <shebs@apple.com>
6004
6005 Remove MPW support, no longer used.
6006 * config.bfd (powerpc-*-mpw*): Remove configuration.
6007 * mpw-config.in, mpw-make.sed: Remove files.
6008 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
6009
6010 2004-03-26 Alan Modra <amodra@bigpond.net.au>
6011
6012 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
6013 (ppc64_elf_add_symbol_hook): New function.
6014 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
6015 const from Elf_Internal_Sym param.
6016 * elflink.c (elf_link_add_object_symbols): Adjust.
6017 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
6018 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
6019 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
6020 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
6021 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
6022 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
6023 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
6024 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
6025 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
6026 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
6027 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
6028 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
6029 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
6030 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
6031 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
6032 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
6033
6034 2004-03-26 Alan Modra <amodra@bigpond.net.au>
6035
6036 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
6037 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
6038 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
6039 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
6040 (bfd_elf64_bfd_link_add_symbols): Delete.
6041 (bfd_elf_link_add_symbols): Declare.
6042 * elfcode.h (elf_bfd_link_add_symbols): Delete.
6043 * elflink.c: Include safe-ctype.h.
6044 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
6045 make static.
6046 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
6047 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
6048 static.
6049 (elf_link_add_archive_symbols): Rename from
6050 _bfd_elf_link_add_archive_symbols, make static.
6051 (elf_link_add_object_symbols): New function. Corresponding
6052 elflink.h function converted to use elf_size_info.
6053 (bfd_elf_link_add_symbols): Likewise.
6054 (bfd_elf_size_dynamic_sections): Adjust.
6055 * elflink.h (elf_bfd_link_add_symbols): Delete.
6056 (elf_link_add_object_symbols): Delete.
6057 * elf32-gen.c (elf32_generic_link_add_symbols): Call
6058 bfd_elf_link_add_symbols.
6059 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
6060
6061 2004-03-25 Alan Modra <amodra@bigpond.net.au>
6062
6063 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
6064 and chained shared libs only if dynsym. Clear dynsym on forced-local.
6065
6066 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
6067 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
6068 (_bfd_elf_add_dt_needed_tag): Declare.
6069 (_bfd_elf_sort_symbol): Declare.
6070 (_bfd_elf_finalize_dynstr): Declare.
6071 (RELOC_FOR_GLOBAL_SYM): Formatting.
6072 * elfcode.h (elf_add_dynamic_entry): Delete.
6073 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
6074 elflink.h function converted to use elf_size_info.
6075 (_bfd_elf_add_dt_needed_tag): Likewise.
6076 (_bfd_elf_sort_symbol): Likewise.
6077 (_bfd_elf_finalize_dynstr): Likewise.
6078 (compute_bucket_count): Likewise.
6079 (bfd_elf_size_dynamic_sections): Likewise. Check result of
6080 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
6081 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
6082 * elflink.h: ..here.
6083 (sort_symbol, add_dt_needed_tag): Delete.
6084 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
6085 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
6086 Update all users.
6087 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
6088 * elf32-cris.c (add_dynamic_entry): Likewise.
6089 * elf32-hppa.c (add_dynamic_entry): Likewise.
6090 * elf32-i370.c (add_dynamic_entry): Likewise.
6091 * elf32-i386.c (add_dynamic_entry): Likewise.
6092 * elf32-m32r.c (add_dynamic_entry): Likewise.
6093 * elf32-m68k.c (add_dynamic_entry): Likewise.
6094 * elf32-ppc.c (add_dynamic_entry): Likewise.
6095 * elf32-s390.c (add_dynamic_entry): Likewise.
6096 * elf32-sh.c (add_dynamic_entry): Likewise.
6097 * elf32-sparc.c (add_dynamic_entry): Likewise.
6098 * elf32-vax.c (add_dynamic_entry): Likewise.
6099 * elf32-xtensa.c (add_dynamic_entry): Likewise.
6100 * elf64-alpha.c (add_dynamic_entry): Likewise.
6101 * elf64-hppa.c (add_dynamic_entry): Likewise.
6102 * elf64-ppc.c (add_dynamic_entry): Likewise.
6103 * elf64-s390.c (add_dynamic_entry): Likewise.
6104 * elf64-sparc.c (add_dynamic_entry): Likewise.
6105 * elf64-x86-64.c (add_dynamic_entry): Likewise.
6106 * elfxx-ia64.c (add_dynamic_entry): Likewise.
6107 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
6108 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
6109 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
6110 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6111
6112 2004-03-23 Paul Brook <paul@codesourcery.com>
6113
6114 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
6115
6116 2004-03-22 Bob Wilson <bob.wilson@acm.org>
6117
6118 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
6119 literal tables and check for relocs outside of literal pools.
6120 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
6121 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
6122 set DF_TEXTREL.
6123 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
6124 (elf_xtensa_relocate_section): Read literal tables and check for
6125 dynamic relocations in read-only sections and not in literal pools.
6126
6127 2004-03-23 Alan Modra <amodra@bigpond.net.au>
6128
6129 PR 51.
6130 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
6131
6132 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
6133
6134 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
6135 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
6136 not defined by the executable, or defined in a DSO.
6137 <eliding run-time relocation of .got>: Initialize GOT entry for a
6138 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
6139 executable.
6140 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
6141 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
6142 a PLT reloc to GOT for an executable.
6143 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
6144 .got for a DSO and explain why.
6145 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
6146 and unreferenced symbols for which a PLT is defined. Adjust
6147 dynamic-symbol pruning correspondingly, to make sure we don't lose
6148 a dynamic symbol also defined by a DSO.
6149
6150 2004-03-22 Alan Modra <amodra@bigpond.net.au>
6151
6152 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
6153 and rel args. Group input and output args. Wrap to 80 columns.
6154 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
6155 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
6156 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
6157 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
6158 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
6159 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
6160 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
6161 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
6162 RELOC_FOR_GLOBAL_SYMBOL invocation.
6163
6164 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
6165
6166 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
6167 unresolved symbols in objects aren't allowed.
6168
6169 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
6170 unresolved symbols.
6171 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
6172 (elf_hppa_unmark_useless_dynamic_symbols):
6173 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6174 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
6175 (elf32_hppa_relocate_section): Likewise.
6176 * elf32-i370.c (i370_elf_relocate_section): Likewise.
6177 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6178 * elf32-sh.c (sh_elf_relocate_section): Likewise.
6179 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
6180 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6181
6182 * elf-m10200.c (mn10200_elf_relocate_section): Use
6183 RELOC_FOR_GLOBAL_SYMBOL.
6184 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6185 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
6186 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
6187 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6188 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6189 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
6190 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
6191 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
6192 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6193 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6194 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6195 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
6196
6197 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6198
6199 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
6200 (final_link_relocate): Likewise.
6201 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
6202 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
6203
6204 2004-03-19 Alan Modra <amodra@bigpond.net.au>
6205
6206 * Makefile.am: Run "make dep-am".
6207 * Makefile.in: Regenerate.
6208 * aclocal.m4: Regenerate.
6209 * config.in: Regenerate.
6210 * po/bfd.pot: Regenerate.
6211
6212 2004-03-19 Alan Modra <amodra@bigpond.net.au>
6213 H.J. Lu <hongjiu.lu@intel.com>
6214
6215 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
6216 type and size change code to where it was previously. Remove
6217 dt_needed param. Treat old weak syms as strong if new sym is
6218 from a shared lib, even when old sym is from another shared
6219 lib. Remove unnecessary tests of oldweak and newweak. Correct
6220 comments.
6221 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
6222 _bfd_elf_merge_symbol calls.
6223 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
6224 dt_needed local var. Update comments.
6225 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
6226 (_bfd_elf_add_default_symbol): Likewise.
6227
6228 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
6229 strong syms in one shared object overriding weak syms in another.
6230
6231 2004-03-18 Alan Modra <amodra@bigpond.net.au>
6232
6233 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
6234 dyn_lib_class field. Rearrange for better packing.
6235 (elf_dt_soname): Delete.
6236 (elf_dyn_lib_class): Define.
6237 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
6238 (bfd_elf_set_dt_needed_soname): Delete.
6239 (bfd_elf_set_dyn_lib_class): New function.
6240 * elflink.h (add_dt_needed_tag): New function. Split out from..
6241 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
6242 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
6243 initialization of soname.
6244 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
6245 elf_dt_soname.
6246 * bfd-in.h (enum dynamic_lib_link_class): New.
6247 (bfd_elf_set_dt_needed_soname): Delete.
6248 (bfd_elf_set_dyn_lib_class): Declare.
6249 * bfd-in2.h: Regenerate.
6250
6251 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
6252 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
6253 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
6254 symbol loop. Instead use add_needed to flag tag as written.
6255
6256 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
6257
6258 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
6259 logic for null_input_bfd detection.
6260
6261 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
6262
6263 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
6264
6265 2004-03-16 Mark Kettenis <kettenis@gnu.org>
6266
6267 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
6268 code.
6269
6270 2004-03-16 Alan Modra <amodra@bigpond.net.au>
6271
6272 * elflink.c (elf_link_read_relocs_from_section): Don't use
6273 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
6274 (_bfd_elf_link_read_relocs): ..to here.
6275 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
6276
6277 2004-03-16 Alan Modra <amodra@bigpond.net.au>
6278
6279 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
6280 values selected in configure.host. Require both to be defined
6281 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
6282 corresponding BFD_HOST vars with quotes.
6283 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
6284 Always require BFD_HOST_64_BIT_DEFINED.
6285 <file_ptr type>: Find off_t size before emitting message. Combine
6286 off_t and ftello64 conditional.
6287 * configure: Regenerate.
6288
6289 2004-03-16 Alan Modra <amodra@bigpond.net.au>
6290
6291 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
6292 aliasing warning. Remove trailing whitespace throughout file.
6293
6294 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6295
6296 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
6297 input_section in calls to get_dyn_name.
6298 * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *". Use section id of first section in input BFD to build dynamic name for
6299 local symbols.
6300 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
6301
6302 2004-03-15 Alan Modra <amodra@bigpond.net.au>
6303
6304 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
6305 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
6306 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
6307 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
6308 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
6309 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
6310 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
6311 when using long.
6312 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
6313 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
6314 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
6315 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
6316 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
6317 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
6318 (read_8_bytes, read_indirect_string, read_address): Likewise.
6319 (read_abbrevs, parse_comp_unit): Likewise.
6320 * targets.c (struct bfd_target): Likewise.
6321 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
6322 * hppabsd-core.c: Likewise. Formatting.
6323 * hpux-core.c: Likewise.
6324 * irix-core.c: Likewise.
6325 * netbsd-core.c: Likewise.
6326 * osf-core.c: Likewise.
6327 * ptrace-core.c: Likewise.
6328 * sco5-core.c: Likewise.
6329 * trad-core.c: Likewise.
6330 * configure: Regenerate.
6331 * bfd-in2.h: Regenerate.
6332
6333 2004-03-15 Alan Modra <amodra@bigpond.net.au>
6334
6335 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
6336 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
6337 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
6338 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
6339 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
6340 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
6341 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
6342 * libbfd.c: Likewise in function definitions.
6343 (bfd_put_8): Mask with 0xff rather than casting to char.
6344 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
6345 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
6346 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
6347 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
6348 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
6349 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
6350 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
6351 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
6352 (H_GET_64, H_GET_32, H_GET_16): Likewise.
6353 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
6354 * archive.c (do_slurp_coff_armap): Update swap prototype.
6355 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
6356 (tic54x_getl_signed_32): Likewise.
6357 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
6358 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
6359 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
6360 (bfd_getp_signed_32, bfd_putp32): Likewise.
6361 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
6362 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
6363 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
6364 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
6365 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
6366 bfd_h_getx_signed_16, bfd_h_putx16.
6367 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
6368 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
6369 * hpux-core.c: Likewise.
6370 * irix-core.c: Likewise.
6371 * netbsd-core.c: Likewise.
6372 * osf-core.c: Likewise.
6373 * ptrace-core.c: Likewise.
6374 * sco5-core.c: Likewise.
6375 * trad-core.c: Likewise.
6376 * bfd-in2.h: Regenerate.
6377
6378 2004-03-15 Matt Thomas <matt@3am-software.com>
6379
6380 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
6381 selected.
6382
6383 2004-03-13 Mark Kettenis <kettenis@gnu.org>
6384
6385 * config.bfd: Add x86_64-*-openbsd*.
6386 * configure.in (x86_64-*-openbsd*): Set COREFILE to
6387 netbsd-core.lo.
6388 * configure: Regenerate.
6389
6390 2004-03-12 Nick Clifton <nickc@redhat.com>
6391 Dave Murphy <wintermute2k4@ntlworld.com>
6392
6393 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
6394 if the input bfd does not contain any code.
6395
6396 2004-03-09 Steve Ellcey <sje@cup.hp.com>
6397
6398 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
6399
6400 2004-03-05 Fred Fish <fnf@redhat.com>
6401
6402 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
6403 mips16 symbols to be even rather than testing first for even/odd.
6404 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
6405
6406 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
6407
6408 * elf.c (map_sections_to_segments): Ignore .tbss sections for
6409 layout purposes.
6410
6411 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
6412
6413 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
6414 undefined symbols as hash_new.
6415
6416 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
6417
6418 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
6419 * cpu-sh.c: Ditto.
6420 * elf32-sh.c: Ditto.
6421 * bfd-in2.h: Regenerate.
6422
6423 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
6424
6425 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
6426 dynrelocs.
6427 (_frv_count_got_plt_entries): Initialize them.
6428 (frv_pic_relocs_info_find): Add insert argument. Adjust all
6429 callers.
6430 (frv_pic_relocs_info_for_global): Likewise.
6431 (frv_pic_relocs_info_for_local): Likewise.
6432 (frv_pic_merge_early_relocs_info): New.
6433 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
6434 another.
6435 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
6436 Check that we don't exceed the allocated count for entry.
6437 (_frv_add_rofixup): Likewise.
6438 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
6439 (elf32_frv_finish_dynamic_sections): Improve error message in case
6440 we emit too few rofixup entries.
6441
6442 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
6443
6444 * archures.c (bfd_mach_fr450): New.
6445 * bfd-in2.h: Regenerate.
6446 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
6447 (arch_info_500): Link to it.
6448 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
6449 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
6450 (frv_elf_arch_extension_p): New function.
6451 (frv_elf_merge_private_bfd_data): Use it.
6452
6453 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
6454
6455 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
6456
6457 * elflink.h (is_global_data_symbol_definition): Moved to
6458 elflink.c.
6459 (elf_link_is_defined_archive_symbol): Likewise.
6460 (elf_link_add_archive_symbols): Likewise. Renamed to
6461 _bfd_elf_link_add_archive_symbols.
6462
6463 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
6464 of ELF symbol table entry from backend.
6465 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
6466 instead of elf_link_add_object_symbols.
6467
6468 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
6469
6470 * elf-bfd.h (struct elf_backend_data): Added
6471 elf_backend_can_make_relative_eh_frame,
6472 elf_backend_can_make_lsda_relative_eh_frame and
6473 elf_backend_encode_eh_address.
6474 (_bfd_elf_encode_eh_address): Declare.
6475 (_bfd_elf_can_make_relative): Declare.
6476 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
6477 hooks to decide whether to attempt to make_relative and
6478 make_lsda_relative.
6479 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
6480 (_bfd_elf_can_make_relative): New.
6481 (_bfd_elf_encode_eh_address): New.
6482 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
6483 (frv_elf_encode_eh_address): New.
6484 (elf_backend_can_make_relative_eh_frame): Define.
6485 (elf_backend_can_make_lsda_relative_eh_frame): Define.
6486 (elf_backend_encode_eh_address): Define.
6487 * elfxx-target.h
6488 (elf_backend_can_make_relative_eh_frame): Define.
6489 (elf_backend_can_make_lsda_relative_eh_frame): Define.
6490 (elf_backend_encode_eh_address): Define.
6491 (elfNN_bed): Add them.
6492
6493 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
6494
6495 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
6496 complain_on_overflow to signed.
6497
6498 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
6499
6500 * elflink.h (sort_symbol): New.
6501 (elf_link_add_object_symbols): Use a sorted symbol array for
6502 weakdef.
6503
6504 2004-02-27 Jakub Jelinek <jakub@redhat.com>
6505
6506 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
6507 for pc relative relocs.
6508 (elf_s390_relocate_section): Likewise.
6509 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
6510 for pc relative relocs.
6511 (elf_s390_relocate_section): Likewise.
6512
6513 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
6514
6515 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
6516 count_dyn_reloc.
6517
6518 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
6519
6520 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
6521 field to track if a relocation is against readonly section.
6522 (count_dyn_reloc): Take a new argument for rent->reltext.
6523 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
6524 (get_reloc_section): Don't set ia64_info->reltext here.
6525 (allocate_dynrel_entries): Set ia64_info->reltext here.
6526
6527 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
6528
6529 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
6530 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
6531 function's descriptor to symbol+offset, and map local undefweak
6532 symbol to NULL function descriptor.
6533 (elf32_frv_relocate_section): Likewise.
6534
6535 2004-02-23 Mark Kettenis <kettenis@gnu.org>
6536
6537 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
6538 M_X86_64_NETBSD.
6539 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
6540 (netbsd_core_file_p): Set architecture from machine ID for
6541 selected machines.
6542
6543 2004-02-23 Jakub Jelinek <jakub@redhat.com>
6544
6545 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
6546 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
6547
6548 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
6549
6550 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
6551 symbols with non-default visibility.
6552
6553 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
6554
6555 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
6556 IMAGE_SCN_MEM_WRITE on known sections only.
6557
6558 2004-02-20 Jakub Jelinek <jakub@redhat.com>
6559
6560 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
6561 symbols used in PIE relocs.
6562
6563 2004-02-19 Jakub Jelinek <jakub@redhat.com>
6564
6565 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
6566 .plt sh_entsize.
6567
6568 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
6569
6570 * configure.in: Update version to 2.15.90.
6571 * configure: Regenerate.
6572
6573 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
6574 Richard Sandiford <rsandifo@redhat.com>
6575
6576 * elfxx-mips.c (mips_elf_calculate_relocation): Use
6577 _bfd_elf_symbol_refs_local_p to decide whether to decay
6578 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
6579 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
6580 relocs if the symbol wasn't defined by a regular object file.
6581 Don't check the symbol's dynindx.
6582
6583 2004-02-16 Andrew Cagney <cagney@redhat.com>
6584
6585 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
6586 @bfd_file_ptr@.
6587 * bfd-in2.h: Re-generate.
6588
6589 2004-02-14 Andrew Cagney <cagney@redhat.com>
6590
6591 * configure.host (HDEFINES): When hppa*-*-hpux*, define
6592 _LARGEFILE64_SOURCE.
6593
6594 2004-02-13 Andrew Cagney <cagney@redhat.com>
6595
6596 * elf.c (vma_page_aligned_bias): New function.
6597 (assign_file_positions_except_relocs)
6598 (assign_file_positions_for_segments): Replace broken modulo
6599 arithmetic with call to vma_page_aligned_bias.
6600
6601 2004-02-11 Andrew Cagney <cagney@redhat.com>
6602
6603 * bfd-in.h: Update copyright.
6604 (bfd_tell): Change return type to file_ptr.
6605 * bfd-in2.h: Re-generate.
6606 * cache.c: Update copyright.
6607 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
6608 parameter.
6609 (close_one): Use real_ftell.
6610 * bfdio.c: Update copyright.
6611 (real_ftell, real_fseek): New functions.
6612 (bfd_tell): Use real_fseek and real_ftell, change return type to
6613 file_ptr.
6614 (bfd_seek): Use real_ftell and real_fseek, change type of
6615 file_position to a file_ptr.
6616 * libbfd-in.h: Update copyright.
6617 (real_ftell, real_fseek): Declare.
6618 * libbfd.h: Re-generate.
6619
6620 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
6621 fseeko and fseeko64. Determine bfd_file_ptr.
6622 * configure: Re-generate.
6623 * config.in: Re-generate.
6624
6625 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
6626
6627 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
6628 * elf32-h8300.c: Likewise.
6629
6630 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
6631 Nick Clifton <nickc@redhat.com>
6632
6633 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
6634 GOT entries with no associated GOT subsection.
6635
6636 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
6637
6638 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
6639 * elf.c (swap_out_syms): Use it to decide whether local section
6640 symbols should be named.
6641 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
6642 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
6643 (elf_backend_name_local_section_symbols): Define.
6644 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
6645
6646 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
6647
6648 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
6649 (elfNN_ia64_relax_section): Optimize brl to br during the relax
6650 finalize pass.
6651
6652 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
6653
6654 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
6655 to bfd_link_hash_entry passed by reference to
6656 _bfd_generic_link_add_one_symbol.
6657
6658 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
6659
6660 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
6661 relocations against dynamic symbols.
6662
6663 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
6664
6665 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
6666 change.
6667
6668 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
6669
6670 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
6671 * bfd-in2.h, libbfd.h: Rebuilt.
6672
6673 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
6674
6675 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
6676 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
6677 flag has been cleared.
6678
6679 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
6680
6681 * coff-h8300.c: Add and adjust comments about relaxation.
6682 * elf32-h8300.c: Likewise.
6683
6684 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
6685
6686 * coff-h8300.c: Fix comment typos.
6687 * elf32-h8300.c: Likewise.
6688
6689 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
6690
6691 * coff-h8300.c: Add comments about relaxation.
6692 * elf32-h8300.c: Likewise.
6693
6694 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6695
6696 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
6697 throughout.
6698 * aclocal.m4: Regenerate.
6699 * configure: Regenerate.
6700
6701 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
6702
6703 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
6704 mips_elf64_rtype_to_howto instead of using howto_table.
6705
6706 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
6707
6708 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
6709 the .plt section.
6710 (elf32_arm_check_relocs): Don't increment the PLT refcount for
6711 relocs which would not use the PLT.
6712
6713 2004-01-13 Alan Modra <amodra@bigpond.net.au>
6714
6715 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
6716 (ppc64_elf_gc_sweep_hook): Likewise.
6717 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
6718
6719 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
6720
6721 Adds linker relaxation support for bit manipulation insns like
6722 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
6723 bst, btst, bxor.
6724 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
6725 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
6726 * coff-h8300.c: Opcode for bit manipulation insn is checked in
6727 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
6728
6729 2004-01-12 Alan Modra <amodra@bigpond.net.au>
6730
6731 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
6732
6733 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
6734
6735 * elf32-h8300.c: Fix formatting.
6736
6737 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
6738
6739 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
6740 dynamic object is present. Declare r_symndx and h in an inner
6741 scope.
6742 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
6743
6744 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
6745
6746 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
6747 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
6748 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
6749 identically. Do not emit PC24 relocations for shared libraries.
6750 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
6751 identically. Don't adjust pc_count.
6752 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
6753 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
6754 adjust count for branch relocations.
6755 (allocate_dynrelocs): Correct typo in call to
6756 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
6757 PC24 or PLT32 relocs when linking.
6758
6759 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
6760
6761 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
6762 relocation howto with ARM_26 one for consistency.
6763 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
6764 that will be converted to ARM_26D ones, since we always want 'done'
6765 relocations to be reflected in section's data.
6766 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
6767 offset.
6768 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
6769 requested.
6770
6771 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
6772
6773 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
6774 are not partial_inplace during a relocatable link.
6775
6776 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
6777
6778 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
6779 if no dynamic object is present. Declare r_symndx and h in an
6780 inner scope.
6781
6782 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
6783
6784 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
6785 trampoline if it is known out of range.
6786
6787 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
6788
6789 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
6790 * elf32-frv.c (_frv_osec_readonly_p): New.
6791 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
6792 undefweak symbol.
6793 (_frv_count_got_plt_entries): Adjust expected count accordingly.
6794 (elf32_frv_relocate_section): Likewise. Error out if attempting
6795 to emit rofixups or dynamic relocs in read-only segments. Use
6796 _bfd_elf_section_offset to adjust r_offsets in rofixups and
6797 dynamic relocations.
6798 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
6799 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
6800 relocations or fixups involving merged sections correctly. Avoid
6801 crash when undefined symbol is referenced by R_FRV_32 or
6802 R_FRV_FUNCDESC_VALUE.
6803 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
6804 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
6805 input section holding local symbol to addend of R_FRV_32 or
6806 R_FRV_FUNCDESC_VALUE dynamic relocation.
6807 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
6808 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
6809 (elf32_frv_always_size_sections): Don't store pointer to
6810 __stacksize symbol in sec_info.
6811 (elf32_frv_modify_segment_map): Look it up here.
6812 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
6813 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
6814 of the lazy PLT entry, not only its offset, as the low word of a
6815 function descriptor.
6816 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
6817 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
6818 if a hash table entry already exists but is not a definition.
6819 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
6820 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
6821 (_frv_add_rofixup): Don't inline.
6822 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
6823 for undefweak symbols.
6824 (elf32_frv_relocate_section): Avoid crash while computing
6825 relocation when linking with shared library. Only emit rofixups
6826 and dynamic relocations for alloc&load sections. Mark binaries
6827 with inter-segment relocations for relocation as a unit.
6828 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
6829 (DEFAULT_STACK_SIZE): New.
6830 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
6831 emit rofixups or dynamic relocs when linking dynamic non-PIE
6832 executables.
6833 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
6834 shared libs too. Reserve the last entry for the GOT pointer.
6835 (elf32_frv_finish_dynamic_sections): Emit it.
6836 (elf32_frv_always_size_sections): New.
6837 (elf32_frv_modify_segment_map): New.
6838 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
6839 sections.
6840 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
6841 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
6842 (elf_backend_always_size_sections): New.
6843 (elf_backend_modify_segment_map): New.
6844 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
6845 * config.bfd: Added frv-*-*linux*.
6846 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
6847 ABS section, instead of crashing.
6848 (elf32_frv_relocate_section): Don't crash before warning about
6849 different segments in non-PIC relocation.
6850 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
6851 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
6852 relocs to undefweak symbols.
6853 (elf32_frv_relocate_section): Ditto for undefined symbols.
6854 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
6855 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
6856 gotfixup section was created.
6857 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
6858 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
6859 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
6860 complain_overflow_signed.
6861 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
6862 have not been allocated.
6863 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
6864 privfd only if dynamic sections were created.
6865 (elf32_frv_relocate_section): Compute gprel_segment, and use it
6866 for GPREL relocs. When linking relocatable FDPIC executables,
6867 emit warnings for relocations that would be illegal on PIE or
6868 shared libraries. Emit rofixup for R_FRV_32 only if input object
6869 is not FDPIC.
6870 (_frv_create_got_section): Define _gp symbol in the rofixup
6871 section.
6872 (elf32_frv_finish_dynamic_sections): If rofixups needed but
6873 dynamic sections missing, error out requesting -melf32frvfd.
6874 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
6875 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
6876 computation of addends from section and global or local symbol
6877 value. Change return type to bfd_boolean, and return a failure if
6878 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
6879 nonzero addend is required.
6880 (elf32_frv_relocate_section): Likewise. Print error for
6881 unsupported nonzero addends.
6882 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
6883 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
6884 force everything local.
6885 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
6886 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
6887 (frv_gotfixup_section): New.
6888 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
6889 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
6890 and relocsfdv.
6891 (_frv_add_rofixup): New.
6892 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
6893 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
6894 improve some ugly conditions.
6895 (elf32_frv_relocate_section): Likewise. Reject inter-segment
6896 relocations in fdpic.
6897 (_frv_create_got_section): Create .rofixup.got section.
6898 (struct _frv_dynamic_got_info): Added fixups.
6899 (_frv_count_got_plt_entries): Account in-GOT relocations into
6900 relocs32, relocsfd and relocsfdv. Account them into relocs or
6901 fixups, as appropriate.
6902 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
6903 sizing of gotrel.
6904 (elf32_frv_finish_dynamic_sections): Verify that the right number
6905 of relocations and fixups was generated.
6906 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
6907 relocsfdv.
6908 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
6909 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
6910 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
6911 descriptor of a (formerly-)global symbol is local.
6912 (struct frv_pic_relocs_info): Adjust comments.
6913 (_frv_emit_got_relocs_plt_entries): Adjust.
6914 (elf32_frv_relocate_section): Likewise.
6915 (_frv_count_got_plt_entries): Likewise.
6916 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
6917 symbol's value to addend in the common preamble. Decay dynamic
6918 symbols to section+offset if they bind or call locally, for GOT
6919 and FUNCDESC_VALUE, respectively.
6920 (elf32_frv_relocate_section): Likewise.
6921 (elf32_frv_check_relocs): Don't register as dynamic symbols of
6922 internal or hidden visibility.
6923 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
6924 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
6925 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
6926 (elf32_frv_relocate_section): Pass relocation addend in. Use
6927 original relocation addend to look up the got relocs/plt entries
6928 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
6929 processing relocations that reference .scommon symbols.
6930 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
6931 Introduce support for dynamic linking.
6932 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
6933 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
6934 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
6935 (frv_reloc_type_lookup): Return REL howtos for executables and
6936 dynamic libraries.
6937 (frv_info_to_howto_rel): New.
6938 (struct frv_elf_link_hash_table): New.
6939 (frv_hash_table, frv_got_section, frv_gotrel_section,
6940 frv_plt_section, frv_pltrel_section, frv_relocs_info,
6941 frv_got_initial_offset, frv_plt_initial_offset): New macros.
6942 (frv_elf_link_hash_table_create): New.
6943 (struct frv_pic_relocs_info): New.
6944 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
6945 (frv_pic_relocs_info_find): New.
6946 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
6947 New.
6948 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
6949 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
6950 (_frv_emit_got_relocs_plt_entries): New.
6951 (elf32_frv_relocate_section): Add support for dynamic linking.
6952 Handle new relocations.
6953 (_frv_create_got_section): New.
6954 (elf32_frv_create_dynamic_sections): New.
6955 (ELF_DYNAMIC_INTERPRETER): New.
6956 (struct _frv_dynamic_got_info): New.
6957 (_frv_count_got_plt_entries): New.
6958 (struct _frv_dynamic_got_plt_info): New.
6959 (_frv_compute_got_alloc_data): New.
6960 (_frv_get_got_entry, _frv_get_fd_entry): New.
6961 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
6962 (_frv_resolve_final_relocs_info): New.
6963 (elf32_frv_size_dynamic_sections): New.
6964 (elf32_frv_finish_dynamic_sections): New.
6965 (elf32_frv_adjust_dynamic_symbol): New.
6966 (elf32_frv_finish_dynamic_symbol): New.
6967 (elf32_frv_check_relocs): Handle new relocs. Explain how the
6968 whole thing works.
6969 (elf_info_to_howto_rel): Define.
6970 (bfd_elf32_bfd_link_hash_table_create): Define.
6971 (elf_backend_create_dynamic_sections): Define.
6972 (elf_backend_adjust_dynamic_symbol): Define.
6973 (elf_backend_size_dynamic_sections): Define.
6974 (elf_backend_finish_dynamic_symbol): Define.
6975 (elf_backend_finish_dynamic_sections): Define.
6976 (elf_backend_want_got_sym): Define.
6977 (elf_backend_got_header_size): Define.
6978 (elf_backend_want_got_plt): Define.
6979 (elf_backend_plt_readonly): Define.
6980 (elf_backend_want_plt_sym): Define.
6981 (elf_backend_plt_header_size): Define.
6982 (elf_backend_may_use_rel_p): Define.
6983 (elf_backend_may_use_rela_p): Define.
6984 (elf_backend_default_use_rela_p): Define.
6985 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
6986 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
6987 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
6988 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
6989 (frv_reloc_map): Map the corresponding BFD relocs to them.
6990 (frv_reloc_type_lookup): ... and back to BFD relocs.
6991 * reloc.c: New relocs.
6992 * bfd-in2.h, libbfd.h: Rebuilt.
6993 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
6994 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
6995 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
6996 R_FRV_FUNCDESC_GOTLO): New.
6997 (frv_reloc_map): Map the corresponding BFD relocs to them.
6998 (frv_reloc_type_lookup): ... and back to BFD relocs.
6999 * reloc.c: New relocs.
7000 * bfd-in2.h, libbfd.h: Rebuilt.
7001
7002 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7003
7004 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7005 targets to support pages of up to 64kB.
7006 (elf32_bed): Redefine to get a separate backend data structure for
7007 traditional targets.
7008 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7009 targets to support pages of up to 64kB.
7010 (elf64_bed): Redefine to get a separate backend data structure for
7011 traditional targets.
7012 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7013 targets to support pages of up to 64kB.
7014 (elf32_bed): Redefine to get a separate backend data structure for
7015 traditional targets.
7016
7017 2004-01-04 Mark Kettenis <kettenis@gnu.org>
7018
7019 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
7020
7021 2004-01-02 Mark Kettenis <kettenis@gnu.org>
7022
7023 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
7024 (elf_i386_grok_psinfo): Likewise.
7025
7026 2004-01-02 Bernardo Innocenti <bernie@develer.com>
7027
7028 * config.bfd: Add m68k-uClinux target.
7029
7030 2004-01-01 Grant Edwards <grante@visi.com>
7031
7032 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
7033 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
7034 (elf32_h8_gc_sweep_hook): New function.
7035 (elf_backend_gc_mark_hook): Define.
7036 (elf_backend_gc_sweep_hook): Define.
7037 (elf_backend_can_gc_sections): Define.
7038
7039 For older changes see ChangeLog-0203
7040 \f
7041 Local Variables:
7042 mode: change-log
7043 left-margin: 8
7044 fill-column: 74
7045 version-control: never
7046 End:
This page took 0.202572 seconds and 5 git commands to generate.