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